I finally compiled and installed everything, but iwm0 and urtwn0 both crash my system.
Continuing from hg up wifi
Create kernel config to exclude drivers. Pulled straight from the Wiki, but I didn't use these lines.
options DEBUG # expensive debugging checks/support
options LOCKDEBUG # expensive locking checks/support
So mine looked like this
vi sys/arch/amd64/conf/GENERIC.local
no an*
no ath*
no athn*
no atw*
no awi*
no bwi*
no bwfm*
no iwi*
no malo*
no ral*
no rtw*
no wi*
no wpi*
no atu*
no otus*
no rum*
no upgt*
no ural*
no urtw*
no zyd*
# options URTWN_DEBUG # debug the urtwn driver
options IWM_DEBUG # debug the iwm driver
options IWN_DEBUG # debug the iwn driver
options RTWN_DEBUG # debug the rtwn driver
options IEEE80211_DEBUG # debug 802.11 code
options KERNHIST # allow debug output to go to a kernhist(9)
compile the sets and kernel. I don't think I needed the obj/
part, but it worked.
In the /usr/src-draft
dir
./build.sh -U -u -O obj/ -j4 -m amd64 -V MKRUMP=no -V MKKMOD=no distsets
./build.sh -U -u -O obj/ -j4 -m amd64 -V MKRUMP=no -V MKKMOD=no kernel=GENERIC
install kernel and upgrade with sysinst
doas mv /netbsd /netbsd.old
cd obj/sys/arch/amd64/compile/GENERIC/
doas cp netbsd /netbsd
shutdown -r now
next boot
su
sysinst
- followed the upgrade procedure and selected custom sets
- unselect everything kernel related
- unselect X11
- selected everything else
- set the "base directory" for the sets
- base dir = /usr/src-draft/obj/releasedir
When sysinst finished, I rebooted and ran etcupdate -s /usr/src-draft
Rebooted again and tried to use the new wifi.
sysctl net.wlan
net.wlan.debug = 0
net.wlan.debug_console = 0
net.wlan.devices = iwm0
doas ifconfig wlan0 create wlandev iwm0
It gives a fatal error loading firmware
doas ifconfig wlan0 up
doas ifconfig wlan0 list scan
ifconfig: SIOCS80211: Operation now in progress
but there's no output, as I would expect from the fatal firmware error
I also have the urtwn0, so I tried it. It loads without complaint, but crashes the system a few seconds later.
I'm pretty happy I was able to get this to build and run. Hopefully if anyone else wants to try, this post might help clarify some steps, and give an idea what to expect.