RE: firmware modules

From: Mark Millard <marklmi_at_yahoo.com>
Date: Thu, 20 Mar 2025 18:40:58 UTC
LuMiWa <lumiwa_at_dismail.de> wrote on
Date: Thu, 20 Mar 2025 10:35:34 UTC :

> One question about kernel directories which are install firmware or
> modules.
> Packages from FreeBSD repositories installed firmware in /boot/modules
> but packages from repositories kmdos installed in /boot/firmware. I
> found this when I installed firmware for wifi (iwifi...). Why is double
> standard? I have firmware for wifi in both directories.

Looking in the two places in one of my contexts, I see:

# fwget
Needed firmware packages: 'wifi-firmware-rtw89-kmod-rtw8852b gpu-firmware-amd-kmod-gc-10-3-6 gpu-firmware-amd-kmod-psp-13-0-5 gpu-firmware-amd-kmod-dcn-3-1-5 gpu-firmware-amd-kmod-sdma-5-2-6 gpu-firmware-amd-kmod-vcn-3-1-2'
The most recent versions of packages are already installed

# find -s /boot/firmware/ /boot/modules/ -print
/boot/firmware/
/boot/firmware/amd-ucode.bin
/boot/firmware/intel-ucode.bin
/boot/firmware/iwm3160fw
/boot/firmware/iwm3168fw
/boot/firmware/iwm7260fw
/boot/firmware/iwm7265Dfw
/boot/firmware/iwm7265fw
/boot/firmware/iwm8000C
/boot/firmware/iwm8265fw
/boot/firmware/iwm9000fw
/boot/firmware/iwm9260fw
/boot/firmware/rtw89
/boot/firmware/rtw89/rtw8852b_fw-1.bin
/boot/modules/
/boot/modules/amdgpu_dcn_3_1_5_dmcub_bin.ko
/boot/modules/amdgpu_gc_10_3_6_ce_bin.ko
/boot/modules/amdgpu_gc_10_3_6_me_bin.ko
/boot/modules/amdgpu_gc_10_3_6_mec2_bin.ko
/boot/modules/amdgpu_gc_10_3_6_mec_bin.ko
/boot/modules/amdgpu_gc_10_3_6_pfp_bin.ko
/boot/modules/amdgpu_gc_10_3_6_rlc_bin.ko
/boot/modules/amdgpu_psp_13_0_5_asd_bin.ko
/boot/modules/amdgpu_psp_13_0_5_ta_bin.ko
/boot/modules/amdgpu_psp_13_0_5_toc_bin.ko
/boot/modules/amdgpu_sdma_5_2_6_bin.ko
/boot/modules/amdgpu_vcn_3_1_2_bin.ko
/boot/modules/linker.hints

Looking at just a few examples:

# file /boot/firmware/iwm3160fw /boot/firmware/rtw89/rtw8852b_fw-1.bin /boot/modules/amdgpu_dcn_3_1_5_dmcub_bin.ko /boot/modules/amdgpu_psp_13_0_5_toc_bin.ko
/boot/firmware/iwm3160fw:                    data
/boot/firmware/rtw89/rtw8852b_fw-1.bin:      data
/boot/modules/amdgpu_dcn_3_1_5_dmcub_bin.ko: ELF 64-bit LSB relocatable, x86-64, version 1 (FreeBSD), BuildID[sha1]=4b30b4248d57199be9498869d56e659ffbfa7050, not stripped
/boot/modules/amdgpu_psp_13_0_5_toc_bin.ko:  ELF 64-bit LSB relocatable, x86-64, version 1 (FreeBSD), BuildID[sha1]=bd31f5c066ef6ea222807c901a5a2f6bba3690f5, not stripped
7950X3D-ZFS amd64  1500034 1500034 # 

It looks to me like some things involve loadable kernel
modules that add code to into the kernel and some do not
involve such. Those that do not are probably just loaded
into a device that is using the material via the FreeBSD
kernel. Which type of file looks to determine
/boot/firmware/ vs. /boot/modules/ for where the files
are put.

Also, I'll note that pkg puts things where FreeBSD is
designed to have the files put. Pkg does not, of itself,
determine where FreeBSD is designed to have the files.
So where pkg put things is just following the FreeBSD
rules for those things.

I've no clue if some of your materials are older from
before the last time FreeBSD changed the designed
organization. You might want to send out the output
from the likes of:

# find -s /boot/firmware/ /boot/modules/ -print

That might give someone a clue about if it is an
appropriate mix or not vs. if there is older material
that should be uninstalled/deleted.

===
Mark Millard
marklmi at yahoo.com