According to the handbook (https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/usb-disks.html) `kldload cfumass` should be sufficient to load the cfumass module for mass storage target use, however the kernel reports that icl and ctl are not available: root@beaglebone:~ # kldload cfumass KLD ctl.ko: depends on icl - not available or version mismatch KLD cfumass.ko: depends on ctl - not available or version mismatch kldload: can't load cfumass: No such file or directory root@beaglebone:~ # It requires manually loading iscsi first: root@beaglebone:~ # kldload iscsi root@beaglebone:~ # kldload cfumass root@beaglebone:~ #
Something's fishy here. I've seen it before, but was never able to reproduce it. Can you help me a bit? Where did the current kernel come from? Was it installed by "make installkernel"? Does it happen after you do a "make installkernel" again? What FreeBSD version you're running this on, and on what hardware?
(Also note that it probably won't appear anymore due to the cfiscsi(4) refactoring done by Ngie; still, there's something weird with KLD dependencies and would be nice to figure it out.)
I used the most recent BBB SD-card snapshot image, built a new kernel via make buildkernel, renamed /boot/kernel/ to kernel.old, and just scp'd the new kernel & required modules into /boot/kernel/.
Do you have up to date /boot/kernel/linker.hints file?
Probably not. I will test again once new snapshot images are ready, and close if it's now working.
It was a problem of CTL iSCSI frontend, that made impossible to load CTL without loading iscsi/icl module first. ngie@ fixed it recently in r316212.
Something's still not right. This is tested on a BeagleBone Black using the re@ snapshot at r317181. /boot/loader.conf contains: cfumass_load="YES" Using ctladm reports: root@beaglebone:~ # ctladm create -b block -o file=/image KLD cfiscsi.ko: depends on icl - not available or version mismatch ctladm: couldn't load cfiscsi: No such file or directory LUN created successfully backend: block device type: 0 LUN size: 16777216 bytes blocksize 512 bytes LUN ID: 0 Serial Number: MYSERIAL 0 Device ID; MYDEVID 0 root@beaglebone:~ # kldstat Id Refs Address Size Name 1 21 0xc0200000 9132f4 kernel 2 1 0xc0b14000 d540 cfumass.ko 3 2 0xc0b22000 549f8 ctl.ko Trying to load cfiscsi directly reports: root@beaglebone:~ # kldload cfiscsi KLD cfiscsi.ko: depends on icl - not available or version mismatch But manually loading iscsi first works: root@beaglebone:~ # kldload iscsi root@beaglebone:~ # kldload cfiscsi
It appears the linker.hints file on the BBB image is not correct - it's fixed after running kldxref on the BBB. Maybe it's an issue with cross-kldxref?
I took another look at this - it also happens with 12.0 RPI-B image - and it seems the /boot/kernel/linker.hints is simply missing: % ls /media/rootfs/boot/kernel/*hints* zsh: no matches found: /media/rootfs/boot/kernel/*hints* The same seems to be the case for the BEAGLEBONE images.
Digging deeper... 1. The "kldload cfumass" works fine without the linker.hints file. A way to reproduce the problem is to "kldload cfiscsi" instead. 2. It seems it's impossible to create arm6 hints file on amd64. Running "kldxrefs -v" results in this: % doas kldxref -v /media/rootfs/boot/kernel /media/rootfs/boot/kernel/accf_data.ko kldxref: elf_open(/media/rootfs/boot/kernel/accf_data.ko): Inappropriate file type or format /media/rootfs/boot/kernel/accf_dns.ko kldxref: elf_open(/media/rootfs/boot/kernel/accf_dns.ko): Inappropriate file type or format ... and so on, and so on. The linker.hints file doesn't get created.
As suggested by jhibbits@, the fix might be simply to set "kldxref_enable=YES".
See https://reviews.freebsd.org/D14534.
(In reply to Edward Tomasz Napierala from comment #12) That's been committed long time ago. Are we good to close this?