On Sat, 29 Mar 2025 16:37:48 +0100 (GMT+01:00)
=?UTF-8?Q?=C3=89ric_Valette?= <eric.vale...@free.fr> wrote:
I would rater suspect an initramfs-tool script issue as the kernel is perfectly able to
load the firmware but I suspect the location path is not what kernel expects : the path
I see when inspecting the initrd 147 content has "early" before the path the
kernel expects. A bind mount or whatever May be missing.
I should add that I tested with m'y own generated kernel but also with official
debian 6.12.20. Résultat is the same.
Indeed the culprit was initrd content but due to the hook that comes
with amd64-microcode package...
I have another amd machine that I recently installed and there update
early was working. Looked at initrd content but it was vastly different
as this one had no busybox installed.
So removed busybox, and anything that made initrd content much different
(beside the modules I mean).
Then looking at AuthenticAMD.bin I realized they had different size
while version of the amd ucode package was the same.
Did a cat /usr/lib/firmware/amd-ucode/*.bin > /tmp/AuthenticAMD.bin
And then size was identical to working one and binary placed in initrd
did the update!
So I found the root reasons. Part is my fault, part is the
/usr/share/initramfs-tools/hooks/amd64_microcode script that is not
defensive enough.
As long as the hook has a simple cat *.bin, it has been working but,
judging from comments, due to reproducible build someone introduced a
complex find command that mostly do and additional sort on name
(overkill to my taste but...) that presuppose only .bin file are in the
firmware/amd-ucode directory.
The things is that when I bought my laptop long time ago, it was one of
the first total amd device (cpu/ gpu discrete gpu) and it was requiring
recent BIOS/firmware for CPU/GPU/ and even change in xorg server that
were not in debian...
So I always have a git clone of linux firmware and when I see new
firmware image a available and not yet in debian I usually manually copy
part of relevant linux git firmware (yes I know...). Doing this via "cp
-a src dest" is copies also additional stuff that exists in the original
git linux-firmware/amd-ucode. I haven't done it for a while but there
was probably some .asc or README leftover.
ls -l /home/valette/local/bin/linux-firmware/amd-ucode/
total 180
-rw-rw-r-- 1 valette valette 12684 Jun 14 2024 microcode_amd.bin
-rw-rw-r-- 1 valette valette 490 Jun 14 2024 microcode_amd.bin.asc
-rw-rw-r-- 1 valette valette 7876 Jun 14 2024 microcode_amd_fam15h.bin
-rw-rw-r-- 1 valette valette 473 Jun 14 2024
microcode_amd_fam15h.bin.asc
-rw-rw-r-- 1 valette valette 3510 Jun 14 2024 microcode_amd_fam16h.bin
-rw-rw-r-- 1 valette valette 473 Jun 14 2024
microcode_amd_fam16h.bin.asc
-rw-rw-r-- 1 valette valette 22596 Mar 29 11:43 microcode_amd_fam17h.bin
-rw-rw-r-- 1 valette valette 488 Mar 29 11:43
microcode_amd_fam17h.bin.asc
-rw-rw-r-- 1 valette valette 100684 Mar 29 11:43 microcode_amd_fam19h.bin
-rw-rw-r-- 1 valette valette 488 Mar 29 11:43
microcode_amd_fam19h.bin.asc
-rw-rw-r-- 1 valette valette 4662 Mar 29 11:43 README
So the script should protect itself and use only *.bin image in the
relevant directory.
In /usr/share/initramfs-tools/hooks/amd64_microcode
replacing
find "${AUCODE_FW_DIR}/." -maxdepth 1 -type f -print0
by
find "${AUCODE_FW_DIR}/." -maxdepth 1 -type f -name "*.bin" -print0
makes AuthenticAMD.bin generation more robust and working again even if
directory contains extra stuff.
So I propose to apply this simple modification in case someone does the
same (and the package content could simply be a copy of the relebant
directory as the README has informative info that are not in
/usr/share/doc/amd64-microcode/...).
Regards,
--
Eric Valette