Support for Easybox 904 LTE

On the EB904, Wifi is "external" to the system and a bit of a black box. One can send commands but it won't accept all (documented) commands, and if it does it returns hardly any confirmations or status information. That's probably why LuCI cannot really show its status.

I dabbled with the EB904's Wifi some time ago, so my memory is a bit hazy. But I seem to remember that it doesn't accept all of the commands it should, "country code" being one of them. Also, it seemed like it would accept certain commands only once and never after.

I'm almost sure one could make the LuCI interface show if not the current status then at least the current configuration and allow to modify it, but noone took the time or made the effort to do so yet.

And is there an alternative way, to configure wlan on the eb904?

Or what do you recommend?

I'm also still interested in future development on this device.

What can we do to solve the issues?

Actually I'm still confused how to come to a working Box with VVDSL support, working (fast) wifi and fast switching speed between wan, lan and wifi.

Thanks @Plonk34, @kovz and @QAuge for their investigation and hard work you already put into this devil device.

I would really love to understand these whole problems with so many different devices.

Unfortunately it seems actually an unrealistic dreaming to get one fully working device with OpenWRT.

  • Even my recommended BT Hub 5A has still problems with high throughput in wifi and it's a mess to update via serial always the box.

So I don't know if this whole openwrt world is not slowly dieing because we can't get through the important (performance) doors with any device.

I would love to give more to this community than complaining within the last month, but I unfortunately can't really debug and compile whole images. I can just use the chef online builder and put things together and try out. Also soldering is OK, but when it comes to hardware acceleration implementation things in source code I can't help and it's always a hustle to find any solution for such problems instead of using somehow the original source for it...

In the meantime usually people give up and buy a FritzBox and are happy...

The performance is roughly similar between all VRX2xx devices, aside from the decision of enabling FXS ports (and thereby sacrificing a mips core to them) or retaining SMP support. So if your BT Home Hub 5 Type A isn't fast enough, the Easybox 904 xDSL won't be either (given that it has FXS ports, it will be considerably slower (55-60 MBit/s at most) - and its WLAN isn't as good as on the BTHub5 either). With the advent of super vectoring (profile 35b), the days of VRX2xx devices are numbered anyways (GRX3xx/ GRX550/ GRX750, which would support super vectoring, aren't supported by OpenWrt yet).

Unfortunately there is a big problem with drivers. I have found inic driver absolutely spontaneous! There is no datasheet for lantiq IC and most important drivers is closed. Currently I'm trying to bring up LTE version. It looks more simple than xDSL version, but still has a lot of problems. And both versions is outdated due to luck of WiFi ac standard support.

Of course, you can edit the /etc/config/wireless config file directly through the shell.

Somebody would probably have a deeper look why LuCI doesn't pick up on the settings. I reckon it's a minor thing why it currently fails to do so. As for the fact that it doesn't display the current status, I'm afraid that will not happen unless someone reverse engineers what the original firmware uses to do it. I distinctly remember that with the current means I couldn't get any status information no matter what I tried.

I have never used luci no idea if it works.
Did you mean "at the moment '00' and signal power is 0" in luci

Modifie the /etc/config/wireless via SSH and reboot the wifi via: /etc/init.d/rt3883 boot
see the /etc/init.d/rt3883 for single commands.
Some values can be change with the old iwconfig and iwpriv commands.
@kovs should correct me, but he background are it based on a very old driver time before using the default nl80211 connection of the linuxkernel.

yes it is normal flash_eraseall do not exist anymore.
use:

flash_erase /dev/mtd0 0x0 0x2
nandwrite -p /dev/mtd0 u-boot.lq

instead

The combination of @pc2005 patches

and
software flow offloading
brings 88Mbit/s from 94Mbit/s VDSL speed. (no SMP support, i use the FXS ports)

At the moment it is the only solution for VVDSL (up to profile 30a) and Telefon support i can not see that there are somthing change in the next future.
An other thing are these devices second hand are really cheap in Germany.

I do it long time too but i more and more understand why openwrt official support only wifi and ethernet.
Every time when i make an build somthing else does not correct work

At the moment the biggest problem are SQM (using the tc command) in combination with the Wifi driver reboot the devices.
(see here: SQM reboot my Router (Easybox 904xDSL))

@Plonk34 thanks for your information about the rt3884 driver.

What I don't understand is on the device is an Openwrt Backfire previous version originally and it worked quite OK, why is it than so difficult with newer versions?

@ suppenkasper0815

No idea i have no investigate it, i thing @kovs have more know how.

####################################################################################

@all
The kernelversion for the lantiq devices was changed from 4.14.x to 4.19.x
I modifie the pullrequest for it. (It was was simple the most kernelpatches can be leave)
I do only a short test and the Devices works in general.

The bad new is that the wifi driver does not work anymore.
First building is not possible because init_timer(..) function does not exist in 4.19
I replace by setup_timer(..)

my modified ./comm/raconfig.c
https://pastebin.com/tHbuBuNy
and the resulting patch
https://pastebin.com/JuKQksKx

Them building are possible but it reboot the device with:
On first try (the first try differ always from the rest)

root@OpenWrt:~# ./rt3883 boot
Insmod with MAC1=4c:09:d4:15:10:54 and MAC2=4c:09:d4:15:10:56
[  354.149085] Warnning!! syncmiimac is foreced to 0 in dual concurrent mode.
[  354.154665] RT3883iNIC: 802.11n WLAN MII driver v2.4.0.6 (Feb. 09, 2011)
[  354.161435] eth0.3: Master at 0x0, 00:11:22:33:44:55
[  354.166326] Use default profile path.
[  354.169907] -----> mii_hardware_reset
[  354.183638] -----> mii_hardware_reset
[  354.185921] Update MAC(0)=4c:09:d4:15:10:54
[  354.190080] ============= Init Thread ===================
[  354.198371] RacfgTaskThread pid = 2076
[  354.200942] RacfgBacklogThread pid = 2077
[  354.206381] wl000: Ralink iNIC at 0x0, 4c:09:d4:15:10:54
[  354.213840] Ignored command_type: 1, command_id: 1 
[  354.224184] Update MAC(0)=4c:09:d4:15:10:56
[  354.226971] ============= Init Thread ===================
[  354.269925] RacfgTaskThread pid = 2082
[  354.273989] RacfgBacklogThread pid = 2084
[  354.278184] wl010: Ralink iNIC at 0x0, 4c:09:d4:15:10:56
[  354.316261] iNIC Open wl000
[  354.317759] -----> mii_hardware_reset
[  355.349509] -----> mii_hardware_reset
[  355.351738] Op mode = 1
[  355.354252] ConcurrentObj.CardCount=0
[  355.357867] Read profile[0]
[  355.363549] BssidNum=2
[  355.366144] Read profile[1]
[  355.368938] BssidNum=2
[  355.371508] rlk_inic_mbss_init (pAd->RaCfgObj.BssidNum=2)
[  355.375549] rlk_inic_mbss_init --->
[  355.379053] Register MBSSID IF (wl001)
[  355.384233] register_netdev done
[  355.386112] rlk_inic_mbss_init <---
[  355.389548] ConcurrentObj.CardCount=0 init_flag=0
[  355.394237] Wait for boot done...
[  355.397545] Call RaCfgWaitSyncRsp
[  355.402357] RACFG_CMD_BOOT_NOTIFY
[  355.404306] Firmware path iNIC/RT3883/iNIC_ap.bin
[  355.409024] Profile[0] path iNIC/RT3883/iNIC_ap.dat, read path iNIC/RT3883/iNIC_ap.dat
[  355.416904] EEPROM[0] path iNIC/RT3883/iNIC_e2p.bin, read path iNIC/RT3883/iNIC_e2p.bin
[  355.424905] Profile[1] path iNIC/RT3883/iNIC_ap1.dat, read path iNIC/RT3883/iNIC_ap1.dat
[  355.432998] EEPROM[1] path iNIC/RT3883/iNIC_e2p1.bin, read path iNIC/RT3883/iNIC_e2p1.bin
[  355.441196] Request file: iNIC/RT3883/iNIC_ap.bin
[  355.710247] Request file: iNIC/RT3883/iNIC_ap.dat
[  355.713977] Request file: iNIC/RT3883/iNIC_e2p.bin
[  355.719698] Request file: iNIC/RT3883/iNIC_ap1.dat
[  355.723805] Request file: iNIC/RT3883/iNIC_e2p1.bin
[  355.729384] Upload Profile 1024 bytes from file, 0 from extra...

> here it have no reaction if after 30 seconds ( reboot by watchdog ? )

on the 2, 3 n times:

...
[  159.826860] Request file: iNIC/RT3883/iNIC_ap1.dat
[  159.831331] Request file: iNIC/RT3883/iNIC_e2p1.bin
[  159.836676] Upload Profile 1024 bytes from file, 0 from extra...
[  159.841624] Unhandled kernel unaligned access[#1]:
[  159.846198] CPU: 0 PID: 1939 Comm: RaCfg Task Tainted: G         C        4.19.56 #0
[  159.853933] $ 0   : 00000000 00000001 80736360 00000001
[  159.859154] $ 4   : 80d2c9c9 86779bd4 861204a0 00000000
[  159.864376] $ 8   : 00000001 50415053 0a575041 50534b33
[  159.869598] $12   : 3d0a5750 37800000 0000013d 4150534b
[  159.874821] $16   : 00000001 86120644 806dbfe4 80736360
[  159.880043] $20   : 00040000 86779bd4 80d2c9c9 00000001
[  159.885266] $24   : 00000000 00000000                  
[  159.890488] $28   : 86778000 86779b70 00000000 80096fc4
[  159.895711] Hi    : 00000053
[  159.898584] Lo    : a8f5c3de
[  159.901476] epc   : 8054fa80 _raw_spin_lock_irqsave+0x1c/0x64
[  159.907225] ra    : 80096fc4 lock_timer_base+0x6c/0xbc
[  159.912336] Status: 1100ff02	KERNEL EXL 
[  159.916254] Cause : 00800010 (ExcCode 04)
[  159.920257] BadVA : 80d2c9c9
[  159.923130] PrId  : 00019556 (MIPS 34Kc)
[  159.927045] Modules linked in: rt3883_iNIC iptable_nat ipt_MASQUERADE xt_state xt_nat xt_conntrack xt_REDIRECT xt_FLOWOFFLOAD xt_CT pppoe nf_nat_ipv4 nf_nat nf_flow_table_hw nf_flow_table nf_conntrack_rtcache nf_conntrack ipt_REJECT xt_time xt_tcpudp xt_multiport xt_mark xt_mac xt_limit xt_comment xt_TCPMSS xt_LOG pppox ppp_async nf_reject_ipv4 nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 ltq_deu_vr9 iptable_mangle iptable_filter ip_tables drv_vmmc crc_ccitt drv_dsl_cpe_api drv_mei_cpe nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 pppoatm ppp_generic slhc br2684 atm drv_tapi drv_ifxos fb_ili9341_eb904 fbtft(C) fb_sys_fops backlight sysimgblt sysfillrect syscopyarea fb font dwc2 gpio_button_hotplug
[  159.993819] Process RaCfg Task (pid: 1939, threadinfo=bb2a0ea3, task=7c6cd506, tls=00000000)
[  160.002247] Stack : 00000000 00000001 00000000 8007ea18 00000000 ffffffe5 861204a0 80096fc4
[  160.010602]         86118ca0 86779bfc 8600f380 8600f100 86120644 8600f100 867c9bbc ffff780a
[  160.018958]         86102f84 80660000 80840000 800979c4 8600f380 8600f100 86118ca0 86779bfc
[  160.027314]         86102f84 8007f0d4 8600f380 8600f100 867c9bbc 861204a0 86102f84 80660000
[  160.035670]         80840000 86105f60 86042b94 00000400 00000000 00000000 00000000 00000001
[  160.044026]         ...
[  160.046464] Call Trace:
[  160.048911] [<8054fa80>] _raw_spin_lock_irqsave+0x1c/0x64
[  160.054314] [<80096fc4>] lock_timer_base+0x6c/0xbc
[  160.059095] [<800979c4>] mod_timer+0x94/0x1b4
[  160.063470] [<86105f60>] _append_extra_profile2+0xde4/0x1820 [rt3883_iNIC]
[  160.070325] Code: 32100001  000000c0  24030001 <c0850000> 14a00005  00000000  00600825  e0810000  1020fffa 
[  160.080060] 
[  160.081712] ---[ end trace 3ebc1fc412e9a498 ]---
[  160.089508] Kernel panic - not syncing: Fatal exception
[  160.095159] Rebooting in 3 seconds..

ROM VER: 1.1.4
CFG 06
...

without using of busybox memdev:

root@OpenWrt:~# ./rt3883 boot
Insmod with MAC1=4c:09:d4:15:10:54 and MAC2=4c:09:d4:15:10:56
[  113.371392] Warnning!! syncmiimac is foreced to 0 in dual concurrent mode.
[  113.376939] RT3883iNIC: 802.11n WLAN MII driver v2.4.0.6 (Feb. 09, 2011)
[  113.383726] eth0.3: Master at 0x0, 00:11:22:33:44:55
[  113.388620] Use default profile path.
[  113.392200] -----> mii_hardware_reset
[  113.405958] -----> mii_hardware_reset
[  113.408252] Update MAC(0)=4c:09:d4:15:10:54
[  113.412399] ============= Init Thread ===================
[  113.419825] RacfgTaskThread pid = 1888
[  113.422378] RacfgBacklogThread pid = 1889
[  113.427818] wl000: Ralink iNIC at 0x0, 4c:09:d4:15:10:54
[  113.442034] Update MAC(0)=4c:09:d4:15:10:56
[  113.444850] ============= Init Thread ===================
[  113.480983] RacfgTaskThread pid = 1893
[  113.487750] RacfgBacklogThread pid = 1896
[  113.491972] wl010: Ralink iNIC at 0x0, 4c:09:d4:15:10:56
[  113.524369] iNIC Open wl000
[  113.525729] -----> mii_hardware_reset
[  114.563312] -----> mii_hardware_reset
[  114.565595] Op mode = 1
[  114.568058] ConcurrentObj.CardCount=0
[  114.571674] Read profile[0]
[  114.577347] BssidNum=2
[  114.579935] Read profile[1]
[  114.582724] BssidNum=2
[  114.585286] rlk_inic_mbss_init (pAd->RaCfgObj.BssidNum=2)
[  114.589328] rlk_inic_mbss_init --->
[  114.592828] Register MBSSID IF (wl001)
[  114.597983] register_netdev done
[  114.599885] rlk_inic_mbss_init <---
[  114.603307] ConcurrentObj.CardCount=0 init_flag=0
[  114.607988] Wait for boot done...
[  114.611293] Call RaCfgWaitSyncRsp


[  154.657588] timeout(40 secs): cmd=0000 no response
[  154.660946] ERROR! can't get target's MAC address, boot fail.
> no response

Have someone any ideas ?
What is the meaning of:

[  159.907225] ra    : 80096fc4 lock_timer_base+0x6c/0xbc
[  159.912336] Status: 1100ff02	KERNEL EXL 
[  159.916254] Cause : 00800010 (ExcCode 04)

Hi.

I followed your patches (thanks =) ), but isn't the timer_setup() missing at
https://pastebin.com/tHbuBuNy Line: 1266
?

Ahh @QAuge great that you are here :smiley:

Hmm it should be inside.
raconfig.c = https://pastebin.com/g91LuYVL
change-raconfig.c-for-linux4.19.patch = https://pastebin.com/kiqY8xrL
I try again with an nealy eqal result.

root@OpenWrt:~# ./rt3883 boot
Insmod with MAC1=4c:09:d4:15:10:54 and MAC2=4c:09:d4:15:10:56
[  123.226683] Warnning!! syncmiimac is foreced to 0 in dual concurrent mode.
[  123.232262] RT3883iNIC: 802.11n WLAN MII driver v2.4.0.6 (Feb. 09, 2011)
[  123.239020] eth0.3: Master at 0x0, 00:11:22:33:44:55
[  123.243915] Use default profile path.
[  123.247526] -----> mii_hardware_reset
[  123.261251] -----> mii_hardware_reset
[  123.263480] Update MAC(0)=4c:09:d4:15:10:54
[  123.267697] ============= Init Thread ===================
[  123.275024] RacfgTaskThread pid = 1878
[  123.277918] RacfgBacklogThread pid = 1879
[  123.282906] wl000: Ralink iNIC at 0x0, 4c:09:d4:15:10:54
[  123.291403] Ignored command_type: 1, command_id: 1 
[  123.300785] Update MAC(0)=4c:09:d4:15:10:56
[  123.303521] ============= Init Thread ===================
[  123.344161] RacfgTaskThread pid = 1884
[  123.348401] RacfgBacklogThread pid = 1886
[  123.352608] wl010: Ralink iNIC at 0x0, 4c:09:d4:15:10:56
[  123.391126] iNIC Open wl000
[  123.392612] -----> mii_hardware_reset
[  124.424067] -----> mii_hardware_reset
[  124.426299] Op mode = 1
[  124.428817] ConcurrentObj.CardCount=0
[  124.432428] Read profile[0]
[  124.438096] BssidNum=2
[  124.440678] Read profile[1]
[  124.443469] BssidNum=2
[  124.446050] rlk_inic_mbss_init (pAd->RaCfgObj.BssidNum=2)
[  124.450091] rlk_inic_mbss_init --->
[  124.453589] Register MBSSID IF (wl001)
[  124.458783] register_netdev done
[  124.460662] rlk_inic_mbss_init <---
[  124.464098] ConcurrentObj.CardCount=0 init_flag=0
[  124.468790] Wait for boot done...
[  124.472096] Call RaCfgWaitSyncRsp
[  124.476165] RACFG_CMD_BOOT_NOTIFY
[  124.480886] Firmware path iNIC/RT3883/iNIC_ap.bin
[  124.484244] Profile[0] path iNIC/RT3883/iNIC_ap.dat, read path iNIC/RT3883/iNIC_ap.dat
[  124.492121] EEPROM[0] path iNIC/RT3883/iNIC_e2p.bin, read path iNIC/RT3883/iNIC_e2p.bin
[  124.500122] Profile[1] path iNIC/RT3883/iNIC_ap1.dat, read path iNIC/RT3883/iNIC_ap1.dat
[  124.508218] EEPROM[1] path iNIC/RT3883/iNIC_e2p1.bin, read path iNIC/RT3883/iNIC_e2p1.bin
[  124.516396] Request file: iNIC/RT3883/iNIC_ap.bin
[  124.781375] Request file: iNIC/RT3883/iNIC_ap.dat
[  124.785082] Request file: iNIC/RT3883/iNIC_e2p.bin
[  124.790914] Request file: iNIC/RT3883/iNIC_ap1.dat
[  124.795000] Request file: iNIC/RT3883/iNIC_e2p1.bin
[  124.800735] Upload Profile 1024 bytes from file, 0 from extra...
[  125.454754] RACFG_CMD_BOOT_NOTIFY
> no reaction

It happen somtimes so and so on loading the same module

...
[  693.656243] RACFG_CMD_BOOT_NOTIFY
[  693.660999] Firmware path iNIC/RT3883/iNIC_ap.bin
[  693.664359] Profile[0] path iNIC/RT3883/iNIC_ap.dat, read path iNIC/RT3883/iNIC_ap.dat
[  693.672245] EEPROM[0] path iNIC/RT3883/iNIC_e2p.bin, read path iNIC/RT3883/iNIC_e2p.bin
[  693.680237] Profile[1] path iNIC/RT3883/iNIC_ap1.dat, read path iNIC/RT3883/iNIC_ap1.dat
[  693.688333] EEPROM[1] path iNIC/RT3883/iNIC_e2p1.bin, read path iNIC/RT3883/iNIC_e2p1.bin
[  693.696512] Request file: iNIC/RT3883/iNIC_ap.bin
[  693.962679] Request file: iNIC/RT3883/iNIC_ap.dat
[  693.966381] Request file: iNIC/RT3883/iNIC_e2p.bin
[  693.972313] Request file: iNIC/RT3883/iNIC_ap1.dat
[  693.976380] Request file: iNIC/RT3883/iNIC_e2p1.bin
[  693.981699] Upload Profile 1024 bytes from file, 0 from extra...
[  693.986709] Unhandled kernel unaligned access[#1]:
[  693.991329] CPU: 0 PID: 2065 Comm: RaCfg Task Tainted: G         C        4.19.56 #0
[  693.999064] $ 0   : 00000000 00000001 80736360 00000001
[  694.004284] $ 4   : 074e4b69 8627fbd4 869284a0 00000000
[  694.009507] $ 8   : 00000001 50415053 0a575041 50534b33
[  694.014729] $12   : 3d0a5750 64000000 0000013f 4150534b
[  694.019952] $16   : 00000001 86928644 806dbfe4 80736360
[  694.025174] $20   : 00040000 8627fbd4 074e4b69 00000001
[  694.030396] $24   : 00000000 00000000                  
[  694.035619] $28   : 8627e000 8627fb70 00000000 80096fc4
[  694.040842] Hi    : 00000062
[  694.043715] Lo    : 28f5c418
[  694.046606] epc   : 8054fa80 _raw_spin_lock_irqsave+0x1c/0x64
[  694.052354] ra    : 80096fc4 lock_timer_base+0x6c/0xbc
[  694.057467] Status: 1100ff02	KERNEL EXL 
[  694.061385] Cause : 00800010 (ExcCode 04)
[  694.065387] BadVA : 074e4b69
[  694.068261] PrId  : 00019556 (MIPS 34Kc)
[  694.072175] Modules linked in: rt3883_iNIC iptable_nat ipt_MASQUERADE xt_state xt_nat xt_conntrack xt_REDIRECT xt_FLOWOFFLOAD xt_CT pppoe nf_nat_ipv4 nf_nat nf_flow_table_hw nf_flow_table nf_conntrack_rtcache nf_conntrack ipt_REJECT xt_time xt_tcpudp xt_multiport xt_mark xt_mac xt_limit xt_comment xt_TCPMSS xt_LOG pppox ppp_async nf_reject_ipv4 nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 ltq_deu_vr9 iptable_mangle iptable_filter ip_tables drv_vmmc crc_ccitt drv_dsl_cpe_api drv_mei_cpe nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 pppoatm ppp_generic slhc br2684 atm drv_tapi drv_ifxos fb_ili9341_eb904 fbtft(C) fb_sys_fops backlight sysimgblt sysfillrect syscopyarea fb font dwc2 gpio_button_hotplug
[  694.138950] Process RaCfg Task (pid: 2065, threadinfo=0e2e251a, task=bb73c495, tls=00000000)
[  694.147378] Stack : 00000000 00000001 00000000 8007ea18 00000000 ffffffe5 869284a0 80096fc4
[  694.155733]         86278d00 8627fbfc 867ad380 86135d80 86928644 86135d80 867ddbbc 000181b1
[  694.164089]         86262fa4 80660000 80840000 800979c4 867ad380 86135d80 86278d00 8627fbfc
[  694.172445]         86262fa4 8007f0d4 867ad380 86135d80 867ddbbc 869284a0 86262fa4 80660000
[  694.180801]         80840000 86265fbc 867e3594 00000400 00000000 00000000 00000000 8086a634
[  694.189156]         ...
[  694.191595] Call Trace:
[  694.194042] [<8054fa80>] _raw_spin_lock_irqsave+0x1c/0x64
[  694.199444] [<80096fc4>] lock_timer_base+0x6c/0xbc
[  694.204226] [<800979c4>] mod_timer+0x94/0x1b4
[  694.208601] [<86265fbc>] _append_extra_profile2+0xde4/0x1820 [rt3883_iNIC]
[  694.215456] Code: 32100001  000000c0  24030001 <c0850000> 14a00005  00000000  00600825  e0810000  1020fffa 
[  694.225191] 
[  694.226862] ---[ end trace 2d0f26f69ecd14f7 ]---
[  694.234655] Kernel panic - not syncing: Fatal exception
[  694.240314] Rebooting in 3 seconds..

I littleit play with it (remove some timer stuff) and i thing the problems is somting with the linux timers.
I thing my code are wrong when i look in some other linux kernel code i found stuff that looks like:

timer_setup(&pAd->RaCfgObj.uploadTimer, upload_timeout, 0);

instead off:

timer_setup(&pAd->RaCfgObj.uploadTimer, (void *)&upload_timeout, (uintptr_t)pAd);

but when i write this i get this error:

  CC [M]  /opt/build/openwrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/ralink_inic-1.0.0/comm/raconfig.o
In file included from ./include/linux/workqueue.h:9:0,
                 from ./include/linux/srcu.h:34,
                 from ./include/linux/notifier.h:16,
                 from ./include/linux/memory_hotplug.h:7,
                 from ./include/linux/mmzone.h:748,
                 from ./include/linux/gfp.h:6,
                 from ./include/linux/umh.h:4,
                 from ./include/linux/kmod.h:22,
                 from ./include/linux/module.h:13,
                 from /opt/build/openwrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/ralink_inic-1.0.0/comm/rlk_inic.h:6,
                 from /opt/build/openwrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/ralink_inic-1.0.0/comm/raconfig.c:1:
/opt/build/openwrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/ralink_inic-1.0.0/comm/raconfig.c: In function '_upload_firmware':
./include/linux/timer.h:114:27: error: passing argument 2 of 'init_timer_key' from incompatible pointer type [-Werror=incompatible-pointer-types]
  init_timer_key((_timer), (_fn), (_flags), NULL, NULL)
                           ^
./include/linux/timer.h:130:2: note: in expansion of macro '__init_timer'
  __init_timer((timer), (callback), (flags))
  ^~~~~~~~~~~~
/opt/build/openwrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/ralink_inic-1.0.0/comm/raconfig.c:1274:3: note: in expansion of macro 'timer_setup'
   timer_setup(&pAd->RaCfgObj.uploadTimer, upload_timeout, 0);
   ^~~~~~~~~~~
./include/linux/timer.h:79:6: note: expected 'void (*)(struct timer_list *)' but argument is of type 'void (*)(uintptr_t) {aka void (*)(long unsigned int)}'
 void init_timer_key(struct timer_list *timer,
      ^~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[4]: *** [/opt/build/openwrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/ralink_inic-1.0.0/comm/raconfig.o] Error 1
make[3]: *** [_module_/opt/build/openwrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/ralink_inic-1.0.0] Error 2
make[3]: Leaving directory `/opt/build/openwrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/linux-4.19.56'
make[2]: *** [/opt/build/openwrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/ralink_inic-1.0.0/.built] Error 2
make[2]: Leaving directory `/opt/build/openwrt/feeds/eb904_driver/kernel/ralink_inic'
time: package/feeds/eb904_driver/ralink_inic/compile#3.37#1.23#13.51
make[1]: *** [package/feeds/eb904_driver/ralink_inic/compile] Error 2
make[1]: Leaving directory `/opt/build/openwrt'
make: *** [package/ralink_inic/compile] Error 2
 

############################################################
At removing memdev:

I read the post Support for Easybox 904 LTE - #139 by kovz
again and again but i do not really understand it.
Anyway i search in the linked source for MII_PCDU_5_REG but i found only the definition in the linked header file

#define MII_PCDU_5_REG (VR9_SWIP_TOP_BASE_ADDR + (0x41 * 4))

Is MII_PCDU_5_REG the Address 0x1e10b204 And where is it used ?
As i say i found not using in the linked source.

OK but i had have the naiv simple idea to put the devmem write part of the init script at the beginning of the Module.
Without understanding

unsigned int *iMemioaddr_MII_CFG_5 	= (void *)0x1e10b200;
writel(0x4024, iMemioaddr_MII_CFG_5);

But the kernel crash with:

[   25.284262] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   33.773786] CPU 0 Unable to handle kernel paging request at virtual address 1e10b200, epc == 867d5eb8, ra == 867b402c
[   33.783054] Oops[#1]:
[   33.785216] CPU: 0 PID: 1497 Comm: insmod Not tainted 4.14.130 #0
[   33.791303] task: 872a72c0 task.stack: 86674000
[   33.795824] $ 0   : 00000000 00000001 1e10b200 24400000
[   33.801046] $ 4   : 00004024 1e10b200 00000001 86717380
[   33.806268] $ 8   : 00009911 00009910 00000001 00000001
[   33.811491] $12   : 00009910 86ae0400 86ae0400 00000114
[   33.816713] $16   : 80800000 00000000 867b4000 80810000
[   33.821935] $20   : 80810000 00000000 867db408 00000028
[   33.827158] $24   : 00000003 80028214                  
[   33.832380] $28   : 86674000 86675c78 80800000 867b402c
[   33.837603] Hi    : 00000000
[   33.840476] Lo    : 00000000
[   33.843465] epc   : 867d5eb8 crc32+0x568/0xf28 [rt3883_iNIC]
[   33.849085] ra    : 867b402c init_module+0x2c/0xa58 [rt3883_iNIC]
[   33.855098] Status: 1100ff03	KERNEL EXL IE 
[   33.859278] Cause : 0080000c (ExcCode 03)
[   33.863281] BadVA : 1e10b200
[   33.866154] PrId  : 00019556 (MIPS 34Kc)
[   33.870069] Modules linked in: rt3883_iNIC(+) pppoe nf_conntrack_ipv6 iptable_nat ipt_REJECT ipt_MASQUERADE xt_time xt_tcpudp xt_state xt_nat xt_multiport xt_mark xt_mac xt_limit xt_conntrack xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_FLOWOFFLOAD xt_CT pppox ppp_async nf_reject_ipv4 nf_nat_redirect nf_nat_masquerade_ipv4 nf_conntrack_ipv4 nf_nat_ipv4 nf_nat nf_log_ipv4 nf_flow_table_hw nf_flow_table nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcache nf_conntrack ltq_deu_vr9 iptable_mangle iptable_filter ip_tables drv_vmmc crc_ccitt drv_dsl_cpe_api drv_mei_cpe nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 pppoatm ppp_generic slhc br2684 atm drv_tapi drv_ifxos gpio_button_hotplug
[   33.935356] Process insmod (pid: 1497, threadinfo=86674000, task=872a72c0, tls=77f1ceb8)
[   33.943443] Stack : 00000001 00000003 1e10b200 24400000 00004024 1e10b200 86514780 8007cc44
[   33.951798]         87010400 00000000 00000000 001f0041 00000001 86514780 80863220 00000000
[   33.960154]         00000000 00000000 86675cc0 001f0041 80830000 80970000 86717600 80807cc0
[   33.968510]         00000000 80830000 807ca3e8 924e750e 80800000 924e750e 867b4000 80002650
[   33.976866]         00000000 80807cc0 00000800 001f0041 00000001 867a7f00 00000800 867a7f00
[   33.985221]         ...
[   33.987662] Call Trace:
[   33.990179] [<867d5eb8>] crc32+0x568/0xf28 [rt3883_iNIC]
[   33.995569] [<867b402c>] init_module+0x2c/0xa58 [rt3883_iNIC]
[   34.001228] Code: afa2000c  8fa20008  8fa3000c <ac430000> 00000000  27bd0010  03e00008  00000000  00000000 
[   34.010899] 
[   34.012523] ---[ end trace 1c14d1d955584722 ]---
[   34.019871] Kernel panic - not syncing: Fatal exception
[   34.025156] Rebooting in 3 seconds..

ROM VER: 1.1.4

Can it happen that is not allowed what i want ?
Can it happen that a kernel module allowed to write in there own space ?

###################################################################
at SQM crashes:
And not to forget that SQM (tc) not working with the driver:

1 Like

We have to rework the timer thingy a little bit deeper. I'll have a look at it.
Completely untested, but maybe in this manner?

1 Like

Great thanks !
I do some tests and it work like before, but the problem with SQM /sheduling / tc exist too.
Is it possible do remove some SQM /sheduling / tc stuff from the driver ?

@Plonk34 I prepared patch for PCDU setup from eth driver. Currently I do not have possibility to check it. At least, there is a main idea for replace the direct memory manipulation with devmem command. pcdu.patch

Cool!

Currently I have problems when booting the kernel. Is your repo ready to go? Can you provide your config?

[    0.000000] Linux version 4.19.56 (mueller@MediaNAS) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 r9245+78-4b403821c6)) #0 SMP Mon Jul 8 04:42:55 2019                                                                                                                             
[    0.000000] SoC: xRX200 rev 1.2                                                                                                     
[    0.000000] bootconsole [early0] enabled            
[    0.000000] CPU0 revision is: 00019556 (MIPS 34Kc)              
[    0.000000] MIPS: machine is EasyBox 904 xDSL    
[    0.000000] Determined physical RAM map:                
[    0.000000]  memory: 006bd000 @ 00002000 (usable)                                                                                   
[    0.000000]  memory: 00141000 @ 006bf000 (usable after init)                                                                        
[    0.000000] Wasting 72 bytes for tracking 2 unused pages                                                                            
[    0.000000] Kernel panic - not syncing: No memory area to place a bootmap bitmap                                                    
[    0.000000] Rebooting in 1 seconds..                                                                                                
[    0.000000] Reboot failed -- System halted

@QAuge unfortunately have the same problem :frowning: Don't know how to solve it. Tried rebase on previous master, but w/o success.

So only Plonk34 can enlighten us :slight_smile:

Maybe we need this one? ( Adapted to our dts)

1 Like

@QAuge @kovs
No i use a openwrt version (63e3c3d from 05.07) with a script like post 135:

And i split it in a SMP and VPE (with telephon) version and use the VPE version.

Sorry i have not test the raw pr001-eb904x branch itself.

OK thanks for the notice i will try to make an build with kovs patch and test it, but
my problem are that my builmaschine are 10years old Laptop or Raspberry-Pi 3 and i need always ca minimum 5hours to build.
And when someting goes wrong i have to wait 5h again.
So i hope i have an result next evening.

Hi there!
The patch "lantiq: dts: move memory node to board dts" fixes the boot problem. I made some changes to my repo to reflect that change.

@Plonk34 Maybe you can speedup the builds with ccache ?

Hi @kovz The patch is titled "Initial LTE support" and modifies the network ports. Does that apply to the EasyBox xDSL or do I mix something up?