Page MenuHomeFreeBSD

rtlbtfw: add firmware to base
Needs ReviewPublic

Authored by vexeduxr on Wed, Sep 23, 12:36 AM.
Tags
None
Referenced Files
F174192876: D59920.diff
Thu, Oct 1, 6:49 AM
F174123917: D59920.id187721.diff
Wed, Sep 30, 7:00 PM
F174107616: D59920.diff
Wed, Sep 30, 4:35 PM
Unknown Object (File)
Tue, Sep 29, 11:48 PM
Unknown Object (File)
Tue, Sep 29, 11:47 PM
Unknown Object (File)
Tue, Sep 29, 6:31 PM
Unknown Object (File)
Tue, Sep 29, 6:31 PM
Unknown Object (File)
Tue, Sep 29, 6:31 PM
Subscribers

Details

Reviewers
adrian
wulf
Group Reviewers
srcmgr
Summary

Add the firmware for supported chips to base. For the RTL8723BU at
least, this makes bluetooth, along with wifi, "just work" in base.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 77429
Build 74312: arc lint + arc unit

Event Timeline

I believe we prefer to not uuencode firmware blobs. That practice came from when we used version control systems with poor(er) support for binary files, and it's largely unneeded now.

oh yeah, vex, we should just figure out how to check in the binary file now and not the uuencoded one.

I need to do a pass over all the other realtek firmware in the src tree and un-uuencode it too. (but not part of this commit.)

  • Please import all supported firmwares. See rtlbt_fw.cc for the list.
  • Install firmwares to /usr/share/firmware/rtlbt rather than to /usr/share/firmware to not produce mess.
  • Add LICENSE file from rtwn

    /sys file hierarchy is for kernel. May be it is better to use /share/firmware or /usr.sbin/b;uetooth? I do not have strong opinion about that.
usr.sbin/bluetooth/rtlbtfw/Makefile
19

This .for loop can be replaced with multi-target entry, but FreeBSD uses loops everywhere for reason unknown to me.

${FIRMWARE_FILES}:       path/to/${.TARGET}.uu
        uudecode -p ${.ALLSRC} > ${.TARGET}
usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf
200

Just add all required firmwares instead of this hack.

emaste added inline comments.
usr.sbin/bluetooth/rtlbtfw/Makefile
19

Probably just gets copied from existing examples over and over. But as already commented we should just drop the uudecoding altogether.

usr.sbin/bluetooth/rtlbtfw/Makefile
19

Oh, I wasn't aware we could use ${.TARGET} like that. But yeah I'll drop the uudecoding.

vexeduxr retitled this revision from rtlbtfw: add some firmware to base to rtlbtfw: add firmware to base.Sat, Sep 26, 2:07 AM
vexeduxr edited the summary of this revision. (Show Details)

Move firmware files to share/firmwares/rtlbt
Add all firmware files from the rtlbt-firmware port except for rtl8761b (which isn't used by rtlbtfw), and the SDIO chips since they do bluetooth over UART, which we don't support.

LGTM.

Some nits:

  1. List of unsupported firmware files that can be deleted:
  • rtl8192eu_fw.bin
  • rtl8761cu_config.bin
  • rtl8761cu_fw.bin
  • rtl8812ae_fw.bin
  • rtl8852cu_fw.bin
  1. It is better to use linuxfirmwares repo rather then port as source of files as latter may be somewhat stalled.
  2. MK_BLUETOOTH section of tools/build/mk/OptionalObsoleteFiles.inc should be updated too.
This revision is now accepted and ready to land.Mon, Sep 28, 11:36 AM
  • Remove firmware for unsupported chips
  • Add firmware files to OptionalObsoleteFiles.inc
  • Update firmware blobs from the linux repo. Updated: rtl8852au_fw.bin, rtl8852btu_fw.bin, and rtl8852bu_fw.bin
  • Remove duplicate config files and replace them with symlinks
  • Drop CLEANFILES, since the files aren't uuencoded anymore

I also moved the firmware files to usr.sbin/bluetooth/contrib/rtlbt.
I think that's more fitting, since share/firmwares seems to just contain Makefiles for installing firmware, not the binary blobs themselves. It also felt odd not having it under a contrib/ directory.

This revision now requires review to proceed.Mon, Sep 28, 9:58 PM