[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#956663: marked as done (initramfs-tools-core: update-initramfs does not search all the firmware paths the kernel does)



Your message dated Tue, 28 Apr 2020 17:33:36 +0000
with message-id <E1jTU6y-000BBM-Fh@fasolo.debian.org>
and subject line Bug#956663: fixed in initramfs-tools 0.137
has caused the Debian Bug report #956663,
regarding initramfs-tools-core: update-initramfs does not search all the firmware paths the kernel does
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
956663: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=956663
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: initramfs-tools-core
Version: 0.133+deb10u1
Severity: normal
Tags: patch

Dear Maintainer,

   * What led up to the situation?

I like to keep up with the official kernel releases. As a result the firmware
they wind up requiring is newer than what is available in firmware packages.

I'd like to install these from the git repo but also want to keep using
some firmware package from debian (cpu microcode patches for example).

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

I placed the firmware from the git repo in /lib/firmware/updates/ which
the kernel searches before /lib/firmware.

   * What was the outcome of this action?

Kernel can find them but update-initramfs cannot.

   * What outcome did you expect instead?

update-initramfs look in all the places the kernel does and copies the files
as appropriate.

I have attached an initial patch that solves this. I am currently using the
resultng code and it is working fine for me.

The one thing the patch does not do is allow for a custom location that can
be provided to the kernel to search first.

This is because that's a little more complicated and requires a decision wrt
where to specify this location (ie the config file?).

I can do that work also if it'll help get the patch in.

-- System Information:
Debian Release: 10.3
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable'), (100, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.6.3-local.20200409-123516 (SMP w/6 CPU cores; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE=en_AU:en (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages initramfs-tools-core depends on:
ii  coreutils    8.30-3
ii  cpio         2.12+dfsg-9
ii  e2fsprogs    1.44.5-1+deb10u3
ii  klibc-utils  2.0.6-1
ii  kmod         26-1
ii  udev         241-7~deb10u3

Versions of packages initramfs-tools-core recommends:
ii  busybox  1:1.30.1-4
ii  pigz     2.4-1

Versions of packages initramfs-tools-core suggests:
pn  bash-completion  <none>

-- no debconf information
--- a/hook-functions	2020-04-09 11:39:18.061168163 +1000
+++ b/hook-functions	2020-04-09 11:51:05.621625010 +1000
@@ -53,7 +53,7 @@
 # Add dependent modules + eventual firmware
 manual_add_modules()
 {
-	local prefix kmod options firmware
+	local prefix kmod options firmware fwloc
 
 	if [ $# -eq 0 ]; then
 		return
@@ -76,15 +76,19 @@
 
 		# Add required firmware
 		for firmware in $(modinfo -k "${version}" -F firmware "${kmod}"); do
-			if [ -e "${DESTDIR}/lib/firmware/${firmware}" ] \
-			|| [ -e "${DESTDIR}/lib/firmware/${version}/${firmware}" ]; then
+			if [ -e "${DESTDIR}/lib/firmware/updates/${version}/${firmware}" ] \
+			|| [ -e "${DESTDIR}/lib/firmware/updates/${firmware}" ] \
+			|| [ -e "${DESTDIR}/lib/firmware/${version}/${firmware}" ] \
+			|| [ -e "${DESTDIR}/lib/firmware/${firmware}" ]; then
 				continue
 			fi
 
 			# Only print warning for missing fw of loaded module
 			# or forced loaded module
-			if [ ! -e "/lib/firmware/${firmware}" ] \
-			&& [ ! -e "/lib/firmware/${version}/${firmware}" ] ; then
+			if [ ! -e "/lib/firmware/updates/${version}/${firmware}" ] \
+			&& [ ! -e "/lib/firmware/updates/${firmware}" ] \
+			&& [ ! -e "/lib/firmware/${version}/${firmware}" ] \
+			&& [ ! -e "/lib/firmware/${firmware}" ]; then
 				# Only warn about missing firmware if
 				# /proc/modules exists
 				if [ ! -e /proc/modules ] ; then
@@ -99,12 +103,15 @@
 				continue
 			fi
 
-			if [ -e "/lib/firmware/${version}/${firmware}" ]; then
-				copy_file firmware \
-					"/lib/firmware/${version}/${firmware}"
-			else
-				copy_file firmware "/lib/firmware/${firmware}"
-			fi
+			for fwloc in "/lib/firmware/updates/${version}/${firmware}" \
+				"/lib/firmware/updates/${firmware}" \
+				"/lib/firmware/${version}/${firmware}" \
+				"/lib/firmware/${firmware}"; do
+				if [ -e "$fwloc" ]; then
+					copy_file firmware "$fwloc"
+					break
+				fi
+			done
 		done
 	done
 }

--- End Message ---
--- Begin Message ---
Source: initramfs-tools
Source-Version: 0.137
Done: Ben Hutchings <benh@debian.org>

We believe that the bug you reported is fixed in the latest version of
initramfs-tools, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 956663@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Ben Hutchings <benh@debian.org> (supplier of updated initramfs-tools package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Tue, 28 Apr 2020 04:56:17 +0100
Source: initramfs-tools
Architecture: source
Version: 0.137
Distribution: unstable
Urgency: medium
Maintainer: Debian kernel team <debian-kernel@lists.debian.org>
Changed-By: Ben Hutchings <benh@debian.org>
Closes: 950254 955347 956663 958851
Changes:
 initramfs-tools (0.137) unstable; urgency=medium
 .
   [ Ben Hutchings ]
   * [1b28d25] Document copy_exec as usable for shared libraries
   * [f2ac13e] hook-functions: copy_exec: Copy libgcc_s.so.1 along with
     libpthread.so.* (Closes: #950254)
   * [d96228a] hook-functions: copy_exec: Correct verbose log message for
     symlinks
   * [dd5fb36] hook-functions: Factor out device class walking into a function
   * [14a00af] hook-functions: Don't add backlight modules if we have generic
     fb device (Closes: #955347)
   * [f6133e1] Fix new shellcheck warnings around unquoted parameter expansion
     (Closes: #958851)
 .
   [ AP ]
   * [857042c] hook-functions: Search for firmware under /lib/firmware/updates
     (Closes: #956663)
Checksums-Sha1:
 acd33330a982a67cad4d40efb9385b6fb45f0695 1839 initramfs-tools_0.137.dsc
 48528fad1c4f943fec68f69977e2c551c354b0bb 92108 initramfs-tools_0.137.tar.xz
 545ef2ee4e4072f9c1f614b12c6bcf202b5bc9d7 6668 initramfs-tools_0.137_source.buildinfo
Checksums-Sha256:
 1c4d31bc83df9cb1ae90547778ed3cccb06f6b13866fd9fdc87e9b157c22bf2a 1839 initramfs-tools_0.137.dsc
 ec1faba93b08e20d1e0ea82d3041196b1e9228d06e908fd046281b2088af1604 92108 initramfs-tools_0.137.tar.xz
 3e62191f13ce44a421acae60d3242a024f666367afd6b42b7d3281cedaf55319 6668 initramfs-tools_0.137_source.buildinfo
Files:
 ffbaf7605598974cfed141c376559613 1839 utils optional initramfs-tools_0.137.dsc
 8efb9dcf33783021ca123289cff36eef 92108 utils optional initramfs-tools_0.137.tar.xz
 05ff70cdfd8edf22987f7122d34b6d55 6668 utils optional initramfs-tools_0.137_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEErCspvTSmr92z9o8157/I7JWGEQkFAl6oZzkACgkQ57/I7JWG
EQnpUA/9GbEa2CUu6YPfbRUX0zNMGXJO9Nq3aSIWkxYt6dz60jSPMlrjD/Gjm8Vs
I8eqaDTSJgMWX34nrrkETZSER3mkWrYtEISYZu88cthd5sxbSy/J6qTfy0ub8rqe
BuRnU8bOwBuKrruLi2afYr/4HYNB13hoLPLYDeP8/qje86Pz48rFONkLQvfnRCnf
UtSyWVih/XX+iK9USFvPfCPq/T0QQo1updY2/TUpSYP52UsEF65E2G6UGegPFjpm
4wAlxx6WWSIw5ULTpAjjx9ic/ECBHMdGyewuZblLt2RZevkQyvMeQ363Ti+bNsVD
geqBu0YJP5+7CeDzmeE2JRUHsgUZKhlQG4oEHSZHoidboezxgD44LsIuAOVWUM1W
peukFcaqzzBmncqDBToflcVN5Kdms9Yqtq472uh2tbuAInKHVsP8faOtSXaeA/JI
oug/ppnn2DMfqXPQ3DgP2vselPnYcThnzivGTYWAcqXAa3tS4UD91D3vP+LbYa1w
Xveq2PC78qYbroOOz0kEh/lxDypz69/zrrWwUAEYGwZYOGzC8F1P3dFGedTzrL/4
OAksu5Ns1xlqJ9KS+TjXWnrSnHOLauTnPuDV4QZbRGoRkNLyY3U0RTJZTdwYVgk1
QWL1aO05Ba0TNRKn42ZwwmeLs6Q0hAQTd7fx0ticaJRTkD42gU0=
=flr9
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: