# kldxref: error while reading /boot/testing/iwlwifi-9000-pu-b0-jf-b0-46.ucode.ko: Bad address



## freebuser (Feb 4, 2022)

Hi,

I compiled and installed the 13.0 STABLE kernel and world in the Hyper-V FreeBSD without any issues, but when I tried to install them via NFS shares to a server host I get these following issues:


```
kldxref: error while reading /boot/testing/iwlwifi-9000-pu-b0-jf-b0-46.ucode.ko: Bad address
kldxref: error while reading /boot/testing/iwlwifi-9260-th-b0-jf-b0-46.ucode.ko: Bad address
```

Any idea what these are? I don't have any wireless cards.


----------



## grahamperrin@ (Feb 5, 2022)

freebuser said:


> STABLE



Are all computers at the same version?


----------



## freebuser (Feb 5, 2022)

grahamperrin said:


> Are all computers at the same version?


The one installed without any error is the virtual FreeBSD in Hyper-V which is then shared (/usr/src & usr/obj) through NFS to a different host (Dell T420) running all my jails to install the kernel and the world where the error occurred.
I now recompile the kernel without the drivers and wireless and didn't have any issues, but wondering what causes the issue.
Both were running 13-STABLE before upgrade (may be different previous revisions)


----------



## grahamperrin@ (Feb 6, 2022)

Thanks.



freebuser said:


> … (may be different previous revisions)



For the benefit of other readers:*†*

STABLE is in some ways a test/development environment
in some of those ways, FreeBSD-STABLE may be _less than_ stable (the traditional meaning of the word).
<https://cgit.freebsd.org/src/log/?h=stable/13&qt=grep&q=iwlwifi> for example. Subject to change, and so on. There's a rough schedule for 13.1 to be release engineered, a few weeks will pass before beta tests begin.

HTH, although I never took an NFS approach to updating.


*†* freebuser I see that you're a long-time user (from maybe 8.0, familiar with STABLE for at least five years).


----------



## zirias@ (Feb 6, 2022)

freebuser said:


> (may be different previous revisions)


This _could_ be the culprit.

`kldxref` doesn't change too often, but I've seen problems with it before. It's always executed from the host, it is NOT part of the temporary toolset built inside the obj tree...

Most of the time, the errors it produces are non-fatal. Reboot the machine, execute the install again, this time it will (probably?) work.


----------



## freebuser (Feb 6, 2022)

Zirias said:


> This _could_ be the culprit.
> 
> `kldxref` doesn't change too often, but I've seen problems with it before. It's always executed from the host, it is NOT part of the temporary toolset built inside the obj tree...
> 
> Most of the time, the errors it produces are non-fatal. Reboot the machine, execute the install again, this time it will (probably?) work.


I'll make a note of it. I don't need these drivers anyway as it is for a headless server, but never wanted to modify the GENERIC as it is hard to keep up with different things for different hosts.
This is the first time I encountered *an* issue in my more than 10 years experience with STABLE branch. 

I can certainly live with a 1 in 10 year minor hiccups .


----------



## zirias@ (Feb 6, 2022)

freebuser said:


> never wanted to modify the GENERIC


Just as a hint, there's no need to _modify_ it, it can be included in your own config before listing your custom changes with `[no]device/[no]options`. I think the handbook should really recommend this approach instead of "copy and modify".

E.g. I use the following simple config file to get a kernel that includes Linux-compatible `sg` devices:

```
include GENERIC
ident DESKTOP

device          sg
```


----------



## freebuser (Feb 6, 2022)

Zirias said:


> Just as a hint, there's no need to _modify_ it, it can be included in your own config before listing your custom changes with `[no]device/[no]options`. I think the handbook should really recommend this approach instead of "copy and modify".
> 
> E.g. I use the following simple config file to get a kernel that includes Linux-compatible `sg` devices:
> 
> ...



Not sure how to exclude unwanted devices?
I am currently doing it with WITHOUT_MODULES in make.conf, with the whole directory specified.


----------



## zirias@ (Feb 6, 2022)

freebuser said:


> Not sure how to exclude unwanted devices?


`nodevice`


freebuser said:


> I am currently doing it with WITHOUT_MODULES in make.conf, with the whole directory specified.


That's for loadable modules, the kernel config is for what's built into the kernel... btw, I'd recommend putting it in src.conf instead of make.conf, it's irrelevant for anything outside the FreeBSD src tree


----------



## monwarez (Feb 6, 2022)

Seems related to





						⚙ D32383 modules: increase MAXMODNAME and provide backward compat
					






					reviews.freebsd.org
				




I.e before this patch the file path to the module to load was set to a maximum of 32 character.


----------



## Alain De Vos (Apr 29, 2022)

Having this issue today with make installkernel of releng 13.1 which is normally at RC4.
I'll try nodevice iwifw , nodevice iwnfw


----------



## Alain De Vos (Apr 29, 2022)

The install error remained.
The kernel boots correctly though.
Can i tell make explicitly not to build iwlwifi-9000-pu-b0-jf-b0-46.ucode.ko & iwlwifi-9260-th-b0-jf-b0-46.ucode.ko ?


----------

