CentOS 7 linux-firmware - how to trim it?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












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?










share|improve this question

























    up vote
    1
    down vote

    favorite












    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?










    share|improve this question























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      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?










      share|improve this question













      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?







      centos rpm firmware






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Aug 29 at 10:21









      Paul D Smith

      213




      213




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote













          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:



          1. Download the linux-firmware source RPM and install it

          2. 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.

          3. Copy the existing %package -n and %file -n code to create a new sub-package (let's call it unwanted-firmware)

          4. In the SOURCE directory, untar the source files so that you can see what source you will/not want

          5. 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 unwanted-firmware

          6. 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 linux-firmware creates.



          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.






          share|improve this answer




















          • There's a nasty gotcha. The SPEC file has code to trim the 'everything' list of files down to remove those placed into other firmware files. This code does not seem to work properly for %dir lists so my initial attempt has created an unwanted-firmware RPM but the files inside are still in the linux-firmware RPM too :-(.
            – Paul D Smith
            Aug 29 at 13:00










          • In the SPEC file, about line 295, you will find this: sed -i -e '/^iwlwifi/d' linux-firmware.files (split over two lines) Look carefully because this is trimming files from the iwlwifi directory! You want to add your extra directories here and also be careful because some directory names clash with files that you might also want to trim. But there is plenty of fat to trim here if you need to.
            – Paul D Smith
            Sep 3 at 9:59











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f465467%2fcentos-7-linux-firmware-how-to-trim-it%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote













          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:



          1. Download the linux-firmware source RPM and install it

          2. 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.

          3. Copy the existing %package -n and %file -n code to create a new sub-package (let's call it unwanted-firmware)

          4. In the SOURCE directory, untar the source files so that you can see what source you will/not want

          5. 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 unwanted-firmware

          6. 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 linux-firmware creates.



          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.






          share|improve this answer




















          • There's a nasty gotcha. The SPEC file has code to trim the 'everything' list of files down to remove those placed into other firmware files. This code does not seem to work properly for %dir lists so my initial attempt has created an unwanted-firmware RPM but the files inside are still in the linux-firmware RPM too :-(.
            – Paul D Smith
            Aug 29 at 13:00










          • In the SPEC file, about line 295, you will find this: sed -i -e '/^iwlwifi/d' linux-firmware.files (split over two lines) Look carefully because this is trimming files from the iwlwifi directory! You want to add your extra directories here and also be careful because some directory names clash with files that you might also want to trim. But there is plenty of fat to trim here if you need to.
            – Paul D Smith
            Sep 3 at 9:59















          up vote
          1
          down vote













          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:



          1. Download the linux-firmware source RPM and install it

          2. 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.

          3. Copy the existing %package -n and %file -n code to create a new sub-package (let's call it unwanted-firmware)

          4. In the SOURCE directory, untar the source files so that you can see what source you will/not want

          5. 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 unwanted-firmware

          6. 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 linux-firmware creates.



          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.






          share|improve this answer




















          • There's a nasty gotcha. The SPEC file has code to trim the 'everything' list of files down to remove those placed into other firmware files. This code does not seem to work properly for %dir lists so my initial attempt has created an unwanted-firmware RPM but the files inside are still in the linux-firmware RPM too :-(.
            – Paul D Smith
            Aug 29 at 13:00










          • In the SPEC file, about line 295, you will find this: sed -i -e '/^iwlwifi/d' linux-firmware.files (split over two lines) Look carefully because this is trimming files from the iwlwifi directory! You want to add your extra directories here and also be careful because some directory names clash with files that you might also want to trim. But there is plenty of fat to trim here if you need to.
            – Paul D Smith
            Sep 3 at 9:59













          up vote
          1
          down vote










          up vote
          1
          down vote









          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:



          1. Download the linux-firmware source RPM and install it

          2. 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.

          3. Copy the existing %package -n and %file -n code to create a new sub-package (let's call it unwanted-firmware)

          4. In the SOURCE directory, untar the source files so that you can see what source you will/not want

          5. 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 unwanted-firmware

          6. 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 linux-firmware creates.



          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.






          share|improve this answer












          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:



          1. Download the linux-firmware source RPM and install it

          2. 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.

          3. Copy the existing %package -n and %file -n code to create a new sub-package (let's call it unwanted-firmware)

          4. In the SOURCE directory, untar the source files so that you can see what source you will/not want

          5. 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 unwanted-firmware

          6. 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 linux-firmware creates.



          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.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Aug 29 at 12:12









          Paul D Smith

          213




          213











          • There's a nasty gotcha. The SPEC file has code to trim the 'everything' list of files down to remove those placed into other firmware files. This code does not seem to work properly for %dir lists so my initial attempt has created an unwanted-firmware RPM but the files inside are still in the linux-firmware RPM too :-(.
            – Paul D Smith
            Aug 29 at 13:00










          • In the SPEC file, about line 295, you will find this: sed -i -e '/^iwlwifi/d' linux-firmware.files (split over two lines) Look carefully because this is trimming files from the iwlwifi directory! You want to add your extra directories here and also be careful because some directory names clash with files that you might also want to trim. But there is plenty of fat to trim here if you need to.
            – Paul D Smith
            Sep 3 at 9:59

















          • There's a nasty gotcha. The SPEC file has code to trim the 'everything' list of files down to remove those placed into other firmware files. This code does not seem to work properly for %dir lists so my initial attempt has created an unwanted-firmware RPM but the files inside are still in the linux-firmware RPM too :-(.
            – Paul D Smith
            Aug 29 at 13:00










          • In the SPEC file, about line 295, you will find this: sed -i -e '/^iwlwifi/d' linux-firmware.files (split over two lines) Look carefully because this is trimming files from the iwlwifi directory! You want to add your extra directories here and also be careful because some directory names clash with files that you might also want to trim. But there is plenty of fat to trim here if you need to.
            – Paul D Smith
            Sep 3 at 9:59
















          There's a nasty gotcha. The SPEC file has code to trim the 'everything' list of files down to remove those placed into other firmware files. This code does not seem to work properly for %dir lists so my initial attempt has created an unwanted-firmware RPM but the files inside are still in the linux-firmware RPM too :-(.
          – Paul D Smith
          Aug 29 at 13:00




          There's a nasty gotcha. The SPEC file has code to trim the 'everything' list of files down to remove those placed into other firmware files. This code does not seem to work properly for %dir lists so my initial attempt has created an unwanted-firmware RPM but the files inside are still in the linux-firmware RPM too :-(.
          – Paul D Smith
          Aug 29 at 13:00












          In the SPEC file, about line 295, you will find this: sed -i -e '/^iwlwifi/d' linux-firmware.files (split over two lines) Look carefully because this is trimming files from the iwlwifi directory! You want to add your extra directories here and also be careful because some directory names clash with files that you might also want to trim. But there is plenty of fat to trim here if you need to.
          – Paul D Smith
          Sep 3 at 9:59





          In the SPEC file, about line 295, you will find this: sed -i -e '/^iwlwifi/d' linux-firmware.files (split over two lines) Look carefully because this is trimming files from the iwlwifi directory! You want to add your extra directories here and also be careful because some directory names clash with files that you might also want to trim. But there is plenty of fat to trim here if you need to.
          – Paul D Smith
          Sep 3 at 9:59


















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f465467%2fcentos-7-linux-firmware-how-to-trim-it%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay