Any plans for Realtek SOC support?

You can use the wifi driver (rtl8192cd) and network driver (rtl819x) from the 8device in the new kernel. Just need a few modifications...
I'm currently working on the network driver for a DSA version...
The rtw88 from openwrt already have the 8822B 5GHz driver that can work with this project...

Thank you for this appraisal.

This is very interesting. I wish you great success

Sorry for having to ask that, but i'm not very deep into such hardware-related things.

Would it be possible to add the 8devices Komikan to these sources as Dimazhan did for the TOTOLINK A3002RU v1.

It would be a great help to hear the opinion on it

Yes... Its a 97f full mips... The 5Ghz 8822B from the Komikan already have an open driver...
I dont have a board to test, but I can add the config and someone with the board can follow...

I would appreciate that very much. I could provide any informations needed. I think it is also a good chance for me to learn :slightly_smiling_face: Building and testing an image should not be the problem.

awk 'BEGIN{FS="[ \t]+:[ \t]"} /machine/ {print $2}' /proc/cpuinfo
Output:
8devices Komikan devboard

Partitions:

MTD

0x000000000000 - 0x000000020000 : "boot"
0x000000020000 - 0x000000040000 : "hwpart"
0x000000040000 - 0x000000080000 : "config"
0x000000080000 - 0x000002000000 : "firmware"

cvimc-fw

0x000000080000 - 0x000000280000 : "kernel"
0x000000280000 - 0x000002000000 : "rootfs"

squashfs-split
0x000000080000 - 0x000002000000 : "roofs_data"

Great... 8devices are openwrt already... their github is in 18.06.

Hello all,

I am new to openwrt and the 819x family.
I have a board based on the 8197FS. The SDK from Realtek is terrible and I'd be happy to switch to a much cleaner base. I'm very happy to find that you worked on this.

Any tip on how to start ? I'm having trouble compiling the ggbruno/master (probably a newbie's mistake somewhere)

Hello gaspare,

FYI I had trouble building from your repository because cvimg was not present. This has been fixed in the repo of dimazhan:

commit 3673300937a729242e0c6775d9022e34410f4e19
Author: Dimazhan <dimazhan@list.ru>
Date:   Thu Nov 26 01:11:12 2020 +0700

    Added missing cvimg tool
2 Likes

Hi,

One question how to make this new image with the kernel vesion 4.14 to run on komikan board

thank you.

Regards

I don't have this board. I upload the image using tftp from boot loader, but the board must have support for tftp (cvimg header)... The image must be adapted in the dts for the board too...

Thanks for your reply, I am now able to use your image, in the komikan board.

I just modified the device tree like this.
&spi0 {
status = "okay";

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

	all@0 {
		label = "ALL";
		reg = <0x0 0x2000000>;
	};
	
	partition@0 {
		label = "boot";
		reg = <0x0 0x20000>;
		read-only;
	};
	
	partition@20000 {
		label = "hwpart";
		reg = <0x20000 0x20000>;
	};
	
	partition@40000 {
		label = "config";
		reg = <0x40000 0x40000>;
	};

	firmware@80000 {
		label = "kernel";
		reg = <0x80000 0x240000>;
	};

	partition@240000 {
		label = "rootfs";
		reg = <0x240000 0x2000000>;
	};
};

};

still my kernel is crashing.

 0.000000] Linux version 4.14.187 (user@ubuntu) (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 Multilaser RE708 V1
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] BOOTSTRAP = 8197f001 0 412582e0 80000000
[    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-0x0000000003ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[    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: 16240
[    0.000000] Kernel command line: console=ttyS0,38400
[    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] Writing ErrCtl register=0000e0a0
[    0.000000] Readback ErrCtl register=0000e0a0
[    0.000000] Memory: 58492K/65536K available (3952K kernel code, 159K rwdata, 816K rodata, 1208K init, 200K bss, 7044K 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.008539] Calibrating delay loop... 663.55 BogoMIPS (lpj=1327104)
[    0.047280] pid_max: default: 32768 minimum: 301
[    0.052508] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.059666] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.070307] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.080959] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.088059] NET: Registered protocol family 16
[    0.109642] INFO: sheipa spi driver register
[    0.115127] clocksource: Switched to clocksource MIPS
[    0.121584] NET: Registered protocol family 2
[    0.126966] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.134578] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.141458] TCP: Hash tables configured (established 1024 bind 1024)
[    0.148551] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.154912] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.162002] NET: Registered protocol family 1
[    0.171044] 1800351c.gpio-controller: Realtek GPIO controller driver
[    0.178637] Crashlog allocated RAM at address 0x3f00000
[    0.186409] workingset: timestamp_bits=14 max_order=14 bucket_order=0
[    0.197824] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.204180] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.226297] io scheduler noop registered
[    0.230575] io scheduler deadline registered (default)
[    0.236466] Serial: 8250/16550 driver, 1 ports, IRQ sharing enabled
[    0.243822] console [ttyS0] disabled
[    0.247765] 18147000.serial: ttyS0 at MMIO 0x18147000 (irq = 17, base_baud = 6250000) is a 16550A
£[    0.257438] console [ttyS0] enabled
[    0.257438] console [ttyS0] enabled
[    0.264395] bootconsole [early0] disabled
[    0.264395] bootconsole [early0] disabled
[    0.273329] libphy: Fixed MDIO Bus: probed
[    0.278362] NET: Registered protocol family 10
[    0.288509] Segment Routing with IPv6
[    0.292321] NET: Registered protocol family 17
[    0.296835] 8021q: 802.1Q VLAN Support v1.8
£[    0.304542] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    0.312072] Please append a correct "root=" boot option; here are the available partitions:
[    0.320400] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    0.328992] Rebooting in 1 seconds..

Please suggest what I am doing wrong

Thank you

I don't see spi-controller driver message in your logs. Did you configure spi driver?

Thanks a lot for your message, by mistake I think I uchecked that, Now I enabled the same, Now I am getting the following message,

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 (user@ubuntu) (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 Multilaser RE708 V1
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 04000000 @ 00000000 (usable)
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] BOOTSTRAP = 8197f001 0 412582e0 80000000
[ 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-0x0000000003ffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x0000000003ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[ 0.000000] random: get_random_bytes called from start_kernel+0x98/0x4ac with crng_init=0
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 16240
[ 0.000000] Kernel command line: console=ttyS0,38400
[ 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] Writing ErrCtl register=0000eab6
[ 0.000000] Readback ErrCtl register=0000eab6
[ 0.000000] Memory: 58232K/65536K available (4172K kernel code, 159K rwdata, 888K rodata, 1172K init, 205K bss, 7304K 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.008539] Calibrating delay loop... 666.41 BogoMIPS (lpj=3332096)
[ 0.075259] pid_max: default: 32768 minimum: 301
[ 0.080498] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.087637] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.098338] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.109083] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.116173] NET: Registered protocol family 16
[ 0.141182] clocksource: Switched to clocksource MIPS
[ 0.147593] NET: Registered protocol family 2
[ 0.152994] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.160535] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.167535] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.174580] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.180882] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.188051] NET: Registered protocol family 1
[ 0.197364] 1800351c.gpio-controller: Realtek GPIO controller driver
[ 0.204942] Crashlog allocated RAM at address 0x3f00000
[ 0.212773] workingset: timestamp_bits=14 max_order=14 bucket_order=0
[ 0.224175] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.230462] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.253039] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[ 0.261040] io scheduler noop registered
[ 0.265386] io scheduler deadline registered (default)
[ 0.271465] Serial: 8250/16550 driver, 1 ports, IRQ sharing enabled
[ 0.278745] console [ttyS0] disabled
£[ 0.292332] console [ttyS0] enabledt MMIO 0x18147000 (irq = 17, base_baud = 6250000) is a 16550A
[ 0.292332] console [ttyS0] enabled
[ 0.299290] bootconsole [early0] disabled
[ 0.299290] bootconsole [early0] disabled
[ 0.308081] m25p80 spi0.0: change speed to 40000000Hz, div 3
[ 0.317606] m25p80 spi0.0: found w25q256, expected m25p80
[ 0.323070] INFO: flash mode error, cmd 0x5A, flash_mode 0
[ 0.337372] m25p80 spi0.0: w25q256 (32768 Kbytes)
[ 0.342493] 6 fixed-partitions partitions found on MTD device spi0.0
[ 0.348829] Creating 6 MTD partitions on "spi0.0":
[ 0.353658] 0x000000000000-0x000002000000 : "ALL"
[ 0.359114] 0x000000000000-0x000000020000 : "boot"
[ 0.364667] 0x000000020000-0x000000040000 : "hwpart"
[ 0.370264] 0x000000040000-0x000000080000 : "config"
[ 0.375940] 0x000000080000-0x0000002c0000 : "kernel"
[ 0.381603] 0x000000240000-0x000002240000 : "rootfs"
[ 0.386551] mtd: partition "rootfs" extends beyond the end of device "spi0.0" -- size truncated to 0x1dc0000
[ 0.397012] mtd: device 5 (rootfs) set to be root filesystem
[ 0.406797] mtdsplit: no squashfs found in "rootfs"
[ 0.412320] libphy: Fixed MDIO Bus: probed
[ 0.417179] NET: Registered protocol family 10
[ 0.425122] Segment Routing with IPv6
[ 0.428849] NET: Registered protocol family 17
[ 0.433431] 8021q: 802.1Q VLAN Support v1.8
£[ 0.442018] List of all partitions:
[ 0.445518] 1f00 32768 mtdblock0
[ 0.445522] (driver?)
[ 0.452077] 1f01 128 mtdblock1
[ 0.452081] (driver?)
[ 0.458566] 1f02 128 mtdblock2
[ 0.458568] (driver?)
[ 0.465065] 1f03 256 mtdblock3
[ 0.465068] (driver?)
[ 0.471559] 1f04 2304 mtdblock4
[ 0.471562] (driver?)
[ 0.478050] 1f05 30464 mtdblock5
[ 0.478052] (driver?)
[ 0.484544] No filesystem could mount root, tried:
[ 0.484547] squashfs
[ 0.489390]
[ 0.493120] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,5)
[ 0.501928] Rebooting in 1 seconds..

Please suggest what I am missign here.

You are tftp-booting an initramfs, isn't it? Question is whether or not your kernel has the relevant configuration for that and whether or not the image is built as such.

Hello. Can someone explain me, how to compile from source? I have a Rtl8197FN and in the menuconfig I can select "Realtek MIPS" but not the specific SoC.

Flash layout in kernel (dts-file) don't correspond to flash layout in firmware image file.

Hi, I am not using initramfs filesystem but squashfs. This has been done by modifying the Makefile of image folder

Hi,

Thanks for your response,

mtdsplit: squashfs is empty in "rootfs"
[    0.402175] libphy: Fixed MDIO Bus: probed
[    0.407040] NET: Registered protocol family 10
[    0.414956] Segment Routing with IPv6
[    0.418687] NET: Registered protocol family 17
[    0.423266] 8021q: 802.1Q VLAN Support v1.8
£[    0.431801] squashfs: SQUASHFS error: Major/Minor mismatch, older Squashfs 0                                                                  .0 filesystems are unsupported
[    0.441599] List of all partitions:
[    0.445081] 1f00            8192 mtdblock0
[    0.445085]  (driver?)
[    0.451606] 1f01             128 mtdblock1
[    0.451609]  (driver?)
[    0.458099] 1f02              64 mtdblock2
[    0.458101]  (driver?)
[    0.464597] 1f03            7872 mtdblock3
[    0.464600]  (driver?)
[    0.471093] 1f04            5919 mtdblock4
[    0.471095]  (driver?)
[    0.477582] 1f05              64 mtdblock5
[    0.477584]  (driver?)
[    0.484076] No filesystem could mount root, tried:
[    0.484078]  squashfs

This is the debug messages from the kernel.

Can you please help/suggest me how to find out what I am missing that my image is not having the squashfs filesystem in it.

you misallocated flash memory, do so

	partition@0 {
		label = "boot";
		reg = <0x0 0x20000>;
		read-only;
	};
	
	partition@20000 {
		label = "hwpart";
		reg = <0x20000 0x20000>;
	};
	
	partition@40000 {
		label = "config";
		reg = <0x40000 0x40000>;
	};

	partition@80000 {
		label = "firmware";
		reg = <0x80000 0x1f80000>;
	};

Thanks a lot for your replay
I made the changes suggest by you but still got the following error

m25p80 spi0.0: change speed to 40000000Hz, div 3
[    0.317449] m25p80 spi0.0: found w25q256, expected m25p80
[    0.322922] INFO: flash mode error, cmd 0x5A, flash_mode 0
[    0.337278] m25p80 spi0.0: w25q256 (32768 Kbytes)
[    0.342399] 4 fixed-partitions partitions found on MTD device spi0.0
[    0.348727] Creating 4 MTD partitions on "spi0.0":
[    0.353560] 0x000000000000-0x000000020000 : "boot"
[    0.359086] 0x000000020000-0x000000040000 : "hwpart"
[    0.364814] 0x000000040000-0x000000080000 : "config"
[    0.370397] 0x000000080000-0x000002000000 : "firmware"
[    0.376693] libphy: Fixed MDIO Bus: probed
[    0.381722] NET: Registered protocol family 10
[    0.392162] Segment Routing with IPv6
[    0.395885] NET: Registered protocol family 17
[    0.400371] 8021q: 802.1Q VLAN Support v1.8
£[    0.408222] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    0.415754] Please append a correct "root=" boot option; here are the available partitions:
[    0.424069] 1f00             128 mtdblock0
[    0.424074]  (driver?)
[    0.430560] 1f01             128 mtdblock1
[    0.430562]  (driver?)
[    0.437056] 1f02             256 mtdblock2
[    0.437058]  (driver?)
[    0.443553] 1f03           32256 mtdblock3
[    0.443555]  (driver?)
[    0.450043] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    0.458721] Rebooting in 1 seconds..

The code which I modified has been checked in the following link

run make V=s and look, buildroot probably swearing at the absence of cvimg tool

this has already been mentioned here:

you need this two patches:
https://github.com/Dimazhan/openwrt/commit/c89ab7db41e0acb37981e69839adc1db5a3232fa
https://github.com/Dimazhan/openwrt/commit/7b9454efd69175da124bda64dfb880e5c0042c99