OpenWrt Forum Archive

Topic: Realtek SoC support in OpenWrt

The content of this topic has been archived between 22 Sep 2016 and 30 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello the community!

I've been postponing this post since about 2 month, hoping we will get to
some stable quiet bay. But we are still not there so I decided not to wait
any longer :)

We are working on Realtek SoC family support in OpenWrt. Particulatrly rtl8196c,
rtl8196e, rtl8196d and rtl8198. Most of you probably know that Realtek SoCs are
actually Lexra cores (4xxx and 5xxx series) which are modified mips cpus with
few absend instrustions (compared to mips).

There was some interest in rtl8196c based routers seen here, like [1][2][3] and
even rtl8198 [4]. There is also DSL SoC from Realtek [5] but we don't have any
plans to work on that currently.

For now we have rtl8196c + rtl8188re as wifi working pretty stable but several
hacks to OpenWrt build system are needed to compile it. Also we have it
working only with binutils 2.21.1 and gcc 4.5-linaro (4.6-linaro breaks
usb support somehow). Current toolchain patches are based on earlier work of
other OpenWrt members (Florian? Felix?). But we got some support from Realtek
itself and now, looking at their changes and what we had before, we are going
to make gcc 4.8 + binutils 2.22 toolchain.
As for the other chips, rtl8196e boots and seems to be working but without
ethernet and usb and rtl8196d only kernel boot is working (userspace explodes).

Regarding the kernel and drivers we are still at 2.6.30/2.6.32
as this is what can be found in Realtek SDK but major kernel bump is planned.
Wifi driver (rtl8192cd) is already made to be compiled from compat-wireless.
Realtek's code is mostly GPLd or doesn't contain any copyrights so there should
be no legal problems with code porting. Sometimes there are also fake copyrights
(original copyright changed to Realtek).

For those who are interested right now our tree is based on trunk@36713 and all
changes are in realtek-unstable branch here [6]. There are also few snapshot
images here [7]. There is also #nprove@freenode where we are free to talk or
discuss any questions regarding this port. Some also blog a little [8].
Sure we will be glad to get any help and suggestions.
Feedback is also welcomed :)

Our current TODO list looks approximately like this (priorities could be mixed):
- toolchain (gcc 4.8 + binutils 2.22)
- rtl8196e ethernet and usb (newer ethernet driver? toolchain?)
- rtl8196d userspace (toolchain problem?)
- merge arch/rlx/ with arch/mips/, cleanup
- kernel version bump (to 3.10?), this may trigger major driver rewrites
- ethernet switch driver based on swconfig


1. https://forum.openwrt.org/viewtopic.php?id=31551
2. https://forum.openwrt.org/viewtopic.php?id=44406
3. https://forum.openwrt.org/viewtopic.php?id=45484
4. https://forum.openwrt.org/viewtopic.php?id=31547
5. https://forum.openwrt.org/viewtopic.php?id=40958
6. https://git.nprove.in/rtl819xx/
7. https://downloads.nprove.in/
8. http://main.lv/writeup/rtl8196c_support … enwrt.html

anarchy99 wrote:

please consider adding support for RTL8186 as they are also widely spread around

RTL8186 is so Obsolete, I could never get support from Realtek for it. How about this, I can do a trade in program. If you send me your Obsolete Realtek routers, I will give you a discount off an officially supported Realtek router from us.

(Last edited by ps2chiper on 4 Oct 2013, 16:56)

anarchy99,

You would want a Dualband Realtek router because the 5ghz radio is backwards compatible with 2.4ghz. You can configure it to also run at 2x 2.4ghz radios similar to what you currently have.

roman wrote:

Hello the community!

I've been postponing this post since about 2 month, hoping we will get to
some stable quiet bay. But we are still not there so I decided not to wait
any longer smile
...

dear roman,
  great job!! ,
i have 2 router with rtl8196C with 4m flash+16MB RAM,

if it can work,i wanna test it later.

kwongwo wrote:
roman wrote:

Hello the community!

I've been postponing this post since about 2 month, hoping we will get to
some stable quiet bay. But we are still not there so I decided not to wait
any longer :)
...

dear roman,
  great job!! ,
i have 2 router with rtl8196C with 4m flash+16MB RAM,

if it can work,i wanna test it later.

Most likely it will work for you already at least partly. Remember that 8196c doesn't have wifi embedded so the routers come with wifi companion chips like rtl8188er or rtl8192re. Choosing the chip is basically a matter of configuration and currently we have no companion chip profiling. But you can change the kernel config directly if you know which wifi chip is soldered on your router.
Also 4MB flash and 16MB RAM is not enough to run web interface so you should be ready to use console only.

roman wrote:
kwongwo wrote:
roman wrote:

Hello the community!

I've been postponing this post since about 2 month, hoping we will get to
some stable quiet bay. But we are still not there so I decided not to wait
any longer smile
...

dear roman,
  great job!! ,
i have 2 router with rtl8196C with 4m flash+16MB RAM,

if it can work,i wanna test it later.

Most likely it will work for you already at least partly. Remember that 8196c doesn't have wifi embedded so the routers come with wifi companion chips like rtl8188er or rtl8192re. Choosing the chip is basically a matter of configuration and currently we have no companion chip profiling. But you can change the kernel config directly if you know which wifi chip is soldered on your router.
Also 4MB flash and 16MB RAM is not enough to run web interface so you should be ready to use console only.

Dear Roman,
   i just check that wlan chip,it is rtl8192. how about the bootloader ? need i upgrade it  first?

how to use your image/bin in your site at:https://downloads.nprove.in/snapshots/rtl8196c-gcc4.5-fonluci/

or do you have any full fireware  with the bootloader, with size 4M or 8M.

i download the kernel " openwrt-realtek-rtl8196c-nprove-kernel.bin",and i got the error:

OpenWrt kernel loader for Realtek rtl819xx
Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
Copyright (C) 2013 Roman Yeryomin <roman@advem.lv>
Decompressing kernel to 80000000... done!
Seems kernel_entry address is different from load address, so...
Starting kernel from 80003530...
...
...
[    3.590000] SPI flash(MX25L3206E) was found at CS0, size 0x400000
[    3.600000] Creating 4 MTD partitions on "flash_bank_1":
[    3.610000] 0x000000000000-0x000000030000 : "boot+cfg"
[    3.620000] 0x000000030000-0x0000001b0000 : "kernel"
[    3.630000] 0x0000001b0000-0x000000800000 : "rootfs"
[    3.640000] mtd: partition "rootfs" extends beyond the end of device "flash_0
[    3.660000] mtd: partition "rootfs" set to be root filesystem
[    3.670000] mtd: partition "rootfs_data" created automatically, ofs=530000,  
[    3.680000] 0x000000530000-0x000000400000 : "rootfs_data"
[    3.690000] mtd: partition "rootfs_data" is out of reach -- disabled
[    3.710000] 0x000000030000-0x000000800000 : "firmware"
[    3.720000] mtd: partition "firmware" extends beyond the end of device "flas0
[    3.730000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    3.740000] rtl819x-ehci rtl819x-ehci: Realtek rtl819x On-Chip EHCI Host Conr
[    3.750000] rtl819x-ehci rtl819x-ehci: new USB bus registered, assigned bus 1


.....
 4.200000] Realtek FastPath:v1.03
[    4.220000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000d
[    4.230000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000d
[    4.240000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000d
[    4.250000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000d
[    4.260000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000d
....
....

roman,could you pls advice the MTD info,  cat /proc/mtd ?

thx

kwongwo wrote:

i download the kernel " openwrt-realtek-rtl8196c-nprove-kernel.bin",and i got the error:

OpenWrt kernel loader for Realtek rtl819xx
Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
Copyright (C) 2013 Roman Yeryomin <roman@advem.lv>
Decompressing kernel to 80000000... done!
Seems kernel_entry address is different from load address, so...
Starting kernel from 80003530...
...
...
[    3.590000] SPI flash(MX25L3206E) was found at CS0, size 0x400000
[    3.600000] Creating 4 MTD partitions on "flash_bank_1":
[    3.610000] 0x000000000000-0x000000030000 : "boot+cfg"
[    3.620000] 0x000000030000-0x0000001b0000 : "kernel"
[    3.630000] 0x0000001b0000-0x000000800000 : "rootfs"
[    3.640000] mtd: partition "rootfs" extends beyond the end of device "flash_0
[    3.660000] mtd: partition "rootfs" set to be root filesystem
[    3.670000] mtd: partition "rootfs_data" created automatically, ofs=530000,  
[    3.680000] 0x000000530000-0x000000400000 : "rootfs_data"
[    3.690000] mtd: partition "rootfs_data" is out of reach -- disabled
[    3.710000] 0x000000030000-0x000000800000 : "firmware"
[    3.720000] mtd: partition "firmware" extends beyond the end of device "flas0
[    3.730000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    3.740000] rtl819x-ehci rtl819x-ehci: Realtek rtl819x On-Chip EHCI Host Conr
[    3.750000] rtl819x-ehci rtl819x-ehci: new USB bus registered, assigned bus 1


.....
 4.200000] Realtek FastPath:v1.03
[    4.220000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000d
[    4.230000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000d
[    4.240000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000d
[    4.250000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000d
[    4.260000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000d
....
....

roman,could you pls advice the MTD info,  cat /proc/mtd ?

thx

Well, that's a good sign - it boots :)
The reason is (as you probably suspected) that image is made for 8MB flash. But you can change the sizes as you need from menuconfig (image configuration) and compile your own image. Remember to use the right version of gcc if you want usb working.
Also you can use fw.bin - that's kernel and rootfs. Otherwise you would need two files - kernel and squashfs.

(Last edited by roman on 6 Oct 2013, 17:26)

Dear Roman,
    thanks, i m trying to make the 8M fw, and my memory is only 16MB,it is not large enough,

i'll change it to 32MB/64MB. btw will the  64MB  memory chip(MT48LC32M16A2-75IT 64MB SDRAM SOP 54)  work?

Dear Roman,
   
i could not found the  [gcc 4.5-linaro] in the realtek-unstable trunk,
my steps:

# git clone -b  realtek-unstable git://red.nprove.in/openwrt-realtek.git
# feeds update -a
# feeds install -a
# make menuconfig
   --->select the [binutils 2.21.x]
   --->select the  gcc (only gcc 4.7 & gcc 4.8 available)

any steps need to be updated?


$ ls /usr/bin/gcc*
/usr/bin/gcc      /usr/bin/gcc-4.7     /usr/bin/gcc-nm-4.7
/usr/bin/gcc-4.5  /usr/bin/gcc-ar-4.7  /usr/bin/gcc-ranlib-4.7

(Last edited by kwongwo on 7 Oct 2013, 13:11)

kwongwo wrote:

Dear Roman,
    thanks, i m trying to make the 8M fw, and my memory is only 16MB,it is not large enough,

i'll change it to 32MB/64MB. btw will the  64MB  memory chip(MT48LC32M16A2-75IT 64MB SDRAM SOP 54)  work?

I do not recommend you change the memory unless you compile your own bootloader. The ram is hard locked. But you can change the spi chip as long as you copy the MIB portion. You can also just buy a router from the factory we work for with 8MB flash and 64MB of ram. It will be guarnteed to work out of the box.

kwongwo wrote:

Dear Roman,
   
i could not found the  [gcc 4.5-linaro] in the realtek-unstable trunk,
my steps:

# git clone -b  realtek-unstable git://red.nprove.in/openwrt-realtek.git
# feeds update -a
# feeds install -a
# make menuconfig
   --->select the [binutils 2.21.x]
   --->select the  gcc (only gcc 4.7 & gcc 4.8 available)

Advanced configuration options (for developers)  ---> Toolchain Options  ---> GCC compiler Version ---> gcc 4.5.x with Linaro enhancements

roman wrote:
kwongwo wrote:

Dear Roman,
   
i could not found the  [gcc 4.5-linaro] in the realtek-unstable trunk,
my steps:

# git clone -b  realtek-unstable git://red.nprove.in/openwrt-realtek.git
# feeds update -a
# feeds install -a
# make menuconfig
   --->select the [binutils 2.21.x]
   --->select the  gcc (only gcc 4.7 & gcc 4.8 available)

Advanced configuration options (for developers)  ---> Toolchain Options  ---> GCC compiler Version ---> gcc 4.5.x with Linaro enhancements


Dear roman,
   in the location Advanced configuration options (for developers)  ---> Toolchain Options  ---> GCC compiler Version --->

  only gcc 4.7 & gcc 4.8 available, no  any GCC 4.5.xx  option,

my system is ubuntu 12.04.



----

Dear ps2chiper, do you have the link of the rounter with 8MB flash and 64MB of ram?

Dear roman,
  i change the SPI Flash to 8MB, and i can  complie it in Redhat systems .
download the new fw with 8MB Flash + 16MB RAM,

the OpenWrt kernel works ,but i have no idear how to connect the router via the WAN/LAN.

WAN (DHCP not work)   ---: [other router with DHCP Server]<----RJ45 Cable---> RTL8196C
LAN (DHCP not work)   ---: PC(dhcp) <----RJ45 Cable---> RTL8196C
LAN (static not work) ---: PC(static) <----RJ45 Cable---> RTL8196C


bootloader

========== SPI =============
SDRAM CLOCK:156MHZ
 ------------------------- Force into Single IO Mode ------------------------ 
|No chipID  Sft chipSize blkSize secSize pageSize sdCk opCk      chipName    |
| 0 c22017h  0h  800000h  10000h   1000h     100h   86   39   MX6405D/05E/45E|
 ---------------------------------------------------------------------------- 
 
---RealTek(RTL8196C)at 2013.10.06-21:29+0800 version v1.2 [16bit](390MHz)

kernel info

OpenWrt kernel loader for Realtek rtl819xx
Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
Copyright (C) 2013 Roman Yeryomin <roman@advem.lv>
Decompressing kernel to 80000000... done!
Seems kernel_entry address is different from load address, so...
Starting kernel from 80003530...

[    0.000000] Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.010000] Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.020000] Memory: 9992k/16384k available (2811k kernel code, 6392k reserved, 710k data, 104k init, 0k highmem)
[    0.030000] Calibrating delay loop... 389.12 BogoMIPS (lpj=1945600)
[    0.250000] Mount-cache hash table entries: 512
[    1.260000] USB 2.0 PHY Patch Done.
[    1.300000] reg e0=99
[    1.340000] reg e1=a8
[    1.370000] reg e2=98
[    1.410000] reg e3=c1
[    1.450000] reg e4=1
[    1.490000] reg e5=91
[    1.520000] reg e6=98
[    1.560000] reg e7=34
[    1.600000] reg f0=fc
[    1.640000] reg f1=8c
[    1.670000] reg f2=0
[    1.710000] reg f3=11
[    1.750000] reg f4=e3
[    1.790000] reg f5=d2
[    1.820000] reg f6=0
[    1.830000] net_namespace: 780 bytes
[    1.840000] NET: Registered protocol family 16
[    1.890000] bio: create slab <bio-0> at 0
[    1.900000] usbcore: registered new interface driver usbfs
[    1.910000] usbcore: registered new interface driver hub
[    1.920000] usbcore: registered new device driver usb
[    1.940000] NET: Registered protocol family 2
[    1.960000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    1.970000] TCP established hash table entries: 512 (order: 0, 4096 bytes)
[    1.980000] TCP bind hash table entries: 512 (order: -1, 2048 bytes)
[    1.990000] TCP: Hash tables configured (established 512 bind 512)
[    2.000000] TCP reno registered
[    2.020000] NET: Registered protocol family 1
[    2.040000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    2.050000] Registering mini_fo version $Id$
[    2.060000] JFFS2 version 2.2. (NAND) 漏 2001-2006 Red Hat, Inc.
[    2.070000] msgmni has been set to 19
[    2.090000] io scheduler noop registered
[    2.100000] io scheduler cfq registered (default)
[    2.120000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    2.130000] serial8250: ttyS0 at MMIO 0x18002000 (irq = 23) is a 16550A
[    2.140000] PPP generic driver version 2.4.2
[    2.150000] PPP Deflate Compression module registered
[    2.160000] PPP BSD Compression module registered
[    2.170000] MPPE/MPPC encryption/compression module registered
[    2.180000] NET: Registered protocol family 24
[    2.190000] tun: Universal TUN/TAP device driver, 1.6
[    2.200000] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[    2.220000] Realtek WLAN driver - version 1.6 (2013-02-21)
[    2.230000]  wlan_index:0  0, 134,0xb9000000,0xb8b10000,11
[    2.240000] =====>>INSIDE rtl8192cd_init_one <<=====
[    2.250000] sizeof(struct rtl8192cd_priv) = 161152 
[    2.560000] 96C - 40MHz Clock Source
[    3.290000] vendor_deivce_id=819110ec
[    3.320000] =====>>EXIT rtl8192cd_init_one <<=====
[    3.330000] =====>>INSIDE rtl8192cd_init_one <<=====
[    3.340000] sizeof(struct rtl8192cd_priv) = 161152 
[    3.350000] =====>>EXIT rtl8192cd_init_one <<=====
[    3.360000] =====>>INSIDE rtl8192cd_init_one <<=====
[    3.370000] sizeof(struct rtl8192cd_priv) = 161152 
[    3.380000] =====>>EXIT rtl8192cd_init_one <<=====
[    3.390000] 
[    3.390000] 
[    3.390000] 
[    3.390000] Probing RTL8186 10/100 NIC-kenel stack size order[3]...
[    3.400000] chip name: 8196C, chip revid: 0
[    3.420000]   Set 8196C PHY Patch OK
[    3.430000] NOT YET
[    3.460000] Set threshould idx 0
[    3.470000] eth0 added. vid=9 Member port 0x1...
[    3.480000] eth1 added. vid=8 Member port 0x10...
[    3.490000] eth2 added. vid=9 Member port 0x2...
[    3.510000] eth3 added. vid=9 Member port 0x4...
[    3.520000] eth4 added. vid=9 Member port 0x8...
[    3.530000] eth5 added. vid=9 Member port 0x0...
[    3.550000] [peth0] added, mapping to [eth1]...
[    3.560000] SPI INIT
[    3.570000]  ========================= Registed SPI Flash Model ========================= 
[    3.580000] |No chipID  Sft chipSize blkSize secSize pageSize sdCk opCk      chipName    |
[    3.590000] | 0 c22017h  0h  800000h  10000h   1000h     100h   50    0   MX6405D/05E/45E|
[    3.600000]  ============================================================================ 
[    3.610000] SPI flash(MX6405D/05E/45E) was found at CS0, size 0x800000
[    3.620000] Creating 4 MTD partitions on "flash_bank_1":
[    3.630000] 0x000000000000-0x000000030000 : "boot+cfg"
[    3.640000] 0x000000030000-0x0000001b0000 : "kernel"
[    3.650000] 0x0000001b0000-0x000000400000 : "rootfs"
[    3.660000] mtd: partition "rootfs" set to be root filesystem
[    3.670000] split_squashfs: no squashfs found in "flash_bank_1"
[    3.680000] 0x000000030000-0x000000400000 : "firmware"
[    3.690000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    3.700000] rtl819x-ehci rtl819x-ehci: Realtek rtl819x On-Chip EHCI Host Controller
[    3.710000] rtl819x-ehci rtl819x-ehci: new USB bus registered, assigned bus number 1
[    3.760000] rtl819x-ehci rtl819x-ehci: irq 10, io mem 0x18021000
[    3.800000] rtl819x-ehci rtl819x-ehci: USB 2.0 started, EHCI 1.00
[    3.810000] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    3.820000] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.830000] usb usb1: Product: Realtek rtl819x On-Chip EHCI Host Controller
[    3.840000] usb usb1: Manufacturer: Linux 2.6.30.9 ehci_hcd
[    3.850000] usb usb1: SerialNumber: rtl819x-ehci
[    3.860000] usb usb1: configuration #1 chosen from 1 choice
[    3.870000] hub 1-0:1.0: USB hub found
[    3.880000] hub 1-0:1.0: 1 port detected
[    3.890000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    3.900000] rtl819x-ohci rtl819x-ohci: Realtek rtl819x built-in OHCI controller
[    3.910000] rtl819x-ohci rtl819x-ohci: new USB bus registered, assigned bus number 2
[    3.920000] rtl819x-ohci rtl819x-ohci: irq 10, io mem 0x18020000
[    4.000000] usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
[    4.010000] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    4.020000] usb usb2: Product: Realtek rtl819x built-in OHCI controller
[    4.030000] usb usb2: Manufacturer: Linux 2.6.30.9 ohci_hcd
[    4.040000] usb usb2: SerialNumber: rtl819x-ohci
[    4.050000] usb usb2: configuration #1 chosen from 1 choice
[    4.060000] hub 2-0:1.0: USB hub found
[    4.070000] hub 2-0:1.0: 1 port detected
[    4.080000] nf_conntrack version 0.5.0 (256 buckets, 1024 max)
[    4.090000] ip_tables: (C) 2000-2006 Netfilter Core Team
[    4.100000] TCP cubic registered
[    4.110000] NET: Registered protocol family 17
[    4.120000] Netlink[Kernel] create socket for igmp ok.
[    4.130000] Realtek FastPath:v1.03
[    4.150000] jffs2_scan_eraseblock(): Node at 0x00000000 {0x1985, 0x2003, 0x0000000c) has invalid CRC 0x001f4d80 (calculated 0xf060dc98)
[    4.160000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000008: 0x001f instead
[    5.720000] VFS: Mounted root (jffs2 filesystem) readonly on device 31:2.
[    5.730000] Freeing unused kernel memory: 104k freed
[    5.750000] Warning: unable to open an initial console.
- preinit -
Press the [f] key and hit [enter] to enter failsafe mode
- regular preinit -
- init -

Please press Enter to activate this console. [   13.530000] NET: Registered protocol family 10
[   13.540000] lo: Disabled Privacy Extensions
[   13.840000] xt_time: kernel timezone is -0000
[   14.210000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   26.240000] device eth0 entered promiscuous mode
[   26.270000] br-lan: port 1(eth0) entering learning state
[   26.430000] device eth2 entered promiscuous mode
[   26.440000] br-lan: port 2(eth2) entering learning state
[   26.520000] device eth3 entered promiscuous mode
[   26.530000] br-lan: port 3(eth3) entering learning state
[   26.610000] device eth4 entered promiscuous mode
[   26.620000] br-lan: port 4(eth4) entering learning state
[   28.280000] br-lan: port 1(eth0) entering forwarding state
[   28.450000] br-lan: port 2(eth2) entering forwarding state
[   28.540000] br-lan: port 3(eth3) entering forwarding state
[   28.630000] br-lan: port 4(eth4) entering forwarding state





BusyBox v1.19.4 (2013-10-07 10:24:18 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 BARRIER BREAKER (Bleeding Edge, r36713)
 -----------------------------------------------------
  * 1/2 oz Galliano         Pour all ingredients into
  * 4 oz cold Coffee        an irish coffee mug filled
  * 1 1/2 oz Dark Rum       with crushed ice. Stir.
  * 2 tsp. Creme de Cacao
 -----------------------------------------------------


root@OpenWrt:/# 

ifconfig info

root@OpenWrt:/# ifconfig
br-lan    Link encap:Ethernet  HWaddr 00:12:34:56:78:90  
          inet addr:192.168.2.1  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::212:34ff:fe56:7890/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:21 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1880 (1.8 KiB)  TX bytes:690 (690.0 B)

eth0      Link encap:Ethernet  HWaddr 00:12:34:56:78:90  
          inet6 addr: fe80::212:34ff:fe56:7890/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:12 

eth1      Link encap:Ethernet  HWaddr 00:12:34:56:78:91  
          inet6 addr: fe80::212:34ff:fe56:7891/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:12 

eth2      Link encap:Ethernet  HWaddr 00:12:34:56:78:92  
          inet6 addr: fe80::212:34ff:fe56:7892/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:12 

eth3      Link encap:Ethernet  HWaddr 00:12:34:56:78:93  
          inet6 addr: fe80::212:34ff:fe56:7893/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:23 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:2386 (2.3 KiB)  TX bytes:94 (94.0 B)
          Interrupt:12 

eth4      Link encap:Ethernet  HWaddr 00:12:34:56:78:94  
          inet6 addr: fe80::212:34ff:fe56:7894/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:12 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:48 errors:0 dropped:0 overruns:0 frame:0
          TX packets:48 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:3264 (3.1 KiB)  TX bytes:3264 (3.1 KiB)

root@OpenWrt:/# 

ps

root@OpenWrt:/# ps
  PID USER       VSZ STAT COMMAND
    1 root      1568 S    init
    2 root         0 SW<  [kthreadd]
    3 root         0 SW<  [ksoftirqd/0]
    4 root         0 SW<  [events/0]
    5 root         0 SW<  [khelper]
   10 root         0 SW<  [async/mgr]
   55 root         0 SW<  [kblockd/0]
   62 root         0 SW<  [khubd]
   80 root         0 SW   [pdflush]
   81 root         0 SW   [pdflush]
   82 root         0 SW<  [kswapd0]
  115 root         0 SW<  [mtdblockd]
  257 root         0 SWN  [jffs2_gcd_mtd2]
  263 root      1564 S    /bin/ash --login
  320 root      1572 S    /sbin/syslogd -C16
  322 root      1552 S    /sbin/klogd
  324 root       824 S    /sbin/hotplug2 --override --persistent --set-rules-f
  331 root      1284 S    /sbin/procd
  338 root       860 S <  ubusd
  346 root      1480 S    /sbin/netifd
  515 root      1556 S    /usr/sbin/telnetd -l /bin/login.sh
  561 root      1564 S    udhcpc -p /var/run/udhcpc-eth1.pid -s /lib/netifd/dh
  590 nobody     972 S    /usr/sbin/dnsmasq -C /var/etc/dnsmasq.conf
  620 root       792 S    /usr/sbin/6relayd -l/tmp/hosts/6relayd /usr/sbin/6re
  628 root      1564 S    /usr/sbin/ntpd -n -p 0.openwrt.pool.ntp.org -p 1.ope
  645 root      1188 S    /usr/sbin/dropbear -F -P /var/run/dropbear.1.pid -p
  647 root      1560 R    p

free

root@OpenWrt:/# free
             total         used         free       shared      buffers
Mem:         10096         8780         1316            0            0
-/+ buffers:               8780         1316
Swap:            0            0            0

[update],
   i found the error  after bootup

 skb_over_panic: text:802c5b1c len:65532 put:65532 head:80517dac data:80517e2e tail:0x80527e2a end:0x8051850c dev:<NULL>

Hm, great to see that the effort lives! I think I'd give it a quick test some time soon. So far your commit log looks quite promising.
Meanwhile, this may prove useful if anyone would want to take on the effort (unfortunately, I don't have time for that any more)

https://github.com/nekromant/linux-rlx-upstream

This is my old attempt to boot upstream linux kernel on RTL8196. 8198 would need some extra love.
The rtkload is not required, thanks to BOOT_RAW.
So far, stuff that works:
* Interrupts and related stuff
* earlyprintk
The bad thing is, that lexra core inside the RTL8196 expects to find nop after each ll. So it requires some heavy patching of the assembly macros to work. Right now it boots, and crashes somewhere when the multitasking kicks in.

Necromant wrote:

The bad thing is, that lexra core inside the RTL8196 expects to find nop after each ll. So it requires some heavy patching of the assembly macros to work. Right now it boots, and crashes somewhere when the multitasking kicks in.

I'd look at fixing that at the binutils level. gas has a bunch of hacks for processors with that kind of hazard.

Hey guys, we just finished another and probably our last hong kong global sources fair. We will try to attend cebit and computex next year instead of global sources.

Hello!
I have the device D-Link DIR-320 D1 on the basis of the following chips:
1. Realtek RTL8196D
2. Realtek RTL8188ER
3. MXIC MX25L6406E - 64M-BIT [x1/x2] CMOS SERIAL FLASH
4. ESMT M13S2561616A-5T - 200MHz 4M x 16 Bit x 4 Banks Double Data Rate SDRAM
I can not understand the difference between RTL8196D (not found the datasheet) from RTL8196C.
Tell me, is it possible to compile the firmware project OpenWRT under my device?

I have 3x Trendnet TEW-652BRP v3.2R's that I'd love to throw OpenWrt on.

(Last edited by Simba7 on 7 Nov 2013, 09:19)

Alex_Jet wrote:

Hello!
I have the device D-Link DIR-320 D1 on the basis of the following chips:
1. Realtek RTL8196D
2. Realtek RTL8188ER
3. MXIC MX25L6406E - 64M-BIT [x1/x2] CMOS SERIAL FLASH
4. ESMT M13S2561616A-5T - 200MHz 4M x 16 Bit x 4 Banks Double Data Rate SDRAM
I can not understand the difference between RTL8196D (not found the datasheet) from RTL8196C.
Tell me, is it possible to compile the firmware project OpenWRT under my device?

96d is rlx5281 and 96c is rlx4181
rlx5281 is wip right now (we still don't have a reliable toolchain for it)

Simba7 wrote:

I have 3x Trendnet TEW-652BRP v3.2R's that I'd love to throw OpenWrt on.

List out the chips to see if its compatible.

Hi Roman, thanks for your work on this - I have purchased: TP-LINK TL-WR841HP which seems to be  Realtek RTL8196D and Realtek RTL8192CE - http://wikidevi.com/wiki/TP-LINK_TL-WR841HP. So please keep up posted on your progress and if you have a donate page feel free to share the link.

TP-Link routers are crappy with stock firmware but great when flashed with openwrt firmware -  in my limited experience

(Last edited by danielsokolowski on 8 Dec 2013, 21:09)

Hey all,

great work Roman (and his collegues) did here!

I tried on an Edimax 3G-6200nL V2 with RTL8196C chipset and RTL8188CE for WIFI. I compiled how roman suggested in the first post. System boots up, but I have a similar problem like kwongwo. I can`t reach the deive via LAN. Pinging on the IP results mostly in "Destination Host Unreachable". Only on startup or if I restart the network a few packets get transmitted with times between 200ms and 2000ms. After that the host is unreachable. The only thing I notice is the flashing LED for the LAN port during ping and the increase of package counters in ifconfig.

In very few cases I also got the skb_over_panic and tried some patches to fix this, but none of it worked, I got this message anyway.

I have no Idea what to do for getting this fixed.

danielsokolowski wrote:

Hi Roman, thanks for your work on this - I have purchased: TP-LINK TL-WR841HP which seems to be  Realtek RTL8196D and Realtek RTL8192CE - http://wikidevi.com/wiki/TP-LINK_TL-WR841HP. So please keep up posted on your progress and if you have a donate page feel free to share the link.

TP-Link routers are crappy with stock firmware but great when flashed with openwrt firmware -  in my limited experience


If you want to donate to Roman. He is trying to raise 1000 USD to send his poor Indian assistant to China and Taiwan for face to face interaction with Realtek them selves.