Any plans for Realtek SOC support?

Is there somewere GPL sourcecode for it? The challenge is to port recent kernels and rewrite/port realtek drivers. Can you share bootlog?

RTL8197F?

is some interesting SoC
Looking at wikidevi there are already ~10 devices on sale, mostly from the cheap low cost side.
Anyway sources based on OpenWrt for v3.10 kernel


look for rtkmipsel target
I think almost all drivers are there
It should be feasible to use this as a starter

Where is openwrt_rtk with 3.10 kernel and where is recent openwrt with 4.14 kernel? Did you have time to look inside proprietary realtek driver's codebase? It is nearly impossible to port it onto recent linux kernels. @hackpascal did great work to port LEDE onto Realtek SoC but gave up. It is interesting to hear his point of view.

RTL8107F != RTL8196C
The latter one misses some patented functions, so it's/was a waste of time.

@xssa
Please follow the link I gave here
There is the sdk for rtk
And some defconfigs

RTL8107F != RTL8196C

@ElektromAn What is in difference?
You misunderstand me probably. I'm not about cpu core or it's architecture, but about drivers. They are written on plain C and have nothing to deal with Lexra or clean MIPS32 (and will run on both if compiled with right toolchain) but code itself is awful and is far from recent linux kernel standarts, thus has to be rewritten from scratch. Do you have needed datasheets for this SoCs, and knowledge, and time to perform this piece of hard work? IMO Realtek itself has to invest their efforts to be supported well in recent Linux kernels.
And about Realtek openwrt-RSDK - I know well what is inside it.

The code on openwrt-rtk
rtk_openwrt_sdk/target/linux/rtkmipsel/
is ugly, awful, whatever
They messed up the old lexra and new MIPS code.
Also some registers are not well named
i.e.for GPIO, pinmux, clok

And I have no datasheet at all.

@ElektromAn, here you can find some useful datasheets, and, again, @hackpascal already did big piece of porting work and indeed have knowledge to do the rest.

@xssa
The datasheets are for the older 9187D.
But I think parts of this may be the same for 9187F.

For initial support aka boot this is maybe sufficient.
Hmmm :wink:

Hi All!

I have a D-Link DIR-842, and play with this device.
I have some information:

SOC:RTL8197DN
RAM: NT5TU32M16EG-AC 512Mbit 32M x 16
FLASH:25Q64CSIG 64Mbit 8MB

Console log and answers of linux info commands:

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 000002dh GD25Q64
@ 
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Boot code version : 1.00B01
Model name : DIR-842
HW version : B1

 
---RealTek(RTL8196D)at 2015.10.27-16:01+0800 v1.1 [16bit](659MHz)
Jump to image start=0x80500000...
decompressing kernel:
Uncompressing Linux... done, booting the kernel.
done decompressing kernel.
start address: 0x80003430
Realtek WLAN driver - version 1.6 (2013-02-21)
DFS function - version 1.0.22
Adaptivity function - version 7.1
8812 mp chip !! 


#######################################################
SKB_BUF_SIZE=3600 MAX_SKB_NUM=768
#######################################################



#######################################################
SKB_BUF_SIZE=3600 MAX_SKB_NUM=768
#######################################################




Probing RTL8186 10/100 NIC-kenel stack size order[3]...
chip name: 8196C, chip revid: 0
NOT YET
eth0 added. vid=9 Member port 0x1...
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 (2016-10-14 11:04:55 CST)
mount: mounting /dev/mtdblock6 on /pdata failed: No such device
mount: mounting usbfs on /proc/bus/usb failed: No such file or directory
cmd write
Write memory 0xb8021054 dat 0x186a0: 0x0
cmd write
Write memory 0xb8021054 dat 0x100000: 0x0
mount flash ok
mount pdata fail ...
getFileSize: No such device
Unlocking /dev/mtd6 ...
Could not open mtd device: /dev/mtd6
# sh: eval: line 1: Usage:: not found
sh: null: not found
sh: eval: line 1: Usage:: not found
sh: null: not found
sh: eval: line 1: Usage:: not found
sh: null: not found
sh: eval: line 1: Usage:: not found
sh: null: not found
[707  |707   ncc_rtk3_hwcfg.c    :  396 gen_default_pinc()]:::WPS PIN is secure, good!!
[707  |707   ncc_rtcfg.c         :  819   ncc_init_rtcfg()]:::Init Run-Time Config Success.
[707  |707   ncc_rtcfg.c         :  820   ncc_init_rtcfg()]:::Total 11338 nodes, each node 24 bytes.
[707  |707   ncc_rtcfg.c         :  821   ncc_init_rtcfg()]:::Total 272112 byte for all nodes.
[707  |707   ncc_rtcfg.c         :  822   ncc_init_rtcfg()]:::Total 267891 byte for data.
[707  |707   ncc_rtcfg.c         : 1488 ncc_load_rtcfg_decompress()]:::CONFSIGNATURE = CACA/CACA
[707  |707   ncc_rtcfg.c         : 1500 ncc_load_rtcfg_decompress()]:::Load Success(/var/tmp/cfg.txt)
[1069 |1069  ncc_inf.c           :  285      inf_handler()]:::[1069|1069]Thread Create[inf_handler]
[1075 |1075  leobox_timer.c      :  283      timerThread()]:::[1075|1075]Thread Create[timerThread]
[1075 |1075  leobox_timer.c      :  291      timerThread()]:::Timer Thread Running
[1076 |1076  ncc_event.c         :  772 ncc_event_routing()]:::[1076|1076]Thread Create[ncc_event_routing]
killall: crond: no process killed
Jan  1 00:00:21 crond[1084]: crond (busybox 1.13.4) started, log level 8

[707  |707   ncc_dns.c           :  710     ncc_dns_init()]:::Each DnsInfo need 548 bytes
[707  |707   main.c              :  529             main()]:::Start BulK Agent Info
[Type]0x0001[Length]7[Value]DIR-842
[Type]0x0002[Length]2[Value]B1
[Type]0x0003[Length]2[Value]WW
[Type]0x0004[Length]1[Value]0
[Type]0x0005[Length]9[Value]2.03MTb02
[Type]0x0006[Length]1[Value]1
don't exist default language pack!!
[Type]0x0007[Length]7[Value]DISABLE
[Type]0x0008[Length]17[Value]10:62:eb:0a:12:52
[Type]0x0009[Length]17[Value]10:62:eb:0a:12:51
[Type]0x000A[Length]17[Value]10:62:eb:0a:12:51
[Type]0x000B[Length]17[Value]10:62:eb:0a:12:53
[Type]0x000C[Length]4[Value]0x30
[Type]0x0010[Length]10[Value]dlink-1251
[Type]0x0011[Length]15[Value]dlink-1251-5GHz
[Type]0x0012[Length]10[Value]ygfyu82496
[Type]0x0014[Length]10[Value]0xD7F947F4
[Type]0x0015[Length]8[Value]69243226
[Type]0x0018[Length]13[Value]SN20FAB000001
[Type]0x0019[Length]0[Value]
[Type]0x001A[Length]12[Value]2016A1761057
[707  |707   main.c              :  531             main()]:::End BulK Agent Info
[707  |707   main.c              :  538             main()]:::Ncc ready now(707) build 9e0d4a
Jan  1 00:00:22 crond[1104]: crond (busybox 1.13.4) started, log level 8

[5279 |5279  main.c              :  363   ncc_boot_check()]:::salf booting...
[707  |707   ncc_fsm_router.c    : 1623 ncc_router_mode_boot()]:::Start ncc_router_mode_boot(0)
date: invalid date '000000000000.00'
[707  |707   ncc_fsm_callback.c  : 1119 fsm_state_handle()]:::state 2 enter fsm_state_handle()
[707  |707   ncc_fsm_callback.c  : 1162 fsm_state_handle()]:::Local time change
language pack exists...
do language merge...
[5339 |5339  lang_merge.c        : 1154             main()]:::before print info
[5339 |5339  lang_merge.c        : 1157             main()]:::Parameters:
 ori_lang_fp: /var/tmp/lang.js
 def_lang_fp: /www/js/i18n_en.js
The input file is not a correct js file!!
Exit program.

#######################################################
  NUM_RX_PKTHDR_DESC= 1412, eth_skb_free_num= 1550
#######################################################
[707  |707   ncc_rtk_wlan.c      : 3074         mySpConf()]:::Config instance 1 wlan1
[707  |707   ncc_rtk_wlan.c      : 3015        mySpStart()]:::Start instance 1 wlan1 conf_addr=6a4dd8
[PHY_REG_8192Emp]
[AGC_TAB_8192Emp]
[RadioA_8192Emp]
[RadioB_8192Emp]
[707  |707   ncc_l2.c            : 1356 ncc_L2_wlan_process()]:::op = 0 index = 1 
[707  |707   ncc_rtk_wlan.c      : 3074         mySpConf()]:::Config instance 2 wlan1-va0
[707  |707   ncc_rtk_wlan.c      : 3015        mySpStart()]:::Start instance 2 wlan1-va0 conf_addr=6a5968
[707  |707   ncc_l2.c            : 1356 ncc_L2_wlan_process()]:::op = 0 index = 2 
[707  |707   ncc_rtk_wlan.c      : 3074         mySpConf()]:::Config instance 5 wlan0
[707  |707   ncc_rtk_wlan.c      : 3015        mySpStart()]:::Start instance 5 wlan0 conf_addr=6a64f8
 <=== FirmwareDownload8812()
[707  |707   ncc_l2.c            : 1356 ncc_L2_wlan_process()]:::op = 0 index = 5 
[707  |707   ncc_rtk_wlan.c      : 3074         mySpConf()]:::Config instance 6 wlan0-va0
[707  |707   ncc_rtk_wlan.c      : 3015        mySpStart()]:::Start instance 6 wlan0-va0 conf_addr=6a7088
[707  |707   ncc_l2.c            : 1356 ncc_L2_wlan_process()]:::op = 0 index = 6 
[PHY_REG_8192Emp]
[AGC_TAB_8192Emp]
[RadioA_8192Emp]
[RadioB_8192Emp]
 <=== FirmwareDownload8812()
xpwr_lmt_index 2
mtxpwr_lmt_index 2
[707  |707   ncc_fsm_callback.c  : 1119 fsm_state_handle()]:::state 1 enter fsm_state_handle()
[707  |707   ncc_fsm_callback.c  : 1142 fsm_state_handle()]:::LAN 1 br0 Up
setMIB end...
txpwr_lmt_index 2
txpwr_lmt_index 2
bind to interface br0
bind to interface lo
activate ipv6 interfaces
0. br0
1. lo
mDNSResponderPosix: Starting in daemon mode
[707  |707   ncc_gpl_udhcpd.c    :  784 probeRouterUdhcpd()]:::queryDOMAINInfo FALSE!!!
killall: proxy: no process killed
[707  |707   ncc_iptable.c       : 1136       reBuildMAC()]:::DEBUG!!
killall: proxy: no process killed
iptables: Bad rule (does a matching rule exist in that chain?).
iptables: Bad rule (does a matching rule exist in that chain?).
[1076 |1076  ncc_gpl_udhcpd.c    :  141          bc_send()]:::bcu_feedback error
RTNETLINK answers: Cannot assign requested address
[707  |707   ncc_fsm_callback.c  : 1119 fsm_state_handle()]:::state 1 enter fsm_state_handle()
[707  |707   ncc_fsm_callback.c  : 1142 fsm_state_handle()]:::LAN 1 br0 Up
[707  |707   ncc_lan.c           : 1086 nccLanv6ServiceStart()]:::[Derek Debug]is_linklocal_DAD_fail Start
[707  |707   ncc_lan.c           : 1095 nccLanv6ServiceStart()]:::
mode.type=0

MLD Proxy v1.2 (2016.10.14-03:06+0000).

[707  |707   ncc_fsm_router.c    : 1976 ncc_router_mode_boot()]:::No WAN Cable Connection, by pass WAN state machine start
killall: iwcontrol: no process killed
rm: cannot remove '/var/run/wscd*.pid': No such file or directory
killall: wscd: no process killed
[707  |707   ncc_rtk_wlan.c      : 3235 ctrl_wps_restart()]:::wscd -start -both_band_ap -c /var/wsc.conf -w wlan0 -fi /var/wscd-wlan0.fifo -daemon

WiFi Simple Config v2.13-wps2.0 (2016.10.14-03:06+0000).

Register to wlan1
Register to wlan0
iwcontrol RegisterPID to (wlan1)
iwcontrol RegisterPID to (wlan0)
[SYS][  707 ncc_fsm_router.c    : 2216 ncc_router_mode_boot()]:::Boot complete, device is Running now.
[707  |707   ncc_fsm_router.c    : 2231 ncc_router_mode_boot()]:::Finish ncc_router_mode_boot()
[707  |707   ncc_fsm_router.c    : 2233 ncc_router_mode_boot()]:::===== Types Info =====
[707  |707   ncc_fsm_router.c    : 2234 ncc_router_mode_boot()]:::sizeof(short)   2 
[707  |707   ncc_fsm_router.c    : 2235 ncc_router_mode_boot()]:::sizeof(int)     4 
[707  |707   ncc_fsm_router.c    : 2236 ncc_router_mode_boot()]:::sizeof(long)    4 
[707  |707   ncc_fsm_router.c    : 2237 ncc_router_mode_boot()]:::sizeof(time_t)  4 

# cat /proc/cpu# cat /proc/cpuinfo 
system type		: RTL819xD
processor		: 0
cpu model		: 56322
BogoMIPS		: 658.63
hardware watchpoint	: no
tlb_entries		: 32
mips16 implemented	: yes
# cat /pr# cat /proc/mt# cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00270000 00001000 "boot+cfg+linux"
mtd1: 00590000 00001000 "root fs"
mtd2: 000d0000 00001000 "jffs2"
mtd3: 00010000 00001000 "config"
mtd4: 00010000 00001000 "web fs"
mtd5: 00800000 00001000 "all fs"
# cat /proc/devices
Character devices:
  1 mem
  2 pty
  3 ttyp
  4 ttyS
  5 /dev/tty
  5 /dev/console
 10 misc
 90 mtd
108 ppp

Block devices:
259 blkext
  8 sd
 31 mtdblock
 65 sd
 66 sd
 67 sd
 68 sd
 69 sd
 70 sd
 71 sd
128 sd
129 sd
130 sd
131 sd
132 sd
133 sd
134 sd
135 sd
# cat /proc/cmd# cat /proc/cmdline 
console=ttyS0,38400 root=/dev/mtdblock1
# cat /pr# cat /proc/vers# cat /proc/version 
Linux version 2.6.30.9 (root@localhost.localdomain) (gcc version 4.4.5-1.5.5p4 (GCC) ) #1 Fri Oct 14 11:14:40 CST 2016
# cat /etc/ver# cat /etc/version 
RTL819xD v1.0 --  Fri Oct 14 11:10:15 CST 2016
The SDK version is: Realtek SDK v3.4.6.2-r21268
Ethernet driver version is: 21215-21109
Wireless driver version is: 21129-21129
Fastpath source version is: 21126-20238
Feature support version is: 21149-14785
# cd /proc
# ls
1                          eth1
1068                       eth2
1069                       eth3
1070                       eth4
1071                       eth7
1072                       execdomains
1073                       ext_service_ports
1074                       fast_l2tp
1075                       fast_nat
1076                       fast_pppoe
1079                       fast_pptp
1104                       fast_spi
2                          filesystems
3                          filter_table
4                          fs
48                         gc_overflow_timout
5                          gpio
5290                       gpio_led
5712                       hw_nat
5724                       interrupts
5727                       iomem
5730                       ioports
632                        irq
663                        load_default
679                        loadavg
68                         locks
69                         meminfo
6915                       misc
6916                       modules
706                        mounts
707                        mtd
7703                       ncc
7704                       net
7824                       pagetypeinfo
7828                       partitions
8                          peth0
8017                       phyRegTest
8106                       pptp_conn_ck
8109                       qos
8112                       reInitSwitchCore
8183                       rf_switch
8186                       rtk_vlan_management_entry
8772                       rtk_vlan_support
StormCtrl                  rtk_wlan
alg                        rtl865x
black_cat                  scsi
br_igmpDb                  self
br_igmpProxy               slabinfo
br_igmpQuerierInfo         stat
br_igmpVersion             suspend_check
br_igmpquery               sys
br_igmpsnoop               sysvipc
br_mCastFastFwd            timer_list
br_mldQuerierInfo          tty
br_mldVersion              uptime
br_mldquery                urlrRedirectAdd
br_mldsnoop                urlrRedirectClean
br_wlanblock               usb_mode_detect
buddyinfo                  version
bus                        vmallocinfo
buttons                    vmstat
cameo_log_pkt              wan_bridge
classify_dns               watchdog_reboot
cmdline                    wlan0
cpuinfo                    wlan0-va0
crypto                     wlan0-va1
custom_Passthru            wlan0-va2
custom_Passthru_wlan       wlan0-va3
devices                    wlan1
diskstats                  wlan1-va0
driver                     wlan1-va1
eee                        wlan1-va2
enable_dos                 wlan1-va3
eth0                       zoneinfo
# lsmod
nf_nat_ipsec 3168 0 - Live 0xc09cf000
nf_conntrack_ipsec 2192 1 nf_nat_ipsec, Live 0xc09c5000
nf_nat_sip 5040 0 - Live 0xc09af000
nf_conntrack_sip 13056 1 nf_nat_sip, Live 0xc09a1000
nf_nat_rtsp 3200 0 - Live 0xc0986000
nf_conntrack_rtsp 4000 1 nf_nat_rtsp, Live 0xc097b000
nf_conntrack_l2tp 512 0 - Live 0xc0965000
nf_nat_pptp 1296 0 - Live 0xc095c000
nf_conntrack_pptp 3392 1 nf_nat_pptp, Live 0xc0952000
nf_conntrack_proto_gre 2624 1 nf_conntrack_pptp, Live 0xc0947000
nf_nat_proto_gre 848 1 nf_nat_pptp, Live 0xc093c000
# cat /proc/mem# cat /proc/meminfo 
MemTotal:          47216 kB
MemFree:           11408 kB
Buffers:            2408 kB
Cached:             8528 kB
SwapCached:            0 kB
Active:             6508 kB
Inactive:           7144 kB
Active(anon):       2716 kB
Inactive(anon):        0 kB
Active(file):       3792 kB
Inactive(file):     7144 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:          2724 kB
Mapped:             2960 kB
Slab:              19072 kB
SReclaimable:        504 kB
SUnreclaim:        18568 kB
PageTables:          308 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:       23608 kB
Committed_AS:      16944 kB
VmallocTotal:    1048404 kB
VmallocUsed:        2516 kB
VmallocChunk:    1038132 kB
# cat /pro# cat /proc/moun# cat /proc/mounts 
rootfs / rootfs rw 0 0
/dev/root / squashfs ro,relatime 0 0
proc /proc proc rw,relatime 0 0
ramfs /var ramfs rw,relatime 0 0
/dev/mtdblock2 /flash jffs2 rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
ramfs /media ramfs rw,relatime 0 0
# ifc# ifconfig 
br0       Link encap:Ethernet  HWaddr 10:62:EB:0A:12:51  
          inet addr:192.168.100.1  Bcast:192.168.100.255  Mask:255.255.255.0
          inet6 addr: fe80::1262:ebff:fe0a:1251/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:406 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:148364 (144.8 KiB)

eth0      Link encap:Ethernet  HWaddr 10:62:EB:0A:12:51  
          inet6 addr: fe80::1262:ebff:fe0a:1251/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 10:62:EB:0A:12:52  
          inet6 addr: fe80::1262:ebff:fe0a:1252/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:62 errors:0 dropped:0 overruns:0 frame:0
          TX packets:62 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:3968 (3.8 KiB)  TX bytes:3968 (3.8 KiB)

wlan0     Link encap:Ethernet  HWaddr 10:62:EB:0A:12:53  
          inet6 addr: fe80::1262:ebff:fe0a:1253/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3323 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:657478 (642.0 KiB)  TX bytes:1312 (1.2 KiB)
          Interrupt:14 

wlan1     Link encap:Ethernet  HWaddr 10:62:EB:0A:12:51  
          inet6 addr: fe80::1262:ebff:fe0a:1251/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3770 errors:0 dropped:0 overruns:0 frame:0
          TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:777403 (759.1 KiB)  TX bytes:1760 (1.7 KiB)
          Interrupt:11 

# 

RTL8197 devices list in wikidevi.com (this site is available only until 2019.10.31)

RTL8197 devices:
,Type,"FCC ID",Manuf,"Manuf. mdl",CPU1,"CPU1 clock speed",FLA1,FLA2,RAM1,"WI1 chip1","WI1 MIMO","WI2 chip1","WI2 MIMO","PHY modes",OUI,"OUI (Eth)","Est. year"
"A-Link RRAP","wireless router",,,,RTL8197DN,"660 MHz","4 MiB",,"64 MiB",RTL8192ER,2x2:2,RTL8812AR,2x2:2,abgn+ac,,,
"ALFA Network AC1200R","wireless router",2AB87197D,"ALFA Network",,RTL8197D,"660 MHz","8 MiB",,"64 MiB",RTL8812AR,2x2:2,RTL8192ER,2x2:2,abgn+ac,,,2015
"AboCom AR7522","wireless router",,,,RTL8197D,,"8 MiB",,"64 MiB",RTL8812AR,2x2:2,RTL8192CE,2x2:2,abgn+ac,,,
"Amped Wireless APA20","access point",ZTT-APA20,Loopcomm,,RTL8197D,,,,,RTL8812AR,2x2:2,RTL8192CE,2x2:2,abgn+ac,,,2013
"Amped Wireless RTA15","wireless router",ZTT-RTA15,Loopcomm,,RTL8197D,"660 MHz",,,,RTL8812AR,2x2:2,RTL8192CE,2x2:2,abgn+ac,F8:7B:8C,F8:7B:8C,2013
"Amped Wireless TAP-R2","wireless router",ZTT-TAPR2,Loopcomm,LP-9096TR,RTL8197DN,,,,,RTL8812AR,1x1:1,RTL8192ER,2x2:2,abgn+ac,,,2015
"Beeline SmartBox","wireless router,CPE",,SerComm,S1000,RTL8197D,"660 MHz","16 MiB",,"64 MiB",RTL8192CE,2x2:2,,,bgn,,,2014
"Beeline SmartBox One","wireless router,CPE",,SerComm,S1010,RTL8197DL,"700 MHz","16 MiB",,"64 MiB",RTL8192CE,2x2:2,RTL8192DR,2x2:2,abgn,,,2015
"Beeline SmartBox One v2","wireless router,CPE",,SerComm,S1010,RTL8197DL,"700 MHz","16 MiB",,"64 MiB",RTL8192ER,2x2:2,RTL8812AR,2x2:2,abgn+ac,,,2017
"Belkin F9K1102 v2","wireless router",K7SF9K1102V2,SerComm,,RTL8197D,,"8 MiB",,"64 MiB",RTL8192CE,2x2:2,RTL8192DR,2x2:2,abgn,,,2012
"Belkin F9K1105 v2","wireless router",K7SF9K1105V2,SerComm,,RTL8197D,,"8 MiB",,"32 MiB",RTL8192DR,2x2:2,RTL8188RE,1x1:1,abgn,,,2012
"Belkin F9K1113 v4","wireless router",K7SF9K1117V2,SerComm,,RTL8197D,,,,"64 MiB",RTL8812AR,2x2:2,RTL8192CE,2x2:2,abgn+ac,,,2014
"Belkin F9K1113 v5","wireless router",K7SF9K1117V2,SerComm,,RTL8197D,,"16 MiB",,"64 MiB",RTL8812AR,2x2:2,RTL8192CE,2x2:2,abgn+ac,,,2016
"Belkin F9K1116 v1","wireless router",K7SF9K1116V1,SerComm,,RTL8197D,"660 MHz","8 MiB",,"64 MiB",RTL8812AR,2x2:1,RTL8192CE,2x2:2,abgn+ac,EC:1A:59,EC:1A:59,2013
"Belkin F9K1116 v2","wireless router",K7SF9K1116V1,SerComm,,RTL8197D,,,"16 MiB","64 MiB",RTL8812AR,2x2:1,RTL8192CE,2x2:2,abgn+ac,,,2016
"Belkin F9K1117 v2","wireless router",K7SF9K1117V2,SerComm,,RTL8197D,,,,"64 MiB",RTL8812AR,2x2:2,RTL8192CE,2x2:2,abgn+ac,,,2012
"Belkin F9K1121 v1","range extender",K7SF9K1121V1,Edimax,,RTL8197DL,"660 MHz","8 MiB",,"64 MiB",RTL8192CE,2x2:2,RTL8192DR,2x2:2,abgn,,,2013
"Belkin F9K1123 v1","wireless router",K7SF9K1116V1,SerComm,,RTL8197D,,,,"64 MiB",RTL8812AR,2x2:2,RTL8192CE,2x2:2,abgn+ac,,,
"Belkin F9K1123 v2","wireless router",K7SF9K1116V1,SerComm,,RTL8197D,,"16 MiB",,"64 MiB",RTL8812AR,2x2:2,RTL8192CE,2x2:2,abgn+ac,,,2016
"Comtrend WR-5887","wireless router","L9VWR5887,NDD9564781213",,,RTL8197D,"660 MHz","4 MiB",,"64 MiB",RTL8812AR,2x2:2,RTL8192CE,2x2:2,abgn+ac,,,2018
"Corega CG-WGR1200","wireless router",,,,RTL8197D,,"8 MiB",,"64 MiB",RTL8812AR,2x2:2,RTL8192CE,2x2:2,abgn+ac,,,2013
"D-Link DAP-1650 rev A1","range extender",KA2AP1650A1,"Alpha Networks",WRG-AC05,RTL8197D,,,,"128 MiB",RTL8812AR,2x2:2,RTL8192CE,2x2:2,abgn+ac,,,2013
"D-Link DAP-1665 rev A1","access point",KA2AP1665A1,Cameo,,RTL8197D,,"8 MiB",,"128 MiB",RTL8812AR,2x2:2,RTL8192CE,2x2:2,abgn+ac,,,2013
"D-Link DIR-815 rev C1","wireless router",KA2IR815C1,SGE,,RTL8197D,"660 MHz","8 MiB",,"64 MiB",RTL8192DR,2x2:2,RTL8192CE,2x2:2,abgn,,,2013
"D-Link DIR-815 rev D1","wireless router",KA2IR815D1,"SGE (T&W)",,RTL8197DL,"660 MHz","8 MiB",,"64 MiB",RTL8812AR,2x2:2,RTL8192ER,2x2:2,abgn+ac,10:62:EB,10:62:EB,2017
"D-Link DIR-820L rev A1","wireless router",KA2IR820LA1,Cameo,,RTL8197D,"660 MHz","8 MiB",,"64 MiB",RTL8812AR,2x2:2,RTL8192CE,2x2:2,abgn+ac,,,2013
"D-Link DIR-820L rev B1","wireless router",KA2IR820LB1,Cameo,,RTL8197DL,,"8 MiB",,"128 MiB",RTL8812AR,2x2:2,RTL8192ER,2x2:2,abgn+ac,,,2014
"D-Link DIR-822 rev A1","wireless router",KA2IR822A1,"Alpha Networks",WRG-AC43,RTL8197DL,"660 MHz","8 MiB",,"64 MiB",RTL8812AR,2x2:2,RTL8192ER,2x2:2,abgn+ac,,,2015
"D-Link DIR-825 rev D1","wireless router",KA2IR825D1,"Shenzhen Gongjin Electronics",,RTL8197D,,"8 MiB",,"64 MiB",RTL8192DR,2x2:2,RTL8192CE,2x2:2,abgn,,,2013
"D-Link DIR-825 rev E1","wireless router","KA2IR825E1,KA2IR825G1",,,RTL8197DN,"660 MHz","8 MiB",,"64 MiB",RTL8812AR,2x2:2,RTL8192ER,2x2:2,abgn+ac,48:EE:0C,48:EE:0C,2016
"D-Link DIR-825 rev G1","wireless router",KA2IR825G1,SGE,,RTL8197DN,"660 MHz","8 MiB",,"64 MiB",RTL8812AR,2x2:2,RTL8192ER,2x2:2,abgn+ac,,,2016
"D-Link DIR-842 rev A1","wireless router",KA2IR842A1,,,RTL8197DN,,,,"64 MiB",RTL8812AR,2x2:2,RTL8192ER,2x2:2,abgn+ac,,,2015
"D-Link DIR-850L rev A1","wireless router",KA2IR850LA1,"Alpha Networks",WRGAC05,RTL8197D,"660 MHz","128 MiB",,"128 MiB",RTL8812AR,2x2:2,RTL8192CE,2x2:2,abgn+ac,90:94:E4,90:94:E4,2013
"Edimax BR-6478AC","wireless router",NDD9564781213,Edimax,,RTL8197D,"660 MHz","4 MiB",,"64 MiB",RTL8812AR,2x2:2,RTL8192CE,2x2:2,abgn+ac,80:1F:02,80:1F:02,2013
"Edimax BR-6479Gn","wireless router",NDD9564791214,Edimax,,RTL8197D,,,,,RTL8192CE,2x2:2,,,bgn,,,2013
"Edimax CV-7438nDM","bridge,audio streamer",NDD9574381301,Edimax,,RTL8197D,"660 MHz","8 MiB",,"64 MiB",RTL8192DR,2x2:2,,,abgn,,,2013
"JCG JHR-AC865","wireless router",HHOJHR-AC865,"Shenzhen Yichen Technology",,RTL8197D,,"8 MiB",,"64 MiB",RTL8812AR,2x2:2,RTL8192CE,2x2:2,abgn+ac,,,2013
"Loopcomm LP-9096TR","wireless router",ZTT-TAPR2,Loopcomm,,RTL8197DN,,,,,RTL8812AR,1x1:1,RTL8192ER,2x2:2,abgn+ac,,,2015
"Manhattan 525480","wireless router",NDD9564781213,,,RTL8197D,"660 MHz","4 MiB",,"64 MiB",RTL8812AR,,RTL8192CE,2x2:2,abgn+ac,80:1F:02,80:1F:02,2013
"Netis WF2780","wireless router",T58WF2780R,Netis,,RTL8197DN,"660 MHz","8 MiB",,"64 MiB",RTL8812AR,2x2:2,RTL8192ER,2x2:2,abgn+ac,,,2014
"Realtek RTL8197D-11AC Reference Design","wireless router",TX2-RTL8197D-11AC,,,RTL8197D,,"16 MiB",,"64 MiB",RTL8812AR,2x2:2,RTL8192CE,2x2:2,abgn+ac,,,2013
"TOTOLINK A2004NS","wireless router",X7D-IP04227,Zioncom,IP04227,RTL8197D,"660 MHz","8 MiB",,"128 MiB",RTL8812AR,2x2:2,RTL8192CE,2x2:2,abgn+ac,B8:55:10,B8:55:10,2014
"TOTOLINK A3002RU","wireless router,repeater",X7DIP04281,Zioncom,IP04281,RTL8197DN,"600 MHz","8 MiB",,"64 MiB",RTL8812AR,2x2:2,RTL8192ER,2x2:2,abgn+ac,78:44:76,78:44:76,2017
"TOTOLINK A850R","wireless router",X7D-IP04268,,,RTL8197D,,,,,RTL8812AR,2x2:2,RTL8192ER,2x2:2,abgn+ac,,,2014
"TOTOLINK N600R","wireless router",X7DIP04291,Zioncom,,RTL8197D,"660 MHz","4 MiB",,"32 MiB",RTL8194AR,4x4:3,,,bgn,F4:28:53,F4:28:53,2017
"TOTOLINK N600RV2","wireless router",,,,RTL8197DL,,"4 MiB",,"64 MiB",RTL8812AR,2x2:2,RTL8192ER,2x2:2,abgn,,,
"TOTOLINK N610RT","wireless router",,Zioncom,,RTL8197DL,"660 MHz","4 MiB",,"64 MiB",RTL8192ER,2x2:2,RTL8812AR,2x2:2,abgn,,,
"TRENDnet TEW-813DRU V1.0R","wireless router",XU8TEW813DRU,Cameo,,RTL8197D,,,,"128 MiB",RTL8812AR,2x2:2,RTL8192CE,2x2:2,abgn+ac,,,2014
"TRENDnet TEW-814DAP V1.xR","access point",XU8TEW814DAP,Cameo,,RTL8197D,,,,"128 MiB",RTL8812AR,2x2:2,RTL8192CE,2x2:2,abgn+ac,,,2014
"UPVEL UR-825AC","wireless router","2AAIIUP-825AC,KA2IR825E1",,,RTL8197DN,"660 MHz","16 MiB",,"64 MiB",RTL8812AR,2x2:2,RTL8192ER,2x2:2,abgn+ac,,,
"Wavlink WL-WN527A2","wireless router,access point",NZ3WS-WN527,,,RTL8197DN,"660 MHz","16 MiB",,"64 MiB",RTL8812AR,2x2:2,RTL8192ER,2x2:2,abgn+ac,80:3F:5D,80:3F:5D,2016
"Winstars WS-WN527A2","wireless router,access point",NZ3WS-WN527,,,RTL8197DN,"660 MHz","16 MiB",,"64 MiB",RTL8812AR,2x2:2,RTL8192ER,2x2:2,abgn+ac,,,2014
"ZyXEL X650","wireless router",NDD9564781213,Edimax,BR-6478AC,RTL8197D,,"8 MiB",,"64 MiB",RTL8812AR,2x2:2,RTL8192CE,2x2:2,abgn+ac,80:1F:02,80:1F:02,2013
"IpTIME A2004NS","wireless router",,Zioncom,,RTL8197D,,"8 MiB",,"64 MiB",RTL8812AR,2x2:2,RTL8192CE,2x2:2,abgn+ac,64:E5:99,64:E5:99,2013
"IpTIME N904","wireless router",,,,RTL8197D,"660 MHz","4 MiB",,"64 MiB",,2x2:2,,2x2:2,abgn,,,2012

Links:
OpenWrt (Barrier Breaker) for Realtek rtl819x devices.
[h]ttps://github.com/AlexeySofree/openwrt-rtl819x

Unfinished OpenWrt RTL819x LEDE
[h]ttps://github.com/hackpascal/lede-rtl8196c

Best Regards

Realtek is a dead end for OpenWrt. You can only blame them for that. Don't buy hardware with their SoCs if OpenWrt support is what you're after.

Hi All!

The UPVEL ur825ac Barrier Breaker OpenWrt firmware (Upvel_OWRT_v0.1.2build39.bin) work on D-Link DIR-842 B1.

You can download more firmwares from:

[h]ttps://oldwiki.archive.openwrt.org/toh/upvel/ur825ac

I changed D-Link boot loader first.
I used CH341A spi flash programmer.

Here is the dmesg:

[    0.000000] Linux version 3.10.49 (marklee@System-Product-Name) (gcc version 4.6.4 (Realtek RSDK-4.6.4 Build 2002) ) #2 Fri Jul 24 12:01:51 CST 2015
[    0.000000] CPU revision is: 0000dc02
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x03ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x03ffffff]
[    0.000000] On node 0 totalpages: 16384
[    0.000000] free_area_init_node: node 0, pgdat 80332880, node_mem_map 81000000
[    0.000000]   Normal zone: 128 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 16384 pages, LIFO batch:3
[    0.000000] icache: 64kB/32B, dcache: 32kB/32B, scache: 0kB/0B
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line:  board=AP console=ttyS0,38400 linuxpart=0x10000
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 61232k/65536k available (2827k kernel code, 4304k reserved, 534k data, 156k init, 0k highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:128
[    0.000000] console [ttyS0] enabled
[    0.200000] Calibrating delay loop... 657.81 BogoMIPS (lpj=3289088)
[    0.270000] pid_max: default: 32768 minimum: 301
[    0.280000] Mount-cache hash table entries: 512
[    0.400000] NET: Registered protocol family 16
[    0.450000] bio: create slab <bio-0> at 0
[    0.470000] SCSI subsystem initialized
[    0.480000] usbcore: registered new interface driver usbfs
[    0.490000] usbcore: registered new interface driver hub
[    0.500000] usbcore: registered new device driver usb
[    0.520000] NET: Registered protocol family 2
[    0.540000] TCP established hash table entries: 512 (order: 0, 4096 bytes)
[    0.550000] TCP bind hash table entries: 512 (order: -1, 2048 bytes)
[    0.560000] TCP: Hash tables configured (established 512 bind 512)
[    0.570000] TCP: reno registered
[    0.580000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.590000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.600000] NET: Registered protocol family 1
[    0.630000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.640000] NTFS driver 2.1.30 [Flags: R/O].
[    0.650000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.660000] msgmni has been set to 119
[    0.670000] io scheduler noop registered
[    0.680000] io scheduler deadline registered (default)
[    0.690000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.700000] serial8250: ttyS0 at MMIO 0x18002000 (irq = 8) is a 16550A
[    0.710000] SPI INIT
[    0.720000]  ------------------------- Force into Single IO Mode ------------------------
[    0.730000] |No chipID  Sft chipSize blkSize secSize pageSize sdCk opCk      chipName    |
[    0.740000] | 0 ef4018h  0h 1000000h  10000h   1000h     100h   80    0           W25Q128|
[    0.750000]  ----------------------------------------------------------------------------
[    0.760000] SPI flash(W25Q128) was found at CS0, size 0x1000000
[    0.770000] Creating 3 MTD partitions on "flash_bank_1":
[    0.780000] 0x000000000000-0x000000010000 : "boot"
[    0.790000] 0x000000010000-0x000001000000 : "linux"
[    0.810000] 0x000000130000-0x000001000000 : "rootfs"
[    0.820000] mtd: device 2 (rootfs) set to be root filesystem
[    0.830000] mtd: partition "rootfs_data" created automatically, ofs=0x491000, len=0xb6f000
[    0.840000] 0x000000491000-0x000001000000 : "rootfs_data"
[    0.850000]
[    0.850000] Probing RTL819X NIC-kenel stack size order[1]...
[    1.510000] chip name: 8196C, chip revid: 0
[    6.530000] eth0 added. vid=9 Member port 0x10f...
[    6.560000] eth1 added. vid=8 Member port 0x10...
[    6.570000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    6.580000] rtl819x-ehci rtl819x-ehci: Realtek rtl819x On-Chip EHCI Host Controller
[    6.590000] rtl819x-ehci rtl819x-ehci: new USB bus registered, assigned bus number 1
[    6.630000] rtl819x-ehci rtl819x-ehci: irq 10, io mem 0x18021000
[    6.660000] rtl819x-ehci rtl819x-ehci: USB 2.0 started, EHCI 1.00
[    6.670000] hub 1-0:1.0: USB hub found
[    6.680000] hub 1-0:1.0: 1 port detected
[    6.690000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    6.700000] rtl819x-ohci rtl819x-ohci: Realtek rtl819x built-in OHCI controller
[    6.710000] rtl819x-ohci rtl819x-ohci: new USB bus registered, assigned bus number 2
[    6.720000] rtl819x-ohci rtl819x-ohci: irq 10, io mem 0x18020000
[    6.790000] hub 2-0:1.0: USB hub found
[    6.800000] hub 2-0:1.0: 1 port detected
[    6.810000] usbcore: registered new interface driver usb-storage
[    6.820000] -------8196D OTG init
[    7.030000] dwc_otg: version 2.60a 22-NOV-2006
[    7.040000]  [S0] lmdev=83929900
[    7.050000] device_register :register pass
[    7.070000]   [S2]  otg_dev=8393c8e0
[    7.280000]   [S3] hcd==83905e00
[    7.290000] DWC_otg: Using DMA mode
[    7.300000] dwc_otg logicmodule: DWC OTG Controller
[    7.310000] dwc_otg logicmodule: new USB bus registered, assigned bus number 3
[    7.320000] dwc_otg logicmodule: irq 15, io mem 0xb8030000
[    7.330000] set OTG host to high speed !
[    7.340000] DWC_otg: Init: Port Power? op_state=1
[    7.350000] DWC_otg: Init: Power Port (0)
[    7.360000] hub 3-0:1.0: USB hub found
[    7.370000] hub 3-0:1.0: 1 port detected
[    7.380000]   [S1] dwc_otg_driver, lmdriver=80344c3c
[    7.400000] TCP: westwood registered
[    7.410000] NET: Registered protocol family 17
[    7.420000] 8021q: 802.1Q VLAN Support v1.8
[    7.440000] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    7.450000] Freeing unused kernel memory: 156K (80349000 - 80370000)
[   13.880000] jffs2: notice: (294) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (1 unchecked, 0 orphan) and 23 of xref (0 dead, 15 orphan) found.
[   15.440000] nf_conntrack version 0.5.0 (959 buckets, 3836 max)
[   15.460000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   15.480000] PPP generic driver version 2.4.2
[   15.510000] Realtek FastPath:v1.03
[   15.540000] NET: Registered protocol family 10
[   15.560000] rtl_sendfile installed
[   15.570000] Loading modules backported from Linux version master-2014-05-22-0-gf2032ea
[   15.580000] Backport generated by backports.git backports-20140320-37-g5c33da0
[   15.620000] NET: Registered protocol family 24
[   15.660000] xt_time: kernel timezone is -0000
[   15.710000] cfg80211: Calling CRDA to update world regulatory domain
[   15.730000] cfg80211: World regulatory domain updated:
[   15.740000] cfg80211:  DFS Master region: unset
[   15.750000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[   15.760000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   15.770000] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   15.780000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[   15.790000] cfg80211:   (5170000 KHz - 5250000 KHz @ 160000 KHz), (N/A, 2000 mBm), (N/A)
[   15.800000] cfg80211:   (5250000 KHz - 5330000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[   15.810000] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[   15.820000] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[   15.830000] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[   16.610000] Realtek WLAN driver - version 1.6 (2013-02-21)
[   16.620000] DFS function - version 2.0.5
[   16.630000] Adaptivity function - version 8.7
[   16.640000] Device Name = RTKWiFi0
[   16.650000] VIF_NUM=9
[   18.660000] 98 - 25MHz Clock Source
[   20.280000] Find Port=1 Device:Vender ID=881210ec
[   20.860000] Device Name = RTKWiFi1
[   20.870000] VIF_NUM=9
[   22.870000] 98 - 25MHz Clock Source
[   24.880000] Find Port=0 Device:Vender ID=818b10ec
[   32.020000] cfg80211: Calling CRDA for country: US
[   32.100000] cfg80211: Regulatory domain changed to country: US
[   32.110000] cfg80211:  DFS Master region: FCC
[   32.120000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[   32.130000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 3000 mBm), (N/A)
[   32.140000] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 1700 mBm), (N/A)
[   32.150000] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz), (N/A, 2300 mBm), (0 s)
[   32.160000] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 3000 mBm), (N/A)
[   32.170000] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 4000 mBm), (N/A)
[   34.590000] device eth0 entered promiscuous mode
[   34.610000] br-lan: port 1(eth0) entered forwarding state
[   34.620000] br-lan: port 1(eth0) entered forwarding state
[   36.620000] br-lan: port 1(eth0) entered forwarding state
[   38.520000]
[   38.520000]
[   38.520000] ************* Initialize MAC/PHY parameter *************
[   38.520000] [MAC_REG_8812_n]
[   38.520000] [PHY_REG_8812_n_hp]
[   38.520000] RL6286_MAC_PHY_Parameter_v042_20131128@
[   38.520000] [PHY_REG_PG_8812_new]
[   38.520000] RL6286_MAC_PHY_Parameter_v026_20130314@
[   38.520000] [AGC_TAB_8812_n_hp]
[   38.520000] RL6286_MAC_PHY_Parameter_v041_20131127@
[   38.530000] [RadioA_8812_n_ultra_hp]
[   38.540000] RL6286_MAC_PHY_Parameter_v041_20131127@
[   38.960000] [RadioB_8812_n_ultra_hp]
[   38.970000] RL6286_MAC_PHY_Parameter_v041_20131127@
[   39.180000] [TXPWR_LMT_8812_new]
[   39.190000] [PHY_ConfigTXPwrTrackingWithParaFile]
[   39.200000] [REG_TXPWR_TRK_8812_hp]
[   39.330000] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   39.460000] device wlan0 entered promiscuous mode
[   39.660000]
[   39.660000]
[   39.660000] ************* Initialize MAC/PHY parameter *************
[   39.660000] [MAC_REG_8192Emp]
[   39.670000] [PHY_REG_8192Emp]
[   39.690000] RTL8192E_MAC_PHY_Parameter_v043_MP_20141229@
[   39.700000] [PHY_REG_PG_8192E_new]
[   39.720000] RL6286_MAC_PHY_Parameter_v024_20130125@
[   39.730000] [AGC_TAB_8192Emp]
[   39.740000] RTL8192E_MAC_PHY_Parameter_v043_MP_20141229@
[   39.760000] RadioA_8192Emp
[   39.770000] RTL8192E_MAC_PHY_Parameter_v043_MP_20141229@
[   40.130000] [RadioB_8192Emp]
[   40.140000] RTL8192E_MAC_PHY_Parameter_v043_MP_20141229@
[   40.480000] [TXPWR_LMT_92EE_new]
[   40.490000] [PHY_ConfigTXPwrTrackingWithParaFile]
[   40.500000] [TxPowerTrack_AP]
[   40.750000] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
[   43.410000] device wlan1 entered promiscuous mode
[   47.160000]
[   47.160000]
[   47.160000] ************* Initialize MAC/PHY parameter *************
[   47.160000] [MAC_REG_8812_n]
[   47.160000] [PHY_REG_8812_n_hp]
[   47.160000] RL6286_MAC_PHY_Parameter_v042_20131128@
[   47.160000] [PHY_REG_PG_8812_new]
[   47.160000] RL6286_MAC_PHY_Parameter_v026_20130314@
[   47.160000] [AGC_TAB_8812_n_hp]
[   47.160000] RL6286_MAC_PHY_Parameter_v041_20131127@
[   47.170000] [RadioA_8812_n_ultra_hp]
[   47.190000] RL6286_MAC_PHY_Parameter_v041_20131127@
[   48.280000] [RadioB_8812_n_ultra_hp]
[   48.360000] RL6286_MAC_PHY_Parameter_v041_20131127@
[   48.860000] [TXPWR_LMT_8812_new]
[   48.870000] [PHY_ConfigTXPwrTrackingWithParaFile]
[   48.880000] [REG_TXPWR_TRK_8812_hp]
[   49.220000] br-lan: port 2(wlan0) entered forwarding state
[   49.230000] br-lan: port 2(wlan0) entered forwarding state
[   49.240000] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   51.250000] br-lan: port 2(wlan0) entered forwarding state
[   53.570000]
[   53.570000]
[   53.570000] ************* Initialize MAC/PHY parameter *************
[   53.570000] [MAC_REG_8192Emp]
[   53.660000] [PHY_REG_8192Emp]
[   53.670000] RTL8192E_MAC_PHY_Parameter_v043_MP_20141229@
[   53.680000] [PHY_REG_PG_8192E_new]
[   53.690000] RL6286_MAC_PHY_Parameter_v024_20130125@
[   53.700000] [AGC_TAB_8192Emp]
[   53.780000] RTL8192E_MAC_PHY_Parameter_v043_MP_20141229@
[   53.800000] RadioA_8192Emp
[   53.810000] RTL8192E_MAC_PHY_Parameter_v043_MP_20141229@
[   54.760000] [RadioB_8192Emp]
[   54.770000] RTL8192E_MAC_PHY_Parameter_v043_MP_20141229@
[   55.600000] [TXPWR_LMT_92EE_new]
[   55.610000] [PHY_ConfigTXPwrTrackingWithParaFile]
[   55.620000] [TxPowerTrack_AP]
[   64.030000] br-lan: port 3(wlan1) entered forwarding state
[   64.040000] br-lan: port 3(wlan1) entered forwarding state
[   64.130000] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
[   66.050000] br-lan: port 3(wlan1) entered forwarding state
.
.
.
.

The RTL819x LEDE without Wifi compiled already.

You can find bootloader with Winbond W25Q128 support:
https://forum.archive.openwrt.org/viewtopic.php?id=46606&p=10
Post #233

Best Regards

Hi All!

The dmesg output contains the IDs of Wifi PCIe devices:
[ 20.280000] Find Port=1 Device:Vender ID=881210ec
[ 24.880000] Find Port=0 Device:Vender ID=818b10ec

10EC:8812
https://cateee.net/lkddb/web-lkddb/RTL8821AE.html

10EC:818B
https://cateee.net/lkddb/web-lkddb/RTL8192EE.html

Best Regards

That is neither OpenWrt nor is a five-year-old OS suitable for any use, due to multiple, well-known, actively exploited vulnerabilities in the kernel, third-party applications, and 802.11 protocols.

3 Likes

Hi All!

I would use the original and newer OpenWrt.
If they exist, but not. Nothing.

The Barrier Breaker is more secured like brand routerOS.
I think: All brand (blackbox/closed) routerOS have factory backdoor:)))))

The RTL819x for LEDE from hackpascal compiled already.
I didn' try load mainline kernel wifi modules yet.
The finished "rootfs" is still too big.
I must configure required/needed modules, and packages.
When done, i will try upload to the router, and try load mainline wifi modules.

Best Regards

2 Likes

The Realtek SOC's (rtl8881a, rtl8196e, rtl819xd) DOESN'T CRIPLED MIPS!!!!!!!!!!!

Hi All!

I checked the code of realtek SDK 2.5 and I found something very important.
The forums and openwrt informations contains:
"Realtek inherited a reduced mips ISA via Lexra"
Realtek SOC's have lexra core with reduced (crippled) mips funcionality.
The lexra core doesn't support four unaligned instructions:


" It was founded in 1997 and began developing and licensing semiconductor intellectual property cores that implemented the MIPS I architecture, except for the four unaligned load and store (lwl, lwr, swl, swr) instructions. "

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

                          BUT 

The Realtek SOC's (rtl8881a, rtl8196e, rtl819xd) support these four unaligned load and store opcodes (lwl, lwr, swl, swr) !

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

target/linux/realtek/rtl8881a/config-3.10
ONFIG_CPU_HAS_ULS=y

target/linux/realtek/rtl819xd/config-3.10
CONFIG_CPU_HAS_ULS=y

target/linux/realtek/rtl8196e/config-3.10
CONFIG_CPU_HAS_ULS=y



target/linux/realtek/files/arch/rlx/kernel/unaligned.c
#ifdef CONFIG_CPU_HAS_ULS
#define     LoadW(addr, value, res)   \
                __asm__ __volatile__ (                      \
                        "1:\tlwl\t%0, (%2)\n"               \
                        "2:\tlwr\t%0, 3(%2)\n\t"            \
                        "li\t%1, 0\n"                       \
                        "3:\n\t"                            \
                        ".insn\n\t"                         \
                        ".section\t.fixup,\"ax\"\n\t"       \
                        "4:\tli\t%1, %3\n\t"                \
                        "j\t3b\n\t"                         \
                        ".previous\n\t"                     \
                        ".section\t__ex_table,\"a\"\n\t"    \
                        STR(PTR)"\t1b, 4b\n\t"              \
                        STR(PTR)"\t2b, 4b\n\t"              \
                        ".previous"                         \
                        : "=&r" (value), "=r" (res)         \
                        : "r" (addr), "i" (-EFAULT));
#else
#define     LoadW(addr, value, res)   \
                __asm__ __volatile__ (                      \
                        "1:\tlbu\t%0, 0(%2)\n\t"            \
                        "lbu\t%1, 1(%2)\n\t"                \
                        "sll\t%0, 8\n\t"                    \
                        "or\t%0, %1\n\t"                    \
                        "lbu\t%1, 2(%2)\n\t"                \
                        "sll\t%0, 8\n\t"                    \
                        "or\t%0, %1\n\t"                    \
                        "lbu\t%1, 3(%2)\n\t"                \
                        "sll\t%0, 8\n\t"                    \
                        "or\t%0, %1\n\t"                    \
                        "li\t%1, 0\n"                       \
                        "3:\n\t"                            \
                        ".insn\n\t"                         \
                        ".section\t.fixup,\"ax\"\n\t"       \
                        "4:\tli\t%1, %3\n\t"                \
                        "j\t3b\n\t"                         \
                        ".previous\n\t"                     \
                        ".section\t__ex_table,\"a\"\n\t"    \
                        STR(PTR)"\t1b, 4b\n\t"              \
                        STR(PTR)"\t2b, 4b\n\t"              \
                        ".previous"                         \
                        : "=&r" (value), "=&r" (res)        \
                        : "r" (addr), "i" (-EFAULT));
#endif


target/linux/realtek/files/arch/rlx/lib/csum_partial.S
#ifdef CONFIG_CPU_HAS_ULS
        ulw     t1, (src)
#else
  #ifdef __MIPSEB__
        lbu     t1, 0(src)
        lbu     t5, 1(src)
        sll     t1, 8
        or      t1, t5
        lbu     t5, 2(src)
        sll     t1, 8
        or      t1, t5
        lbu     t5, 3(src)
        sll     t1, 8
        or      t1, t5
  #else /* __MIPSEL__ */
        lbu     t1, 3(src)
        lbu     t5, 2(src)
        sll     t1, 8
        or      t1, t5
        lbu     t5, 1(src)
        sll     t1, 8
        or      t1, t5
        lbu     t5, 0(src)
        sll     t1, 8
        or      t1, t5
  #endif
#endif /* CONFIG_CPU_HAS_ULS */


target/linux/realtek/files/arch/rlx/lib/memset.S
#ifdef CONFIG_CPU_HAS_ULS
  #ifdef __MIPSEB__
        EX(LONG_S_L, a1, (a0), .Lfirst_fixup)   /* make word aligned */
  #endif
  #ifdef __MIPSEL__
        EX(LONG_S_R, a1, (a0), .Lfirst_fixup)   /* make word aligned */
  #endif

        PTR_SUBU        a0, t0                  /* long align ptr */
        PTR_ADDU        a2, t0                  /* correct size */
#else
4:      EX(sb, a1, 0(a0), .Lfirst_fixup)
        PTR_ADDIU       a0, 1
        PTR_SUBU        a2, 1
        andi            t0, a0, LONGMASK
        bnez            t0, 4b
         nop
#endif

Conclusion:
The Realtek SOC's (rtl8881a, rtl8196e, rtl819xd)are full MIPS. The instruction set is the same as the mips r3000 and not the r6000.

The MIPS R6000 doesn't support unaligned instruction opcodes.

Best Regards

1 Like

There is a guy who ported RTL8186 in linux kernel and successfully able to boot it https://github.com/yashac3/linux-rtl8186 . RTL8186 doesn't support unaligned load and store opcodes (lwl, lwr, swl, swr). But RTL8196E does as u say and I have a RTL8196E device. I followed his steps like 1 year ago and try to do a port for my 8196E but it didn't worked, back then I didn't know that 8196E is a full MIPS. Do u want to check his port and continue ?

I have ported the RTL8196E RTL8197D and RTL8197F SoC from Realtek to the last master of Openwrt (as of today).

The port have the necessary code for those SoCs. I used the @hackpascal initial port as a start and have ported RLX4181 and RLX5281 Lexra processors. Those are easier to port, as they have the unaligned instructions. Musl is working in lexra now...
RTL8197F uses a full 24k mips processor, so, no modification is needed in the toolchain...

For the SoCs:
All the SoC drivers are implemented and tested (gpio, pci, irq, timers, etc), for the three SoCs. One can port a router to openwrt just creating a DTS file for it (and changing the Makefiles, as any normal port for openwrt).

The problem is with network and wireless. RTL8196E based routers can use the RTL8192EE open source wifi driver from mac80211 package. Most routers that use RTL8197D SoC also use RTL8192EE for 2.4 and RTL8812 for 5... Both drivers are open source on linux kernel...

TODO:

  • Network and switch driver: hackpascal has started the port for RE865X driver. Need rework for new SoCs....
  • RTL8197F 2.4Ghz wireless driver: This SoC uses an internal wifi, but can be ported to the new RTW88 driver, as they use the same structs (8192EE uses this structs too, but is implemented in the old driver... May a port of 8192EE to the new driver can help too :slight_smile: )
  • Performace: The main focus right now is compatibility... We need to improve for performace....

Use the ramdisk for now... As we dont have the network driver right now, we must use the serial port to bootup... The cvimg boot can be used, but is now of much use right now...

Any help and feedback are welcome :slight_smile:

4 Likes

Forgot the bootlog :slight_smile:
This is a RTL8196E router

[    0.000000] Linux version 4.14.187 (gaspare@gaspare-MacBookAir) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r14023-1deaf695ec)) #0 T0
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0000cd01 (Lexra LX4380 / RLX4181)
[    0.000000] MIPS: machine is Multilaser RE172 V1
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] BOOTSTRAP = 8196e001 2 100218 b08
[    0.000000] Primary instruction cache 16kB, linesize 16 bytes.
[    0.000000] Primary write-back data cache 8kB, linesize 16 bytes.
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] random: get_random_bytes called from start_kernel+0x9c/0x4e0 with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 8120
[    0.000000] Kernel command line: console=ttyS0,38400
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Memory: 19248K/32768K available (4442K kernel code, 159K rwdata, 832K rodata, 7488K init, 204K bss, 13520K reserve)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 128
[    0.000000] clocksource: RTL819X counter: mask: 0xfffffff max_cycles: 0xfffffff, max_idle_ns: 4778151100 ns
[    0.000034] sched_clock: 28 bits at 25MHz, resolution 40ns, wraps every 5368709100ns
[    0.025522] timer-controller: running - mult: 107374182, shift: 32, IRQ: 7, CLK: 25.000MHz
[    0.052958] Calibrating delay loop... 397.82 BogoMIPS (lpj=795648)
[    0.105601] pid_max: default: 32768 minimum: 301
[    0.121964] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.143697] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.184820] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.216906] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.239084] NET: Registered protocol family 16
[    1.001167] PCI host bridge to bus 0000:00
[    1.014647] pci_bus 0000:00: root bus resource [mem 0x19000000-0x19ffffff]
[    1.037216] pci_bus 0000:00: root bus resource [io  0x18c00000-0x18dfffff]
[    1.059810] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    1.082111] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    1.109647] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.138528] pci 0000:00:00.0: BAR 8: assigned [mem 0x19000000-0x190fffff]
[    1.160894] pci 0000:00:00.0: BAR 7: assigned [io  0x18c00000-0x18c00fff]
[    1.183247] pci 0000:01:00.0: BAR 2: assigned [mem 0x19000000-0x19003fff 64bit]
[    1.207328] pci 0000:01:00.0: BAR 0: assigned [io  0x18c00000-0x18c000ff]
[    1.229645] pci 0000:00:00.0: PCI bridge to [bus 01]
[    1.245948] pci 0000:00:00.0:   bridge window [io  0x18c00000-0x18c00fff]
[    1.268256] pci 0000:00:00.0:   bridge window [mem 0x19000000-0x190fffff]
[    1.293361] clocksource: Switched to clocksource RTL819X counter
[    1.319464] NET: Registered protocol family 2
[    1.336443] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    1.359429] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    1.380334] TCP: Hash tables configured (established 1024 bind 1024)
[    1.401946] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    1.421214] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    1.443012] NET: Registered protocol family 1
[    1.573510] random: fast init done
[    2.296471] Crashlog allocated RAM at address 0x1f00000
[    2.323211] workingset: timestamp_bits=14 max_order=13 bucket_order=0
[    2.381620] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    2.400799] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    2.568508] io scheduler noop registered
[    2.581500] io scheduler deadline registered (default)
[    2.600128] Serial: 8250/16550 driver, 1 ports, IRQ sharing enabled
[    2.623840] console [ttyS0] disabled
[    2.635794] 18002000.serial: ttyS0 at MMIO 0x18002000 (irq = 28, base_baud = 12500000) is a 16550A
[    2.665498] console [ttyS0] enabled
[    2.665498] console [ttyS0] enabled
[    2.688503] bootconsole [early0] disabled
[    2.688503] bootconsole [early0] disabled
[    2.743549] m25p80 spi0.0: gd25q32 (4096 Kbytes)
[    2.824635] 2 fixed-partitions partitions found on MTD device spi0.0
[    2.845952] Creating 2 MTD partitions on "spi0.0":
[    2.862089] 0x000000000000-0x000000010000 : "boot"
[    2.882633] 0x000000010000-0x000000400000 : "firmware"
[    2.909620] NET: Registered protocol family 10
[    2.947927] Segment Routing with IPv6
[    2.960656] NET: Registered protocol family 17
[    2.975928] 8021q: 802.1Q VLAN Support v1.8
[    3.035923] Freeing unused kernel memory: 7488K
[    3.051177] This architecture does not have kernel memory protection.
[    3.131238] init: Console is alive
[    3.211875] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    3.246387] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.282665] init: - preinit -

[    4.734676] random: jshn: uninitialized urandom read (4 bytes read)
[    5.069736] random: jshn: uninitialized urandom read (4 bytes read)
[    5.998420] random: jshn: uninitialized urandom read (4 bytes read)
[    6.217717] random: jshn: uninitialized urandom read (4 bytes read)
[    6.755500] random: jshn: uninitialized urandom read (4 bytes read)
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[   10.816134] procd: - early -
[   11.505577] procd: - ubus -
[   11.542893] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.569277] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.592857] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.623301] procd: - init -
Please press Enter to activate this console.
[   13.865007] kmodloader: loading kernel modules from /etc/modules.d/*
[   13.951095] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   14.056952] Loading modules backported from Linux version v5.8-rc2-0-g48778464bb7d
[   14.082325] Backport generated by backports.git v5.8-rc2-1-0-g7a69429b
[   14.145792] urngd: v1.0.2 started.
[   14.171293] ip_tables: (C) 2000-2006 Netfilter Core Team
[   14.255706] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[   14.688222] xt_time: kernel timezone is -0000
[   14.872751] random: crng init done
[   14.884328] random: 2 urandom warning(s) missed due to ratelimiting
[   15.077787] PPP generic driver version 2.4.2
[   15.128741] NET: Registered protocol family 24
[   15.308137] PCI: Enabling device 0000:00:00.0 (0000 -> 0003)
[   15.361707] rtl8192ee: Using firmware rtlwifi/rtl8192eefw.bin
[   15.396009] rtlwifi: rtlwifi: wireless switch is on
[   15.542723] kmodloader: done loading kernel modules from /etc/modules.d/*



BusyBox v1.31.1 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r14023+1-1deaf695ec
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@(none):/# 

2 Likes

Devices are only merged through the master branch, for that kernel 5.4 support would be a hard requirement.

Realtek SOCs haven't seen a lot of love so far, because of the lexra issue (in all but the latest SOCs) and because they're usually very low-spec and with a "challenging" wireless support state. If those issues can be solved (musl support can also be considered a hard requirement), there wouldn't be much of a reason not to merge support for these devices (obviously there needs to be sufficient development manpower behind it, to suggest longer term attention).

1 Like