Look for firmware in /usr/lib/firmware as well as /lib/firmware

Closes: #1059858
This commit is contained in:
Steve McIntyre 2024-01-02 15:55:46 +00:00
parent b1f66d7191
commit 4f8c844f81
4 changed files with 13 additions and 6 deletions

2
debian/changelog vendored
View File

@ -7,6 +7,8 @@ debian-cd (3.2.2) UNRELEASED; urgency=medium
control which packages are included - see control which packages are included - see
tasks/$codename/firmware-exclude. Closes: #1032071 tasks/$codename/firmware-exclude. Closes: #1032071
* Tweak sizes slightly for BD media. * Tweak sizes slightly for BD media.
* Look for firmware in /usr/lib/firmware as well as /lib/firmware.
Closes: #1059858
[ Guido Berhoerster ] [ Guido Berhoerster ]
* Update DebianEdu installer banner and syslinux splash image * Update DebianEdu installer banner and syslinux splash image

View File

@ -240,7 +240,7 @@ install_firmwares_initrd () {
for FILE in $FILES; do for FILE in $FILES; do
dpkg -x "${MIRROR}/${FILE}" ${FWDIR} dpkg -x "${MIRROR}/${FILE}" ${FWDIR}
done done
(cd ${FWDIR} ; find lib/firmware | cpio -oA -H newc -F $initrd) (cd ${FWDIR} ; find lib/firmware -o usr/lib/firmware | cpio -oA -H newc -F $initrd)
pigz -9nm $initrd pigz -9nm $initrd
rm -fr $FWDIR rm -fr $FWDIR
else else

View File

@ -240,7 +240,7 @@ install_firmwares_initrd () {
for FILE in $FILES; do for FILE in $FILES; do
dpkg -x "${MIRROR}/${FILE}" ${FWDIR} dpkg -x "${MIRROR}/${FILE}" ${FWDIR}
done done
(cd ${FWDIR} ; find lib/firmware | cpio -oA -H newc -F $initrd) (cd ${FWDIR} ; find lib/firmware -o usr/lib/firmware | cpio -oA -H newc -F $initrd)
pigz -9nm $initrd pigz -9nm $initrd
rm -fr $FWDIR rm -fr $FWDIR
else else

View File

@ -5,8 +5,10 @@
# Work out which firmware packages we need # Work out which firmware packages we need
# Several steps: # Several steps:
# #
# 1. Look for packages which contain "firmware" or "microcode" in their package names # 1. Look for packages which contain "firmware" or "microcode" in
# 2. Check each of those packages to see if they contain files in /lib/firmware # their package names
# 2. Check each of those packages to see if they contain files in
# /lib/firmware or /usr/lib/firmware
# 3. For those that do, output the package name into the firmware task # 3. For those that do, output the package name into the firmware task
# #
# Copyright Steve McIntyre <93sam@debian.org> 2011 # Copyright Steve McIntyre <93sam@debian.org> 2011
@ -29,12 +31,15 @@ my $cpp_command;
my %excluded; my %excluded;
sub contains_firmware($$) { sub contains_firmware($$) {
my ($mirror, $filename) = @_;
my $count = 0; my $count = 0;
open (PKGLISTING, "dpkg --contents $mirror/$filename | grep ' ./lib/firmware/' |") or open (PKGLISTING, "dpkg --contents $mirror/$filename |") or
die "Can't check package file $filename: $!\n"; die "Can't check package file $filename: $!\n";
while ($_ = <PKGLISTING>) { while ($_ = <PKGLISTING>) {
$count++; $_ =~ /\.\/lib\/firmware\// and $count++;
$_ =~ /\.\/usr\/lib\/firmware\// and $count++;
} }
close PKGLISTING;
if ($count) { if ($count) {
return 1; return 1;
} else { } else {