Skip to content

Extract firmware files for rtl8703b wifi chip

License

Notifications You must be signed in to change notification settings

airtower-luna/rtw8703b-fw-extractor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RTL8723CS/RTL8703B firmware extractor

The vendor 8723cs driver in megi's tree that's commonly used on the Pinephone today contains its firmware as huge byte arrays, which doesn't work nicely with the modern Linux firmware infrastructure. The code in this repository compiles them into a binary which writes them to disk as binary files.

The files hal8703b_fw.h and hal8703b_fw.c have been copied verbatim from the vendor driver. drv_types.h is a compatibility header that defines types and macros used in the former files, and rtw8703b_fw.c is the tool that takes the arrays and writes them to disk.

Naming

RTL8723CS is the name of the combined wifi/bluetooth chip in the Pinephone, according to the vendor code the wifi component is called RTL8703B. I'm using the rtw prefix for this tool because it matches the rtw88 based driver I'm experimenting with.

Usage

Assuming you have make and GCC, calling make should be all that's needed:

$ make
gcc -fPIC -DCONFIG_RTL8703B -c -o rtw8703b_fw.o rtw8703b_fw.c
gcc -fPIC -DCONFIG_RTL8703B -c -o hal8703b_fw.o hal8703b_fw.c
gcc -DCONFIG_RTL8703B -o rtw8703b_fw rtw8703b_fw.o hal8703b_fw.o
./rtw8703b_fw
rtw8703b_ap_fw.bin: 19994 bytes
rtw8703b_fw.bin: 20290 bytes
rtw8703b_wow_fw.bin: 23074 bytes

The resulting *.bin files are the firmware binaries. For use with my experimental rtw88_8703b/rtw88_8723cs driver place rtw8703b_fw.bin and rtw8703b_wow_fw.bin in /lib/firmware/rtw88/. If you have this repository on the system where you want to use the driver, you can also run make install (requires sudo permission).

About

Extract firmware files for rtl8703b wifi chip

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages