A guide for intel wireless adapter AC 9260 and 9560 driver installation on Freebsd 12.1

look this thread
https://forums.freebsd.org/threads/i-cant-find-any-wlan0-interface-with-ifconfig.73899
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227044
https://www.intel.com/content/www/u...5511/network-and-i-o/wireless-networking.html

you need checkout svn code from svn.freebsd.org like this:
svn checkout https://svn.freebsd.org/base/stable/12/sys/dev/iwm/
and copy it to /usr/src/sys/dev/iwm (overwrite it)

you need download this Makefile to /usr/src/sys/modules/iwm/ (overwrite orgrinal Makefile file)
https://svnweb.freebsd.org/base/stable/12/sys/modules/iwm/Makefile?view=co

you need download intel wireless adapter firmware from following link.

for ac9560 download this https://wireless.wiki.kernel.org/_media/en/users/drivers/iwlwifi-9000-pu-b0-jf-b0-34.618819.0.tgz
for ac9260 download this https://wireless.wiki.kernel.org/_media/en/users/drivers/iwlwifi-9260-th-b0-jf-b0-34.618819.0.tgz

https://www.intel.com/content/www/u...5511/network-and-i-o/wireless-networking.html
Download: [Intel® Wireless-AC 9260](iwlwifi-9260-th-b0-jf-b0-34.618819.0.tgz]
Code:
# tar -xf iwlwifi-*.tgz
# cd ./iwlwifi-9xxx*/

For ac9260   # b64encode -o iwm-9260-34.fw.uu iwlwifi-9260-*.ucode iwm-9260-43.fw.uu
# mv iwm-9260-43.fw.uu /usr/src/sys/contrib/dev/iwm/
==> /usr/src/sys/contrib/dev/iwm/iwm-9260-34.fw.uu

For ac9560  # b64encode -o iwm-9000-34.fw.uu iwlwifi-9000-*.ucode iwm-9000-43.fw.uu
# mv iwm-9000-43.fw.uu /usr/src/sys/contrib/dev/iwm/
==> /usr/src/sys/contrib/dev/iwm/iwm-9000-43.fw.uu


add these lines to /usr/src/sys/conf/files at 2015 line (below iwm8265fw.fwo )
for AC9260
Code:
iwm9260.fw                      optional iwm9260fw | iwmfw              \
        dependency      "$S/contrib/dev/iwm/iwm-9260-43.fw.uu" \
        compile-with    "${NORMAL_FW}"                                  \
        no-obj no-implicit-rule                                         \
        clean           "iwm9260.fw"
iwm9260fw.c                     optional iwm9260fw | iwmfw              \
        compile-with    "${AWK} -f $S/tools/fw_stub.awk iwm9260.fw:iwm9260fw -miwm9260fw -c${.TARGET}" \
        no-implicit-rule before-depend local                            \
        clean           "iwm9260fw.c"
iwm9260fw.fwo                   optional iwm9260fw | iwmfw              \
        dependency      "iwm9260.fw"                                    \
        compile-with    "${NORMAL_FWO}"                                 \
        no-implicit-rule                                                \
        clean           "iwm9260fw.fwo"

For AC9560
Code:
iwm9000.fw                      optional iwm9000fw | iwmfw              \
        dependency      "$S/contrib/dev/iwm/iwm-9000-43.fw.uu" \
        compile-with    "${NORMAL_FW}"                                  \
        no-obj no-implicit-rule                                         \
        clean           "iwm9000.fw"
iwm9000fw.c                     optional iwm9000fw | iwmfw              \
        compile-with    "${AWK} -f $S/tools/fw_stub.awk iwm9000.fw:iwm9000fw -miwm9000fw -c${.TARGET}" \
        no-implicit-rule before-depend local                            \
        clean           "iwm9000fw.c"
iwm9000fw.fwo                   optional iwm9000fw | iwmfw              \
        dependency      "iwm9000.fw"                                    \
        compile-with    "${NORMAL_FWO}"                                 \
        no-implicit-rule                                                \
        clean           "iwm9000fw.fwo"


change 'iwm9000_cfg' to 'iwm_9560_cfg' in /usr/src/sys/dev/iwm/if_iwm_config.h
orginal content is "extern const struct iwm_cfg iwm9000_cfg;"
Code:
extern const struct iwm_cfg iwm9560_cfg;

download Makefile from this link
For ac9260 https://svnweb.freebsd.org/base/sta...fw/iwm9260fw/Makefile?revision=354201&view=co and copy it to /usr/src/sys/modules/iwmfw/iwm9260fw/
for ac9560 https://svnweb.freebsd.org/base/sta...fw/iwm9000fw/Makefile?revision=354201&view=co and copy it to /usr/src/sys/modules/iwmfw/iwm9000fw/

install firmware for ac9260
Code:
# cd /usr/src/sys/modules/iwmfw/iwm9260fw
# make clean all install
==> /boot/modules/iwm9260fw.ko

# cd /usr/src/sys/modules/iwm
# make clean all install
==> /boot/modules/if_iwm.ko

# cd /usr/src/sys/modules/iwm
# make clean all install
# kldload /boot/modules/iwm9260fw.ko
# kldload /boot/modules/if_iwm.ko


install firmware for ac9560
Code:
#mkdir /usr/src/sys/modules/iwmfw/iwm9000fw
# cd /usr/src/sys/modules/iwmfw/iwm9000fw
# make clean all install
==> /boot/modules/iwm9000fw.ko

# cd /usr/src/sys/modules/iwm
# make clean all install
==> /boot/modules/iwm.ko

# kldload /boot/modules/iwm9000fw.ko
# kldload /boot/modules/if_iwm.ko


install wpa_supplicant
Code:
#pkg install wpa_supplicant

configure your wpa_supplicant
your /etc/wpa_supplicant.conf should like this.
Code:
network={
    ssid="YourWifiRouter SSID"
    bssid=xx:xx:xx:xx:xx:xx  #your wifirouter bssid
    key_mgmt=WPA-PSK
    proto=RSN
    psk="password"
}
if you really don't know how to setup it, you could use wifimgr to do it in xwindow
install wifimgr
#pkg install wifimgr

add option in /etc/rc.conf

Code:
wpa_supplicant_program="/usr/local/sbin/wpa_supplicant"
wlans_iwm0="wlan0"
ifconfig_wlan0="WPA DHCP"
add auto load kernel module in loader.conf

Code:
if_iwm_load="YES"

iwm9260fw_load="YES"  ### for ac9260
iwm9000fw_load="YES" ### for ac9560
legal.intel_iwi.license_ack=1
wlan_wep_load="YES"
wlan_ccmp_load="YES"
wlan_tkip_load="YES"

restart your laptop now , you will find wlan0 interface with ifconfig

if you load module successfully , you could find some message with dmesg like this


iwm0: <Intel(R) Dual Band Wireless AC 9260> mem 0xf0800000-0xf0803fff at device 0.0 on pci2
iwm0: hw rev 0x320, fw ver 34.0.0, address xx:xx:xx:xx:xx:xx



note:
1.if you are running in securelevel , you can't load kernel by kldload , you need load it in loader.conf
2.sometime , the directory is not exist in /usr/src/sys so you need to make it with mkdir by hand
 
Last edited:
I needed to change that svn web address to

svn checkout https://svn.freebsd.org/base/stable/12/sys/dev/iwm/

Take out the web part of svnweb.

Code:
$ svn checkout https://svn.freebsd.org/base/stable/12/sys/dev/iwm/
A    iwm/if_iwm_8000.c
A    iwm/if_iwm_phy_db.h
A    iwm/if_iwm_9000.c
A    iwm/if_iwm_config.h
A    iwm/if_iwm_pcie_trans.h
A    iwm/if_iwm_fw.h
A    iwm/if_iwm_7000.c
A    iwm/if_iwm_notif_wait.h
A    iwm/if_iwm.c
A    iwm/if_iwm_binding.c
A    iwm/if_iwm_binding.h
A    iwm/if_iwm_constants.h
A    iwm/if_iwm_fw.c
A    iwm/if_iwm_led.c
A    iwm/if_iwm_led.h
A    iwm/if_iwm_mac_ctxt.c
A    iwm/if_iwm_mac_ctxt.h
A    iwm/if_iwm_phy_ctxt.c
A    iwm/if_iwm_phy_ctxt.h
A    iwm/if_iwm_power.c
A    iwm/if_iwm_power.h
A    iwm/if_iwm_scan.c
A    iwm/if_iwm_scan.h
A    iwm/if_iwm_sf.c
A    iwm/if_iwm_sf.h
A    iwm/if_iwm_sta.c
A    iwm/if_iwm_sta.h
A    iwm/if_iwm_time_event.c
A    iwm/if_iwm_time_event.h
A    iwm/if_iwm_util.c
A    iwm/if_iwm_util.h
A    iwm/if_iwmreg.h
A    iwm/if_iwmvar.h
A    iwm/if_iwm_9260.c
A    iwm/if_iwm_pcie_trans.c
A    iwm/if_iwm_debug.h
A    iwm/if_iwm_phy_db.c
A    iwm/if_iwm_notif_wait.c
Checked out revision 358994.
 
there was no dir
/usr/src/sys/modules/iwmfw/iwm9260fw/
/usr/src/sys/modules/iwmfw/iwm9000fw/

so I made them copied the respective Makefile into each one. on the first one. 9260
# make clean all install
it came back with
I don't know how to make iwm-9260-34.fw.uu

so I am back in Linux posting this..
IMG_0167-2.JPG


this is the 9000
IMG_0170-2.JPG
 
# tar -xf iwlwifi-*.tgz
# cd ./iwlwifi-9xxx*/

For ac9260 # b64encode -o iwm-9260-34.fw.uu iwlwifi-9260-*.ucode iwm-9260-34.fw.uu
# mv iwm-9260-34.fw.uu /usr/src/sys/contrib/dev/iwm/
==> /usr/src/sys/contrib/dev/iwm/iwm-9260-34.fw.uu

For ac9560 # b64encode -o iwm-9000-34.fw.uu iwlwifi-9000-*.ucode iwm-9000-34.fw.uu
# mv iwm-9000-34.fw.uu /usr/src/sys/contrib/dev/iwm/
==> /usr/src/sys/contrib/dev/iwm/iwm-9000-34.fw.uu

look at this, you need download firmware from intel website, I have already written it in the first thread . look at it carefully
 
# tar -xf iwlwifi-*.tgz
# cd ./iwlwifi-9xxx*/

For ac9260 # b64encode -o iwm-9260-34.fw.uu iwlwifi-9260-*.ucode iwm-9260-34.fw.uu
# mv iwm-9260-34.fw.uu /usr/src/sys/contrib/dev/iwm/
==> /usr/src/sys/contrib/dev/iwm/iwm-9260-34.fw.uu

For ac9560 # b64encode -o iwm-9000-34.fw.uu iwlwifi-9000-*.ucode iwm-9000-34.fw.uu
# mv iwm-9000-34.fw.uu /usr/src/sys/contrib/dev/iwm/
==> /usr/src/sys/contrib/dev/iwm/iwm-9000-34.fw.uu

look at this, you need download firmware from intel website, I have already written it in the first thread . look at it carefully
I did that part too .. I'll redo it from the start again. I just copied them over not moved so I still have them in there dir.

if you look closley at the images 2nd one you'll see the tarballs and there dir in there


IMG_0174.JPG
 
For ac9560 # b64encode -o iwm-9000-34.fw.uu iwlwifi-9000-*.ucode iwm-9000-43.fw.uu
# mv iwm-9000-43.fw.uu /usr/src/sys/contrib/dev/iwm/
==> /usr/src/sys/contrib/dev/iwm/iwm-9000-43.fw.uu

this step has an issue , the firmware name not correct, change iwm-9000-34.fw.uu to iwm-9000-43.fw.uu in /usr/src/sys/contrib/dev/iwm

and add some lines to /usr/src/sys/conf/files, i have already update the first thread. look at it, insert those lines at 2015 line (below iwm8265fw.fwo last line)
 
No...
I got the same issue with
For ac9260 # b64encode -o iwm-9260-34.fw.uu iwlwifi-9260-*.ucode iwm-9260-34.fw.uu
that was posted in the images same error, I changed that to
For ac9260 # b64encode -o iwm-9260-43.fw.uu iwlwifi-9260-*.ucode iwm-9260-43.fw.uu
that build the modue iwm9260fw.ko
IMG_0246.JPG
next step failed, see photo
did the change for 9000 one it build the modue but too, it failed on the second second step. see image
IMG_0247.JPG


yes I changed the 'files' file as you stated to do so. the thing I do not understand is in that change it references the drivers as
dependency "$S/contrib/dev/iwm/iwm-9260-34.fw.uu
but failed, when I changed that file to (43) dependency "$S/contrib/dev/iwm/iwm-9260-43.fw.uu
it built the module and installed it. with a mismatch in the number within the name.
dependency "$S/contrib/dev/iwm/iwm-9000-34.fw.uu"

it says 34 but 43 works
this I too think is a misprint (typo)
For ac9560 # b64encode -o iwm-9000-34.fw.uu iwlwifi-9000-*.ucode iwm-9000-43.fw.uu
I used this to redo it then it build that module

For ac9560 # b64encode -o iwm-9000-43.fw.uu iwlwifi-9000-*.ucode iwm-9000-43.fw.uu

having 43 on both mentions of the name.

so I am stuck again at the second step for both 9260 and 9000.
 
yes ,your kernel firmware have alreay built sucessfully. i will find out the issue and test it . wait for a mininute!
cat your iwm Makfile and ls /usr/src/sys/dev/iwm
 
there is ni make file in there.
look ar post #2
svn checkout https://svn.freebsd.org/base/stable/12/sys/dev/iwm/

you will see everything that gave me.

this makefile is for for the 2nd stage in this process

# cd /usr/src/sys/modules/iwm
# make install
==> /boot/modules/if_iwm.ko


/usr/src/sys/modules/iwm/Makefile
Code:
# $FreeBSD$

.PATH:  ${SRCTOP}/sys/dev/iwm

KMOD=    if_iwm
# Main driver
SRCS=    if_iwm.c if_iwm_binding.c if_iwm_util.c if_iwm_phy_db.c
SRCS+=    if_iwm_mac_ctxt.c if_iwm_phy_ctxt.c if_iwm_time_event.c
SRCS+=    if_iwm_power.c if_iwm_scan.c if_iwm_led.c if_iwm_notif_wait.c
SRCS+=    if_iwm_7000.c if_iwm_8000.c if_iwm_9000.c if_iwm_fw.c if_iwm_9260.c
SRCS+=    if_iwm_sta.c if_iwm_sf.c
# bus layer
SRCS+=    if_iwm_pcie_trans.c
SRCS+=    device_if.h bus_if.h pci_if.h opt_wlan.h opt_iwm.h

CFLAGS+= -DIWM_DEBUG

.include <bsd.kmod.mk>
 
change 'iwm9000_cfg' to 'iwm_9560_cfg' in /usr/src/sys/dev/iwm/if_iwm_config.h
orginal content is "extern const struct iwm_cfg iwm9000_cfg;"
Code:
extern const struct iwm_cfg iwm9560_cfg;
and then compile iwm , i have alread compiled it sucessfully!
 
change 'iwm9000_cfg' to 'iwm_9560_cfg' in if_iwm_config.h
orginal content is "extern const struct iwm_cfg iwm9000_cfg;"
Code:
extern const struct iwm_cfg iwm9560_cfg;
and then compile iwm , i have alread compiled it sucessfully!
grep'ed them in linux .. figured I'd just change it in there then move it over from one laptop to the freebsd laptop. easier to modify like that. , but I'm coming up empty for anything in iwm for either one.
Code:
bash-5.0# grep -rwn iwm -e iwm9000_cfg
bash-5.0# grep -rwn iwm -e iwm_9560_cfg
bash-5.0#

i did find the defs for extern
Code:
/*
* This list declares the config structures for all devices.
*/
extern const struct iwm_cfg iwm7260_cfg;
extern const struct iwm_cfg iwm3160_cfg;
extern const struct iwm_cfg iwm3165_cfg;
extern const struct iwm_cfg iwm3168_cfg;
extern const struct iwm_cfg iwm7265_cfg;
extern const struct iwm_cfg iwm7265d_cfg;
extern const struct iwm_cfg iwm8260_cfg;
extern const struct iwm_cfg iwm8265_cfg;
extern const struct iwm_cfg iwm9560_cfg;
extern const struct iwm_cfg iwm9260_cfg;

#endif /* __IWM_CONFIG_H__ */

let me go boot the other laptop into freebsd and look to see what that one has.
it is the same, so i do not know what you did;.

-----
do not know how to make device_if.h

I did a
find / -type f -name device_if.h
and came up empty no file found on system.

I do not know what file is telling it to use that device_if.h to go look in to that file ....
 
i didn't find device_if.h in my laptop , i think that file is generated automaticlly.
but i could compile iwm without any issuse, which freebsd version is your?
my freebsd is 12.1 stable.
FreeBSD Raffeale 12.1-RELEASE FreeBSD 12.1-RELEASE GENERIC amd64
i use a custom kernel
 
i didn't find device_if.h in my laptop , i think that file is generated automaticlly.
but i could compile iwm without any issuse, which freebsd version is your?
my freebsd is 12.1 stable.
FreeBSD Raffeale 12.1-RELEASE FreeBSD 12.1-RELEASE GENERIC amd64
i use a custom kernel
12.1-RELEASE

uname -a is in post #3 on the bottom of the 1st image to see everything
 
argggg,
I reinstalled for a fresh start.

For ac9260 # b64encode -o iwm-9260-34.fw.uu iwlwifi-9260-*.ucode iwm-9260-34.fw.uu
# mv iwm-9260-34.fw.uu /usr/src/sys/contrib/dev/iwm/
==> /usr/src/sys/contrib/dev/iwm/iwm-9260-34.fw.uu

For ac9560 # b64encode -o iwm-9000-34.fw.uu iwlwifi-9000-*.ucode iwm-9000-43.fw.uu
# mv iwm-9000-43.fw.uu /usr/src/sys/contrib/dev/iwm/
==> /usr/src/sys/contrib/dev/iwm/iwm-9000-43.fw.uu

didn't work
changed it to

For ac9260 # b64encode -o iwm-9260-43.fw.uu iwlwifi-9260-*.ucode iwm-9260-43.fw.uu
# mv iwm-9260-34.fw.uu /usr/src/sys/contrib/dev/iwm/
==> /usr/src/sys/contrib/dev/iwm/iwm-9260-34.fw.uu

For ac9560 # b64encode -o iwm-9000-43.fw.uu iwlwifi-9000-*.ucode iwm-9000-43.fw.uu
# mv iwm-9000-43.fw.uu /usr/src/sys/contrib/dev/iwm/
==> /usr/src/sys/contrib/dev/iwm/iwm-9000-43.fw.uu

that got compiled.

copied in new iwm from 12.1 changed if_iwm_conf.h added last line

Code:
/*
* This list declares the config structures for all devices.
*/
extern const struct iwm_cfg iwm7260_cfg;
extern const struct iwm_cfg iwm3160_cfg;
extern const struct iwm_cfg iwm3165_cfg;
extern const struct iwm_cfg iwm3168_cfg;
extern const struct iwm_cfg iwm7265_cfg;
extern const struct iwm_cfg iwm7265d_cfg;
extern const struct iwm_cfg iwm8260_cfg;
extern const struct iwm_cfg iwm8265_cfg;

#endif /* __IWM_CONFIG_H__ */

chaeged file
Code:
    clean        "iwm8265fw.c"
iwm8265fw.fwo            optional iwm8265fw | iwmfw        \
    dependency    "iwm8265.fw"                    \
    compile-with    "${NORMAL_FWO}"                    \
    no-implicit-rule                        \
    clean        "iwm8265fw.fwo"
iwm9260.fw                      optional iwm9260fw | iwmfw              \
        dependency      "$S/contrib/dev/iwm/iwm-9260-34.fw.uu" \
        compile-with    "${NORMAL_FW}"                                  \
        no-obj no-implicit-rule                                         \
        clean           "iwm9260.fw"
iwm9260fw.c                     optional iwm9260fw | iwmfw              \
        compile-with    "${AWK} -f $S/tools/fw_stub.awk iwm9260.fw:iwm9260fw -miwm9260fw -c${.TARGET}" \
        no-implicit-rule before-depend local                            \
        clean           "iwm9260fw.c"
iwm9260fw.fwo                   optional iwm9260fw | iwmfw              \
        dependency      "iwm9260.fw"                                    \
        compile-with    "${NORMAL_FWO}"                                 \
        no-implicit-rule                                                \
        clean           "iwm9260fw.fwo"
iwm9000.fw                      optional iwm9000fw | iwmfw              \
        dependency      "$S/contrib/dev/iwm/iwm-9000-43.fw.uu" \
        compile-with    "${NORMAL_FW}"                                  \
        no-obj no-implicit-rule                                         \
        clean           "iwm9000.fw"
iwm9000fw.c                     optional iwm9000fw | iwmfw              \
        compile-with    "${AWK} -f $S/tools/fw_stub.awk iwm9000.fw:iwm9000fw -miwm9000fw -c${.TARGET}" \
        no-implicit-rule before-depend local                            \
        clean           "iwm9000fw.c"
iwm9000fw.fwo                   optional iwm9000fw | iwmfw              \
        dependency      "iwm9000.fw"                                    \
        compile-with    "${NORMAL_FWO}"                                 \
        no-implicit-rule                                                \
        clean           "iwm9000fw.fwo"
dev/iwn/if_iwn.c        optional iwn
iwn1000fw.c            optional iwn1000fw | iwnfw        \

this step
Code:
install firmware for ac9260
      
# cd /usr/src/sys/modules/iwm
# make clean all install
==> /boot/modules/if_iwm.ko
don't know how to make if_iwm_9000.c stop

/usr/src/sys/modules/iwm/Makefile
Code:
# $FreeBSD$

.PATH:  ${SRCTOP}/sys/dev/iwm

KMOD=    if_iwm
# Main driver
SRCS=    if_iwm.c if_iwm_binding.c if_iwm_util.c if_iwm_phy_db.c
SRCS+=    if_iwm_mac_ctxt.c if_iwm_phy_ctxt.c if_iwm_time_event.c
SRCS+=    if_iwm_power.c if_iwm_scan.c if_iwm_led.c if_iwm_notif_wait.c
SRCS+=    if_iwm_7000.c if_iwm_8000.c if_iwm_9000.c if_iwm_fw.c if_iwm_9260.c
SRCS+=    if_iwm_sta.c if_iwm_sf.c
# bus layer
SRCS+=    if_iwm_pcie_trans.c
SRCS+=    device_if.h bus_if.h pci_if.h opt_wlan.h opt_iwm.h

CFLAGS+= -DIWM_DEBUG

.include <bsd.kmod.mk>
 
don't bother about this too much where I go for wifi is shutting down for two weeks due to the beer virus (coronavirus) the politically correct term is "social distancing"

I just got told so I am telling you so you don't go beating your brains out on this and get no replies from me for two weeks.
 
you will be okay, god bless you! everything will be okay! the virus can be cured , see you soon , where are you from? i'm from China, HaHa! i want to make friend with you!

this step is common , ac900 could use it as well.
# cd /usr/src/sys/modules/iwm
# make clean all install
li==> /boot/modules/if_iwm.ko

did you compile it successfully?
 
you will be okay, god bless you! everything will be okay! the virus can be cured , see you soon , where are you from? i'm from China, HaHa! i want to make friend with you!

this step is common , ac900 could use it as well.
# cd /usr/src/sys/modules/iwm
# make clean all install
li==> /boot/modules/if_iwm.ko

did you compile it successfully?
make: make don't know how to make /usr/src/sys/contrib/dev/iwm/iwm-9000-43.fw.uu stop

in the files file it has that added ... do not know what is doing what to what to even try to figure out what to do

when I am trying to build
9260
# cd /usr/src/sys/modules/iwm
# make clean all install
==> /boot/modules/if_iwm.ko
why it is trying to buile if_iwm_9000.c make says it does not know how to
 
this is getting to be ridiculous. this works then it doesn't then sometihng else is screws up .. blah blaha stop wasiting time I am fed up with this.
 
In your photos which you uploaded ,it said firmware build finish,but building own has some issues,the device_if.h did not find. Do you try to remove device_if.h from own Makefile?
 
Back
Top