Re: Debian on Action Tech SG200 and MI424WR-rev-I
May 02, 2021 06:39PM
8086k,

Does this box have Wifi chip?

Quote

I think it is becase of the GPON/EPON support. Maybe F660 is more similar to google GFRG110.

No, I don't think GPON/EPON has anything to do with thisinterrupt. I meant that confirms the device is eth1 in the avanta.dtsi.

eth1: ethernet@70000 {
                        compatible = "marvell,armada-370-neta";
                        reg = <0x70000 0x4000>;
                        interrupts = <7>;
                        clocks = <&gate_clk 0>;
                        status = "disabled";
                };

That's mdio address f1070000.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Action Tech SG200 and MI424WR-rev-I
May 02, 2021 08:54PM
bodhi,

Yes this box do have a wifi chip. The wifi chip is RealTek RTL8192CE. I haven't worked on the wifi module yet. But I believe it won't be so hard as ETH device.

I believe the order of two eth device in avanta.dtsi is upside down. So I swapped the two eth nodes in avanta.dtsi. (According to the stock log of mi424wr rev i, It uses eth1)
However, that's same as just using eth1 in the dts.

8086k
Re: Debian on Action Tech SG200 and MI424WR-rev-I
May 03, 2021 02:59AM
bodhi,

I have tested it. Ethernet is completely working. I can connect to the terminal with telnet. The next thing is WIFI chip.

8086k
Re: Debian on Action Tech SG200 and MI424WR-rev-I
May 03, 2021 05:12AM
8086k,

Please post the DTS, DTSI and DTB.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 05/03/2021 05:14AM by bodhi.
Re: Debian on Action Tech SG200 and MI424WR-rev-I
May 03, 2021 05:28AM
bodhi,

Can linux 5.11 kernel drive the eth device of 88f6560 now? I am trying to update openwrt version.

8086k



Edited 1 time(s). Last edit at 05/03/2021 05:37AM by 8086k.
Re: Debian on Action Tech SG200 and MI424WR-rev-I
May 03, 2021 05:36AM
bodhi,

This is the DTS file of F660. It's for linux 3.14 kernel. It is not very perfect but works well.

8086k
Attachments:
open | download - ZTE_F660_DTS.7z (5.1 KB)
Re: Debian on Action Tech SG200 and MI424WR-rev-I
May 03, 2021 05:01PM
8086k,

I did not see where your changes are in these files.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Action Tech SG200 and MI424WR-rev-I
May 03, 2021 06:55PM
bodhi,

There are some details changed.
First, I commented out these codes
	phy0: ethernet-phy@9 {
		reg = <9>;
	};
&eth1 {
	status = "okay";
	phy = <&phy0>;
	phy-mode = "rgmii-id";
};

Next, I changed
		cpu-port-0 = <5>;
		cpu-port-1 = <6>;
into
		cpu-port-0 = <4>;
		cpu-port-1 = <5>;

I also changed the eth nodes in avanta.dtsi into this.
		eth0: ethernet@70000 {
			compatible = "marvell,armada-370-neta";
			reg = <0x70000 0x4000>;
			interrupts = <7>;
			clocks = <&gate_clk 0>;
			status = "disabled";
		};

		eth1: ethernet@74000 {
			compatible = "marvell,armada-370-neta";
			reg = <0x74000 0x4000>;
			interrupts = <11>;
			clocks = <&gate_clk 19>;
			status = "disabled";
		};
I believe you can see the differences.

8086k



Edited 2 time(s). Last edit at 05/03/2021 07:01PM by 8086k.
Re: Debian on Action Tech SG200 and MI424WR-rev-I
May 05, 2021 04:14AM
bodhi,

There is a very annoying problem on the uboot of F660. It doesn't run bootcmd directly. Instead, It will read the kernel into ram and check the image. If it doesn't pass, U-boot won't continue to run bootcmd. So everytime I must enter the uboot console to boot the openwrt kernel manually. Can you crack the uboot a little?

8086k
Re: Debian on Action Tech SG200 and MI424WR-rev-I
May 05, 2021 04:09PM
8086k,

> cpu-port-0 = <4>;
> cpu-port-1 = <5>;

Thanks. It confirmed the similarity with the MI424WR-rev-I. I've looked at the GPL source and discovered that the CPU is port 5.

> I also changed the eth nodes in avanta.dtsi into
> this.

I have some doubt whether mvneta can be used in the latest kernel (eg. kernel 5.11.4) for these boxes. mvneta has been significantly evloved during 3.x.x to 5.x.x kernels. I will try going back to the Kirkwood driver to see it is a better fit.

=====

Updated: CPU is port 5.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 05/11/2021 05:26AM by bodhi.
Re: Debian on Action Tech SG200 and MI424WR-rev-I
May 05, 2021 04:24PM
8086k,

> There is a very annoying problem on the uboot of
> F660. It doesn't run bootcmd directly. Instead, It
> will read the kernel into ram and check the image.
> If it doesn't pass, U-boot won't continue to run
> bootcmd. So everytime I must enter the uboot
> console to boot the openwrt kernel manually. Can
> you crack the uboot a little?

Sure, post the serial bootlog with printenvs.

The bootcmd must be changed permanently to boot Openwrt and fallback to boot stock (if it is possible).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Action Tech SG200 and MI424WR-rev-I
May 06, 2021 04:57AM
bodhi,

Exactly, I think the way to solve it is to modify the assembly code to make the uboot continue when the check is not passed. But I am very poor at ARM assembly code. So it is too hard for me to do that. The cheking part seemed not to be included in bootcmd or any other envs.

How can we sign the new uboot image? As far as I know, bootrom won't boot an unsigned uboot image.

8086k



Edited 3 time(s). Last edit at 05/06/2021 08:39AM by 8086k.
Re: Debian on Action Tech SG200 and MI424WR-rev-I
May 06, 2021 09:01AM
bodhi,


BootROM 1.34
Booting from NAND flash
BootROM: Image checksum verification PASSED
l

U-Boot 2009.08 ( 13 5 2013 - 18:06:09)

Hit enter to stop autoboot:  0
=>
=>
=>
=>
=>
=>
=>
=>
=> printenv
baudrate=115200
loads_echo=0
rootpath=/mnt/ARM_FS/
netmask=255.255.255.0
netdev=mii0
EMAC=EMAC0
MACMODE=GMII
rootfile=rootfs.img
bootfile=uboot.bin
linuzfile=vmlinuz.bin
fullfile=upgrade.bin
bootsize=0x60000
kernelsize=0xc800000
flashsize=33554432
console=console=ttyS0,115200
CASset=min
MALLOC_len=3
ethprime=egiga0
bootargs_root=root=/dev/nfs rw
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvNetConfig); bootm 0x2000000;
ethaddr=00:50:43:00:00:01
eth1addr=00:50:43:00:00:02
mv_pon_addr=00:50:43:00:01:01
ethmtu=1500
eth1mtu=1500
nandEcc=1bit
eeeEnable=yes
ethact=egiga0
memsize=127M
bootcmd=setenv bootargs $(console),$(silent) root=/dev/ram0 rw load_ramdisk=1 rdinit=/sbin/init $(mvNetConfig) $(mvPhoneConfig) mem=$(memsize); bootm 0x2000100;
ipaddr=192.168.1.1
serverip=192.168.1.100
versioninfo=U-Boot V1.2.0P1T1 0x100000 0x0 0x86 0x83
silent=0
stdin=serial
stdout=serial
stderr=serial
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
bootdelay=3
disaMvPnp=no
mvNetConfig=mv_net_config=0
pcieTune=no

Environment size: 1275/16380 bytes
=> help
?       - alias for 'help'
bdinfo  - print Board Info structure
bootm   - boot application image from memory
bubt    - burn an image on the Boot Nand Flash
cp      - memory copy
cpumap  - display CPU memory mapping settings
crc32   - checksum calculation
downver - upgrade software version from TFTP server
go      - start application at address 'addr'
help    - print online help
i2c     - I2C sub-system
loady   - load binary file over serial line (ymodem mode)
md      - memory display
mpp     - mpp
mtest   - simple RAM read/write test
mux     - mux set
mw      - memory write (fill)
nand    - NAND sub-system
nboot   - boot from NAND device
nbubt   - burn a boot loader image on the Boot Nand Flash
ping    - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
reset   - Perform RESET of the CPU
resetenv- earse environment sector to reset all variables to default
run     - run commands in an environment variable
saveenv - save environment variables to persistent storage
setenv  - set environment variables
tftpboot- boot image via network using TFTP protocol
wdtdbg  - debug watchdog
=>

Have you downloaded the firmware here?
https://www.dropbox.com/sh/qy573558hh75mna/AACQokzz-sCMU_m_so4qqo0Ka?dl=0
The u-boot image is contained in the package.

If I don't enter uboot console, This is the log

BootROM 1.34
Booting from NAND flash
BootROM: Image checksum verification PASSED


U-Boot 2009.08 ( 5月 13 2013 - 18:06:09)

Hit enter to stop autoboot:  0
No Version Available on Flash.


8086k



Edited 1 time(s). Last edit at 05/06/2021 09:18AM by 8086k.
Re: Debian on Action Tech SG200 and MI424WR-rev-I
May 06, 2021 04:29PM
8086k,

Quote

> Exactly, I think the way to solve it is to modify
> the assembly code to make the uboot continue when
> the check is not passed.

No need to do that. Sometime u-boot has a quirk that we can use. Or if GPL source is available then rebuild stock u-boot.


Quote

> How can we sign the new uboot image? As far as I
> know, bootrom won't boot an unsigned uboot image.
>

This u-boot is quite old, it does not have signature.

Quote

No Version Available on Flash.

This is a simple checksum failed, or the kernel image on flashed was corrupted or wiped out. So your stock FW is not good any more.

The thing to do here is to make it permanently booting into Debian or OpenWrt.

Quote

Have you downloaded the firmware here?
https://www.dropbox.com/sh/qy573558hh75mna/AACQokzz-sCMU_m_so4qqo0Ka?dl=0
The u-boot image is contained in the package.

Not yet. I don't really have much free time to do any research.


=======

I don't recall if you have tried kwboot with the stock uboot image?

Before we attempt to save envs in u-boot console, it is best that you try kwboot so there is a rescue path if something goes wrong. See example here.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Action Tech SG200 and MI424WR-rev-I
May 08, 2021 04:59PM
8086k,

Please post the boot log where you set the envs to allow successful booting to Debian.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Action Tech SG200 and MI424WR-rev-I
May 09, 2021 01:35AM
bodhi,

Do you know how to solve the serial interrupt problem? It happens almost everytime when I turn on my box.

I am busy making patches to put my changes into the builder now, I will try kwboot later.

8086k
Re: Debian on Action Tech SG200 and MI424WR-rev-I
May 09, 2021 01:44AM
bodhi,

I didn't change any of the envs because changing them can't make the uboot boot openwrt automaticly(the checksum before running bootcmd stopped it). So I use these three commands to boot openwrt.

wdtdbg watchdog 0 (disable watchdog)
nboot 0x2000000 0 0x80000 (read kernel from NAND to RAM)
bootm (boot kernel from RAM)

This box only have a 32MB NAND flash so I think openwrt is better than debian for it.

8086k



Edited 1 time(s). Last edit at 05/09/2021 01:45AM by 8086k.
Re: Debian on Action Tech SG200 and MI424WR-rev-I
May 09, 2021 01:51AM
bodhi,

BootROM 1.34
Booting from NAND flash
BootROM: Image checksum verification PASSED
l

U-Boot 2009.08 ( 5月 13 2013 - 18:06:09)

Hit enter to stop autoboot:  0
=>
=>
=>
=>
=>
=>
=>
=> nboot 0x2000000 0 0x80000

Loading from NAND 32MiB 3,3V 8-bit, offset 0x80000
   Image Name:   ARM OpenWrt Linux-3.14.34
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1596945 Bytes =  1.5 MB
   Load Address: 00008000
   Entry Point:  00008000
=> wdtdbg watchdog 0
disable watchdog
=> bootm
## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   ARM OpenWrt Linux-3.14.34
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1596945 Bytes =  1.5 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK
----------------------
|-->setup start tag...
----------------------
|-->setup memory tag...
----------------------
|-->setup cmdline tag...
----------------------
|-->setup marvell tag...
----------------------
|-->setup versioninfo tag...
----------------------
|-->setup end tag...
----------------------

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 3.14.34 (user@ubuntu) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r44647) ) #1 Sat May 8 23:16:04 PDT 2021
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine model: ZTE F420
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,115200n8 earlyprintk
[    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] Memory: 125244K/131072K available (3214K kernel code, 151K rwdata, 912K rodata, 136K init, 181K bss, 5828K reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xc8800000 - 0xff000000   ( 872 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc040fd5c   (4128 kB)
[    0.000000]       .init : 0xc0410000 - 0xc04320ac   ( 137 kB)
[    0.000000]       .data : 0xc0434000 - 0xc0459c64   ( 152 kB)
[    0.000000]        .bss : 0xc0459c64 - 0xc0487110   ( 182 kB)
[    0.000000] NR_IRQS:114
[    0.000010] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 21474836475ns
[    0.000098] Calibrating delay loop... 1191.11 BogoMIPS (lpj=5955584)
[    0.040050] pid_max: default: 32768 minimum: 301
[    0.040135] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.040146] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.041628] CPU: Testing write buffer coherency: ok
[    0.041871] Setting up static identity map for 0x11180 - 0x111bc
[    0.043031] pinctrl core: initialized pinctrl subsystem
[    0.043555] regulator-dummy: no parameters
[    0.043841] NET: Registered protocol family 16
[    0.044130] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.045354] cpuidle: using governor ladder
[    0.045388] Avanta: MV88F6560-Rev-2.
[    0.045504] Feroceon L2: Cache support initialised.
[    0.057172] bio: create slab <bio-0> at 0
[    0.058328] SCSI subsystem initialized
[    0.059097] usbcore: registered new interface driver usbfs
[    0.059247] usbcore: registered new interface driver hub
[    0.059428] usbcore: registered new device driver usb
[    0.060870] Switched to clocksource orion_clocksource
[    0.062689] NET: Registered protocol family 2
[    0.063419] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.063444] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.063466] TCP: Hash tables configured (established 1024 bind 1024)
[    0.063516] TCP: reno registered
[    0.063528] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.063550] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.063703] NET: Registered protocol family 1
[    0.064988] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.065452] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.065464] jffs2: version 2.2 (NAND) (SUMMARY) (ZLIB) (RTIME) (RUBIN) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.065609] msgmni has been set to 244
[    0.066250] io scheduler noop registered
[    0.066260] io scheduler deadline registered (default)
[    0.067034] kirkwood-pinctrl f1018000.pinctrl: registered pinctrl driver
[    0.067683] mvebu-pcie pcie-controller.1: PCI host bridge to bus 0000:00
[    0.067702] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    0.067713] pci_bus 0000:00: root bus resource [mem 0xf3000000-0xf4000000]
[    0.067725] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.068023] PCI: bus0: Fast back to back transfers disabled
[    0.068038] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.068238] PCI: bus1: Fast back to back transfers enabled
[    0.068287] pci 0000:00:01.0: PCI bridge to [bus 01]
[    0.141348] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.142677] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 33, base_baud = 12500000) is a 16550A
[    0.540763] console [ttyS0] enabled
[    0.546040] nand: device found, Manufacturer ID: 0x20, Chip ID: 0x75
[    0.552450] nand: ST Micro NAND 32MiB 3,3V 8-bit
[    0.557090] nand: 32MiB, SLC, page size: 512, OOB size: 16
[    0.562618] Scanning device for bad blocks
[    0.676052] 3 ofpart partitions found on MTD device orion_nand
[    0.681928] Creating 3 MTD partitions on "orion_nand":
[    0.687095] 0x000000000000-0x000000080000 : "u-boot"
[    0.693150] 0x000000080000-0x000000280000 : "kernel"
[    0.699084] 0x000000280000-0x000002000000 : "ubi"
[    0.705632] libphy: Fixed MDIO Bus: probed
[    0.710027] libphy: orion_mdio_bus: probed
[    0.716546] mvneta f1070000.ethernet eth0: Using hardware mac address 00:50:43:00:00:01
[    0.724768] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.731347] ehci-pci: EHCI PCI platform driver
[    0.735964] ehci-orion: EHCI orion driver
[    0.740315] usbcore: registered new interface driver usb-storage
[    0.747600] TCP: cubic registered
[    0.750958] NET: Registered protocol family 17
[    0.755659] 8021q: 802.1Q VLAN Support v1.8
[    0.760845] regulator-dummy: disabling
[    0.765202] UBI: auto-attach mtd2
[    0.768540] UBI: attaching mtd2 to ubi0
[    1.028136] UBI: scanning is finished
[    1.044236] UBI: attached mtd2 (name "ubi", size 29 MiB) to ubi0
[    1.050279] UBI: PEB size: 16384 bytes (16 KiB), LEB size: 15872 bytes
[    1.056867] UBI: min./max. I/O unit sizes: 512/512, sub-page size 256
[    1.063350] UBI: VID header offset: 256 (aligned 256), data offset: 512
[    1.069995] UBI: good PEBs: 1888, bad PEBs: 0, corrupted PEBs: 0
[    1.076039] UBI: user volume: 2, internal volumes: 1, max. volumes count: 92
[    1.083132] UBI: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 1342534149
[    1.092228] UBI: available PEBs: 0, total reserved PEBs: 1888, PEBs reserved for bad PEB handling: 40
[    1.101798] UBI: background thread "ubi_bgt0d" started, PID 748
[    1.108260] UBI: ubiblock0_0 created from ubi0:0(rootfs)
[    1.113622] ubiblock: device ubiblock0_0 (rootfs) set to be root filesystem
[    1.121062] mvsw61xx 8.mvsw6171: Found MV88F6560 built-in at f1072004.mdio-bu:08
[    1.128495] mvsw61xx 8.mvsw6171: Using indirect addressing
[    1.134188] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[    1.152579] random: nonblocking pool is initialized
[    1.281948] irq 33: nobody cared (try booting with the "irqpoll" option)
[    1.288687] CPU: 0 PID: 1 Comm: swapper Not tainted 3.14.34 #1
[    1.294545] Backtrace:
[    1.297034] [<c0014aa8>] (dump_backtrace) from [<c0014cd0>] (show_stack+0x18/0x1c)
[    1.304636]  r6:00000021 r5:c0445844 r4:c0445810 r3:00000000
[    1.310370] [<c0014cb8>] (show_stack) from [<c0196edc>] (dump_stack+0x20/0x28)
[    1.317632] [<c0196ebc>] (dump_stack) from [<c0048b18>] (__report_bad_irq.isra.7+0x20/0xb8)
[    1.326026] [<c0048af8>] (__report_bad_irq.isra.7) from [<c0048e08>] (note_interrupt+0x1ec/0x2d8)
[    1.334936]  r5:00000000 r4:c0445810
[    1.338554] [<c0048c1c>] (note_interrupt) from [<c0047548>] (handle_irq_event_percpu+0x17c/0x1b0)
[    1.347464]  r10:c043ab4b r9:c0445810 r8:00000021 r7:00000000 r6:00000000 r5:00000000
[    1.355383]  r4:00000000 r3:00000000
[    1.359000] [<c00473cc>] (handle_irq_event_percpu) from [<c00475ac>] (handle_irq_event+0x30/0x40)
[    1.367910]  r10:00000001 r9:c7833a68 r8:00000001 r7:c0481d20 r6:00000000 r5:00000021
[    1.375827]  r4:c0445810
[    1.378387] [<c004757c>] (handle_irq_event) from [<c0049538>] (handle_level_irq+0xd8/0xe8)
[    1.386686]  r4:c0445810 r3:00020000
[    1.390304] [<c0049460>] (handle_level_irq) from [<c0046e9c>] (generic_handle_irq+0x28/0x3c)
[    1.398777]  r4:c043a068 r3:c0049460
[    1.402393] [<c0046e74>] (generic_handle_irq) from [<c00127b8>] (handle_IRQ+0x68/0x88)
[    1.410351] [<c0012750>] (handle_IRQ) from [<c0008510>] (orion_handle_irq+0x74/0xa8)
[    1.418126]  r6:c78034e4 r5:00000001 r4:00000002 r3:00000040
[    1.423859] [<c000849c>] (orion_handle_irq) from [<c0008f20>] (__irq_svc+0x40/0x4c)
[    1.431550] Exception stack(0xc7833a68 to 0xc7833ab0)
[    1.436629] 3a60:                   00001ceb ffffffff 000016b8 c000c410 c79ccc00 00000000
[    1.444848] 3a80: 00000001 c7833b38 00000000 c79cce38 00000000 c7833b2c c78dc000 c7833ab0
[    1.453064] 3aa0: c021ef14 c000c44c 20000013 ffffffff
[    1.458136]  r10:00000000 r9:c79cce38 r8:00000000 r7:c7833a9c r6:ffffffff r5:20000013
[    1.466054]  r4:c000c44c
[    1.468613] [<c021ebf4>] (nand_do_read_ops) from [<c021f528>] (nand_read+0x60/0x80)
[    1.476303]  r10:c7a32000 r9:00001000 r8:c7a32000 r7:c7833c0c r6:c79cce38 r5:00000000
[    1.484220]  r4:00288200
[    1.486782] [<c021f4c8>] (nand_read) from [<c0213a1c>] (part_read+0x50/0x90)
[    1.493860]  r9:00000002 r8:00000000 r7:00000000 r6:c79d2600 r5:00000000 r4:00280000
[    1.501698] [<c02139cc>] (part_read) from [<c0210f04>] (mtd_read+0x80/0xbc)
[    1.508688]  r8:c79d2600 r7:00000000 r6:01d80000 r5:00000000 r4:01d77e00
[    1.515481] [<c0210e84>] (mtd_read) from [<c022b708>] (ubi_io_read+0x13c/0x2e4)
[    1.522821]  r8:00000200 r7:00000004 r6:c7825000 r5:00001000 r4:c7833c0c
[    1.529613] [<c022b5cc>] (ubi_io_read) from [<c0229178>] (ubi_eba_read_leb+0x2e0/0x434)
[    1.537650]  r10:00000002 r9:00000000 r8:00000000 r7:c7a32000 r6:00001000 r5:c7a19a00
[    1.545568]  r4:c7825000
[    1.548126] [<c0228e98>] (ubi_eba_read_leb) from [<c02281c8>] (ubi_leb_read+0xcc/0x130)
[    1.556164]  r10:00000000 r9:c7a32000 r8:00000006 r7:c7a32000 r6:00001000 r5:00000000
[    1.564083]  r4:c7a19a00
[    1.566646] [<c02280fc>] (ubi_leb_read) from [<c014a138>] (ubifs_leb_read+0x30/0x90)
[    1.574422]  r7:00000000 r6:00000000 r5:00001000 r4:00000000
[    1.580156] [<c014a108>] (ubifs_leb_read) from [<c014bd6c>] (ubifs_read_node+0x144/0x2e4)
[    1.588368]  r7:00001000 r6:00000000 r5:c7a27000 r4:00000000
[    1.594100] [<c014bc28>] (ubifs_read_node) from [<c01485d4>] (ubifs_read_sb_node+0x5c/0x78)
[    1.602486]  r10:00000000 r9:c7a27008 r8:c7a285a0 r7:c7a34e00 r6:c047feac r5:c7a32000
[    1.610405]  r4:c7a27000
[    1.612965] [<c0148578>] (ubifs_read_sb_node) from [<c014927c>] (ubifs_read_superblock+0xc44/0x15bc)
[    1.622137]  r5:c7a27000 r4:00000028
[    1.625754] [<c0148638>] (ubifs_read_superblock) from [<c0147668>] (ubifs_mount+0x90c/0x1660)
[    1.634315]  r10:00000000 r9:c7a27008 r8:c7a285a0 r7:c7a34e00 r6:c047feac r5:c7a27000
[    1.642233]  r4:00000028
[    1.644796] [<c0146d5c>] (ubifs_mount) from [<c0091fc4>] (mount_fs+0x1c/0xd0)
[    1.651962]  r10:c0443080 r9:c7a28600 r8:c0455a3c r7:00000000 r6:c0455a3c r5:c7a285e0
[    1.659880]  r4:c780e420
[    1.662446] [<c0091fa8>] (mount_fs) from [<c00a84d4>] (vfs_kern_mount+0x50/0xdc)
[    1.669873]  r6:00008000 r5:c7a285e0 r4:c780e420
[    1.674549] [<c00a8484>] (vfs_kern_mount) from [<c00ab0f4>] (do_mount+0x81c/0x97c)
[    1.682151]  r8:c7a285e0 r7:00000020 r6:00008000 r5:00000000 r4:c0455a3c r3:00000000
[    1.689987] [<c00aa8d8>] (do_mount) from [<c00ab514>] (SyS_mount+0x8c/0xc0)
[    1.696978]  r10:00000045 r9:c042c998 r8:c047eaa8 r7:00008000 r6:c03aa430 r5:c7853000
[    1.704895]  r4:00000000
[    1.707462] [<c00ab488>] (SyS_mount) from [<c04111a4>] (mount_root+0x30/0xbc)
[    1.714628]  r7:c04838f8 r6:c042c990 r5:c042c9b8 r4:c0459c88
[    1.720363] [<c0411174>] (mount_root) from [<c041136c>] (prepare_namespace+0x13c/0x194)
[    1.728401]  r4:c0459c88
[    1.730963] [<c0411230>] (prepare_namespace) from [<c0410ca4>] (kernel_init_freeable+0x17c/0x1c8)
[    1.739873]  r5:00000007 r4:c0431ea0
[    1.743496] [<c0410b28>] (kernel_init_freeable) from [<c000c4e4>] (kernel_init+0x10/0x10c)
[    1.751795]  r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c000c4d4
[    1.759714]  r4:00000000
[    1.762273] [<c000c4d4>] (kernel_init) from [<c00086d0>] (ret_from_fork+0x14/0x24)
[    1.769874]  r4:00000000 r3:c7832000
[    1.773483] handlers:
[    1.775771] [<c01e8710>] serial8250_interrupt
[    1.780155] Disabling IRQ #33
[    1.788497] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[    1.796190] Freeing unused kernel memory: 136K (c0410000 - c0432000)
[    2.302531] init: Console is alive
[    3.306787] init: - preinit -
Failed to find gpio-button-hotplug. Maybe it is a built in module ?
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
[    5.410908] mvneta f1070000.ethernet eth0: link up
[    5.619796] UBIFS: recovery needed
[    5.623839] UBIFS: background thread "ubifs_bgt0_1" started, PID 792
[    5.665213] UBIFS: recovery completed
[    5.668973] UBIFS: mounted UBI device 0, volume 1, name "rootfs_data"
[    5.675468] UBIFS: LEB size: 15872 bytes (15 KiB), min./max. I/O unit sizes: 512 bytes/512 bytes
[    5.684326] UBIFS: FS size: 27426816 bytes (26 MiB, 1728 LEBs), journal size 1380864 bytes (1 MiB, 87 LEBs)
[    5.694122] UBIFS: reserved for root: 1295435 bytes (1265 KiB)
[    5.699987] UBIFS: media format: w4/r0 (latest is w4/r0), UUID 134AD671-AF9D-4CAB-98A3-46ABFCFCA498, small LPT model
[    5.711434] mount_root: switching to jffs2 overlay
[    5.734993] procd: - early -
[    8.004863] procd: - ubus -
[    9.015358] procd: - init -
Please press Enter to activate this console.
[   10.731037] NET: Registered protocol family 10
[   10.758176] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   10.783548] ip_tables: (C) 2000-2006 Netfilter Core Team
[   10.804925] nf_conntrack version 0.5.0 (1959 buckets, 7836 max)
[   10.829529] xt_time: kernel timezone is -0000
[   10.839609] PPP generic driver version 2.4.2
[   10.845431] NET: Registered protocol family 24
[   13.867511] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   13.880133] device eth0 entered promiscuous mode
[   13.890583] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   15.860905] mvneta f1070000.ethernet eth0: link up
[   15.865750] br-lan: port 1(eth0) entered forwarding state
[   15.871218] br-lan: port 1(eth0) entered forwarding state
[   15.876691] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   15.883829] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   17.870906] br-lan: port 1(eth0) entered forwarding state



BusyBox v1.22.1 (2021-05-08 23:01:53 PDT) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 CHAOS CALMER (Bleeding Edge, r44647)
 -----------------------------------------------------
  * 1 1/2 oz Gin            Shake with a glassful
  * 1/4 oz Triple Sec       of broken ice and pour
  * 3/4 oz Lime Juice       unstrained into a goblet.
  * 1 1/2 oz Orange Juice
  * 1 tsp. Grenadine Syrup
 -----------------------------------------------------
root@OpenWrt:/#

Is this the log you want?

8086k
Re: Debian on Action Tech SG200 and MI424WR-rev-I
May 10, 2021 01:08AM
8086k,

Quote

This box only have a 32MB NAND flash so I think openwrt is better than debian for it.

You can run Debian on USB. That's what I meant.

==========

For now, see if you can make it boot permanently to OpenWrt.

Interrupt serial console at countdown and

setenv bootcmd_openwrt 'wdtdbg watchdog 0; nboot 0x2000000 0 0x80000; bootm'
setenv bootcmd_stock 'setenv bootargs $(console),$(silent) root=/dev/ram0 rw load_ramdisk=1 rdinit=/sbin/init $(mvNetConfig) $(mvPhoneConfig) mem=$(memsize); bootm 0x2000100;'
setenv bootcmd 'run bootcmd_openwrt; run bootcmd_stock'

and then
boot

After it booted successfully, reboot and

Interrupt serial console at countdown and

setenv bootcmd_openwrt 'wdtdbg watchdog 0; nboot 0x2000000 0 0x80000; bootm'
setenv bootcmd_stock 'setenv bootargs $(console),$(silent) root=/dev/ram0 rw load_ramdisk=1 rdinit=/sbin/init $(mvNetConfig) $(mvPhoneConfig) mem=$(memsize); bootm 0x2000100;'
setenv bootcmd 'run bootcmd_openwrt; run bootcmd_stock'

Now this is where kwboot is important. The next command will save the envs to flash. So there is some small risk that it could mess up your FW (kwboot will enable the rescue if the FW is corrupted).

Do this at your own risk:

saveenv

Now the envs should reflect what you have just saved

printenv
If it looks good

reset
and let it boot automaticaly all the way into OpenWrt.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Action Tech SG200 and MI424WR-rev-I
May 10, 2021 06:14AM
bodhi,

No, it is not working. This appears again.

BootROM 1.34
Booting from NAND flash
BootROM: Image checksum verification PASSED


U-Boot 2009.08 ( 5月 13 2013 - 18:06:09)

Hit enter to stop autoboot:  0
No Version Available on Flash.

I have told you the check to the kernel image is run before boot_cmd. It isn't contained in the env. If you use hex editor or ida to view the uboot image, you will find it out. The problem is I can't understand the assebmly code.

There is a chinese post which described it in detail. But the author is not very friendly so I can't get the cracked Uboot image from him.
http://www.chinadsl.net/forum.php?mod=viewthread&tid=101533

8086k
Re: Debian on Action Tech SG200 and MI424WR-rev-I
May 10, 2021 06:21PM
8086k,

> No, it is not working. This appears again.
> Hit enter to stop autoboot: 0
> No Version Available on Flash.

OK so that's good to know. It's typcial of some NAS manufacturers to do something like this. The bootcmd got reversed to internal hardcode string.

Now, the hard part is not how to change machince code. That is actually kernel image checksum. It can be modified to put the OpenWrt payload in,or calculated for the OPenWrt payload, but we don't know which algorigthm this u-boot uses, whether it's a CRC like in typical older NAS, or some other. I would bet it is a CRC checksum.

So before you spend more time on this topic, I think you should try kwboot.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Action Tech SG200 and MI424WR-rev-I
May 10, 2021 07:00PM
The u-boot binary for MI424WR-rev-I from bkallus upload:

https://forum.doozan.com/read.php?2,78499,116194#msg-116194

If you can kwboot it, chance is that will run OpenWrt on NAND.

If there is a problem because it's a different HW, we can deal with it.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 05/10/2021 07:02PM by bodhi.
Re: Debian on Action Tech SG200 and MI424WR-rev-I
May 10, 2021 07:27PM
bodhi,

OK, I will try kwboot first. Mi424wr's Uboot is certainly not suitable for F660. They have different NAND and ETH config.

8086k
Re: Debian on Action Tech SG200 and MI424WR-rev-I
May 11, 2021 12:22AM
8086k,

> OK, I will try kwboot first. Mi424wr's Uboot is
> certainly not suitable for F660. They have
> different NAND and ETH config.

That's not really relevant, yet. All you would care is to boot it successfully, and then worry about the differences.

And by the way, I don't believe that person on the Chinese laguage forum you posted the link to . Why reporting all that he accomplished and then no binary to share? the process he described was correct (albeit a bit redundant), but you can learn all that by googling .

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 05/11/2021 12:31AM by bodhi.
Re: Debian on Action Tech SG200 and MI424WR-rev-I
May 11, 2021 02:03AM
bodhi,

I've browsed all the information I have, then find this https://lists.denx.de/pipermail/u-boot/2012-June/125700.html The F660 of the author of this page is running an older version of U-Boot I think. This version of U-Boot shows more detail of the checking process. I can't find any available download link of this version of U-Boot.

8086k
Re: Debian on Action Tech SG200 and MI424WR-rev-I
May 11, 2021 04:48AM
Ignore this, I just click on the wrong place and post this message.



Edited 2 time(s). Last edit at 05/11/2021 06:14AM by 8086k.
Re: Debian on Action Tech SG200 and MI424WR-rev-I
May 12, 2021 04:00PM
I've spent some time searching the GPL source for info

- The CPU port for MI424WR-rev-I is port 5.
- The PHY for switch is 8 (we knew that from Claudio's DTS).
- PON is an option for MI424WR-rev-I in the code, look like it can be turned on for other variants of this 6560 SoC.
- The Ethernet driver is mvneta, but a quite old version (about 10 years).

I think currently I might be seeing an old mvneta bug (irq related) from long time ago. The mvneta driver in mainine Linux is working well for the Armada SoCs (Armv7), but has never been used for Kirkwood or other Armv5 SoC such as this 6560.

It could be due to the fact that the mvneta code was architected to run with multi-core, and for single core SoC, it has some problem. However, we are using this for the Mirabox and RN102 (Armv7) in non-SMP kernel successfully! so my theory might or might not be correct.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 05/13/2021 01:27AM by bodhi.
Re: Debian on Action Tech SG200 and MI424WR-rev-I
May 14, 2021 03:17AM
bodhi,

I have tired the rtl8192ce driver pack in openwrt. It doesn't work. I'm quite sure rtl8192ce is using pci-e bus. And the active pci-e device in device tree is pcie1,0. What do you think the problem is? The driver or the pci-e port id?

8086k
Re: Debian on Action Tech SG200 and MI424WR-rev-I
May 14, 2021 05:28AM
bodhi,

I have tried kwboot. It interrupted the normal boot successfully, but kwboot didn't give any other results. It stuck.
user@ubuntu:~/kwboot$ ./kwboot -t -p -B115200 /dev/ttyUSB0 -b mtd0-u-boot.img
Sending boot message. Please reboot the target...-
This is the result when I was using a kirkwood image provided by another forum. When I was using my backup or your mi424wr rev i uboot, it printed this.
user@ubuntu:~/kwboot$ ./kwboot -t -p -B115200 /dev/ttyUSB0 -b uboot-revI-128MbFlash.bin
uboot-revI-128MbFlash.bin: Invalid image.

8086k
Re: Debian on Action Tech SG200 and MI424WR-rev-I
May 14, 2021 06:37AM
This is the command I used:
kwboot -t -B 115200 /dev/ttyUSB0 -b uboot-revI-128MbFlash.bin  -p

Look at the file info, too

file uboot-revI-128MbFlash.bin


Quote

I have tired the rtl8192ce driver pack in openwrt. It doesn't work. I'm quite sure rtl8192ce is using pci-e bus. And the active pci-e device in device tree is pcie1,0. What do you think the problem is? The driver or the pci-e port id?

The PCIe ports should work fine. But try both PCIe ports in the DTS.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: