2

I am trying to reduce the amount of firmware that is included in a Yocto image to reduce its size. for example I have these i915/bxt_dmc_ver1_07.bin and i915/bxt_guc_ver9_29.bin, which are not needed.

My Yocto project build platform has this recipe linux-firmware_git.bb at meta/recipes-kernel/linux-firmware. Obviously I can edit this file to exclude items of firmware. But because it is one of the base files of the distribution I'm using I want to leave it intact.

I have tried creating a linux-firmware_git.bbappend file which contains the following entries:

LICENSE_${PN}-i915       = ""
LICENSE_${PN}-i915-license = ""
FILES_${PN}-i915-license = ""
FILES_${PN}-i915-license = ""
FILES_${PN}-i915-license = ""
FILES_${PN}-i915         = ""
RDEPENDS_${PN}-i915      = ""

Unfortunately this bbappend prevents all firmware being installed in the image rather than just excluding the *-i915 files.

Could someone please tell my how to override the linux-firmware recipe so that unneeded files are excluded.

Thanks in advance

Andrew

Andrew Ellis
  • 129
  • 2
  • 11

1 Answers1

2

After much digging around, I found it was quite easy to achieve what I wanted.

To remove particular items firmware, eg i915, I needed to do this:

FILES_${PN}_remove += "${nonarch_base_libdir}/firmware/LICENSE.i915 \
                       ${nonarch_base_libdir}/firmware/i915"

RDEPENDS_${PN}-i915      = "${PN}-i915-license"

do_install_append() {        
   rm -r ${D}/${nonarch_base_libdir}/firmware/i915
}

I hope this is helpful to others.

Andrew Ellis
  • 129
  • 2
  • 11