Traditionally Android-x86 use `PRODUCT_COPY_FILES` to copy firmware to /system/lib/firmware. This still being used today, however it have a few issues, especially if you use this method with newer linux-firmware repo:
- It doesn't symlinks all the firmware, especially with brcm and nvidia
- It will create errors, especially with newer AOSP builds like s-x86 or t-x86 due to the fact that some brcm firmware have spaces.
Thankfully, on linux-firmware repo there is a script called copy-firmware.sh. What this script does is that it will read a file inside called WHENCE to check which file need to copy or which file need to symlink and then do all of that in a specified output. I tried this script and it works perfectly with BlissOS 15.8.2 (s-x86) so far. If anyone interested in using it here's what I did :
- For r-x86 and above, whitelist "install" command
- Remove
firmware.mk and Android.mk out from device/generic/firmware