CentOS 7 has merged a number of firmware packages into 'linux-firmware' and made these a dependency of kernels. Is there an easy way to create a stripped down version of this, removing those firmware packages that I know I don't need because I never installed them for CentOS 6 on the same platforms?
First it is worth mentioning that the
linux-firmware source RPM in the source for a number of RPMs, one of which is
linux-firmware plus some other (typically WiFi related) firmware files. It looks like the mechanism that is used to split the source files between the different RPMs can be used to trim
linux-firmware further, if you are careful.
The process looks like it should be this:
- Download the
linux-firmwaresource RPM and install it
- Copy the SPEC file, update the version (add a prefix) so that you can distinguish your version from the original and save as a new SPEC file.
- Copy the existing
%file -ncode to create a new sub-package (let's call it
- In the SOURCE directory, untar the source files so that you can see what source you will/not want
- Identify all unwanted source (for example I know there are no WiFi cards or Radeon video cards in the hardware I'm using) and add the appropriate files to the list of files for
- When done, rebuild
linux-firmware, remembering to use the updated SPEC file.
You should end up with your smaller, custom
linux-firmware RPM, a new
unwanted-firmware RPM and the other additional firmware files that
You will want to thoroughly test your new system and check logs etc for broken firmware; if you find some then you might need to tweak your
unwanted-firmware file list.