gef3233
February 5, 2019, 10:58am
1
Hi, I am a little bit lost when it comes to build a new openwrt image for a new device. I have recently purchased a Mikrotik wAP 60G (https://mikrotik.com/product/wap_60g ), and no matter what things I have tried it does not boot the initramfs of openwrt, I was wondering if anyone could help me. As far as I know, this is the first time somebody wants to port openwrt to an ARM version of a Mikrotik device.
This is all I can do/know:
There are other openwrt for other Mikrotik devices but they don't use the ARM processor.
I can root the device, but I am still unable to do something useful with it.
The build I tried was for a generic Q40xx (since the processor is IPQ-4019 ) and, although the device does request the file through TFTP, it just boots into the normal RouterOS at some point.
I have the "latest" kernel patches for the 3.3.5 kernel that Mikrotik uses, but they are too old and I still don't know how to upload my custom kernel to the device.
A few questions:
Is it possible for me to take one of the Mikrotik builds for other architectures and build them for ARMv7? If so, is there any documentation in this regard?
Would it be easier to try to compile something for the IPQ-4019 processor and then apply the changes for Mikrotik?
Also, this is the first few lines of the dmesg command in case this gives any extra info:
Booting Linux on physical CPU 0
Linux version 3.3.5 (build@builder) (gcc version 4.8.2 (GCC) ) #2 SMP Wed Feb 28 10:26:17 UTC 2018
CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: Qualcomm (Flattened Device Tree), model: LHG 5HnD60ad
Memory policy: ECC disabled, Data cache writealloc
On node 0 totalpages: 65536
free_area_init_node: node 0, pgdat 8044d340, node_mem_map 80474000
Normal zone: 512 pages used for memmap
Normal zone: 0 pages reserved
Normal zone: 65024 pages, LIFO batch:15
PERCPU: Embedded 13 pages/cpu @80684000 s5312 r32768 d15168 u53248
pcpu-alloc: s5312 r32768 d15168 u53248 alloc=13*4096
pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 65024
Kernel command line: root=/dev/ram0 bootimage=1 no-uart no-nand parts=1 boot_part_size=16777216 eth_mac=CC:2D:E0:AF:24:9E board=lhg60-dk Board=lhg60-dk ver=6.41.2 hw_opt=00284401 boot=1 mlc=11
PID hash table entries: 1024 (order: 0, 4096 bytes)
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 256MB = 256MB total
Memory: 238540k/238540k available, 23604k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
vmalloc : 0x90800000 - 0xff000000 (1768 MB)
lowmem : 0x80000000 - 0x90000000 ( 256 MB)
modules : 0x7f000000 - 0x80000000 ( 16 MB)
.text : 0x80008000 - 0x803dfc08 (3936 kB)
.init : 0x803e0000 - 0x804124c0 ( 202 kB)
.data : 0x80414000 - 0x8044f1e0 ( 237 kB)
.bss : 0x8044f2c8 - 0x8047312c ( 144 kB)
1 Like
Can u tell me how to root the device?
You could use a modded kernel cpio like I do and package init in it to start telnet and install full busybox.
Thanks to adron who figured it out when we were struggling with Mikrotik and ipq40xx
1 Like
Hi PolynomiallDivision, this https://github.com/robimarko/openwrt/tree/LHGG-60ad-PR works directly with the wAP 60G.
Just follow the instructions and you will have root access on your device
1 Like
I can not use hostapd with this image. Seems like a driver issue with the wil6210
,
kern.err kernel: [ 1023.408798] wil6210 0000:01:00.0 wlan0: wmi_call: wmi_call(0x0822->0x1821) timeout 100 msec
daemon.err hostapd: Failed to set beacon parameters
Here is the whole log
daemon.err hostapd: Configuration file: /var/run/hostapd-phy0.conf
kern.info kernel: [ 1022.737600] wil6210 0000:01:00.0 wlan0: _wil6210_disconnect: disconnect bssid= (null), reason=3
kern.info kernel: [ 1022.737663] wil6210 0000:01:00.0 wlan0: _wil6210_disconnect_complete: disconnect_complete: bssid= (null), reason=3
kern.info kernel: [ 1022.829868] wil6210 0000:01:00.0 wlan0: wil_get_bl_info: Boot Loader struct v2: MAC = c4:ad:34:26:33:31 RF = 0x0000 (status 0x0000) bband = 0x00000000
kern.info kernel: [ 1022.830271] wil6210 0000:01:00.0 wlan0: wil_get_bl_info: Boot Loader build 255.255.0.7253
kern.info kernel: [ 1022.843096] wil6210 0000:01:00.0 wlan0: wil_set_oob_mode: oob_mode to 0
kern.info kernel: [ 1022.851306] wil6210 0000:01:00.0 wlan0: wil_reset: Use firmware <wil6210.fw> + board <wil6210.brd>
kern.info kernel: [ 1022.886212] wil6210 0000:01:00.0 wlan0: wmi_evt_ready: FW ver. 5.2.0.18(SW 18); MAC c4:ad:34:26:33:31; 0 MID's
kern.info kernel: [ 1022.886291] wil6210 0000:01:00.0 wlan0: wil_wait_for_fw_ready: FW ready after 10 ms. HW version 0x00000002
kern.info kernel: [ 1022.895299] wil6210 0000:01:00.0 wlan0: wil_configure_interrupt_moderation: set ITR_TX_CNT_TRSH = 500 usec
kern.info kernel: [ 1022.904817] wil6210 0000:01:00.0 wlan0: wil_configure_interrupt_moderation: set ITR_TX_IDL_CNT_TRSH = 13 usec
kern.info kernel: [ 1022.914430] wil6210 0000:01:00.0 wlan0: wil_configure_interrupt_moderation: set ITR_RX_CNT_TRSH = 500 usec
kern.info kernel: [ 1022.924401] wil6210 0000:01:00.0 wlan0: wil_configure_interrupt_moderation: set ITR_RX_IDL_CNT_TRSH = 13 usec
kern.info kernel: [ 1022.933954] wil6210 0000:01:00.0 wlan0: wil_refresh_fw_capabilities: keep_radio_on_during_sleep (0)
kern.info kernel: [ 1022.950612] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
kern.info kernel: [ 1022.966870] wil6210 0000:01:00.0 wlan0: _wil6210_disconnect: disconnect bssid= (null), reason=2
kern.info kernel: [ 1022.966922] wil6210 0000:01:00.0 wlan0: _wil6210_disconnect_complete: disconnect_complete: bssid= (null), reason=2
kern.info kernel: [ 1022.974942] wil6210 0000:01:00.0 wlan0: _wil6210_disconnect: disconnect bssid=ff:ff:ff:ff:ff:ff, reason=2
kern.info kernel: [ 1022.984925] wil6210 0000:01:00.0 wlan0: _wil6210_disconnect_complete: disconnect_complete: bssid=ff:ff:ff:ff:ff:ff, reason=2
daemon.err hostapd: Using interface wlan0 with hwaddr c4:ad:34:26:33:31 and ssid "OpenWrt"
kern.info kernel: [ 1022.995683] wil6210 0000:01:00.0 wlan0: _wil6210_disconnect: disconnect bssid= (null), reason=3
kern.info kernel: [ 1023.005961] wil6210 0000:01:00.0 wlan0: _wil6210_disconnect_complete: disconnect_complete: bssid= (null), reason=3
kern.info kernel: [ 1023.105677] wil6210 0000:01:00.0 wlan0: wil_get_bl_info: Boot Loader struct v2: MAC = c4:ad:34:26:33:31 RF = 0x0000 (status 0x0000) bband = 0x00000000
kern.info kernel: [ 1023.105798] wil6210 0000:01:00.0 wlan0: wil_get_bl_info: Boot Loader build 255.255.0.7253
kern.info kernel: [ 1023.118270] wil6210 0000:01:00.0 wlan0: wil_set_oob_mode: oob_mode to 0
kern.info kernel: [ 1023.126465] wil6210 0000:01:00.0 wlan0: _wil6210_disconnect: disconnect bssid= (null), reason=3
kern.info kernel: [ 1023.132794] wil6210 0000:01:00.0 wlan0: _wil6210_disconnect_complete: disconnect_complete: bssid= (null), reason=3
kern.info kernel: [ 1023.188742] wil6210 0000:01:00.0 wlan0: wil_get_bl_info: Boot Loader struct v2: MAC = c4:ad:34:26:33:31 RF = 0x0000 (status 0x0000) bband = 0x00000000
kern.info kernel: [ 1023.188793] wil6210 0000:01:00.0 wlan0: wil_get_bl_info: Boot Loader build 255.255.0.7253
kern.info kernel: [ 1023.201162] wil6210 0000:01:00.0 wlan0: wil_set_oob_mode: oob_mode to 0
kern.info kernel: [ 1023.209402] wil6210 0000:01:00.0 wlan0: wil_reset: Use firmware <wil6210.fw> + board <wil6210.brd>
kern.info kernel: [ 1023.243183] wil6210 0000:01:00.0 wlan0: wmi_evt_ready: FW ver. 5.2.0.18(SW 18); MAC c4:ad:34:26:33:31; 0 MID's
kern.info kernel: [ 1023.243263] wil6210 0000:01:00.0 wlan0: wil_wait_for_fw_ready: FW ready after 10 ms. HW version 0x00000002
kern.info kernel: [ 1023.252267] wil6210 0000:01:00.0 wlan0: wil_configure_interrupt_moderation: set ITR_TX_CNT_TRSH = 500 usec
kern.info kernel: [ 1023.261787] wil6210 0000:01:00.0 wlan0: wil_configure_interrupt_moderation: set ITR_TX_IDL_CNT_TRSH = 13 usec
023.271422] wil6210 0000:01:00.0 wlan0: wil_configure_interrupt_moderation: set ITR_RX_CNT_TRSH = 500 usec
kern.info kernel: [ 1023.281376] wil6210 0000:01:00.0 wlan0: wil_configure_interrupt_moderation: set ITR_RX_IDL_CNT_TRSH = 13 usec
kern.info kernel: [ 1023.290923] wil6210 0000:01:00.0 wlan0: wil_refresh_fw_capabilities: keep_radio_on_during_sleep (0)
kern.err kernel: [ 1023.408798] wil6210 0000:01:00.0 wlan0: wmi_call: wmi_call(0x0822->0x1821) timeout 100 msec
daemon.err hostapd: Failed to set beacon parameters
kern.info kernel: [ 1024.210927] wil6210 0000:01:00.0 wlan0: wmi_event_handle: Unhandled event 0x1821
kern.info kernel: [ 1024.212092] wil6210 0000:01:00.0 wlan0: _wil6210_disconnect: disconnect bssid= (null), reason=2
kern.info kernel: [ 1024.217417] wil6210 0000:01:00.0 wlan0: _wil6210_disconnect_complete: disconnect_complete: bssid= (null), reason=2
kern.info kernel: [ 1024.226469] wil6210 0000:01:00.0 wlan0: _wil6210_disconnect: disconnect bssid=ff:ff:ff:ff:ff:ff, reason=3
kern.info kernel: [ 1024.236391] wil6210 0000:01:00.0 wlan0: _wil6210_disconnect_complete: disconnect_complete: bssid=ff:ff:ff:ff:ff:ff, reason=3
daemon.err hostapd: Interface initialization failed
daemon.notice hostapd: wlan0: interface state UNINITIALIZED->DISABLED
daemon.notice hostapd: wlan0: AP-DISABLED
daemon.err hostapd: wlan0: Unable to setup interface.
daemon.notice hostapd: wlan0: interface state DISABLED->DISABLED
kern.info kernel: [ 1024.247228] wil6210 0000:01:00.0 wlan0: _wil6210_disconnect: disconnect bssid=ff:ff:ff:ff:ff:ff, reason=3
kern.info kernel: [ 1024.257401] wil6210 0000:01:00.0 wlan0: _wil6210_disconnect_complete: disconnect_complete: bssid=ff:ff:ff:ff:ff:ff, reason=3
daemon.notice hostapd: wlan0: AP-DISABLED
daemon.notice hostapd: wlan0: CTRL-EVENT-TERMINATING
daemon.err hostapd: hostapd_free_hapd_data: Interface wlan0 wasn't started
daemon.notice hostapd: nl80211: deinit ifname=wlan0 disabled_11b_rates=0
kern.info kernel: [ 1024.343507] wil6210 0000:01:00.0 wlan0: _wil6210_disconnect: disconnect bssid= (null), reason=3
kern.info kernel: [ 1024.343897] wil6210 0000:01:00.0 wlan0: _wil6210_disconnect_complete: disconnect_complete: bssid= (null), reason=3
kern.info kernel: [ 1024.424338] wil6210 0000:01:00.0 wlan0: wil_get_bl_info: Boot Loader struct v2: MAC = c4:ad:34:26:33:31 RF = 0x0000 (status 0x0000) bband = 0x00000000
kern.info kernel: [ 1024.424758] wil6210 0000:01:00.0 wlan0: wil_get_bl_info: Boot Loader build 255.255.0.7253
kern.info kernel: [ 1024.437607] wil6210 0000:01:00.0 wlan0: wil_set_oob_mode: oob_mode to 0
daemon.notice hostapd: ELOOP: remaining socket: sock=22 eloop_data=0xb6fc1560 user_data=0 handler=0x52800
daemon.notice netifd: radio0 (2260): cat: can't open '/var/run/wifi-phy0.pid': No such file or directory
That is weird as my branch worked when I tried it last time.
Are you using my branch or something rebased?
1 Like
I think I used the rebased
one.
Hm, that is really weird as I tested that LHGG-60ad-PR-rebase branch before pushing.
Can you share your wireless config and hostapd config?
Wireless config:
config wifi-device 'radio0'
option type 'mac80211'
option channel '1'
option hwmode '11ad'
option path 'soc/40000000.pci/pci0000:00/0000:00:00.0/0000:01:00.0'
# option disabled '1'
config wifi-iface 'default_radio0'
option device 'radio0'
option network 'lan'
option mode 'ap'
option ssid 'OpenWrt'
option encryption 'none'
hostapd config:
driver=nl80211
logger_syslog=127
logger_syslog_level=2
logger_stdout=127
logger_stdout_level=2
hw_mode=ad
beacon_int=100
channel=1
interface=wlan0
ctrl_interface=/var/run/hostapd
bss_load_update_period=60
chan_util_avg_period=600
disassoc_low_ack=1
preamble=1
wmm_enabled=1
ignore_broadcast_ssid=0
uapsd_advertisement_enabled=1
utf8_ssid=1
multi_ap=0
auth_algs=1
wpa=0
ssid=OpenWrt
bssid=c4:ad:34:26:33:31
Hm, this is some weird bug as basically wmi call is not completing.
I am gonna be rebasing the whole patch series the following weekend so I cant test anything before.
You are trying to use this on which device?
wAP60G
Thank you.
Or which github branch should I use?
Well, I only tested this on LHGG60.
You are using the current branch, like I said I will be rebasing it the following weekend and will test how it works then.
1 Like
If I install full wpad
instead of wpad-basic
the chip seems to work. But, I can not get a connection between two wap 60G
.
Yeah, you need the full version.
Whats the distance between them?
Also, try disabling power saving as that really reduces output power
50cm...
The output looks like this
wil6210 0000:01:00.0 wlan0: wil_get_bl_info: Boot Loader build 255.255.0.7253
wil6210 0000:01:00.0 wlan0: wil_set_oob_mode: oob_mode to 0
wil6210 0000:01:00.0 wlan0: _wil6210_disconnect: disconnect bssid= (null), reason=3
wil6210 0000:01:00.0 wlan0: _wil6210_disconnect_complete: disconnect_complete: bssid= (null), reason=3
wil6210 0000:01:00.0 wlan0: wil_get_bl_info: Boot Loader struct v2: MAC = c4:ad:34:26:33:31 RF = 0x0000 (status 0x0000) bband = 0x00000000
wil6210 0000:01:00.0 wlan0: wil_get_bl_info: Boot Loader build 255.255.0.7253
wil6210 0000:01:00.0 wlan0: wil_set_oob_mode: oob_mode to 0
wil6210 0000:01:00.0 wlan0: wil_reset: Use firmware <wil6210.fw> + board <wil6210.brd>
wil6210 0000:01:00.0 wlan0: wmi_evt_ready: FW ver. 5.2.0.18(SW 18); MAC c4:ad:34:26:33:31; 0 MID's
wil6210 0000:01:00.0 wlan0: wil_wait_for_fw_ready: FW ready after 10 ms. HW version 0x00000002
wil6210 0000:01:00.0 wlan0: wil_configure_interrupt_moderation: set ITR_TX_CNT_TRSH = 500 usec
wil6210 0000:01:00.0 wlan0: wil_configure_interrupt_moderation: set ITR_TX_IDL_CNT_TRSH = 13 usec
wil6210 0000:01:00.0 wlan0: wil_configure_interrupt_moderation: set ITR_RX_CNT_TRSH = 500 usec
wil6210 0000:01:00.0 wlan0: wil_configure_interrupt_moderation: set ITR_RX_IDL_CNT_TRSH = 13 usec
wil6210 0000:01:00.0 wlan0: wil_refresh_fw_capabilities: keep_radio_on_during_sleep (0)
wil6210 0000:01:00.0 wlan0: wmi_call: wmi_call(0x0822->0x1821) timeout 100 msec
wil6210 0000:01:00.0 wlan0: wmi_event_handle: Unhandled event 0x1821
wil6210 0000:01:00.0 wlan0: wmi_event_handle: Unhandled event 0x1821
running hostapd
.
On the wpa_supplicant
I constantly get a segmentation fault.
This is really weird.
I was not getting anything similar to that.
Have you tried disabling power save as that was causing really bad signal and performance for me
Can u shortly describe how to turn off power saving?
Okay, then I compile your git, the wpa_supplicant seems to work.
Then I reinstall wpad
from feed repro, wpa_supplicant always has a segmentation fault.
But, the hostapd does not work if I use the compiled version. 1
Can u maybe just give me an image that was working for you?
Edit:
I tried to use the rebase to the latest master but
FATAL ERROR: Couldn't open "openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-4.19.88/arch/arm/boot/dts/qcom-ipq4019-lhgg-60ad.dtb": No such file or directory
I can only find the qcom-ipq4019-lhgg-60ad.dts
file...