CentOS 7 linux-firmware - how to trim it?
Clash 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?
centos rpm firmware
add a comment |Â
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?
centos rpm firmware
add a comment |Â
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?
centos rpm firmware
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
centos rpm firmware
asked Aug 29 at 10:21
Paul D Smith
213
213
add a comment |Â
add a comment |Â
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:
- Download the
linux-firmware
source 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
%package -n
and%file -n
code to create a new sub-package (let's call itunwanted-firmware
) - 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
unwanted-firmware
- 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.
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 anunwanted-firmware
RPM but the files inside are still in thelinux-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
add a comment |Â
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:
- Download the
linux-firmware
source 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
%package -n
and%file -n
code to create a new sub-package (let's call itunwanted-firmware
) - 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
unwanted-firmware
- 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.
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 anunwanted-firmware
RPM but the files inside are still in thelinux-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
add a comment |Â
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:
- Download the
linux-firmware
source 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
%package -n
and%file -n
code to create a new sub-package (let's call itunwanted-firmware
) - 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
unwanted-firmware
- 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.
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 anunwanted-firmware
RPM but the files inside are still in thelinux-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
add a comment |Â
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:
- Download the
linux-firmware
source 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
%package -n
and%file -n
code to create a new sub-package (let's call itunwanted-firmware
) - 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
unwanted-firmware
- 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.
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-firmware
source 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
%package -n
and%file -n
code to create a new sub-package (let's call itunwanted-firmware
) - 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
unwanted-firmware
- 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.
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 anunwanted-firmware
RPM but the files inside are still in thelinux-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
add a comment |Â
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 anunwanted-firmware
RPM but the files inside are still in thelinux-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
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password