could not load binary firmware /boot/firmware/ in FreeBSD 14.2

Code:
 pkg -v
2.0.6
Code:
 pkg which /boot/modules/iwlwifi_9000_pu_b0_jf_b0_46_ucode.ko
/boot/modules/iwlwifi_9000_pu_b0_jf_b0_46_ucode.ko was installed by package wifi-firmware-iwlwifi-kmod-9000-20241017.1401000_1
Code:
 pkg which /boot/modules/iwlwifi_9260_th_b0_jf_b0_46_ucode.ko
/boot/modules/iwlwifi_9260_th_b0_jf_b0_46_ucode.ko was installed by package wifi-firmware-iwlwifi-kmod-9000-20241017.1401000_1
Code:
 pkg which /boot/firmware/iwlwifi-9000-pu-b0-jf-b0-46.ucode
/boot/firmware/iwlwifi-9000-pu-b0-jf-b0-46.ucode was installed by package wifi-firmware-iwlwifi-kmod-20241017.1402000_1
Code:
pkg which /boot/firmware/iwlwifi-9260-th-b0-jf-b0-46.ucode
/boot/firmware/iwlwifi-9260-th-b0-jf-b0-46.ucode was installed by package wifi-firmware-iwlwifi-kmod-20241017.1402000_1

pkg 2.06 is the last one - few days upgrade
 
I did delete iwlwifi_9260_th_b0_jf_b0_46_ucode.ko built fo 1.41 from /boot/modules and live version 1.42 from kmods repository.
fwget -n shows the same need as before - for wifi-firmware and kmod-raven.
And everything works the same as before. Difference between version for 1.41 latest a d version in kmods repository is that repository doesn't has flavors but for 1.41 has:

PKGNAME: wifi-firmware-iwlwifi-kmodPackage flavors (<flavor>: <package>)
  • iwlwifi: wifi-firmware-iwlwifi-kmod
  • 7000: wifi-firmware-iwlwifi-kmod-7000
  • 8000: wifi-firmware-iwlwifi-kmod-8000
  • 9000: wifi-firmware-iwlwifi-kmod-9000
  • 22000: wifi-firmware-iwlwifi-kmod-22000
  • ax210: wifi-firmware-iwlwifi-kmod-ax210
  • bz: wifi-firmware-iwlwifi-kmod-bz
 
# pkg which /boot/firmware/amd-ucode.bin
Bash:
/boot/firmware/amd-ucode.bin was installed by package cpu-microcode-amd-20240810
# pkg which /boot/modules/amdgpu_kabini_ce_bin.ko
# pkg which /boot/modules/amdgpu_kabini_me_bin.ko
Bash:
/boot/modules/amdgpu_kabini_ce_bin.ko was installed by package gpu-firmware-amd-kmod-kabini-20230625.1401000_2
root@none:/usr/ports/sysutils/cpu-microcode-amd # cat Makefile | grep /boot/firmware
Bash:
FWDIR=        /boot/firmware
 
Got amdgpu not load, guessed it was caused by the mod path error /boot/modules| /boot/firmware.

It turned out to be the UEFI+LEGACY mode, reset to UEFI only fix the issue.
 
There is something wrong. fwget(8) claims "most recent [firmware] versions of packages are already installed", but the intel driver is of the view no firmware is installed:

I also can't see more [drm] related messages, indicating no firmware has attached to the device.

Delete gpu-firmware-intel-kmod-alderlake, gpu-firmware-intel-kmod-tigerlake (wifi-firmware-rtw89-kmod as well), try to install all intel firmware. To get rid of "could not load binary firmware /boot/firmware" messages, set KMODDIR variable:
Code:
 # cd /usr/ports/graphics/gpu-firmware-intel-kmod

 # make install clean  KMODDIR=/boot/firmware

make(1) variables can also be set via make.conf(5) for specific ports:
Code:
.if ${.CURDIR:M*/graphics/gpu-firmware-intel-kmod}
KMODDIR=/boot/firmware
.endif
For a specific flavor add, i.e. FLAVOR=alderlake.

Proceed the same with net/wifi-firmware-rtw89-kmod. The variable KMODDIR should not be needed. On my system, the rtw89 firmware is installed under /boot/firmware (I have it installed from official package, not port):
Code:
 % pkg list wifi-firmware-rtw89-kmod
/boot/firmware/rtw89/rtw8851b_fw.bin
/boot/firmware/rtw89/rtw8852a_fw.bin
/boot/firmware/rtw89/rtw8852b_fw-1.bin
/boot/firmware/rtw89/rtw8852b_fw.bin
/boot/firmware/rtw89/rtw8852c_fw-1.bin
/boot/firmware/rtw89/rtw8852c_fw.bin
/boot/firmware/rtw89/rtw8922a_fw-1.bin
/boot/firmware/rtw89/rtw8922a_fw-2.bin
/boot/firmware/rtw89/rtw8922a_fw.bin
/boot/loader.conf.d/rtw89.conf
[...]
I only have the renoir flavor of graphics/gpu-firmware-amd-kmod installed but after editing make.conf to change install path to /boot/firmware, my system doesn't boot but panics. I attached a screenshot. I think it would still should work if it's a adjustable variable but it doesn't for me.
 

Attachments

  • IMG_20250325_213344.jpg
    IMG_20250325_213344.jpg
    1.6 MB · Views: 37
I only have the renoir flavor of graphics/gpu-firmware-amd-kmod installed but after editing make.conf to change install path to /boot/firmware, my system doesn't boot but panics. I attached a screenshot. I think it would still should work if it's a adjustable variable but it doesn't for me.
this is definitely a firmare, graphics card, and direct rendering manager bug. I am becoming very familiar with what the BSD kernel does and does not like. I see your machine is having issues initializing the gpu to render graphics. Are you leveraging, saving and setting boot environments? I save stable boot environments for a workaround with bootloader hang at boot time. This saved me time for setting up stable BSD checkpoints from where to get FreeBSD running. I utilize the BE boot environment and zfs snapshot for rollbacks.
 
this is definitely a firmare, graphics card, and direct rendering manager bug.
Maybe, it's annoying for me to see these errors on boot, I don't mute my boot messages, though. I believe it's not like ACPI errors because it may not be as easy as solving this problem so I am ignoring ACPI errors.

I see your machine is having issues initializing the gpu to render graphics. Are you leveraging, saving and setting boot environments? I save stable boot environments for a workaround with bootloader hang at boot time. This saved me time for setting up stable BSD checkpoints from where to get FreeBSD running. I utilize the BE boot environment and zfs snapshot for rollbacks.
Yes, I have setup automatic snapshots enabled for my zroot pool. The only time I use boot environments is when using freebsd-update(8) which creates BEs automatically before updates.

In order to not get panic, I booted into single-user mode and then removed amdgpu from kld_list in /etc/rc.conf then booted into system normally then built the mentioned driver without the path modification. Thanks.
 
I only have the renoir flavor of graphics/gpu-firmware-amd-kmod installed but after editing make.conf to change install path to /boot/firmware, my system doesn't boot but panics.
Same here "Renoir" firmware, kernel panic when in /boot/firmware.

Still, dmesg shows search path under /boot/firmware:
Code:
renoir_asd.bin: could not load binary firmware /boot/firmware/renoir_asd.bin either
amdgpu/renoir_asd.bin: could not load binary firmware /boot/firmware/amdgpu/renoir_asd.bin either
amdgpu_renoir_asd.bin: could not load binary firmware /boot/firmware/amdgpu_renoir_asd.bin either
drmn0: successfully loaded firmware image 'amdgpu/renoir_asd.bin'

I tried to catch a core dump to see what causes the panic, but apparently this doesn't work with encrypted swap. /etc/rc.d/dumpon is executed before geli encrypted swap is created:
Code:
676 dumpon: /dev/gpt/swap1.eli: No such file or directory
677 /etc/rc: WARNING: unable to specify gpt/swap1.eli as a dump device
...
683 GEOM_ELI: Device gpt/swap1.eli created.
684 GEOM_ELI: Encryption: AES-XTS 128
685 GEOM_ELI:     Crypto: accelerated software

EDIT: Not much success to save a core dump on a valid dump device either. This needs some more investigation.
 
@T-Daemon and nxjoseph
Still, dmesg shows search path under /boot/firmware:
renoir_asd.bin: could not load binary firmware /boot/firmware/renoir_asd.bin either amdgpu/renoir_asd.bin: could not load binary firmware /boot/firmware/amdgpu/renoir_asd.bin either amdgpu_renoir_asd.bin: could not load binary firmware /boot/firmware/amdgpu_renoir_asd.bin either drmn0: successfully loaded firmware image 'amdgpu/renoir_asd.bin'
My—wild—guess is that amdgpu/renoir_asd.bin causes the panic.

Any idea where to find the file <path-start>amdgpu/renoir_asd.bin on your FreeBSD system, and how you got that file?
Do you perhaps have a /usr/lib/firmware/amdgpu/renoir_asd.bin ?
 
@T-Daemon and nxjoseph

My—wild—guess is that amdgpu/renoir_asd.bin causes the panic.

Any idea where to find the file <path-start>amdgpu/renoir_asd.bin on your FreeBSD system, and how you got that file?
Do you perhaps have a /usr/lib/firmware/amdgpu/renoir_asd.bin ?
Rich (BB code):
# pkg info -l gpu-firmware-amd-kmod-renoir-20230625.1402000_2
gpu-firmware-amd-kmod-renoir-20230625.1402000_2:
        /boot/modules/amdgpu_renoir_asd_bin.ko
        /boot/modules/amdgpu_renoir_ce_bin.ko
        /boot/modules/amdgpu_renoir_dmcub_bin.ko
        /boot/modules/amdgpu_renoir_gpu_info_bin.ko
        /boot/modules/amdgpu_renoir_me_bin.ko
        /boot/modules/amdgpu_renoir_mec2_bin.ko
        /boot/modules/amdgpu_renoir_mec_bin.ko
        /boot/modules/amdgpu_renoir_pfp_bin.ko
        /boot/modules/amdgpu_renoir_rlc_bin.ko
        /boot/modules/amdgpu_renoir_sdma_bin.ko
        /boot/modules/amdgpu_renoir_ta_bin.ko
        /boot/modules/amdgpu_renoir_vcn_bin.ko
        /usr/local/share/licenses/gpu-firmware-amd-kmod-renoir-20230625.1402000_2/AMD
        /usr/local/share/licenses/gpu-firmware-amd-kmod-renoir-20230625.1402000_2/LICENSE
        /usr/local/share/licenses/gpu-firmware-amd-kmod-renoir-20230625.1402000_2/catalog.mk
 
Note the difference:
Rich (BB code):
  <path-start>amdgpu/renoir_asd.bin
/boot/modules/amdgpu_renoir_asd_bin.ko
these are not the same files.
I hard-linked it to amdgpu folder and this is what dmesg(8) show now, i don't know if it differs now, though.

Code:
root@hale /home/yusuf # dmesg -a | grep asd.bin
renoir_asd.bin: could not load binary firmware /boot/firmware/renoir_asd.bin either
amdgpu/renoir_asd.bin: firmware image loaded, but did not register
amdgpu_renoir_asd.bin: could not load binary firmware /boot/firmware/amdgpu_renoir_asd.bin either
drmn0: successfully loaded firmware image 'amdgpu/renoir_asd.bin'
root@hale /home/yusuf # ls -lah /boot/modules/amdgpu
amdgpu_renoir_asd_bin.ko       amdgpu_renoir_me_bin.ko        amdgpu_renoir_rlc_bin.ko       amdgpu.ko
amdgpu_renoir_ce_bin.ko        amdgpu_renoir_mec_bin.ko       amdgpu_renoir_sdma_bin.ko      amdgpu/
amdgpu_renoir_dmcub_bin.ko     amdgpu_renoir_mec2_bin.ko      amdgpu_renoir_ta_bin.ko
amdgpu_renoir_gpu_info_bin.ko  amdgpu_renoir_pfp_bin.ko       amdgpu_renoir_vcn_bin.ko
root@hale /home/yusuf # ls -lah /boot/modules/amdgpu/renoir_asd.bin
-r--r--r--  2 root wheel  181K Mar 25 21:36 /boot/modules/amdgpu/renoir_asd.bin
root@hale /home/yusuf # ls -lah /boot/modules/amdgpu_renoir_asd_bin.ko
-r--r--r--  2 root wheel  181K Mar 25 21:36 /boot/modules/amdgpu_renoir_asd_bin.ko
# ls /boot/modules/amdgpu
renoir_asd.bin

EDIT: For testing, i removed binary in amdgpu folder and this is dmesg(8) output now, it differs.

Code:
# dmesg -a | grep -i asd
renoir_asd.bin: could not load binary firmware /boot/firmware/renoir_asd.bin either
amdgpu/renoir_asd.bin: could not load binary firmware /boot/firmware/amdgpu/renoir_asd.bin either
amdgpu_renoir_asd.bin: could not load binary firmware /boot/firmware/amdgpu_renoir_asd.bin either
drmn0: successfully loaded firmware image 'amdgpu/renoir_asd.bin'
# find /boot/modules | grep asd.bin
/boot/modules/amdgpu_renoir_asd_bin.ko
 
Back
Top