OpenWrt on RTL8196e (Totolink Ex200, Comfast CF-WR302S)

Hi,
I'm trying to run Openwrt on this devices, I could compile it from sources but I need to find the way to write it to flash.
This type of devices has RAM build in into SoC . bootloader boot96E_32M didn't work for me, console showes only "booting..." nothing else happens. bootloader supports pushing image through tftp but my specific device doesn't have network interfaces only wireless. I use SPI programmer to try different roms on it.
Trere is lot of info here:
https://openwrt.org/inbox/toh/totolink_n300rt
Similar cpu but bootloader didn't work for me , openwrt should work.
Bootlog from Totolink Ex200 Rom installed on my device:
Booting...

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@
@ chip__no chip__id mfr___id dev___id cap___id size_sft dev_size chipSize
@ 0000000h 0c84017h 00000c8h 0000040h 0000017h 0000000h 0000017h 0800000h
@ blk_size blk__cnt sec_size sec__cnt pageSize page_cnt chip_clk chipName
@ 0010000h 0000080h 0001000h 0000800h 0000100h 0000010h 000004eh GD25Q64
@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

---RealTek(RTL8196E)at 2014.10.24-17:33+0800 v1.2 16bit
no sys signature at 00010000!
no sys signature at 00020000!
no rootfs signature at 000E0000!
no rootfs signature at 000F0000!
Jump to image start=0x80500000...
decompressing kernel:
Uncompressing Linux... done, booting the kernel.
done decompressing kernel.
start address: 0x80003470
Realtek WLAN driver - version 1.6 (2013-02-21)(SVN:5991M)
Adaptivity function - version 7.1

Probing RTL8186 10/100 NIC-kenel stack size order[3]...
chip name: 8196C, chip revid: 0
NOT YET
eth0 added. vid=9 Member port 0x10...
eth1 added. vid=8 Member port 0x10...
eth2 added. vid=9 Member port 0x2...
eth3 added. vid=9 Member port 0x4...
eth4 added. vid=9 Member port 0x8...
eth5 added. vid=9 Member port 0x0...
[peth0] added, mapping to [eth1]...
Realtek FastPath:v1.03
init started: BusyBox v1.13.4 (cp: cannot stat '/bin/pppoe.sh': No such file or directory
Using ori config
Read hw setting header failed!
Invalid hw setting signature [sig=]!
Read hw setting header failed!
Invalid hw setting signature [sig=]!
Read hw setting header failed!
Invalid hw setting signature [sig=]!
[Notice]:Bak_hw is invaild and Ori_hw is valid,Save ori_hw to bak_hw
[Notice]:Bak_ds is invaild and Ori_ds is valid,Save ori_ds to bak_ds
[Notice]:Bak_cs is invaild and Ori_cs is valid,Save ori_cs to bak_cs
Init Start...
DEFAULT LANGUAGE_TYPE is [3][0:cn;1:en;2:tw;3:vn;4...]
Init bridge interface...
killall: reload: no process killed
open /proc/custom_Passthru_wlan: No such file or directory
Start NTP daemon

Init system...
sh: ntp_inet: not found
cat: can't open '/tmp/wscd_status': No such file or directory
cat: can't open '/tmp/wscd_status': No such file or directory
sh: can't create /mnt/SysCurVerMd5: Read-only file system
cat: can't open '/tmp/wscd_status': No such file or directory
cat: can't open '/tmp/wscd_status': No such file or directory
killall: cs_daemon: no process killed
cat: can't open '/tmp/wscd_status': No such file or directory
cat: can't open '/tmp/wscd_status': No such file or directory
2018-04-09 14:21:26: (log.c.97) server started
cat: can't open '/tmp/wscd_status': No such file or directory

If someone interested and has SPI programmer, we can try to make openwrt running on this devices.

Thanks.

RTL8196E = Lexra -> Not supported, dead end.

See https://openwrt.org/docs/techref/hardware/soc/soc.realtek#adding_support_for_lexra for details.

It's not supported for current release but it still can run LEDE 15... I think it would be still much better then stock firmware...

No, it can't - aside from this particular version not existing in the first place, no lexra SOC has every been supported in OpenWrt or LEDE.

  1. OpenWrt kernel loader for Realtek RTL819X

  2. Copyright (C) 2011 Gabor Juhos juhosg@openwrt.org

  3. Copyright (C) 2017 Weijie Gao hackpascal@gmail.com

  4. Decompressing kernel... done!

  5. Starting kernel at 80000000...

  6. [ 0.000000] Linux version 4.4.49 (hackpascal@HackPascalDesk) (gcc version 5.4.0 (LEDE GCC 5.4.0 r3503-a11243578a) ) #0 Wed Feb 15 23:46:29 2017

  7. [ 0.000000] bootconsole [early0] enabled

  8. [ 0.000000] CPU0 revision is: 0000cd01 (Lexra LX4380 / RLX4181)

  9. [ 0.000000] Realtek SoC: Realtek RTL8196C rev B

  10. [ 0.000000] Determined physical RAM map:

  11. [ 0.000000] memory: 02000000 @ 00000000 (usable)

  12. [ 0.000000] Initrd not found or empty - disabling initrd

This is extract from [hackpascal] post.

Yes with version was wrong it is 17 ... as from screenshot...
To bad that wireless driver wasn't implemented so maybe only option is Realtek SDK.

That's still not LEDE, nor OpenWrt, but some vendor fork. Please contact them for support, we can't help you (support for these lexra devices doesn't exist in OpenWrt/ LEDE and never has).

Maybe someone still be interested to make version even if it wouldn't be oficially supported...

There's really no point when you can now buy supported hardware that will blow the doors off of that thing for less than $25.

2 Likes

I have 10 smart wall dimmers around my home that uses this CPU, and lot of people have this extenders as I can see there are lot of them on sale so having alternative FW is alwais good.

1 Like

I have made a port for RTL8196E to the last master of openwrt.
The SoC dont have the network driver yet, but is working in serial port from bootloader...
Testing and help is welcome :slight_smile:
https://github.com/ggbruno/openwrt

1 Like

that's fine :slight_smile:
qtech qbr-1041w also has that chip

I read ` this firmwares with openwrt on Rtl819x chips are not using yet hardware acceleration
and traffic speeds are low
I wanted change to openwrt for better VLAN configuration

here is most newer documentation that I could find (there is something about hardware acceleration)
https://max.book118.com/html/2017/0721/123288839.shtm

this seems more detailed than old one https://www.osslab.com.tw/wp-content/uploads/2017/01/

but sadly only 63 pages are available (i dont understand chinease to download all :))

and could not find anywhere else

I am sharing this hoping be useful :slight_smile:

The hardware acceleration can now be implemented using the hooks that are present in the 5.4 kernel... Same way as mt7621 had done... I just have to find time to implement that... Its not my priority... I can get around 50mbps in the ethernet with flow offloading (software acceleration in 8196E.. With 97D and F I can get full 100mbps)....

Realtek had release all drivers in their custom openwrt a long time ago. The documentation is there too.. We just need to maintain their code.... As we bring their code to the new openwrt master, we can improve its performace...
https://sourceforge.net/projects/rtl819x/files/

1 Like

I am not pro
but realtek is terrible in everything (buggy, low support)

so that's fine that you decided to deal with porting openWRT :slight_smile:

thank you :slight_smile:

Will try your port, regarding network drivers would it be hard to incorporate them ? Thanks.

I'm working with the partial port for the ethernet switch made by hackpascal.... Its a little tricky because its made for 96C.... When I get something workable, I will incorporate it...
For now, the 96E wifi driver can be used (8192EE that is in kernel)...

I have been able to build and boot OpenWRT from your repo, but my hardware has the rtl8192er wireless. It doesn't look like it's supported in mainline kernel. Or should it be?

Looking forward to any progress with the NIC driver, thanks.

Great! I pretend to release the nic switch soon... working on dsa and kernel 5.4 for master support...

About the wireless driver... Have you tried the 92ee driver? It gives some warnings or errors in the log? I know they are different, but they share the same origin :slight_smile: ... I will look if I can make a patch or something for er... I think the major problem will be the wireless firmware....

1 Like

hello gaspare :slight_smile:

how is going your progress on RTL8196e ??

release is soon ?? :slight_smile:

1 Like