Working Realtek SoC RTL8196E 97D 97F in last master

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

This repository is a mirror of https://git.openwrt.org/openwrt/openwrt.git It is for reference only and is not active for check-ins or for reporting issues. We will continue to accept Pull Request...

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:

9 Likes

Bootlog for RTL8192E

[    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):/# 

3 Likes

Excellent work done here, porting into dts system is a godsend. I also started something earlier but I was alone and couldn't forward much. @gaspare





1 Like

Can you help me build the firmware for a RTL8197D router with 8mb flash and 32mb ram? I attempted to build on my machine but encountered an "dependency on 'libpcre' " error that I was not able to resolve. I am trying to unbrick my router locked in miniweb server after firmware update.

Good day,
I have tried to compile this tree for some device on rtl8196e SoC. But usb, wifi (rtl8192er) and ethernet not working. May be need to enable any driver in kernel? Also, there are no any usb/eth items in dts files.
I need help.

Wifi needs the open firmware for 8192er (open firmware only have the 8192ee)... Actually, ee and er are very similar...
For switch driver, I'm working on converting the patch for kernel 5.4 to use the DSA switch api... I don't have plan (time) to support usb right now...

Wow. Nice!

I recently purchased the Lidl home automation gateway, which turns out to use the RTL8194E-CG SoC.

It is actually a rebranded Tuya TYGWZ1 board

the flash chip is a 25Q127CSIG - which means 16MB of flash?
And 32MB of RAM?
Anyway the zigbee dongle is a TYZS4 and seems to be connected to one of the uarts.

So the only thing missing is networking.
Also, i dont fully undestand what the J1 pins are. is this the other uart or a jtag?

2 Likes

I have connected a 3.3V serial port to the Lidl Zigbee GW, (RTL8194E-CG SoC, Tuya TYGWZ1):

Some interesting lines from boot-up log:

---RealTek(RTL8196E)at 2020.04.28-13:58+0800 v3.4T-pre2 [16bit](400MHz)
Linux version 3.10.90 (dingsl@dingsl-pc) (gcc version 4.6.4 (Realtek RSDK-4.6.4 Build 2080) ) #10 Tue Apr 28 14:03:14 CST 2020
serial8250: ttyS0 at MMIO 0x18002000 (irq = 9) is a 16550A
serial8250: ttyS1 at MMIO 0x18002100 (irq = 13) is a 16550A
5 rtkxxpart partitions found on MTD device flash_bank_1
Creating 5 MTD partitions on "flash_bank_1":
0x000000000000-0x000000020000 : "boot+cfg"
0x000000020000-0x000000200000 : "linux"
0x000000200000-0x000000400000 : "rootfs"
0x000000400000-0x000000420000 : "tuya-label"
0x000000420000-0x000001000000 : "jffs2-fs"
eth0 added. vid=9 Member port 0x10f...
eth1 added. vid=8 Member port 0x10...
[peth0] added, mapping to [eth1]...
VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
Freeing unused kernel memory: 192K (802f0000 - 80320000)
init started: BusyBox v1.13.4 (2020-04-28 13:57:36 CST)
Please press Enter to activate this console. Tuya Gateway Application Normal Srart /tuya/tuya_start.sh UserAppRunDir:
tuya-linux login:

Port speed is 38400, On 3 of the J1 Pins, or on the underside of the PCB are labelled pads.

2 Likes

Hi!
I bought in wall AP IP-COM W36AP.
It is another name of Tenda W12.

This AP has RTL8197FS, RTL8812BRH and RTL8363NB,
128Mb RAM, 8Mb ROM,
two ethernet ports,
two LED: wifi/status, lan activity,
one button for reset.

Can I use this repository for my AP and what should I do for build an image for my device?

The RTL8363 chip is for giga switch... This is the only chip I did not recognise...
RTL8812 is for 5GHz, there is an open source driver for it...

Thank you @gaspare!

This is my bootlog. Perhaps you will tell more after you see it.

Booting...
init_ram
 00000202 M init ddr ok

DRAM Type: DDR2
        DRAM frequency: 400MHz
        DRAM Size: 128MB
JEDEC id EF4017, EXT id 0x0000
found w25q64
flash vendor: Winbond
w25q64, size=8MB, erasesize=64KB, max_speed_hz=29000000Hz
auto_mode=0 addr_width=3 erase_opcode=0x000000d8
=>CPU Wake-up interrupt happen! GISR=89000004
Reboot Result from Watchdog Timeout!

---Realtek RTL8197F boot code at 2017.07.27-09:11+0800 v3.4.11B.9 (999MHz)
Mac addr:d8-38-0d-c4-42-10
lan_wan_isolation Initing...
config: lan port mask is 0x000000f7
config: wan port mask is 0x000000e8
lan_wan_isolation Initing has been completed.
wait for upgrage
port[0] link:down
port[1] link:up
port[2] link:down
port[3] link:up
port[4] link:down
irq:0x00008480
Jump to image start=0x80a00000...
decompressing kernel:
Uncompressing Linux... done, booting the kernel.
done decompressing kernel.
start address: 0x8043ec90
[    0.000000] Linux version 3.10.90 (root@linux-e5sy) (gcc version 4.4.7 (Realtek MSDK-4.4.7 Build 2001) ) #4 Thu Jan 7 04:28:15 EST 2021
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 00019385 (MIPS 24Kc)
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x07ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x07ffffff]
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,115200 root=/dev/mtdblock4
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Writing ErrCtl register=00046000
[    0.000000] Readback ErrCtl register=00046000
[    0.000000] Memory: 107916k/131072k available (4367k kernel code, 23156k reserved, 1877k data, 216k init, 0k highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:192
[    0.000000] Realtek GPIO IRQ init
[    0.000000] Calibrating delay loop... 666.41 BogoMIPS (lpj=3332096)
[    0.060000] pid_max: default: 32768 minimum: 301
[    0.060000] Mount-cache hash table entries: 512
[    0.070000] NET: Registered protocol family 16
[    0.070000] <<<<<Register PCI Controller>>>>>
[    0.090000] Do MDIO_RESET
[    0.120000] 40MHz
[    0.650000] Find PCIE Port, Device:Vender ID=b82210ec
[    0.660000] Realtek GPIO controller driver init
[    0.670000] INFO: registering sheipa spi device
[    0.690000] bio: create slab <bio-0> at 0
[    0.690000] INFO: sheipa spi driver register
[    0.700000] INFO: sheipa spi probe
[    0.700000] Switching to clocksource MIPS
[    0.710000] NET: Registered protocol family 2
[    0.710000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[    0.710000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.720000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.720000] TCP: reno registered
[    0.730000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.730000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.740000] NET: Registered protocol family 1
[    0.760000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.760000] msgmni has been set to 210
[    0.770000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
[    0.780000] io scheduler noop registered (default)
[    0.910000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.920000] serial8250: ttyS0 at MMIO 0x18147000 (irq = 17) is a 16550A
[    0.930000] console [ttyS0] enabled, bootconsole disabled
[    0.930000] console [ttyS0] enabled, bootconsole disabled
[    0.940000] Realtek GPIO to I2C Driver Init...
[    0.940000] mfi_ioctl_init:565,dev=253,MINOR=0
[    0.950000] loop: module loaded
[    0.960000] m25p80 spi0.0: change speed to 15000000Hz, div 7
[    0.960000] JEDEC id EF4017
[    0.970000] m25p80 spi0.0: found w25q64, expected m25p80
[    0.970000] flash vendor: Winbond
[    0.970000] m25p80 spi0.0: w25q64 (8192 Kbytes) (29000000 Hz)
[    0.980000] m25p80 spi0.0: change speed to 29000000Hz, div 4
[    0.990000] Kernel code size:0x1e8012
[    0.990000] 7 rtkxxpart partitions found on MTD device m25p80
[    0.990000] Creating 7 MTD partitions on "m25p80":
[    1.000000] 0x000000000000-0x000000800000 : "ALL"
[    1.010000] 0x000000000000-0x000000020000 : "Bootloader"
[    1.010000] 0x000000020000-0x000000030000 : "CFG"
[    1.020000] 0x000000030000-0x0000007e0000 : "KernelFS"
[    1.030000] 0x000000218012-0x0000007e0000 : "RootFS"
[    1.030000] 0x0000007e0000-0x0000007f0000 : "CFM"
[    1.040000] 0x0000007f0000-0x000000800000 : "CFM_BACKUP"
[    1.050000] PPP generic driver version 2.4.2
[    1.050000] PPP MPPE Compression module registered
[    1.060000] NET: Registered protocol family 24
[    1.060000] PPTP driver version 0.8.5
[    1.060000] Realtek WLAN driver - version 1.7 (2015-10-30)(SVN:exported)
[    1.070000] Adaptivity function - version 9.3.4
[    1.090000] Do MDIO_RESET
[    1.120000] 40MHz
[    1.660000] Find PCIE Port, Device:Vender ID=b82210ec
[    1.670000]
[    1.670000]  found 8822B !!!
[    1.670000] halmac_check_platform_api ==========>
[    1.680000] 12089M
[    1.680000] HALMAC_MAJOR_VER = 0
[    1.680000] HALMAC_PROTOTYPE_VER = 0
[    1.690000] HALMAC_MINOR_VER = 0
[    1.690000] halmac_init_adapter_88xx ==========>
[    1.690000] halmac_init_adapter Succss
[    1.700000] IS_RTL8822B_SERIES value8 = a
[    1.700000] MACHAL_version_init
[    1.730000]
[    1.730000]
[    1.730000] #######################################################
[    1.740000] SKB_BUF_SIZE=4440 MAX_SKB_NUM=1024
[    1.750000] #######################################################
[    1.750000]
[    1.770000] MACHAL_version_init
[    1.780000] RFE TYPE =0
[    1.790000]
[    1.790000]
[    1.790000] #######################################################
[    1.800000] SKB_BUF_SIZE=3040 MAX_SKB_NUM=400
[    1.810000] #######################################################
[    1.810000]
[    1.820000] RFE TYPE =0
[    1.820000] RFE TYPE =0
[    1.830000] RFE TYPE =0
[    1.830000] RFE TYPE =0
[    1.840000] RFE TYPE =0
[    1.840000] RFE TYPE =0
[    1.840000] RFE TYPE =0
[    1.850000] RFE TYPE =0
[    1.850000] TENDA WLAN: init proc
[    1.850000] --- STA STEERING INIT ---
[    1.860000] u32 classifier
[    1.860000] nf_conntrack version 0.5.0 (1686 buckets, 6744 max)
[    1.870000] [BM CORE     ][init_online_ip  ,1053]  INFO: online ip data hash table created, size = 199
[    1.880000] [BM CORE     ][init_online_ip_procfs,647 ]  INFO: online_ip proc file created
[    1.890000] ipip: IPv4 over IPv4 tunneling driver
[    1.890000] gre: GRE over IPv4 demultiplexor driver
[    1.900000] ip_gre: GRE over IPv4 tunneling driver
[    1.900000] ip_tables: (C) 2000-2006 Netfilter Core Team
[    1.910000] TCP: cubic registered
[    1.910000] NET: Registered protocol family 17
[    1.920000] Bridge firewalling registered
[    1.920000] l2tp_core: L2TP core driver, V2.0
[    1.930000] l2tp_ppp: PPPoL2TP kernel driver, V2.0
[    1.930000] 8021q: 802.1Q VLAN Support v1.8
[    1.940000] Realtek FastPath:v1.03
[    1.940000]
[    1.940000] Probing RTL819X NIC-kenel stack size order[1]...
[    6.820000] Probed set of 8367 switch
[    7.600000] eth0 added. vid=9 Member port 0x2...
[    7.610000] eth1 added. vid=8 Member port 0x8...
[    7.630000] [peth0] added, mapping to [eth1]...
[    7.640000] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[    7.650000] Freeing unused kernel memory: 216K (8061a000 - 80650000)
mkdir: can't create directory '/var/run': File exists
[    9.570000] [GPIO] reset gpio number:54
Read hw setting header failed!
Invalid hw setting signature [sig=]!
Initialize AP MIB failed!
Give root password for system maintenance
(or type Control-D for normal startup):argv[0] = cfmd
cfmd
Read hw setting header failed!

 flash_mib_compress_write DEFAULT_SETTING DONE, __[flash.c-6985]
 flash_mib_compress_write CURRENT_SETTING DONE, __[flash.c-7054]
 DEFAULT_SETTING hecksum_ok

 CURRENT_SETTING hecksum_ok

  __[flash.c-7208]setMIB end...
setMIB end...
setMIB end...
setMIB end...
setMIB end...
setMIB end...
setMIB end...
setMIB end...
setMIB end...
setMIB end...
setMIB end...
setMIB end...
setMIB end...
setMIB end...
setMIB end...
setMIB end...
setMIB end...
setMIB end...
setMIB end...
setMIB end...
setMIB end...
setMIB end...
setMIB end...
setMIB end...
setMIB end...
setMIB end...
setMIB end...
argv[0] = timer
timer
argv[0] = logserver
logserver
argv[0] = netctrl
netctrl
connect: No such file or directory
func:cfms_mib_proc_handle, line:214 connect cfmd is error.
After transfor:1 1 1 1 1
wans_conf:1 1 1 1 1
System Vlan Conf:
Port[0]: Vlan:1  Wan_index:0 Wan_ifname:
Port[1]: Vlan:1  Wan_index:0 Wan_ifname:
Port[2]: Vlan:1  Wan_index:0 Wan_ifname:
Port[3]: Vlan:1  Wan_index:0 Wan_ifname:
Port[4]: Vlan:1  Wan_index:0 Wan_ifname:
ifconfig: SIOCSIFHWADDR: No such device
brctl: SIOCDEVPRIVATE: No such device
src/common_hal.c hal_init_bridge
[   14.380000] device vlan1 entered promiscuous mode
[   14.380000] device eth0 entered promiscuous mode
[   14.390000] br0: port 1(vlan1) entered listening state
[   14.390000] br0: port 1(vlan1) entered listening state
Sun May  1 00:00:00 UTC 2011
[   14.440000] device vlan1 left promiscuous mode
[   14.440000] device eth0 left promiscuous mode
[   14.450000] br0: port 1(vlan1) entered disabled state
vlan passthrough initing..
[   14.460000] device eth0 entered promiscuous mode
[   14.470000] br0: port 1(eth0) entered listening state
[   14.470000] br0: port 1(eth0) entered listening state
Now interface name of LAN is eth0
argv[0] = httpd
httpd
[   15.270000] [GPIO] user set reset pid:919
apmib_init ....!
goahead: 4: main----56

GoAhead default debug level : 4
/var/goahead_debug nost exist, record default debug leve 4
GoAhead default debug level : 4
goahead: 4: initPlatform----410

goahead: 4: websOpen----229

route: SIOCDELRT: No such process
goahead: 0: Can't get host address for host linux-1042c40d38d8: errno 124, use Local:127.0.0.1
========[Hardware Chip]wlan1 RTL8197FN==========
init web server success
Interface doesn't accept private ioctl...
set_mib (89F1): Operation not permitted
[   16.470000] br0: port 1(eth0) entered learning state
Interface doesn't accept private ioctl...
set_mib (89F1): Operation not permitted
Interface doesn't accept private ioctl...
set_mib (89F1): Operation not permitted
[   18.470000] br0: topology change detected, propagating
[   18.470000] br0: port 1(eth0) entered forwarding state
Interface doesn't accept private ioctl...
set_mib (89F1): Operation not permitted
Interface doesn't accept private ioctl...
set_mib (89F1): Operation not permitted
Interface doesn't accept private ioctl...
set_mib (89F1): Operation not permitted
Interface doesn't accept private ioctl...
set_mib (89F1): Operation not permitted
Interface doesn't accept private ioctl...
set_mib (89F1): Operation not permitted
2g up ifnames: wlan1
5g up ifnames:
2g br0 ifnames: wlan1
2g br1 ifnames:
5g br0 ifnames:
5g br1 ifnames:
[   22.620000] WlanSupportAbility = 0x3
[   22.630000] available channels[DE]: 1 2 3 4 5 6 7 8 9 10 11 12 13
[   22.770000] [ODM_software_init]
[   22.770000] [97F] Bonding Type 97FS, PKG1
[   22.770000] [97F] RFE type 0 PHY paratemters: DEFAULT
[   22.770000] clock 40MHz
[   22.770000] load efuse ok
[   22.770000] rom_progress: 0x200006f
[   22.770000] rom_progress: 0x400006f
[   22.790000] [GetHwReg88XX][PHY_REG_PG_8197Fmp_Type0] size
[   22.800000] [GetHwReg88XX][PHY_REG_PG_8197Fmp_Type0]
[   23.000000] [GetHwReg88XX][rtl8197Ffw]
[   23.010000] [GetHwReg88XX][rtl8197Ffw size]
[   23.400000] [97F] Default BB Swing=30
[   23.520000] steer_update_bss_info: isdown(0)
[   23.550000] device wlan1 entered promiscuous mode
[   23.550000] br0: port 2(wlan1) entered listening state
[   23.560000] br0: port 2(wlan1) entered listening state
========[Hardware Chip]wlan0 RTL8822B==========
Interface doesn't accept private ioctl...
set_mib (89F1): Operation not permitted
Interface doesn't accept private ioctl...
set_mib (89F1): Operation not permitted
[   25.560000] br0: port 2(wlan1) entered learning state
Interface doesn't accept private ioctl...
set_mib (89F1): Operation not permitted
Interface doesn't accept private ioctl...
set_mib (89F1): Operation not permitted
2g up ifnames: wlan1
5g up ifnames: wlan0
2g br0 ifnames: wlan1
2g br1 ifnames:
5g br0 ifnames: wlan0
5g br1 ifnames:
[   27.560000] br0: topology change detected, propagating
[   27.560000] br0: port 2(wlan1) entered forwarding state
[   27.620000] WlanSupportAbility = 0x3
[   27.640000] available channels[DE]: 36 40 44 48
[   27.780000] [hard_code_8822_mibs] +++
[   27.780000] MAX_RX_BUF_LEN = 4000
[   27.780000] [ODM_software_init]
[   27.780000] clock 40MHz
[   27.780000] InitPON OK!!!
[   27.780000] load efuse ok
[   27.780000] rom_progress: 0x200006f
[   27.780000] rom_progress: 0x400006f
[   27.780000] InitMAC Page0
[   27.780000] Init Download FW OK
[   27.780000] halmac_init_mac_cfg OK
[   27.780000] halmac_cfg_rx_aggregation OK
[   27.780000] halmac_init_mac_cfg OK
[   27.830000] [GetHwReg88XX][size PHY_REG_PG_8822Bmp_Type13]
[   27.830000] [GetHwReg88XX][PHY_REG_PG_8822Bmp_Type13
[   27.840000] RL6302_MAC_PHY_Parameter_v018_20140708
[   28.660000] [set_8822_trx_regs] +++
[   28.930000] ********************************
[   28.930000] 8822 efuse content 0x3D7 = 0xf3
[   28.930000] 8822 efuse content 0x3D8 = 0xf3
[   28.930000] ********************************
[   29.000000] steer_update_bss_info: isdown(0)
[   29.010000] device wlan0 entered promiscuous mode
[   29.020000] br0: port 3(wlan0) entered listening state
[   29.020000] br0: port 3(wlan0) entered listening state
argv[0] = sntp
argv[1] = -e
argv[2] = 1
argv[3] = -z
argv[4] = 14
argv[5] = -t
argv[6] = 1800
argv[7] = -s
argv[8] = /var/network_check_result.cfg
sntp
[   29.470000] [GPIO] sys led mode:0x2 by user
auto_ping_en = 0,auto_ping_time = 600
string=0;0
string[0]=0
string[1]=0
argv[0] = apmng_svr
apmng_svr
wtp_main.c check network 10.0.1.3 success.
argv[0] = auto_discover
auto_discover
[   30.670000] Init castfilter dev success.
[   30.670000] The cast filter is inited for level1 successfully.
dhcp_task task start:
nbns task start:
mdns task start:
talk task start:1137
argv[0] = arprecive
arprecive
argv[0] = ucloud
argv[1] = -c
argv[2] = 1
argv[3] = -l
argv[4] = 4
ucloud
argv[0] = ucloud_ctl
ucloud_ctl
argv[0] = lldpd
argv[1] = -f
argv[2] = -c
argv[3] = /etc/lldpd.conf
argv[4] = -w
argv[5] = /etc/lldpd.write
lldpd
[   31.020000] br0: port 3(wlan0) entered learning state
check timer start success
[   31.130000] User set flags:1
2021-04-22 16:22:08 [INFO ][main.c   , 168][do_options             ] Setting company to 1
2021-04-22 16:22:08 [INFO ][uc_api_lib.c,2309][uc_api_lib_init        ] Successfully initialized the api library...
[uc_conn_notify][120] : ########uc_conn_notify##########
2021-04-22 16:22:08 [DEBUG][uc_api_lib.c,1069][_uc_api_lib_cmd_send   ] Manually sending package: mod[0], cmd[2]...
2021-04-22 16:22:08 [WARN ][uc_api_lib.c,1082][_uc_api_lib_cmd_send   ] session connection is closed, fd:-1!
2021-04-22 16:22:08 [INFO ][uc_api_lib.c, 349][uc_api_lib_cmd_register] Successfully registered command: CMD_CLOUD_ADD_ROUTER_TO_PRJ_A[91] in module: M_CLOUD[4]...
2021-04-22 16:22:08 [DEBUG][uc_api_lib.c,1069][_uc_api_lib_cmd_send   ] Manually sending package: mod[0], cmd[2]...
2021-04-22 16:22:08 [WARN ][uc_api_lib.c,1082][_uc_api_lib_cmd_send   ] session connection is closed, fd:-1!
2021-04-22 16:22:08 [INFO ][uc_api_lib.c, 349][uc_api_lib_cmd_register] Successfully registered command: CMD_CLOUD_DEL_ROUTER_FROM_PRJ[92] in module: M_CLOUD[4]...
2021-04-22 16:22:08 [DEBUG][uc_api_lib.c,1069][_uc_api_lib_cmd_send   ] Manually sending package: mod[0], cmd[2]...
2021-04-22 16:22:08 [WARN ][uc_api_lib.c,1082][_uc_api_lib_cmd_send   ] session connection is closed, fd:-1!
2021-04-22 16:22:08 [INFO ][uc_api_lib.c, 349][uc_api_lib_cmd_register] Successfully registered command: CMD_CLOUD_CONFIG_SYNC[95] in module: M_CLOUD[4]...
2021-04-22 16:22:08 [DEBUG][uc_api_lib.c,1069][_uc_api_lib_cmd_send   ] Manually sending package: mod[0], cmd[2]...
2021-04-22 16:22:08 [WARN ][uc_api_lib.c,1082][_uc_api_lib_cmd_send   ] session connection is closed, fd:-1!
2021-04-22 16:22:08 [INFO ][uc_api_lib.c, 349][uc_api_lib_cmd_register] Successfully registered command: CMD_CLOUD_SERVER_STATUS[96] in module: M_CLOUD[4]...
2021-04-22 16:22:08 [DEBUG][uc_api_lib.c,1069][_uc_api_lib_cmd_send   ] Manually sending package: mod[0], cmd[2]...
2021-04-22 16:22:08 [WARN ][uc_api_lib.c,1082][_uc_api_lib_cmd_send   ] session connection is closed, fd:-1!
2021-04-22 16:22:08 [INFO ][uc_api_lib.c, 349][uc_api_lib_cmd_register] Successfully registered command: CMD_CLOUD_OPEN_MANAGE[100] in module: M_CLOUD[4]...
[cloud_api][754] : enable cloud info OK
2021-04-22 16:22:08 [DEBUG][uc_api_lib.c,1069][_uc_api_lib_cmd_send   ] Manually sending package: mod[9], cmd[1]...
2021-04-22 16:22:08 [WARN ][uc_api_lib.c,1082][_uc_api_lib_cmd_send   ] session connection is closed, fd:-1!
2021-04-22 16:22:08 [DEBUG][uc_api_lib.c,1069][_uc_api_lib_cmd_send   ] Manually sending package: mod[0], cmd[2]...
2021-04-22 16:22:08 [WARN ][uc_api_lib.c,1082][_uc_api_lib_cmd_send   ] session connection is closed, fd:-1!
2021-04-22 16:22:08 [INFO ][uc_api_lib.c, 349][uc_api_lib_cmd_register] Successfully registered command: CMD_CLOUD_INFO_SN_SET[2] in module: M_CLOUD_INFO[9]...
[set_basic_info][514] : uc_api_set_basic_info succeed!
2021-04-22 16:22:08 [DEBUG][uc_api_lib.c,1069][_uc_api_lib_cmd_send   ] Manually sending package: mod[9], cmd[33]...
2021-04-22 16:22:08 [WARN ][uc_api_lib.c,1082][_uc_api_lib_cmd_send   ] session connection is closed, fd:-1!
[set_bind_info][583] : uc_api_bind_info_upload succeed!
2021-04-22 16:22:08 [DEBUG][uc_api_lib.c,1069][_uc_api_lib_cmd_send   ] Manually sending package: mod[0], cmd[2]...
2021-04-22 16:22:08 [WARN ][uc_api_lib.c,1082][_uc_api_lib_cmd_send   ] session connection is closed, fd:-1!
2021-04-22 16:22:08 [INFO ][uc_api_lib.c, 349][uc_api_lib_cmd_register] Successfully registered command: CMD_DEV_AUTO_MAINT_SET[1] in module: M_DEV[3]...
2021-04-22 16:22:09 [DEBUG][uc_api_lib.c,1069][_uc_api_lib_cmd_send   ] Manually sending package: mod[0], cmd[2]...
2021-04-22 16:22:09 [WARN ][uc_api_lib.c,1082][_uc_api_lib_cmd_send   ] session connection is closed, fd:-1!
2021-04-22 16:22:09 [INFO ][uc_api_lib.c, 349][uc_api_lib_cmd_register] Successfully registered command: CMD_DEV_REBOOT_SET[0] in module: M_DEV[3]...
2021-04-22 16:22:09 [DEBUG][uc_api_lib.c,1069][_uc_api_lib_cmd_send   ] Manually sending package: mod[0], cmd[2]...
2021-04-22 16:22:09 [WARN ][uc_api_lib.c,1082][_uc_api_lib_cmd_send   ] session connection is closed, fd:-1!
2021-04-22 16:22:09 [INFO ][uc_api_lib.c, 349][uc_api_lib_cmd_register] Successfully registered command: CMD_DEV_STATUS_UP[2] in module: M_DEV[3]...
2021-04-22 16:22:09 [DEBUG][uc_api_lib.c,1069][_uc_api_lib_cmd_send   ] Manually sending package: mod[0], cmd[2]...
2021-04-22 16:22:09 [WARN ][uc_api_lib.c,1082][_uc_api_lib_cmd_send   ] session connection is closed, fd:-1!
2021-04-22 16:22:09 [INFO ][uc_api_lib.c, 349][uc_api_lib_cmd_register] Successfully registered command: CMD_DEV_STATIC_UPLOAD[3] in module: M_DEV[3]...
2021-04-22 16:22:09 [DEBUG][uc_api_lib.c,1069][_uc_api_lib_cmd_send   ] Manually sending package: mod[0], cmd[2]...
2021-04-22 16:22:09 [WARN ][uc_api_lib.c,1082][_uc_api_lib_cmd_send   ] session connection is closed, fd:-1!
2021-04-22 16:22:09 [INFO ][uc_api_lib.c, 349][uc_api_lib_cmd_register][   31.930000] Phy[0] down
 Successfully re[   31.930000] Phy[1] down
gistered command[   31.930000] Phy[2] down
: CMD_DEV_CONFIG[   31.940000] Phy[3] down
_TIMESTAMP[4] in[   31.940000] Phy[4] down
 module: M_DEV[3]...
2021-04-22 16:22:09 [DEBUG][uc_api_lib.c,1069][_uc_api_lib_cmd_send   ] Manually sending package: mod[0], cmd[2]...
2021-04-22 16:22:09 [WARN ][uc_api_lib.c,1082][_uc_api_lib_cmd_send   ] session connection is closed, fd:-1!
2021-04-22 16:22:09 [INFO ][uc_api_lib.c, 349][uc_api_lib_cmd_register] Successfully registered command: CMD_DEV_CONFIG_ISSUE[5] in module: M_DEV[3]...
2021-04-22 16:22:09 [DEBUG][uc_api_lib.c,1069][_uc_api_lib_cmd_send   ] Manually sending package: mod[0], cmd[2]...
2021-04-22 16:22:09 [WARN ][uc_api_lib.c,1082][_uc_api_lib_cmd_send   ] session connection is closed, fd:-1!
2021-04-22 16:22:09 [INFO ][uc_api_lib.c, 349][uc_api_lib_cmd_register] Successfully registered command: CMD_DEV_CONFIG_UPLOAD[6] in module: M_DEV[3]...
2021-04-22 16:22:09 [DEBUG][uc_api_lib.c,1069][_uc_api_lib_cmd_send   ] Manually sending package: mod[0], cmd[2]...
2021-04-22 16:22:09 [WARN ][uc_api_lib.c,1082][_uc_api_lib_cmd_send   ] session connection is closed, fd:-1!
2021-04-22 16:22:09 [INFO ][uc_api_lib.c, 349][uc_api_lib_cmd_register] Successfully registered command: CMD_DEV_UPGARD_START[9] in module: M_DEV[3]...
2021-04-22 16:22:09 [DEBUG][uc_api_lib.c,1069][_uc_api_lib_cmd_send   ] Manually sending package: mod[0], cmd[2]...
2021-04-22 16:22:09 [WARN ][uc_api_lib.c,1082][_uc_api_lib_cmd_send   ] session connection is closed, fd:-1!
2021-04-22 16:22:09 [INFO ][uc_api_lib.c, 349][uc_api_lib_cmd_register] Successfully registered command: CMD_DEV_FORCE_OFF[10] in module: M_DEV[3]...
reg fact reset
2021-04-22 16:22:09 [DEBUG][uc_api_lib.c,1069][_uc_api_lib_cmd_send   ] Manually sending package: mod[0], cmd[2]...
2021-04-22 16:22:09 [WARN ][uc_api_lib.c,1082][_uc_api_lib_cmd_send   ] session connection is closed, fd:-1!
2021-04-22 16:22:09 [INFO ][uc_api_lib.c, 349][uc_api_lib_cmd_register] Successfully registered command: CMD_DEV_FACT_RESET[11] in module: M_DEV[3]...
2021-04-22 16:22:09 [DEBUG][uc_api_lib.c,1069][_uc_api_lib_cmd_send   ] Manually sending package: mod[0], cmd[2]...
2021-04-22 16:22:09 [WARN ][uc_api_lib.c,1082][_uc_api_lib_cmd_send   ] session connection is closed, fd:-1!
2021-04-22 16:22:09 [INFO ][uc_api_lib.c, 349][uc_api_lib_cmd_register] Successfully registered command: CMD_DEV_WORK_MODE_SET[19] in module: M_DEV[3]...
2021-04-22 16:22:09 [DEBUG][uc_api_lib.c,1069][_uc_api_lib_cmd_send   ] Manually sending package: mod[0], cmd[2]...
2021-04-22 16:22:09 [WARN ][uc_api_lib.c,1082][_uc_api_lib_cmd_send   ] session connection is closed, fd:-1!
2021-04-22 16:22:09 [INFO ][uc_api_lib.c, 349][uc_api_lib_cmd_register] Successfully registered command: CMD_DEV_WIRED_MESH_SET[20] in module: M_DEV[3]...
2021-04-22 16:22:09 [DEBUG][uc_api_lib.c,1069][_uc_api_lib_cmd_send   ] Manually sending package: mod[0], cmd[2]...
2021-04-22 16:22:09 [WARN ][uc_api_lib.c,1082][_uc_api_lib_cmd_send   ] session connection is closed, fd:-1!
2021-04-22 16:22:09 [INFO ][uc_api_lib.c, 349][uc_api_lib_cmd_register] Successfully registered command: CMD_DEV_AI_WIRELESS_SET[21] in module: M_DEV[3]...
2021-04-22 16:22:09 [DEBUG][uc_api_lib.c,1069][_uc_api_lib_cmd_send   ] Manually sending package: mod[0], cmd[2]...
2021-04-22 16:22:09 [WARN ][uc_api_lib.c,1082][_uc_api_lib_cmd_send   ] session connection is closed, fd:-1!
2021-04-22 16:22:09 [INFO ][uc_api_lib.c, 349][uc_api_lib_cmd_register] Successfully registered command: CMD_DEV_MESH_UPGARED_Q[22] in module: M_DEV[3]...
[dev_api][2280] : [dev_api]:[2280],enable dev info OK
2021-04-22 16:22:09 [DEBUG][uc_api_lib.c,1069][_uc_api_lib_cmd_send   ] Manually sending package: mod[0], cmd[2]...
2021-04-22 16:22:09 [WARN ][uc_api_lib.c,1082][_uc_api_lib_cmd_send   ] session connection is closed, fd:-1!
2021-04-22 16:22:09 [INFO ][uc_api_lib.c, 349][uc_api_lib_cmd_register] Successfully registered command: CMD_NET_WAN_SET[1] in module: M_NET[29]...
2021-04-22 16:22:09 [DEBUG][uc_api_lib.c,1069][_uc_api_lib_cmd_send   ] Manually sending package: mod[0], cmd[2]...
2021-04-22 16:22:09 [WARN ][uc_api_lib.c,1082][_uc_api_lib_cmd_send   ] session connection is closed, fd:-1!
2021-04-22 16:22:09 [INFO ][uc_api_lib.c, 349][uc_api_lib_cmd_register] Successfully registered command: CMD_NET_WAN_GET[2] in module: M_NET[29]...
2021-04-22 16:22:09 [DEBUG][uc_api_lib.c,1069][_uc_api_lib_cmd_send   ] Manually sending package: mod[0], cmd[2]...
2021-04-22 16:22:09 [WARN ][uc_api_lib.c,1082][_uc_api_lib_cmd_send   ] session connection is closed, fd:-1!
2021-04-22 16:22:09 [INFO ][uc_api_lib.c, 349][uc_api_lib_cmd_register] Successfully registered command: CMD_NET_CHECK[6] in module: M_NET[29]...
2021-04-22 16:22:09 [DEBUG][uc_api_lib.c,1069][_uc_api_lib_cmd_send   ] Manually sending package: mod[0], cmd[2]...
2021-04-22 16:22:09 [WARN ][uc_api_lib.c,1082][_uc_api_lib_cmd_send   ] session connection is closed, fd:-1!
2021-04-22 16:22:09 [INFO ][uc_api_lib.c, 349][uc_api_lib_cmd_register] Successfully registered command: CMD_NET_PORT_FWD_SET[4] in module: M_NET[29]...
2021-04-22 16:22:09 [DEBUG][uc_api_lib.c,1069][_uc_api_lib_cmd_send   ] Manually sending package: mod[0], cmd[2]...
2021-04-22 16:22:09 [WARN ][uc_api_lib.c,1082][_uc_api_lib_cmd_send   ] session connection is closed, fd:-1!
2021-04-22 16:22:09 [INFO ][uc_api_lib.c, 349][uc_api_lib_cmd_register] Successfully registered command: CMD_NET_ROUTE_SET[3] in module: M_NET[29]...
2021-04-22 16:22:09 [DEBUG][uc_api_lib.c,1069][_uc_api_lib_cmd_send   ] Manually sending package: mod[0], cmd[2]...
2021-04-22 16:22:09 [WARN ][uc_api_lib.c,1082][_uc_api_lib_cmd_send   ] session connection is closed, fd:-1!
2021-04-22 16:22:09 [INFO ][uc_api_lib.c, 349][uc_api_lib_cmd_register] Successfully registered command: CMD_NET_LAN_SET[0] in module: M_NET[29]...
[net_api][958] : enable dev info OK
2021-04-22 16:22:09 [DEBUG][uc_api_lib.c,1069][_uc_api_lib_cmd_send   ] Manually sending package: mod[0], cmd[2]...
2021-04-22 16:22:09 [WARN ][uc_api_lib.c,1082][_uc_api_lib_cmd_send   ] session connection is closed, fd:-1!
2021-04-22 16:22:09 [INFO ][uc_api_lib.c, 349][uc_api_lib_cmd_register] Successfully registered command: CMD_WLAN_POLICY_SET[0] in module: M_WLAN[30]...
2021-04-22 16:22:09 [DEBUG][uc_api_lib.c,1069][_uc_api_lib_cmd_send   ] Manually sending package: mod[0], cmd[2]...
2021-04-22 16:22:09 [WARN ][uc_api_lib.c,1082][_uc_api_lib_cmd_send   ] session connection is closed, fd:-1!
2021-04-22 16:22:09 [INFO ][uc_api_lib.c, 349][uc_api_lib_cmd_register] Successfully registered command: CMD_WLAN_RADIO_OPTIMIZA_SET[1] in module: M_WLAN[30]...
2021-04-22 16:22:09 [DEBUG][uc_api_lib.c,1069][_uc_api_lib_cmd_send   ] Manually sending package: mod[0], cmd[2]...
2021-04-22 16:22:09 [WARN ][uc_api_lib.c,1082][_uc_api_lib_cmd_send   ] session connection is closed, fd:-1!
2021-04-22 16:22:09 [INFO ][uc_api_lib.c, 349][uc_api_lib_cmd_register] Successfully registered command: CMD_WLAN_RADIO_CONFIG_SET[2] in module: M_WLAN[30]...
2021-04-22 16:22:09 [DEBUG][uc_api_lib.c,1069][_uc_api_lib_cmd_send   ] Manually sending package: mod[0], cmd[2]...
2021-04-22 16:22:09 [WARN ][uc_api_lib.c,1082][_uc_api_lib_cmd_send   ] session connection is closed, fd:-1!
2021-04-22 16:22:09 [INFO ][uc_api_lib.c, 349][uc_api_lib_cmd_register] Successfully registered command: CMD_WLAN_RADIO_OPTIMIZA_UPLOAD[3] in module: M_WLAN[30]...
wlan_basic_set_cb is 0x7fe878b8
2021-04-22 16:22:09 [DEBUG][uc_api_lib.c,1069][_uc_api_lib_cmd_send   ] Manually sending package: mod[0], cmd[2]...
2021-04-22 16:22:09 [WARN ][uc_api_lib.c,1082][_uc_api_lib_cmd_send   ] session connection is closed, fd:-1!
2021-04-22 16:22:09 [INFO ][uc_api_lib.c, 349][uc_api_lib_cmd_register] Successfully registered command: CMD_WLAN_BASIC_SET[5] in module: M_WLAN[30]...
wlan_basic_get_cb is 0x7fe878b8
2021-04-22 16:22:09 [DEBUG][uc_api_lib.c,1069][_uc_api_lib_cmd_send   ] Manually sending package: mod[0], cmd[2]...
2021-04-22 16:22:09 [WARN ][uc_api_lib.c,1082][_uc_api_lib_cmd_send   ] session connection is closed, fd:-1!
-------len=172032
set ok
-------len=344064
2021-04-22 16:22:10 [INFO ][uc_api_lib.c, 349][uc_api_lib_cmd_register] Successfully registered command: CMD_WLAN_BASIC_GET[4] in module: M_WLAN[30]...
[wireless_api][637] : enable dev info OK
[uc_server_init][74] : UNIX domain socket bound
[uc_cgi_init][114] : init succeed!  fd:9
2021-04-22 16:22:10 [INFO ][uc_api_lib.c,2192][ucloud_event_accept    ] ucloud_event_accept fd is 10
2021-04-22 16:22:10 [DEBUG][uc_api_lib.c,1069][_uc_api_lib_cmd_send   ] Manually sending package: mod[9], cmd[36]...
2021-04-22 16:22:10 [ERROR][uc_api_lib.c, 552][_net_write             ] write() failed: Bad file descriptor
[   33.020000] br0: topology change detected, propagating
[   33.020000] br0: port 3(wlan0) entered forwarding state
[   35.940000] Phy[1] up
[   35.940000] Phy[3] up
1 Like

I am adding support of IP-COM W36AP to corresponding files.

What should I write for IMAGE/factory.bin and IMAGE/sysupgrade.bin parameters in Makefile?
I copied these parameters from ACTIONRF1200, but I think that for my device they are wrong.

define Device/W36AP
  $(Device/RealtekDTS)
  BLOCKSIZE := 64k
  DEVICE_DTS := W36AP
  DEVICE_TITLE := IP-COM W36AP V1
  SUPPORTED_DEVICES := w36ap-v1
  IMAGE_SIZE := 7872k
  DEV_PROFILE := W36AP
  CMDLINE := console=ttyS0,115200
  KERNEL := kernel-bin | append-dtb | lzma | loader-cmdline-compile
  CVIMG_KERNEL_BURN_ADDR := 0x30000
  CVIMG_LOADER_START_ADDR := 0x80A00000
  IMAGES := factory.bin sysupgrade.bin
  IMAGE/factory.bin = append-kernel | pad-offset 64k 16 | append-rootfs | pad-rootfs -x 16 | cvimg-kernel -T
  IMAGE/sysupgrade.bin = append-kernel | pad-offset 64k 16 | append-rootfs | pad-rootfs -x 16 | cvimg-kernel -S
endef

Also I doubt about m25p80 config in DTS.
In the bootlog I see 7 partitions:


[    0.990000] Creating 7 MTD partitions on "m25p80":
[    1.000000] 0x000000000000-0x000000800000 : "ALL"
[    1.010000] 0x000000000000-0x000000020000 : "Bootloader"
[    1.010000] 0x000000020000-0x000000030000 : "CFG"
[    1.020000] 0x000000030000-0x0000007e0000 : "KernelFS"
[    1.030000] 0x000000218012-0x0000007e0000 : "RootFS"
[    1.030000] 0x0000007e0000-0x0000007f0000 : "CFM"
[    1.040000] 0x0000007f0000-0x000000800000 : "CFM_BACKUP"

0x30000-0x7e0000 is what you'd label as 'firmware' in the DTS. It uses a split partition. Notice how the RootFS partition ends at the same point as the KernelFS one yet starts later than it.

I suppose OpenWrt would do the same (dynamic kernel/rootfs split) but unsure if that is target dependent or applies to all architectures supported.

1 Like

@Borromini Thanks, I will try that.

Autosplit does not work in my case, only manual from DTS. I repeated partitions from the stock firmware(see below).
By the way I am not sure about CFM and CFM-backup partitions. In the stock firmware there are user config and copy of this config in these partitions. I think that for Openwrt there is no need for two partitions for user config and I could create only one.

m25p80@0 {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "jedec,spi-nor";
		reg = <0>;
		spi-max-frequency = <41000000>;

		all@0 {
			label = "ALL";
			reg = <0x0 0x800000>;
		};
		
		partition@0 {
			label = "Bootloader";
			reg = <0x0 0x20000>;
			read-only;
		};
		
		partition@20000 {
			label = "CFG";
			reg = <0x20000 0x10000>;
			read-only;
		};

		firmware@30000 {
			label = "KernelFS";
			reg = <0x30000 0x7B0000>;
		};

		partition@218012 {
			label = "RootFS";
			reg = <0x218012 0x5C7FEE>;
		};

		partition@7E0000 {
			label = "CFM";
			reg = <0x7E0000 0x10000>;
			read-only;
		};
		
		partition@7F0000 {
			label = "CFM_BACKUP";
			reg = <0x7F0000 0x10000>;
			read-only;
		};
		
	};

OK. Built initramfs firmware.
Added kmod-rtw88 and kmod-switch-rtl8367b to firmware.

Upload firmware to the device via TFTP. Booted.
Kernel is booted, but rtw88 and rtl8367b are not booted.

j 80a00000
---Jump to address=80A00000

reboot.......


OpenWrt kernel loader for Realtek RTL819X
Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
Copyright (C) 2017 Weijie Gao <hackpascal@gmail.com>
Copyright (C) 2019 Gaspare Bruno <gaspare@anlix.io>
Decompressing kernel... done!
Starting kernel at 80000000...

[    0.000000] Linux version 4.14.187 (pine@dev) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r14026-8a0ccb93f3)) #0 Tue Aug 4 17:42:33 2020
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019385 (MIPS 24Kc)
[    0.000000] MIPS: machine is IP-COM W36AP V1
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] BOOTSTRAP = 8197f001 0 41258ec0 80000800
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] random: get_random_bytes called from start_kernel+0x98/0x4a4 with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32480
[    0.000000] Kernel command line: console=ttyS0,115200 root=/dev/mtdblock4
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Writing ErrCtl register=00078005
[    0.000000] Readback ErrCtl register=00078005
[    0.000000] Memory: 116800K/131072K available (4063K kernel code, 152K rwdata, 864K rodata, 7648K init, 204K bss, 14272K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 128
[    0.000000] timer_probe: no matching timers found
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 3822520893 ns
[    0.000008] sched_clock: 32 bits at 500MHz, resolution 2ns, wraps every 4294967295ns
[    0.008552] Calibrating delay loop... 663.55 BogoMIPS (lpj=1327104)
[    0.047287] pid_max: default: 32768 minimum: 301
[    0.052532] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.059691] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.070868] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.081543] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.088696] NET: Registered protocol family 16
[    0.116159] clocksource: Switched to clocksource MIPS
[    0.122790] NET: Registered protocol family 2
[    0.128342] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.135927] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.142830] TCP: Hash tables configured (established 1024 bind 1024)
[    0.149953] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.156317] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.163421] NET: Registered protocol family 1
[    0.321740] 18003500.gpio-controller: Realtek GPIO controller driver
[    0.329443] Crashlog allocated RAM at address 0x3f00000
[    0.337780] workingset: timestamp_bits=14 max_order=15 bucket_order=1
[    0.349445] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.355815] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.410160] io scheduler noop registered
[    0.414453] io scheduler deadline registered (default)
[    0.420416] Serial: 8250/16550 driver, 1 ports, IRQ sharing enabled
[    0.427859] console [ttyS0] disabled
[    0.431807] 18147000.serial: ttyS0 at MMIO 0x18147000 (irq = 17, base_baud = 6250000) is a 16550A
6[    0.441479] console [ttyS0] enabled
[    0.441479] console [ttyS0] enabled
[    0.448430] bootconsole [early0] disabled
[    0.448430] bootconsole [early0] disabled
[    0.457277] m25p80 spi0.0: change speed to 29000000Hz, div 4
[    0.475457] m25p80 spi0.0: s25fl064k (8192 Kbytes)
[    0.509871] 7 fixed-partitions partitions found on MTD device spi0.0
[    0.516295] Creating 7 MTD partitions on "spi0.0":
[    0.521076] 0x000000000000-0x000000800000 : "ALL"
[    0.526654] 0x000000000000-0x000000020000 : "Bootloader"
[    0.532826] 0x000000020000-0x000000030000 : "CFG"
[    0.538378] 0x000000030000-0x0000007e0000 : "KernelFS"
[    0.544421] 0x000000218012-0x0000007e0000 : "RootFS"
[    0.550179] 0x0000007e0000-0x0000007f0000 : "CFM"
[    0.555737] 0x0000007f0000-0x000000800000 : "CFM_BACKUP"
[    0.562228] libphy: Fixed MDIO Bus: probed
[    0.567312] NET: Registered protocol family 10
[    0.580838] Segment Routing with IPv6
[    0.584668] NET: Registered protocol family 17
[    0.589195] 8021q: 802.1Q VLAN Support v1.8
6[    0.629507] Freeing unused kernel memory: 7648K
[    0.634047] This architecture does not have kernel memory protection.
[    0.657028] init: Console is alive
[    0.690076] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    0.703906] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    0.721793] init: - preinit -
[    0.934531] random: jshn: uninitialized urandom read (4 bytes read)
[    0.995813] random: jshn: uninitialized urandom read (4 bytes read)
[    1.202828] 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
[    2.108150] random: fast init done
4
[    2.654074] procd: Change state 0 -> 1
[    2.658063] procd: - early -
[    2.705216] procd: {{"ACTION":"add","DEVPATH":"/devices/virtual/mem/full","SUBSYSTEM":"mem","SYNTH_UUID":"0","MAJOR":"1","MINOR":"7","DEVNAME":"full","DEVMODE":"0666","SEQNUM":"247"}}
[    2.736405] procd: Command: makedev
[    2.739992] procd:  /dev/full
[    2.743132] procd:  0666
[    2.745837] procd: Message:
[    2.748802] procd:  ACTION=add
[    2.751924] procd:  DEVPATH=/devices/virtual/mem/full
[    2.757139] procd:  SUBSYSTEM=mem
[    2.760624] procd:  SYNTH_UUID=0
[    2.763912] procd:  MAJOR=1
[    2.766871] procd:  MINOR=7
[    2.769843] procd:  DEVNAME=full
[    2.773237] procd:  DEVMODE=0666
[    2.776631] procd:  SEQNUM=247
[    2.779997] procd: Finished udevtrigger
[    2.784285] procd: {{"ACTION":"add","DEVPATH":"/devices/virtual/mem/urandom","SUBSYSTEM":"mem","SYNTH_UUID":"0","MAJOR":"1","MINOR":"9","DEVNAME":"urandom","DEVMODE":"0666","SEQNUM":"248"}}
[    2.801348] procd: Command: makedev
[    2.805017] procd:  /dev/urandom
[    2.808417] procd:  0666
[    2.811017] procd: Message:
[    2.813977] procd:  ACTION=add
[    2.817199] procd:  DEVPATH=/devices/virtual/mem/urandom
[    2.822676] procd:  SUBSYSTEM=mem
[    2.826158] procd:  SYNTH_UUID=0
[    2.829551] procd:  MAJOR=1
[    2.832516] procd:  MINOR=9
[    2.835380] procd:  DEVNAME=urandom
[    2.839033] procd:  DEVMODE=0666
[    2.842435] procd:  SEQNUM=248
[    2.845983] procd: {{"ACTION":"add","DEVPATH":"/devices/virtual/mem/null","SUBSYSTEM":"mem","SYNTH_UUID":"0","MAJOR":"1","MINOR":"3","DEVNAME":"null","DEVMODE":"0666","SEQNUM":"249"}}
[    2.862570] procd: Command: makedev
[    2.866240] procd:  /dev/null
[    2.869373] procd:  0666
[    2.871973] procd: Message:
[    2.874930] procd:  ACTION=add
[    2.878155] procd:  DEVPATH=/devices/virtual/mem/null
[    2.883373] procd:  SUBSYSTEM=mem
[    2.886865] procd:  SYNTH_UUID=0
[    2.890267] procd:  MAJOR=1
[    2.893230] procd:  MINOR=3
[    2.896089] procd:  DEVNAME=null
[    2.899486] procd:  DEVMODE=0666
[    2.902880] procd:  SEQNUM=249
[    2.906389] procd: {{"ACTION":"add","DEVPATH":"/devices/virtual/mem/random","SUBSYSTEM":"mem","SYNTH_UUID":"0","MAJOR":"1","MINOR":"8","DEVNAME":"random","DEVMODE":"0666","SEQNUM":"250"}}
[    2.923323] procd: Command: makedev
[    2.926997] procd:  /dev/random
[    2.930311] procd:  0666
[    2.933015] procd: Message:
[    2.935880] procd:  ACTION=add
[    2.939105] procd:  DEVPATH=/devices/virtual/mem/random
[    2.944494] procd:  SUBSYSTEM=mem
[    2.947877] procd:  SYNTH_UUID=0
[    2.951275] procd:  MAJOR=1
[    2.954236] procd:  MINOR=8
[    2.957200] procd:  DEVNAME=random
[    2.960769] procd:  DEVMODE=0666
[    2.964061] procd:  SEQNUM=250
[    2.967560] procd: {{"ACTION":"add","DEVPATH":"/devices/virtual/misc/network_latency","SUBSYSTEM":"misc","SYNTH_UUID":"0","MAJOR":"10","MINOR":"62","DEVNAME":"network_latency","SEQNUM":"251"}}
[    2.985097] procd: Command: makedev
[    2.988788] procd:  /dev/network_latency
[    2.992875] procd:  0600
[    2.995473] procd: Message:
[    2.998433] procd:  ACTION=add
[    3.001664] procd:  DEVPATH=/devices/virtual/misc/network_latency
[    3.007917] procd:  SUBSYSTEM=misc
[    3.011485] procd:  SYNTH_UUID=0
[    3.014880] procd:  MAJOR=10
[    3.017932] procd:  MINOR=62
[    3.020982] procd:  DEVNAME=network_latency
[    3.025336] procd:  SEQNUM=251
[    3.029052] procd: {{"ACTION":"add","DEVPATH":"/devices/virtual/misc/memory_bandwidth","SUBSYSTEM":"misc","SYNTH_UUID":"0","MAJOR":"10","MINOR":"60","DEVNAME":"memory_bandwidth","SEQNUM":"252"}}
[    3.046763] procd: Command: makedev
[    3.050452] procd:  /dev/memory_bandwidth
[    3.054625] procd:  0600
[    3.057327] procd: Message:
[    3.060279] procd:  ACTION=add
[    3.063417] procd:  DEVPATH=/devices/virtual/misc/memory_bandwidth
[    3.069750] procd:  SUBSYSTEM=misc
[    3.073323] procd:  SYNTH_UUID=0
[    3.076743] procd:  MAJOR=10
[    3.079688] procd:  MINOR=60
[    3.082736] procd:  DEVNAME=memory_bandwidth
[    3.087172] procd:  SEQNUM=252
[    3.090889] procd: {{"ACTION":"add","DEVPATH":"/devices/virtual/misc/cpu_dma_latency","SUBSYSTEM":"misc","SYNTH_UUID":"0","MAJOR":"10","MINOR":"63","DEVNAME":"cpu_dma_latency","SEQNUM":"253"}}
[    3.108510] procd: Command: makedev
[    3.112094] procd:  /dev/cpu_dma_latency
[    3.116216] procd:  0600
[    3.118842] procd: Message:
[    3.121802] procd:  ACTION=add
[    3.125026] procd:  DEVPATH=/devices/virtual/misc/cpu_dma_latency
[    3.131281] procd:  SUBSYSTEM=misc
[    3.134855] procd:  SYNTH_UUID=0
[    3.138251] procd:  MAJOR=10
[    3.141302] procd:  MINOR=63
[    3.144360] procd:  DEVNAME=cpu_dma_latency
[    3.148706] procd:  SEQNUM=253
[    3.152452] procd: {{"ACTION":"add","DEVPATH":"/devices/virtual/misc/network_throughput","SUBSYSTEM":"misc","SYNTH_UUID":"0","MAJOR":"10","MINOR":"61","DEVNAME":"network_throughput","SEQNUM":"254"}}
[    3.170474] procd: Command: makedev
[    3.174169] procd:  /dev/network_throughput
[    3.178522] procd:  0600
[    3.181225] procd: Message:
[    3.184086] procd:  ACTION=add
[    3.187302] procd:  DEVPATH=/devices/virtual/misc/network_throughput
[    3.193818] procd:  SUBSYSTEM=misc
[    3.197394] procd:  SYNTH_UUID=0
[    3.200787] procd:  MAJOR=10
[    3.203732] procd:  MINOR=61
[    3.206778] procd:  DEVNAME=network_throughput
[    3.211391] procd:  SEQNUM=254
[    3.215118] procd: {{"ACTION":"add","DEVPATH":"/devices/virtual/tty/ptmx","SUBSYSTEM":"tty","SYNTH_UUID":"0","MAJOR":"5","MINOR":"2","DEVNAME":"ptmx","DEVMODE":"0666","SEQNUM":"255"}}
[    3.231737] procd: Command: makedev
[    3.235410] procd:  /dev/ptmx
[    3.238551] procd:  0666
[    3.241255] procd: Message:
[    3.244118] procd:  ACTION=add
[    3.247343] procd:  DEVPATH=/devices/virtual/tty/ptmx
[    3.252561] procd:  SUBSYSTEM=tty
[    3.255946] procd:  SYNTH_UUID=0
[    3.259332] procd:  MAJOR=5
[    3.262295] procd:  MINOR=2
[    3.265260] procd:  DEVNAME=ptmx
[    3.268655] procd:  DEVMODE=0666
[    3.271947] procd:  SEQNUM=255
[    3.275441] procd: {{"ACTION":"add","DEVPATH":"/devices/virtual/tty/console","SUBSYSTEM":"tty","SYNTH_UUID":"0","MAJOR":"5","MINOR":"1","DEVNAME":"console","SEQNUM":"256"}}
[    3.291234] procd: Command: makedev
[    3.294920] procd:  /dev/console
[    3.298313] procd:  0600
[    3.301017] procd: Message:
[    3.303881] procd:  ACTION=add
[    3.307104] procd:  DEVPATH=/devices/virtual/tty/console
[    3.312585] procd:  SUBSYSTEM=tty
[    3.315965] procd:  SYNTH_UUID=0
[    3.319355] procd:  MAJOR=5
[    3.322318] procd:  MINOR=1
[    3.325287] procd:  DEVNAME=console
[    3.328947] procd:  SEQNUM=256
[    3.332710] procd: {{"ACTION":"add","DEVPATH":"/devices/platform/18147000.serial/tty/ttyS0","SUBSYSTEM":"tty","SYNTH_UUID":"0","MAJOR":"4","MINOR":"64","DEVNAME":"ttyS0","SEQNUM":"257"}}
[    3.349723] procd: Command: makedev
[    3.353413] procd:  /dev/ttyS0
[    3.356635] procd:  0660
[    3.359235] procd:  dialout
[    3.362190] procd: Message:
[    3.365155] procd:  ACTION=add
[    3.368380] procd:  DEVPATH=/devices/platform/18147000.serial/tty/ttyS0
[    3.376711] procd:  SUBSYSTEM=tty
[    3.380119] procd:  SYNTH_UUID=0
[    3.392547] procd:  MAJOR=4
[    3.395437] procd:  MINOR=64
[    3.399110] procd:  DEVNAME=ttyS0
[    3.402646] procd:  SEQNUM=257
[    3.406221] procd: Command: makedev
[    3.409922] procd:  /dev/ttyS0
[    3.413149] procd:  0600
[    3.415749] procd: Message:
[    3.418707] procd:  ACTION=add
[    3.421931] procd:  DEVPATH=/devices/platform/18147000.serial/tty/ttyS0
[    3.428709] procd:  SUBSYSTEM=tty
[    3.432088] procd:  SYNTH_UUID=0
[    3.435476] procd:  MAJOR=4
[    3.438441] procd:  MINOR=64
[    3.441500] procd:  DEVNAME=ttyS0
[    3.444989] procd:  SEQNUM=257
[    3.448774] procd: {{"ACTION":"add","DEVPATH":"/devices/virtual/tty/tty","SUBSYSTEM":"tty","SYNTH_UUID":"0","MAJOR":"5","MINOR":"0","DEVNAME":"tty","DEVMODE":"0666","SEQNUM":"258"}}
[    3.465203] procd: Command: makedev
[    3.468874] procd:  /dev/tty
[    3.471823] procd:  0666
[    3.474521] procd: Message:
[    3.477484] procd:  ACTION=add
[    3.480707] procd:  DEVPATH=/devices/virtual/tty/tty
[    3.485830] procd:  SUBSYSTEM=tty
[    3.489311] procd:  SYNTH_UUID=0
[    3.492707] procd:  MAJOR=5
[    3.495565] procd:  MINOR=0
[    3.498525] procd:  DEVNAME=tty
[    3.501841] procd:  DEVMODE=0666
[    3.505235] procd:  SEQNUM=258
[    3.508797] procd: {{"ACTION":"add","DEVPATH":"/devices/platform/18143000.spi/spi_master/spi0/spi0.0/mtd/mtd4/mtdblock4","SUBSYSTEM":"block","SYNTH_UUID":"0","MAJOR":"31","MINOR":"4","DEVNAME":"mtdblock4","DEVTYPE":"disk","SEQNUM":"259"}}
[    3.530305] procd: Command: makedev
[    3.533998] procd:  /dev/mtdblock4
[    3.537565] procd:  0600
[    3.540240] procd: Message:
[    3.543131] procd:  ACTION=add
[    3.546357] procd:  DEVPATH=/devices/platform/18143000.spi/spi_master/spi0/spi0.0/mtd/mtd4/mtdblock4
[    3.555646] procd:  SUBSYSTEM=block
[    3.559313] procd:  SYNTH_UUID=0
[    3.562710] procd:  MAJOR=31
[    3.565766] procd:  MINOR=4
[    3.568730] procd:  DEVNAME=mtdblock4
[    3.572559] procd:  DEVTYPE=disk
[    3.575847] procd:  SEQNUM=259
[    3.579571] procd: {{"ACTION":"add","DEVPATH":"/devices/platform/18143000.spi/spi_master/spi0/spi0.0/mtd/mtd2/mtdblock2","SUBSYSTEM":"block","SYNTH_UUID":"0","MAJOR":"31","MINOR":"2","DEVNAME":"mtdblock2","DEVTYPE":"disk","SEQNUM":"260"}}
[    3.601085] procd: Command: makedev
[    3.604777] procd:  /dev/mtdblock2
[    3.608344] procd:  0600
[    3.610944] procd: Message:
[    3.613902] procd:  ACTION=add
[    3.617125] procd:  DEVPATH=/devices/platform/18143000.spi/spi_master/spi0/spi0.0/mtd/mtd2/mtdblock2
[    3.626415] procd:  SUBSYSTEM=block
[    3.630077] procd:  SYNTH_UUID=0
[    3.633478] procd:  MAJOR=31
[    3.636529] procd:  MINOR=2
[    3.639390] procd:  DEVNAME=mtdblock2
[    3.643217] procd:  DEVTYPE=disk
[    3.646612] procd:  SEQNUM=260
[    3.650388] procd: {{"ACTION":"add","DEVPATH":"/devices/platform/18143000.spi/spi_master/spi0/spi0.0/mtd/mtd0/mtdblock0","SUBSYSTEM":"block","SYNTH_UUID":"0","MAJOR":"31","MINOR":"0","DEVNAME":"mtdblock0","DEVTYPE":"disk","SEQNUM":"261"}}
[    3.671901] procd: Command: makedev
[    3.675591] procd:  /dev/mtdblock0
[    3.679158] procd:  0600
[    3.681860] procd: Message:
[    3.684826] procd:  ACTION=add
[    3.687946] procd:  DEVPATH=/devices/platform/18143000.spi/spi_master/spi0/spi0.0/mtd/mtd0/mtdblock0
[    3.697222] procd:  SUBSYSTEM=block
[    3.700880] procd:  SYNTH_UUID=0
[    3.704248] procd:  MAJOR=31
[    3.707220] procd:  MINOR=0
[    3.710177] procd:  DEVNAME=mtdblock0
[    3.714004] procd:  DEVTYPE=disk
[    3.717399] procd:  SEQNUM=261
[    3.721121] procd: {{"ACTION":"add","DEVPATH":"/devices/platform/18143000.spi/spi_master/spi0/spi0.0/mtd/mtd5/mtdblock5","SUBSYSTEM":"block","SYNTH_UUID":"0","MAJOR":"31","MINOR":"5","DEVNAME":"mtdblock5","DEVTYPE":"disk","SEQNUM":"262"}}
[    3.742633] procd: Command: makedev
[    3.746326] procd:  /dev/mtdblock5
[    3.749893] procd:  0600
[    3.752603] procd: Message:
[    3.755467] procd:  ACTION=add
[    3.758695] procd:  DEVPATH=/devices/platform/18143000.spi/spi_master/spi0/spi0.0/mtd/mtd5/mtdblock5
[    3.767974] procd:  SUBSYSTEM=block
[    3.771633] procd:  SYNTH_UUID=0
[    3.775028] procd:  MAJOR=31
[    3.778078] procd:  MINOR=5
[    3.781042] procd:  DEVNAME=mtdblock5
[    3.784869] procd:  DEVTYPE=disk
[    3.788297] procd:  SEQNUM=262
[    3.791976] procd: {{"ACTION":"add","DEVPATH":"/devices/platform/18143000.spi/spi_master/spi0/spi0.0/mtd/mtd3/mtdblock3","SUBSYSTEM":"block","SYNTH_UUID":"0","MAJOR":"31","MINOR":"3","DEVNAME":"mtdblock3","DEVTYPE":"disk","SEQNUM":"263"}}
[    3.813486] procd: Command: makedev
[    3.817173] procd:  /dev/mtdblock3
[    3.820741] procd:  0600
[    3.823340] procd: Message:
[    3.826298] procd:  ACTION=add
[    3.829523] procd:  DEVPATH=/devices/platform/18143000.spi/spi_master/spi0/spi0.0/mtd/mtd3/mtdblock3
[    3.838804] procd:  SUBSYSTEM=block
[    3.842465] procd:  SYNTH_UUID=0
[    3.845866] procd:  MAJOR=31
[    3.848918] procd:  MINOR=3
[    3.851785] procd:  DEVNAME=mtdblock3
[    3.855613] procd:  DEVTYPE=disk
[    3.859007] procd:  SEQNUM=263
[    3.862726] procd: {{"ACTION":"add","DEVPATH":"/devices/platform/18143000.spi/spi_master/spi0/spi0.0/mtd/mtd1/mtdblock1","SUBSYSTEM":"block","SYNTH_UUID":"0","MAJOR":"31","MINOR":"1","DEVNAME":"mtdblock1","DEVTYPE":"disk","SEQNUM":"264"}}
[    3.884281] procd: Command: makedev
[    3.887869] procd:  /dev/mtdblock1
[    3.891435] procd:  0600
[    3.894135] procd: Message:
[    3.897103] procd:  ACTION=add
[    3.900328] procd:  DEVPATH=/devices/platform/18143000.spi/spi_master/spi0/spi0.0/mtd/mtd1/mtdblock1
[    3.909610] procd:  SUBSYSTEM=block
[    3.913269] procd:  SYNTH_UUID=0
[    3.916663] procd:  MAJOR=31
[    3.919613] procd:  MINOR=1
[    3.922589] procd:  DEVNAME=mtdblock1
[    3.926418] procd:  DEVTYPE=disk
[    3.929814] procd:  SEQNUM=264
[    3.933533] procd: {{"ACTION":"add","DEVPATH":"/devices/platform/18143000.spi/spi_master/spi0/spi0.0/mtd/mtd6/mtdblock6","SUBSYSTEM":"block","SYNTH_UUID":"0","MAJOR":"31","MINOR":"6","DEVNAME":"mtdblock6","DEVTYPE":"disk","SEQNUM":"265"}}
[    3.955038] procd: Command: makedev
[    3.958732] procd:  /dev/mtdblock6
[    3.962300] procd:  0600
[    3.965003] procd: Message:
[    3.967863] procd:  ACTION=add
[    3.971081] procd:  DEVPATH=/devices/platform/18143000.spi/spi_master/spi0/spi0.0/mtd/mtd6/mtdblock6
[    3.980361] procd:  SUBSYSTEM=block
[    3.983917] procd:  SYNTH_UUID=0
[    3.987304] procd:  MAJOR=31
[    3.990353] procd:  MINOR=6
[    3.993317] procd:  DEVNAME=mtdblock6
[    3.997146] procd:  DEVTYPE=disk
[    4.000540] procd:  SEQNUM=265
[    4.504317] procd: Coldplug complete
[    4.507996] procd: Change state 1 -> 2
[    4.512526] procd: - ubus -
[    4.515485] procd: Create service ubus
[    4.519503] procd: Start instance ubus::instance1
[    4.525030] procd: Started instance ubus::instance1[374]
[    4.536616] procd: running /etc/init.d/ubus running
[    4.543468] urandom_read: 2 callbacks suppressed
[    4.543480] random: ubusd: uninitialized urandom read (4 bytes read)
[    4.554877] procd: glob failed on /etc/init.d/ubus
[    4.565704] random: ubusd: uninitialized urandom read (4 bytes read)
[    4.572721] random: ubusd: uninitialized urandom read (4 bytes read)
[    4.580358] procd: Connected to ubus, id=e6cdf386
[    4.585362] procd: Change state 2 -> 3
[    4.589292] procd: - init -
[    4.592752] procd: Parsing inittab - ::sysinit:/etc/init.d/rcS S boot
[    4.599473] procd: Parsing inittab - ::shutdown:/etc/init.d/rcS K shutdown
[    4.606575] procd: Parsing inittab - ::askconsole:/usr/libexec/login.sh
[    4.614379] procd: Launched new askconsole action, pid=375
Please press Ent[    4.623771] procd: running /etc/rc.d/S* boot
er to activate this console.
[    5.151827] kmodloader: loading kernel modules from /etc/modules.d/*
[    5.179577] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    5.208627] Loading modules backported from Linux version v5.8-rc2-0-g48778464bb7d
[    5.216230] Backport generated by backports.git v5.8-rc2-1-0-g7a69429b
[    5.243169] ip_tables: (C) 2000-2006 Netfilter Core Team
[    5.267108] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
[    5.361074] urngd: v1.0.2 started.
[    5.416956] xt_time: kernel timezone is -0000
[    5.537999] PPP generic driver version 2.4.2
[    5.557141] NET: Registered protocol family 24
[    5.648893] random: crng init done
[    5.652328] random: 2 urandom warning(s) missed due to ratelimiting
[    5.658873] kmodloader: done loading kernel modules from /etc/modules.d/*

What is wrong?

What kind of configuration? Firmware or u-boot?

From what I can tell, OpenWrt takes the space that the OEM firmware allocates for the kernel + root FS. Nothing more (might be different if the available flash doesn't suffice to install OpenWrt on). That partition is labeled firmware - check other DTSes for reference.

I asked around and the mtdsplit code is generic, so it should apply to every target. E.g. on one of my devices, I see this. Notice how OpenWrt is more verbose on the split partitions.

[    0.943006] Creating 8 MTD partitions on "spi0.0":
[    0.952570] 0x000000000000-0x000000080000 : "u-boot"
[    0.963697] 0x000000080000-0x000000090000 : "partition-table"
[    0.976372] 0x000000090000-0x0000000a0000 : "product-info"
[    0.988455] 0x0000000a0000-0x000000dc0000 : "firmware"
[    1.000155] 2 tplink-fw partitions found on MTD device firmware
[    1.012023] Creating 2 MTD partitions on "firmware":
[    1.021929] 0x000000000000-0x00000022dfd6 : "kernel"
[    1.032908] 0x00000022dfd6-0x000000d20000 : "rootfs"
[    1.043833] mtd: device 5 (rootfs) set to be root filesystem
[    1.055281] 1 squashfs-split partitions found on MTD device rootfs
[    1.067612] 0x0000008b0000-0x000000d20000 : "rootfs_data"
[    1.079493] 0x000000dc0000-0x000000df0000 : "user-config"
[    1.091359] 0x000000f30000-0x000000fb0000 : "mutil-log"
[    1.102851] 0x000000fb0000-0x000000ff0000 : "oops"
[    1.113524] 0x000000ff0000-0x000001000000 : "radio"

You have to label the partition as "firmware" for the mtdsplit driver to recognize it:

		firmware@30000 {
			label = "firmware";
			reg = <0x30000 0x7B0000>;
			compatible = "...";
		};

You will also need to add an appropriate compatible string, and depending on the compatible maybe some extra properties too.

These are user settings: network and wireless configuration, security configuration etc. These settings are set in stock WEB GUI.
And this is Realtek device - it have not U-boot, it have Realtek bootloader.

I tried to make only one partition for firmware - the splitting does not work.
That is why I repeated stock partitions manually in DTS.

I tried this - the splitting does not work.

I do not know an appropriate 'compatible' string for this device with RTL8197FS Soc.