Welcome! Log In Create A New Profile

Advanced

Debian on Netgear RN102

Posted by whitepawn 
tme
Re: Debian installation on Netgear RN102
August 27, 2020 01:50AM
Hei bodhi,

I have two RN102 units now and can thus test alternative solutions against each other for performance or other behavior. I will keep the vendor's firmware on the second one for some time to be able to compare Debian against stock. Later I will be able to compare Debian against Debian.

I notice that the stock kernel uses the u-boot environment variable 'eth1addr' for setting the mac address:
Marvell>> printenv eth1addr
eth1addr=12:34:56:78:90:AB
Marvell>>
After booting Debian and logging in:
ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 12:34:56:78:90:ab  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:532 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:26
As well as for setting the default 'hostname':
cat /etc/hostname
nas-78-90-AB

I like the idea of giving each unit a (more or less) unique 'hostname', but I think using a part of the u-boot environment variable 'SerialNum' would be a better solution than using a part of the mach address. My serial number is a sting of 13 characters consisting of digits and upper case letters only. Following Netgear's example, including the last, say, 4 characters in the hostname is one possibility.

Regards,
Trond Melen
tme
Re: Debian on Netgear RN102
August 28, 2020 03:17AM
Hi bodhi,

Following up this post, I have performed a fresh install of your latest Debian version, but with Linux kernel 4.20.6 and the modified device tree for the ReadyNAS RN102. Complete procedure follows mainly for my own later reference.

On my Ubuntu 20.04 laptop, I downloaded the input files to /tmp/bodhi. The md5 sums were:
/tmp/bodhi
md5sum *
ffe6bb6a1d591b06be1f3a55273bc236  armada-370-netgear-rn102.dtb
ffa864878dd797241c0bea05d563239a  Debian-5.2.9-mvebu-tld-1-rootfs-bodhi.tar.bz2
8cf3d08dee09d000cf8b50b2df2f4047  linux-4.20.6-mvebu-mirabox-tld-12-bodhi.tar.bz2

Disabled auto mounting and lanched 'gparted':
sudo systemctl stop udisks2.service
sudo gparted

Plugged in the USB-stick and did Refresh Devices. Selected the newly added device in the upper right pull-down menu, created a 'msdos' partition table and formatted the USB-stick with a single partition labeled 'rootfs' containing an 'ext3' file system, and applied the pending operations. Made a screenshot (attached) and closed 'gparted'.

Mounted the USB stick on /mnt and, following your instructions, extracted the input files onto it:
sudo su -
lsblk
mount /dev/sda1 /mnt
cd /mnt
tar xf /tmp/bodhi/Debian-5.2.9-mvebu-tld-1-rootfs-bodhi.tar.bz2
ls -alF

total 96
drwxrwxrwx 21 root root  4096 jan.  20  2017 ./
drwxr-xr-x 20 root root  4096 aug.  21 12:35 ../
drwxr-xr-x  2 root root  4096 aug.  26  2019 bin/
drwxr-xr-x  3 root root  4096 sep.   5  2019 boot/
drwxr-xr-x  4 root root  4096 jan.   2  2017 dev/
drwxr-xr-x 70 root root  4096 sep.   5  2019 etc/
drwxr-xr-x  2 root root  4096 sep.  12  2016 home/
drwxr-xr-x 13 root root  4096 aug.  26  2019 lib/
drwx------  2 root root 16384 jan.   9  2017 lost+found/
drwxr-xr-x  2 root root  4096 jan.  20  2017 media/
drwxr-xr-x  2 root root  4096 jan.   2  2017 mnt/
drwxr-xr-x  2 root root  4096 jan.   2  2017 opt/
drwxr-xr-x  2 root root  4096 sep.  12  2016 proc/
drwx------  5 root root  4096 sep.  10  2019 root/
drwxr-xr-x  8 root root  4096 aug.  25  2019 run/
drwxr-xr-x  2 root root  4096 aug.  26  2019 sbin/
drwxr-xr-x  2 root root  4096 jan.   2  2017 srv/
drwxr-xr-x  2 root root  4096 april  6  2015 sys/
drwxrwxrwt  2 root root  4096 sep.   5  2019 tmp/
drwxr-xr-x 10 root root  4096 jan.   2  2017 usr/
drwxr-xr-x 11 root root  4096 jan.   2  2017 var/

mkdir usr/src/mirabox && cd usr/src/mirabox
tar xf /tmp/bodhi/linux-4.20.6-mvebu-mirabox-tld-12-bodhi.tar.bz2
ls -alF

total 34204
drwxr-xr-x 2 root root     4096 aug.  28 08:03 ./
drwxr-xr-x 3 root root     4096 aug.  28 08:03 ../
-rw-r--r-- 1 root root   174254 mars  13  2019 config-4.20.6-mvebu-mirabox-tld-12
-rw-r--r-- 1 root root    67443 feb.   7  2019 linux-4.20.6-mvebu-tld-1.patch
-rw-r--r-- 1 root root   921600 mars  13  2019 linux-dtb-4.20.6-mvebu-mirabox-tld-12.tar
-rw-r--r-- 1 root root  9431996 mars  13  2019 linux-headers-4.20.6-mvebu-mirabox-tld-12_12.0_armhf.deb
-rw-r--r-- 1 root root 20292840 mars  13  2019 linux-image-4.20.6-mvebu-mirabox-tld-12_12.0_armhf.deb
-rwxr-xr-x 1 root root  4062176 mars  13  2019 zImage-4.20.6-mvebu-mirabox-tld-12*

mkdir dts
cp -a /tmp/bodhi/armada-370-netgear-rn102.dt? dts/
cat dts/armada-370-netgear-rn102.dtb >> zImage.fdt
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.20.6-mvebu-mirabox-tld-12 -d zImage.fdt uImage

Image Name:   Linux-4.20.6-mvebu-mirabox-tld-1
Created:      Fri Aug 28 08:09:11 2020
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    4076820 Bytes = 3981.27 KiB = 3.89 MiB
Load Address: 00008000
Entry Point:  00008000

cp -a uImage ../../../boot/
ls -alF ../../../boot/

total 50272
drwxr-xr-x  3 root root    4096 aug.  28 08:10 ./
drwxrwxrwx 21 root root    4096 jan.  20  2017 ../
-rw-r--r--  1 root root  183639 aug.  19  2019 config-5.2.9-mvebu-tld-1
drwxr-xr-x  2 root root    4096 aug.  20  2019 dts/
-rw-r--r--  1 root root 9488554 aug.  26  2019 initrd.img-5.2.9-mvebu-tld-1
-rw-r--r--  1 root root 9676808 aug.  19  2019 linux-headers-5.2.9-mvebu-tld-1_1.0_armhf.deb
-rw-------  1 root root 3266081 aug.  19  2019 System.map-5.2.9-mvebu-tld-1
-rw-r--r--  1 root root 4076884 aug.  28 08:09 uImage
-rw-r--r--  1 root root 9488618 aug.  26  2019 uInitrd
-rw-------  1 root root 5057632 aug.  19  2019 vmlinuz-5.2.9-mvebu-tld-1
-rwxr-xr-x  1 root root 5057632 aug.  19  2019 zImage*
-rwxr-xr-x  1 root root 5057632 aug.  19  2019 zImage-5.2.9-mvebu-tld-1*

EDIT: These commands should be added to avoid the "Cannot read bad block mark: Invalid argument" issue below.
cd ../../../etc
cp -a fw_env.config fw_env.config.orig
/bin/sh
cat <<EOF > fw_env.config
# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors
/dev/mtd1               0x00000         0x20000         0x20000
EOF
exit
:TIDE
sync
cd
umount /mnt
exit

Plugged the USB-stick into the ReadyNAS RN102, connected power, hit the power button, interrupted u-boot, did 'printenv' and then 'boot'. This is the serial console boot log:

BootROM 1.08
Booting from NAND flash


General initialization - Version: 1.0.0

High speed PHY - Version: 2.1.4 (COM-PHY-V20) 
Update PEX Device ID 0x6710
High speed PHY - Ended Successfully
0001
DDR3 Training Sequence - Ver 5.7.1
DDR3 Training Sequence - Run without PBS.
DDR3 Training Sequence - Ended Successfully 
BootROM: Image checksum verification PASSED

 __   __                      _ _
|  \/  | __ _ _ ____   _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| |  | | (_| | |   \ V /  __/ | |
|_|  |_|\__,_|_|    \_/ \___|_|_|
         _   _     ____              _
        | | | |   | __ )  ___   ___ | |_ 
        | | | |___|  _ \ / _ \ / _ \| __| 
        | |_| |___| |_) | (_) | (_) | |_ 
         \___/    |____/ \___/ \___/ \__| 
 ** LOADER **


U-Boot 2011.12-gec25d27-dirty (Oct 26 2015 - 16:53:05) Marvell version: v2011.12 2014_T2.0p1 
06/23/2015 ReadyNAS-102 V2.0

Board: DB-88F6710-BP
SoC:   MV6710 A1
CPU:   Marvell PJ4B v7 UP (Rev 1) LE
       CPU    @ 1200 [MHz]
       L2     @ 600 [MHz]
       TClock @ 200 [MHz]
       DDR    @ 600 [MHz]
       DDR 16Bit Width, FastPath Memory Access
DRAM:  512 MiB

Map:   Code:            0x1feef000:0x1ff9ef34
       BSS:             0x1ffef0a0
       Stack:           0x1f9eeef8
       Heap:            0x1f9ef000:0x1feef000

NAND:  (ID 0xf1ad)      128 MiB
MMC:   MRVL_MMC: 0
Bad block table found at page 65472, version 0x01
Bad block table found at page 65408, version 0x01
nand_read_bbt: Bad block at 0x000001820000
nand_read_bbt: Bad block at 0x000001f00000

Initialize and scan all PCI interfaces
PEX unit.port(active IF[-first bus]):
------------------------------------------
PEX 0: Root Complex Interface, Detected Link X1, GEN 2.0
PEX 1: Root Complex Interface, Detected Link X1, GEN 2.0
FPU not initialized
USB 0: Host Mode
USB 1: Host Mode
Shutting down unused interfaces:
       GBE0
       SDIO
       AUDIO
       TDM
Modules/Interfaces Detected:
       RGMII1 Phy
       PEX0 (Lane 0)
       PEX1 (Lane 1)
       SATA0 (Lane 2)
       SATA1 (Lane 3)
Net:   , egiga1 [PRIME]
Power supply plug on, please press power button!


BootROM 1.08
Booting from NAND flash


General initialization - Version: 1.0.0

High speed PHY - Version: 2.1.4 (COM-PHY-V20) 
Update PEX Device ID 0x6710
High speed PHY - Ended Successfully
0000
DDR3 Training Sequence - Ver 5.7.1
DDR3 Training Sequence - Run without PBS.
DDR3 Training Sequence - Ended Successfully 
BootROM: Image checksum verification PASSED

 __   __                      _ _
|  \/  | __ _ _ ____   _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| |  | | (_| | |   \ V /  __/ | |
|_|  |_|\__,_|_|    \_/ \___|_|_|
         _   _     ____              _
        | | | |   | __ )  ___   ___ | |_ 
        | | | |___|  _ \ / _ \ / _ \| __| 
        | |_| |___| |_) | (_) | (_) | |_ 
         \___/    |____/ \___/ \___/ \__| 
 ** LOADER **


U-Boot 2011.12-gec25d27-dirty (Oct 26 2015 - 16:53:05) Marvell version: v2011.12 2014_T2.0p1 
06/23/2015 ReadyNAS-102 V2.0

Board: DB-88F6710-BP
SoC:   MV6710 A1
CPU:   Marvell PJ4B v7 UP (Rev 1) LE
       CPU    @ 1200 [MHz]
       L2     @ 600 [MHz]
       TClock @ 200 [MHz]
       DDR    @ 600 [MHz]
       DDR 16Bit Width, FastPath Memory Access
DRAM:  512 MiB

Map:   Code:            0x1feef000:0x1ff9ef34
       BSS:             0x1ffef0a0
       Stack:           0x1f9eeef8
       Heap:            0x1f9ef000:0x1feef000

NAND:  (ID 0xf1ad)      128 MiB
MMC:   MRVL_MMC: 0
Bad block table found at page 65472, version 0x01
Bad block table found at page 65408, version 0x01
nand_read_bbt: Bad block at 0x000001820000
nand_read_bbt: Bad block at 0x000001f00000

Initialize and scan all PCI interfaces
PEX unit.port(active IF[-first bus]):
------------------------------------------
PEX 0: Root Complex Interface, Detected Link X1, GEN 2.0
PEX 1: Root Complex Interface, Detected Link X1, GEN 2.0
FPU not initialized
USB 0: Host Mode
USB 1: Host Mode
Shutting down unused interfaces:
       GBE0
       SDIO
       AUDIO
       TDM
Modules/Interfaces Detected:
       RGMII1 Phy
       PEX0 (Lane 0)
       PEX1 (Lane 1)
       SATA0 (Lane 2)
       SATA1 (Lane 3)
Net:   , egiga1 [PRIME]
Power On!

FDT loaded successfully
Hit any key to stop autoboot:  0 
Marvell>> printenv
AC_Power_fail_detect=open
CASset=min
HW_version=MVT
MALLOC_len=5
Manufacturer=NETGEAR
Product=ReadyNAS 102
SKUNum=RN102
SerialNum=MASKERAD
Startup=Normal
UUID=31774368-b4c7-11e2-bfbc-28c68e347394
Version=V1.0
autoload=no
bootargs=console=ttyS0,115200
bootargs_end=:10.4.50.254:255.255.255.0:KW40:eth0:none
bootargs_root=root=/dev/nfs rw
bootcmd=usb start; run usb_bootcmd; usb stop; reset
bootcmd_fdt=tftpboot 0x2000000 $image_name;tftpboot $fdtaddr $fdtfile;setenv bootargs $console $mtdparts $bootargs_root nfsroot=$se
rverip:$rootpath ip=$ipaddr:$serverip$bootargs_end $mvNetConfig video=dovefb:lcd0:$lcd0_params clcd.lcd0_enable=$lcd0_enable clcd.l
cd_panel=$lcd_panel; bootz 0x2000000 - $fdtaddr;
bootcmd_ubi=ubi part ubifs; ubifsmount rootfs; ubifsload 0x2000000 kernel; ubifsload 0x3000000 initrd.gz; bootm 0x2000000 0x3000000
 0x1000000
bootdelay=3
cacheShare=no
console=console=ttyS0,115200
disL2Cache=yes
disaMvPnp=no
eeeEnable=no
enaAutoRecovery=yes
enaClockGating=yes
enaExtDisk=no
enaFPU=no
enaMonExt=no
enaWrAllo=no
envver=3
eth1addr=MASKERAD
eth1mtu=1500
ethact=egiga1
ethaddr=MASKERAD
ethmtu=1500
ethprime=egiga1
fdt_skip_update=yes
fdtaddr=0x1000000
fdtfile=armada-370-db.dtb
image_name=uImage
initrd_name=uInitrd
load_addr=0x02000000
load_uimage=ext2load usb 0:1 0x2000000 /boot/uImage
load_uinitrd=ext2load usb 0:1 0x3000000 /boot/uInitrd
loadaddr=0x02000000
mtdids=nand0=armada-nand
mtdparts=mtdparts=pxa3xx_nand-0:0x180000@0(u-boot),0x20000@0x180000(u-boot-env),0x600000@0x200000(uImage),0x400000@0x800000(miniroo
tfs),-(ubifs)
mvNetConfig=mv_net_config=1,(MASKERAD,0:1:2:3:4),mtu=1500
mv_pon_addr=MASKERAD
nandEcc=1bit
netbsd_en=no
netretry=no
pcieTune=no
pexMode=rc
pxe_files_load=:default.arm-armada370-db:default.arm-armadaxp:default.arm
pxefile_addr_r=3100000
rcvrip=169.254.100.100
sata_delay_reset=0
sata_dma_mode=yes
setL2CacheWT=no
standalone=fsload $load_addr $image_name;setenv bootargs $console $mtdparts root=/dev/mtdblock0 rw ip=$ipaddr:$serverip$bootargs_en
d; bootm $load_addr;
stderr=serial
stdin=serial
stdout=serial
usb0Mode=host
usb1Mode=host
usb2Mode=device
usbActive=0
usb_boot=run load_uimage; if run load_uinitrd; then bootm 0x2000000 0x3000000; else bootm 0x2000000; fi
usb_bootcmd=run usb_set_bootargs; run usb_boot
usb_set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts earlyprintk=serial
vxworks_en=no
yuk_ethaddr=MASKERAD

Environment size: 2606/131068 bytes
Marvell>> boot
(Re)start USB...
USB:   Active port:     0
Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 2 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found
Loading file "/boot/uImage" from usb device 0:1 (usbda1)
4076884 bytes read
Loading file "/boot/uInitrd" from usb device 0:1 (usbda1)
9488618 bytes read
## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   Linux-4.20.6-mvebu-mirabox-tld-1
   Created:      2020-08-28   6:09:11 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4076820 Bytes = 3.9 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 03000000 ...
   Image Name:   initramfs-5.2.9-mvebu-tld-1
   Created:      2019-08-26  11:03:27 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9488554 Bytes = 9 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.20.6-mvebu-mirabox-tld-12 (root@tldDebianVM) (gcc version 7.3.0 (Ubuntu/Linaro 7.3.0-27ubuntu1~18.04
)) #6 SMP PREEMPT Wed Mar 13 14:43:16 PDT 2019
[    0.000000] CPU: ARMv7 Processor [561f5811] revision 1 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[    0.000000] OF: fdt: Machine model: NETGEAR ReadyNAS 102
[    0.000000] printk: bootconsole [earlycon0] enabled
[    0.000000] Memory policy: Data cache writeback
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] random: get_random_bytes called from start_kernel+0x78/0x4c4 with crng_init=0
[    0.000000] percpu: Embedded 18 pages/cpu @(ptrval) s41548 r8192 d23988 u73728
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=pxa3xx_nand-0:0x180000@0(u-boot),0
x20000@0x180000(u-boot-env),0x600000@0x200000(uImage),0x400000@0x800000(minirootfs),-(ubifs) earlyprintk=serial mtdparts=pxa3xx_nan
d-0:0x180000@0(u-boot),0x20000@0x180000(u-boot-env),0x600000@0x200000(uImage),0x400000@0x800000(minirootfs),-(ubifs) reason=normal 
bdtype=rn102
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 497004K/524288K available (8192K kernel code, 731K rwdata, 2072K rodata, 1024K init, 320K bss, 27284K reserv
ed, 0K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (9184 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 732 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 321 kB)
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
[    0.000000]  Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] L2C: DT/platform modifies aux control register: 0x12086300 -> 0x1a086302
[    0.000000] Aurora cache controller enabled, 4 ways, 256 kB
[    0.000000] Aurora: CACHE_ID 0x00000100, AUX_CTRL 0x1a086302
[    0.000000] Switching to timer-based delay loop, resolution 53ns
[    0.000007] sched_clock: 32 bits at 18MHz, resolution 53ns, wraps every 114537122277ns
[    0.007239] clocksource: armada_370_xp_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 101938038664 ns
[    0.018006] Console: colour dummy device 80x30
[    0.022089] Calibrating delay loop (skipped), value calculated using timer frequency.. 37.49 BogoMIPS (lpj=187492)
[    0.031582] pid_max: default: 32768 minimum: 301
[    0.035961] LSM: Security Framework initializing
[    0.040288] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.046331] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.053616] CPU: Testing write buffer coherency: ok
[    0.058437] CPU0: thread -1, cpu 0, socket -1, mpidr 0
[    0.117366] Setting up static identity map for 0x100000 - 0x100060
[    0.123336] mvebu-soc-id: MVEBU SoC ID=0x6710, Rev=0x1
[    0.128189] mvebu-pmsu: Initializing Power Management Service Unit
[    0.147298] rcu: Hierarchical SRCU implementation.
[    0.187300] smp: Bringing up secondary CPUs ...
[    0.191445] smp: Brought up 1 node, 1 CPU
[    0.195104] SMP: Total of 1 processors activated (37.49 BogoMIPS).
[    0.200777] CPU: All CPU(s) started in SVC mode.
[    0.205794] devtmpfs: initialized
[    0.217546] VFP support v0.3: implementor 56 architecture 2 part 20 variant 9 rev 6
[    0.225100] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.234395] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.240287] prandom: seed boundary self test passed
[    0.247182] prandom: 100 self tests passed
[    0.251100] pinctrl core: initialized pinctrl subsystem
[    0.258038] NET: Registered protocol family 16
[    0.262845] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.270408] audit: initializing netlink subsys (disabled)
[    0.275663] audit: type=2000 audit(0.250:1): state=initialized audit_enabled=0 res=1
[    0.284723] cpuidle: using governor ladder
[    0.289668] cpuidle: using governor menu
[    0.293507] hw-breakpoint: debug architecture 0x4 unsupported.
[    0.388344] vgaarb: loaded
[    0.391143] SCSI subsystem initialized
[    0.398072] usbcore: registered new interface driver usbfs
[    0.403131] usbcore: registered new interface driver hub
[    0.409503] usbcore: registered new device driver usb
[    0.415235] pps_core: LinuxPPS API ver. 1 registered
[    0.420346] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.428931] PTP clock support registered
[    0.435076] clocksource: Switched to clocksource armada_370_xp_clocksource
[    0.496240] VFS: Disk quotas dquot_6.6.0
[    0.499901] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.531299] NET: Registered protocol family 2
[    0.537182] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
[    0.544189] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.551029] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[    0.557118] TCP: Hash tables configured (established 4096 bind 4096)
[    0.563045] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.568451] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.574380] NET: Registered protocol family 1
[    0.609265] RPC: Registered named UNIX socket transport module.
[    0.614674] RPC: Registered udp transport module.
[    0.619058] RPC: Registered tcp transport module.
[    0.623352] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.629476] Unpacking initramfs...
[    1.141558] Freeing initrd memory: 9268K
[    1.145497] NetWinder Floating Point Emulator V0.97 (double precision)
[    1.151803] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[    1.162445] Initialise system trusted keyrings
[    1.168007] Key type blacklist registered
[    1.171887] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[    1.178022] zbud: loaded
[    1.191314] NFS: Registering the id_resolver key type
[    1.196171] Key type id_resolver registered
[    1.199991] Key type id_legacy registered
[    1.203661] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.209874] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    1.556510] Key type asymmetric registered
[    1.560259] Asymmetric key parser 'x509' registered
[    1.565237] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
[    1.572001] io scheduler noop registered
[    1.575734] io scheduler deadline registered
[    1.579676] io scheduler cfq registered (default)
[    1.586642] armada-370-pinctrl d0018000.pin-ctrl: registered pinctrl driver
[    1.601521] mvebu-pcie soc:pcie@82000000: PCI host bridge to bus 0000:00
[    1.608175] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.613189] pci_bus 0000:00: root bus resource [mem 0xf8000000-0xffdfffff]
[    1.619794] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[    1.627682] PCI: bus0: Fast back to back transfers disabled
[    1.632783] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.640431] pci 0000:00:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.648667] pci 0000:00:01.0: ASPM: current common clock configuration is broken, reconfiguring
[    1.686176] PCI: bus1: Fast back to back transfers disabled
[    1.692139] pci 0000:00:02.0: ASPM: current common clock configuration is broken, reconfiguring
[    1.726202] PCI: bus2: Fast back to back transfers disabled
[    1.731390] pci 0000:00:01.0: BAR 14: assigned [mem 0xf8000000-0xf80fffff]
[    1.737745] pci 0000:00:01.0: BAR 15: assigned [mem 0xf8100000-0xf81fffff pref]
[    1.744420] pci 0000:00:02.0: BAR 14: assigned [mem 0xf8200000-0xf82fffff]
[    1.750744] pci 0000:00:01.0: BAR 13: assigned [io  0x10000-0x10fff]
[    1.756590] pci 0000:00:01.0: BAR 6: assigned [mem 0xf8300000-0xf83007ff pref]
[    1.763187] pci 0000:00:02.0: BAR 6: assigned [mem 0xf8400000-0xf84007ff pref]
[    1.769808] pci 0000:01:00.0: BAR 6: assigned [mem 0xf8100000-0xf810ffff pref]
[    1.776421] pci 0000:01:00.0: BAR 5: assigned [mem 0xf8000000-0xf80001ff]
[    1.782622] pci 0000:01:00.0: BAR 4: assigned [io  0x10000-0x1000f]
[    1.788364] pci 0000:01:00.0: BAR 0: assigned [io  0x10010-0x10017]
[    1.794088] pci 0000:01:00.0: BAR 2: assigned [io  0x10018-0x1001f]
[    1.799829] pci 0000:01:00.0: BAR 1: assigned [io  0x10020-0x10023]
[    1.805570] pci 0000:01:00.0: BAR 3: assigned [io  0x10024-0x10027]
[    1.811294] pci 0000:00:01.0: PCI bridge to [bus 01]
[    1.815845] pci 0000:00:01.0:   bridge window [io  0x10000-0x10fff]
[    1.821570] pci 0000:00:01.0:   bridge window [mem 0xf8000000-0xf80fffff]
[    1.827784] pci 0000:00:01.0:   bridge window [mem 0xf8100000-0xf81fffff pref]
[    1.834384] pci 0000:02:00.0: BAR 0: assigned [mem 0xf8200000-0xf820ffff 64bit]
[    1.841082] pci 0000:02:00.0: BAR 2: assigned [mem 0xf8210000-0xf8210fff 64bit]
[    1.847779] pci 0000:02:00.0: BAR 4: assigned [mem 0xf8211000-0xf8211fff 64bit]
[    1.854458] pci 0000:00:02.0: PCI bridge to [bus 02]
[    1.859009] pci 0000:00:02.0:   bridge window [mem 0xf8200000-0xf82fffff]
[    1.865342] pcieport 0000:00:01.0: enabling device (0140 -> 0143)
[    1.871191] pcieport 0000:00:02.0: enabling device (0140 -> 0142)
[    1.878141] mv_xor d0060800.xor: Marvell shared XOR driver
[    1.946208] mv_xor d0060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    1.953362] mv_xor d0060900.xor: Marvell shared XOR driver
[    2.016198] mv_xor d0060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    2.186552] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    2.195790] printk: console [ttyS0] disabled
[    2.220957] d0012000.serial: ttyS0 at MMIO 0xd0012000 (irq = 19, base_baud = 12500000) is a 16550A
[    2.229376] printk: console [ttyS0] enabled
[    2.229376] printk: console [ttyS0] enabled
[    2.237135] printk: bootconsole [earlycon0] disabled
[    2.237135] printk: bootconsole [earlycon0] disabled
[    2.248229] ahci 0000:01:00.0: enabling device (0146 -> 0147)
[    2.253766] ahci 0000:01:00.0: AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl SATA mode
[    2.262036] ahci 0000:01:00.0: flags: 64bit ncq sntf led only pmp fbs pio slum part sxs 
[    2.282435] scsi host0: ahci
[    2.296303] scsi host1: ahci
[    2.299418] ata1: SATA max UDMA/133 abar m512@0xf8000000 port 0xf8000100 irq 42
[    2.306518] ata2: SATA max UDMA/133 abar m512@0xf8000000 port 0xf8000180 irq 42
[    2.314182] sata_mv d00a0000.sata: slots 32 ports 1
[    2.330031] scsi host2: sata_mv
[    2.333374] ata3: SATA max UDMA/133 irq 27
[    2.338907] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xf1
[    2.344767] nand: Hynix H27U1G8F2BTR-BC
[    2.348521] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    2.356233] Bad block table found at page 65472, version 0x01
[    2.361836] Bad block table found at page 65408, version 0x01
[    2.367976] nand_read_bbt: bad block at 0x000001820000
[    2.372715] nand_read_bbt: bad block at 0x000001f00000
[    2.377580] 5 cmdlinepart partitions found on MTD device pxa3xx_nand-0
[    2.383593] Creating 5 MTD partitions on "pxa3xx_nand-0":
[    2.388662] 0x000000000000-0x000000180000 : "u-boot"
[    2.394967] 0x000000180000-0x0000001a0000 : "u-boot-env"
[    2.402169] 0x000000200000-0x000000800000 : "uImage"
[    2.408961] 0x000000800000-0x000000c00000 : "minirootfs"
[    2.416027] 0x000000c00000-0x000008000000 : "ubifs"
[    2.427770] libphy: Fixed MDIO Bus: probed
[    2.435986] libphy: orion_mdio_bus: probed
[    2.454518] mvneta d0074000.ethernet eth0: Using random mac address 92:bd:58:46:1f:64
[    2.466166] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    2.472215] ehci-pci: EHCI PCI platform driver
[    2.477206] ehci-orion: EHCI orion driver
[    2.481113] orion-ehci d0050000.usb: EHCI Host Controller
[    2.486443] orion-ehci d0050000.usb: new USB bus registered, assigned bus number 1
[    2.493659] orion-ehci d0050000.usb: irq 25, io mem 0xd0050000
[    2.525103] orion-ehci d0050000.usb: USB 2.0 started, EHCI 1.00
[    2.530853] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.20
[    2.538553] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.545261] usb usb1: Product: EHCI Host Controller
[    2.549757] usb usb1: Manufacturer: Linux 4.20.6-mvebu-mirabox-tld-12 ehci_hcd
[    2.556481] usb usb1: SerialNumber: d0050000.usb
[    2.561641] hub 1-0:1.0: USB hub found
[    2.565452] hub 1-0:1.0: 1 port detected
[    2.570332] xhci_hcd 0000:02:00.0: xHCI Host Controller
[    2.575709] xhci_hcd 0000:02:00.0: new USB bus registered, assigned bus number 2
[    2.583289] xhci_hcd 0000:02:00.0: hcc params 0x200073a1 hci version 0x100 quirks 0x0000000000080010
[    2.592586] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.20
[    2.600419] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.607162] usb usb2: Product: xHCI Host Controller
[    2.611659] usb usb2: Manufacturer: Linux 4.20.6-mvebu-mirabox-tld-12 xhci-hcd
[    2.618396] usb usb2: SerialNumber: 0000:02:00.0
[    2.623563] hub 2-0:1.0: USB hub found
[    2.627390] hub 2-0:1.0: 2 ports detected
[    2.631881] xhci_hcd 0000:02:00.0: xHCI Host Controller
[    2.637060] xhci_hcd 0000:02:00.0: new USB bus registered, assigned bus number 3
[    2.643957] xhci_hcd 0000:02:00.0: Host supports USB 3.0  SuperSpeed
[    2.649898] ata2: SATA link down (SStatus 0 SControl 300)
[    2.655174] usb usb3: We don't know the algorithms for LPM for this host, disabling LPM.
[    2.662833] usb usb3: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 4.20
[    2.670553] ata3: SATA link down (SStatus 0 SControl F300)
[    2.675777] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.682432] usb usb3: Product: xHCI Host Controller
[    2.687033] usb usb3: Manufacturer: Linux 4.20.6-mvebu-mirabox-tld-12 xhci-hcd
[    2.693689] usb usb3: SerialNumber: 0000:02:00.0
[    2.698805] hub 3-0:1.0: USB hub found
[    2.702526] hub 3-0:1.0: 2 ports detected
[    2.707841] usbcore: registered new interface driver usblp
[    2.713715] usbcore: registered new interface driver usb-storage
[    2.720072] mousedev: PS/2 mouse device common for all mice
[    2.726998] i2c /dev entries driver
[    2.734227] rtc-ds1307 0-0068: 'wakeup-source' is set, request for an IRQ is disabled!
[    2.746171] rtc-ds1307 0-0068: registered as rtc0
[    2.776558] orion_wdt: Initial timeout 229 sec
[    2.835232] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[    2.846027] ata1.00: ATA-8: ST2000DL003-9VT166, CC32, max UDMA/133
[    2.851733] ata1.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 32)
[    2.860596] ata1.00: configured for UDMA/133
[    2.885647] scsi 0:0:0:0: Direct-Access     ATA      ST2000DL003-9VT1 CC32 PQ: 0 ANSI: 5
[    2.895849] sd 0:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
[    2.913947] sd 0:0:0:0: [sda] Write Protect is off
[    2.918808] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    2.935218] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    2.941714]  sda: sda1
[    2.952101] sd 0:0:0:0: [sda] Attached SCSI removable disk
[    2.990930] marvell-cesa d0090000.crypto: CESA device successfully registered
[    2.998317] hidraw: raw HID events driver (C) Jiri Kosina
[    3.004418] usbcore: registered new interface driver usbhid
[    3.010069] usbhid: USB HID core driver
[    3.014083] drop_monitor: Initializing network drop monitor service
[    3.020743] NET: Registered protocol family 10
[    3.036220] Segment Routing with IPv6
[    3.039677] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    3.047372] NET: Registered protocol family 17
[    3.062478] 8021q: 802.1Q VLAN Support v1.8
[    3.066684] Key type dns_resolver registered
[    3.070878] ThumbEE CPU extension supported.
[    3.074828] Registering SWP/SWPB emulation handler
[    3.081722] registered taskstats version 1
[    3.086453] Loading compiled-in X.509 certificates
[    3.091027] zswap: loaded using pool lzo/zbud
[    3.169555] usb 1-1: New USB device found, idVendor=196d, idProduct=0201, bcdDevice=11.20
[    3.185357] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    3.191949] usb 1-1: Product: USB Drive 3SE
[    3.204434] usb 1-1: Manufacturer: Innodisk
[    3.215250] usb 1-1: SerialNumber: 20190831AA101F845011
[    3.225849] usb-storage 1-1:1.0: USB Mass Storage device detected
[    3.239305] Key type big_key registered
[    3.255431] scsi host3: usb-storage 1-1:1.0
[    3.303032] Key type encrypted registered
[    3.311624] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[    3.321014] rtc-ds1307 0-0068: setting system clock to 2020-08-28 05:37:15 UTC (1598593035)
[    3.331975] Freeing unused kernel memory: 1024K
[    3.346918] Checked W+X mappings: passed, no W+X pages found
[    3.352153] Run /init as init process
Loading, please wait...
Starting version 241
[    4.453436] scsi 3:0:0:0: Direct-Access     Innodisk USB Drive 3SE    1120 PQ: 0 ANSI: 6
[    4.500374] sd 3:0:0:0: [sdb] 7905280 512-byte logical blocks: (4.05 GB/3.77 GiB)
[    4.514227] sd 3:0:0:0: [sdb] Write Protect is off
[    4.527634] sd 3:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[    4.560951]  sdb: sdb1
[    4.578971] sd 3:0:0:0: [sdb] Attached SCSI removable disk
[    4.838409] random: fast init done
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
Begin: Will now check root file system ... fsck from util-linux 2.33.1
[/sbin/fsck.ext3 (1) -- /dev/sdb1] fsck.ext3 -a -C0 /dev/sdb1 
rootfs: Superblock last mount time is in the future.
        (by less than a day, probably due to the hardware clock being incorrectly set)
rootfs: Superblock last write time is in the future.
        (by less than a day, probably due to the hardware clock being incorrectly set)
rootfs: clean, 24109/247008 files, 217229/987904 blocks
done.
[   18.664877] EXT4-fs (sdb1): mounting ext3 file system using the ext4 subsystem
[   18.696183] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
INIT: version 2.93 booting
[info] Using makefile-style concurrent boot in runlevel S.
[....] Starting hotplug events dispatcher: systemd-udevd. ok 
[....] Synthesizing the initial hotplug events (subsystems)...done.
[....] Synthesizing the initial hotplug events (devices)...[   22.708880] systemd-udevd[1570]: could not open moddep file '/lib/mod
ules/4.20.6-mvebu-mirabox-tld-12/modules.dep.bin'
[   22.837659] systemd-udevd[1570]: could not open moddep file '/lib/modules/4.20.6-mvebu-mirabox-tld-12/modules.dep.bin'
done.
[....] Waiting for /dev to be fully populated...[   23.458720] systemd-udevd[1578]: Using default interface naming scheme 'v240'.
[   23.529962] systemd-udevd[1579]: could not open moddep file '/lib/modules/4.20.6-mvebu-mirabox-tld-12/modules.dep.bin'
[   23.568273] systemd-udevd[1578]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   23.689400] systemd-udevd[1578]: Could not generate persistent MAC address for eth0: No such file or directory
[   23.946938] systemd-udevd[1568]: could not open moddep file '/lib/modules/4.20.6-mvebu-mirabox-tld-12/modules.dep.bin'
[   24.234608] random: crng init done
[   24.276587] systemd-udevd[1582]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   24.309538] systemd-udevd[1580]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   24.328520] systemd-udevd[1569]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
done.
[....] Setting hostname to 'debian'...done.
[....] Activating swap:. ok 
[   28.436413] EXT4-fs (sdb1): re-mounted. Opts: errors=remount-ro
[info] Will now check all file systems.
fsck from util-linux 2.33.1
Checking all file systems.
LABEL=rootfs is mounted
[....] Done checking file systems. A log is being saved in /var/log/fsck/checkfs if that location is writable.. ok 
[....] Cleaning up temporary files...[....] Cleaning /tmp...done.
 /tmp. ok 
[....] Will now mount local filesystems:. ok 
[....] Will now activate swapfile swap:done.
[....] Checking minimum space in /tmp...done.
[....] Cleaning up temporary files.... ok 
[....] Starting Setting kernel variables: sysctl. ok 
[....] Initializing random number generator...done.
[....] Configuring network interfaces...Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

[   33.109309] mvneta d0074000.ethernet eth0: PHY [d0072004.mdio-mii:00] driver [Marvell 88E1318S]
[   33.117891] mvneta d0074000.ethernet eth0: configuring for phy/rgmii-id link mode
[   33.126313] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Listening on LPF/eth0/92:bd:58:46:1f:64
Sending on   LPF/eth0/92:bd:58:46:1f:64
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
[   36.266053] mvneta d0074000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[   36.273470] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
DHCPOFFER of 192.168.1.190 from 192.168.1.1
DHCPREQUEST for 192.168.1.190 on eth0 to 255.255.255.255 port 67
DHCPACK of 192.168.1.190 from 192.168.1.1
bound to 192.168.1.190 -- renewal in 33799 seconds.
done.
[....] Starting RPC port mapper daemon: rpcbind. ok 
[....] Starting NFS common utilities: statd idmapd. ok 
[....] Cleaning up temporary files.... ok 
INIT: Entering runlevel: 2
[info] Using makefile-style concurrent boot in runlevel 2.
[....] Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
2531 (syslogd)
. ok 
[....] Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
2558 (klogd)
. ok 
[....] Not starting NFS kernel daemon: no exports. ... (warning).
[....] Starting periodic command scheduler: cron. ok 
[....] Starting system message bus: dbus. ok 
[....] Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon. ok 
[....] Starting NTP server: ntpd. ok 
[....] Starting OpenBSD Secure Shell server: sshd. ok 
[....] Running local boot scripts (/etc/rc.local)Cannot read bad block mark: Invalid argument
<13>Aug 27 22:38:08 root[2767]: Cannot read u-boot env ethaddr
. ok 

Debian GNU/Linux 10 debian ttyS0

debian login:

Loging in on the console:
debian login: root
Password: 
Last login: Thu Sep  5 01:58:44 PDT 2019 from 192.168.0.100 on pts/0
Linux debian 4.20.6-mvebu-mirabox-tld-12 #6 SMP PREEMPT Wed Mar 13 14:43:16 PDT 2019 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
debian
192.168.1.190
NETGEAR ReadyNAS 102
Linux version 4.20.6-mvebu-mirabox-tld-12 (root@tldDebianVM) (gcc version 7.3.0 (Ubuntu/Linaro 7.3.0-27ubuntu1~18.04)) #6 SMP PREEM
PT Wed Mar 13 14:43:16 PDT 2019
Debian 10.0
Thu Aug 27 22:38:19 PDT 2020 up 0 minutes
root@debian:~# /root/set_persistent_mac_address
Cannot read bad block mark: Invalid argument
<13>Aug 27 22:50:20 root[2812]: Cannot read u-boot env ethaddr
root@debian:~# fw_printenv
Cannot read bad block mark: Invalid argument
root@debian:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00180000 00020000 "u-boot"
mtd1: 00020000 00020000 "u-boot-env"
mtd2: 00600000 00020000 "uImage"
mtd3: 00400000 00020000 "minirootfs"
mtd4: 07400000 00020000 "ubifs"
root@debian:~# ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.190  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::90bd:58ff:fe46:1f64  prefixlen 64  scopeid 0x20<link>
        ether 92:bd:58:46:1f:64  txqueuelen 1024  (Ethernet)
        RX packets 119  bytes 11783 (11.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 155  bytes 13919 (13.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 26  

root@debian:~#
There seems to be an issue with accessing the mtd block containing the u-boot environment variables? (The mac address is a random one.)

During boot, the LEDs behaved like this: Before hitting the power button there was no light. After hitting the power button, all LEDs were off, except the Power LED, which blinked at, say, 2 Hz, and the Activity and Sata1 LEDs, which were on (because a HDD was present in the first disk compartment). 3 seconds into the kernel boot, both the Power LED and the Backup LED went steady on, while the Sata1 LED went off and started showing disk activity. This remained so until reboot (or power off).

The device tree patch is clearly an enhancement. The Backup LED configuration was left untouched by the patch, but I assume you just overlooked modifying it consistently with the Power LED?

Did you consider initializing the Power LED with 'hearbeat', i.e. load dependent double blinking? Then the Power LED may have one signature during u-boot, another during Linux boot, and become steady on when the boot is finished (through an echo statement in /etc/rc.local.)

As mentioned, if there is no way to invert the behavior of the Activity LED driven by the sata controller, I prefer to turn the Power LED off in /etc/rc.local when the Activity led is on since one power indicator is enough:
if [ -d /sys/class/leds/rn102:blue:pwr ]; then

   # Switch the Power LED on, but off again if the Activity LED is on (one power indicator is enough)
   echo default-on > /sys/class/leds/rn102:blue:pwr/trigger
   if grep scsi1 /proc/scsi/scsi > /dev/null; then
      echo none > /sys/class/leds/rn102:blue:pwr/trigger
   fi
   if grep scsi2 /proc/scsi/scsi > /dev/null; then
      echo none > /sys/class/leds/rn102:blue:pwr/trigger
   fi
fi

One more little detail: You may want to exclude the lost+found directory in your next tarball.

Regards,
Trond Melen



Edited 3 time(s). Last edit at 08/30/2020 09:44AM by tme.
Attachments:
open | download - Screenshot from 2020-08-28 07-46-18.png (39.1 KB)
Re: Debian on Netgear RN102
August 28, 2020 05:37PM
Trond,

Quote

There seems to be an issue with accessing the mtd block containing the u-boot environment variables? (The mac address is a random one.)

Quote

root@debian:~# /root/set_persistent_mac_address
Cannot read bad block mark: Invalid argument
<13>Aug 27 22:50:20 root[2812]: Cannot read u-boot env ethaddr
root@debian:~# fw_printenv
Cannot read bad block mark: Invalid argument
root@debian:~# cat /proc/mtd

Looks like you have missed the /etc/fw_env.config new definition.

cat /etc/fw_env.config 
# MTD device name	Device offset	Env. size	   Flash sector size	Number of sectors
/dev/mtd1                0x00000          0x20000           0x20000


Quote

The device tree patch is clearly an enhancement. The Backup LED configuration was left untouched by the patch, but I assume you just overlooked modifying it consistently with the Power LED?

Yes, I ovelooked that! Will make another update.

Quote

Did you consider initializing the Power LED with 'hearbeat', i.e. load dependent double blinking? Then the Power LED may have one signature during u-boot, another during Linux boot, and become steady on when the boot is finished (through an echo statement in /etc/rc.local.)

In fact, all my boxes have a LED heartbeat during boot. After the kernel has started, it is solid, and then start flashing the heartbeat until Debian finish booting (end of /etc/rc.local). And then it becomes solid again.

However, I wanted the rootfs to be a really basic rootfs with none of my personal preferences. So I let users learn how to do control the LEDs to tailor their system. Hence there is only a simple example in /etc/rc.local.

Note: since init scripts are multi-threaded, controlling the system LED with heartbeat should be implemented as a script to make sure it is in sync with the system LED ON. And it should be start in /etc/default/rcS to make it reflect the true booting time of sysvinit (this is the earliest, and also the last init script).

Quote

As mentioned, if there is no way to invert the behavior of the Activity LED driven by the sata controller, I prefer to turn the Power LED off in /etc/rc.local when the Activity led is on since one power indicator is enough:

I've looked into a similar issue. To make the SATA LEDs stay ON and then flash during activity, I will need to patch the driver code. Device tree does not have a way to handle this correctly. But this will change the default behavior that we have used for so long, I will need to make sure this change can be reversed back to old behavior in userland if anybody want to keep it (SATA LEDs stay OFF until there is activity).

Quote

One more little detail: You may want to exclude the lost+found directory in your next tarball.

Good point!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
tme
Re: Debian on Netgear RN102
August 29, 2020 04:18AM
Hi bodhi,

Quote
bodhi
Looks like you have missed the /etc/fw_env.config new definition.

Thanks a lot! I trusted you would spot the issue at a glance. Now it works. I will edit my previous post to include the 'fw_env.config' update. There still is a run away CR <13> character, but I recon we can live with that:
cat /etc/fw_env.config 
# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors
/dev/mtd1               0x0000          0x80000         0x20000                 4

cp -a /etc/fw_env.config /etc/fw_env.config.orig
/bin/sh
cat <<EOF > /etc/fw_env.config
# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors
/dev/mtd1               0x00000         0x20000         0x20000
EOF
exit  

fw_printenv ethaddr
ethaddr=00:50:43:00:02:02
fw_printenv eth1addr
eth1addr=12:34:56:78:90:AB

/root/set_persistent_mac_address
[50839.659892] Setting Persistent MAC address to 00:50:43:00:02:02
<13>Aug 29 07:27:23 root[3211]: Setting Persistent MAC address to 00:50:43:00:02:02
Killed old client process
Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/32:19:5b:9d:b8:9e
Sending on   LPF/eth0/32:19:5b:9d:b8:9e
Sending on   Socket/fallback
DHCPRELEASE of 192.168.1.190 on eth0 to 192.168.1.1 port 67
[50841.006030] mvneta d0074000.ethernet eth0: Link is Down
Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

[50841.321248] mvneta d0074000.ethernet eth0: PHY [d0072004.mdio-mii:00] driver [Marvell 88E1318S]
[50841.329783] mvneta d0074000.ethernet eth0: configuring for phy/rgmii-id link mode
[50841.338300] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Listening on LPF/eth0/00:50:43:00:02:02
Sending on   LPF/eth0/00:50:43:00:02:02
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
[50844.464952] mvneta d0074000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[50844.472373] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10
DHCPOFFER of 192.168.1.190 from 192.168.1.1
DHCPREQUEST for 192.168.1.190 on eth0 to 255.255.255.255 port 67
DHCPACK of 192.168.1.190 from 192.168.1.1
bound to 192.168.1.190 -- renewal in 39511 seconds.

ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.190  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::250:43ff:fe00:202  prefixlen 64  scopeid 0x20<link>
        ether 00:50:43:00:02:02  txqueuelen 1024  (Ethernet)
        RX packets 3655  bytes 321602 (314.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3415  bytes 240752 (235.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 26  

fw_printenv Manufacturer
Manufacturer=NETGEAR
fw_printenv Product                                                                                                 
Product=ReadyNAS 102
The mac address 32:19:5b:9d:b8:9e is a random one while 00:50:43:00:02:02 was invented. The correct one is 12:34:56:78:90:AB stored in 'eth1addr' (and manipulated for this post). To keep the same mac address when upgrading from stock firmware to Debian, 'set_persistent_mac_address' should first poll 'eth1addr' for the mac address, and only if that fails poll 'ethaddr'. This behaviour may be made depending on 'Manufacturer' or 'Product' or both. (Btw, 'Number of sectors' is missing in the new 'fw_env.config', but maybe this is OK?).

Quote
bodhi
To make the SATA LEDs stay ON and then flash during activity, I will need to patch the driver code. Device tree does not have a way to handle this correctly.

Please don't bother. No light should indicate no activity. Besides, the Activity LED is brighter than the Sata1 and Sata2 LEDs, and almost outshines them. It is the Activity LED behavior that is broken. I believe it's driven by one of the 6 general purpose IO lines of the Marvell 88SE9170 sata controller, so in principle it should be possible to flip a bit or two in the controller's configuration. This controller may optionally have its own SPI eeprom, so maybe the configuration is stored there? Or maybe it is in a blob uploaded to the controller by the kernel when initializing it?

-----------------

Something else: I have successfully compiled the latest stable kernel, but I'm stuck with an 'armel'/'armhf' issue. The RN102 has a fpu so it is an 'armhf', but the kernel uses no fpu instructions, so it shouldn't really matter. U-boot, however, refuse to start my kernel:
Error: unrecognized/unsupported processor variant (0x561f5811).
I had already been warned:
dpkg -i linux-image-5.8.5-kirkwood-tld-1_5.8.5-kirkwood-tld-1-1_armel.deb
dpkg: error processing archive linux-image-5.8.5-kirkwood-tld-1_5.8.5-kirkwood-tld-1-1_armel.deb (--install):
 package architecture (armel) does not match system (armhf)
which I overruled with the option '--force-architecture '. The commands I used when building the kernel were:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j $(nproc) bindeb-pkg
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage

So 'gnueabihf' doen't do what I want. What am I missing? And, can I tailor the kernel for RN102's specific flavor of 'arm'?

Regards,
Trond Melen
Re: Debian on Netgear RN102
August 29, 2020 04:54PM
Trond,

Quote

The mac address 32:19:5b:9d:b8:9e is a random one while 00:50:43:00:02:02 was invented. The correct one is 12:34:56:78:90:AB stored in 'eth1addr' (and manipulated for this post). To keep the same mac address when upgrading from stock firmware to Debian, 'set_persistent_mac_address' should first poll 'eth1addr' for the mac address, and only if that fails poll 'ethaddr'. This behaviour may be made depending on 'Manufacturer' or 'Product' or both.

Since your box use eth1 (unlike most other boxes), then script set_persistent_mac_address should use ethaddr1 and eth1. And also your /etc/network/interfaces needs updated, too. It is default to eth0 in the rootfs (this was the reason for the dhcp to go back to eth0 in your log above).
auto lo eth0
iface lo inet loopback
iface eth0 inet dhcp

Quote

(Btw, 'Number of sectors' is missing in the new 'fw_env.config', but maybe this is OK?).

Yes, it is OK not to have "Number of sectors". We let the kernel figure that out from the bootargs.

Quote

Error: unrecognized/unsupported processor variant (0x561f5811).

U-boot does not care whether it is armhf or armel. So the error is something else. Most probably the kernel image was not built correctly

Quote

dpkg -i linux-image-5.8.5-kirkwood-tld-1_5.8.5-kirkwood-tld-1-1_armel.deb

The above was the error. Kirkwood kernel cannot be used on this box.

If you had used my config and patches from the release thread for Mirabox:
https://forum.doozan.com/read.php?2,92514

Then you could build an armel kernel or armhf kernel. Either one will work on armv7 (i.e. this box, Armada 370).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Netgear RN102
August 29, 2020 06:05PM
Trond,

Here is the update DTB.

1. Test the solution for avoiding random MAC:

Comment out your invocation of set_persistent_mac_address in /etc/rc.local. And reboot, see if the MAC address will be the correct persistent one without the workaround.

2. The Backup LED should behave like the Power LED.

Note that I have not given much thought about this, so you need to try the button with esekeyd to see how the LED should be manipulated. I might need to revise the DTS again for this button LED.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Attachments:
open | download - armada-370-netgear-rn102.dtb (14.4 KB)
open | download - armada-370-netgear-rn102.dts (5.2 KB)
tme
Re: Debian on Netgear RN102
August 30, 2020 11:54AM
Thanks bodhi,

I have edited my post above and added the missing modification of the 'fw_env.config' file.

Quote

Since your box use eth1 (unlike most other boxes), then script set_persistent_mac_address should use ethaddr1 and eth1. And also your /etc/network/interfaces needs updated, too. It is default to eth0 in the rootfs (this was the reason for the dhcp to go back to eth0 in your log above).

Good observation! The stock u-boot environment of my first RN102 included:
eth1addr=AA:AA:AA:AA:AA:AA
eth1mtu=1500
ethact=egiga1
ethaddr=BB:BB:BB:BB:BB:BB:BB
ethmtu=1500
ethprime=egiga1
The RN104 is very similar to the RN102, the main differences being:
  • 2 Gb Ethernet interfaces instead of 1 on RN102
  • 4 SATA bays (using a 88SE9215 SATA controller) instead of 2 on RN102
  • A front 16x2 characters Winstar WH1602G LCD
Currently, my hypothesis is: Probably the circuit design is very similar too, and internally maybe RN102 also has 2 Ethernet interfaces, although only one is equipped with a connector. This one is labeled 'egiga1', while 'egiga0' is unconnected.

RN104 has 2 Ethernet entries in its device tree file ('ethernet@70000' and 'ethernet@74000'), while RN102 only has the latter one (diff attached). The fact that it's the second entry that is shared supports the hypothesis. The fact that 'phy = <&phy1>;' for RN104 is 'phy = <&phy0>;' for RN102 weakens the hypothesis. If 'ethprime' is 'egiga0' on the RN104, that would support the hypothesis. What do you make of this?

I tried to check that my second (and less hacked) RN102 also gets its mac address from 'eth1addr', but I failed. Sorry! I connected the 3 leads of my USB-to-TTL adapter into the 4 pin header connector for the console on the rear panel, and powered up the box. No output in the console window, so I checked the connections and realized that I had swapped GND with RX or TX. Correcting the connections, I got serial console output, but no input. Hopefully, it was only the adapter that died from my carelessness. I will order a new one. For the time being, I cannot enter commands on the serial console.

I have no Linux boxes with two Ethernet connectors laying around, so I don't know what to expect in a 'interfaces' file for the RN104.

Quote

Kirkwood kernel cannot be used on this box.

Thanks! This should help me get further.

Preparing for the tests, I downloaded your dts files to /tmp and did:
sudo su -
cd /tmp 
md5sum *
73bc2df36a483d0a80170f2d3764045d  armada-370-netgear-rn102.dtb
1ac4b3b52a71ca50c6782cf0fc3f8643  armada-370-netgear-rn102.dts
da626ebfe1535f03f96fec005e43beef  armada-370-netgear-rn102.dts.orig
deb08f1be54abf1d04ab263d41552453  Debian-4.12.4-mvebu-tld-1-rootfs-bodhi.tar.bz2
8cf3d08dee09d000cf8b50b2df2f4047  linux-4.20.6-mvebu-mirabox-tld-12-bodhi.tar.bz2

diff -U 1 armada-370-netgear-rn102.dts.orig armada-370-netgear-rn102.dts
--- armada-370-netgear-rn102.dts.orig	2020-08-28 14:43:41.917848030 +0200
+++ armada-370-netgear-rn102.dts	2020-08-30 15:09:12.294897002 +0200
@@ -4,2 +4,5 @@
  *
+ * Copyright (C) 2020 bodhi <mibodhi@gmail.com>
+ *
+ * Based on
  * Copyright (C) 2013, Arnaud EBALARD <arno@natisbad.org>
@@ -17,2 +20,7 @@
 
+	aliases {
+		ethernet0 = &eth0;
+		ethernet1 = &eth1;
+	};
+
 	chosen {
@@ -105,3 +113,3 @@
 			gpios = <&gpio1 25 GPIO_ACTIVE_LOW>;
-			default-state = "keep";
+			linux,default-trigger = "default-on";
 		};
@@ -111,3 +119,3 @@
 			gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
-			default-state = "on";
+			linux,default-trigger = "ide-disk1";
 		};
@@ -117,3 +125,3 @@
 			gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
-			default-state = "on";
+			linux,default-trigger = "ide-disk2";
 		};
@@ -123,3 +131,3 @@
 			gpios = <&gpio1 24 GPIO_ACTIVE_LOW>;
-			default-state = "on";
+			linux,default-trigger = "default-on";
 		};
@@ -249,3 +257,2 @@
 				reg = <0x0000000 0x180000>;  /* 1.5MB */
-				read-only;
 			};

lsblk
mount /dev/sdc1 /mnt
cd /mnt
rm -rf *
tar -xjf /tmp/Debian-4.12.4-mvebu-tld-1-rootfs-bodhi.tar.bz2

cd etc
cp -a fw_env.config fw_env.config.orig
/bin/sh
cat <<EOF > fw_env.config
# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors
/dev/mtd1               0x00000         0x20000         0x20000
EOF
exit

mkdir usr/src/mirabox && cd ../usr/src/mirabox
tar xf /tmp/linux-4.20.6-mvebu-mirabox-tld-12-bodhi.tar.bz2
ls -alF
total 34204
drwxr-xr-x 2 root root     4096 aug.  30 15:13 ./
drwxr-xr-x 3 root root     4096 aug.  30 15:13 ../
-rw-r--r-- 1 root root   174254 mars  13  2019 config-4.20.6-mvebu-mirabox-tld-12
-rw-r--r-- 1 root root    67443 feb.   7  2019 linux-4.20.6-mvebu-tld-1.patch
-rw-r--r-- 1 root root   921600 mars  13  2019 linux-dtb-4.20.6-mvebu-mirabox-tld-12.tar
-rw-r--r-- 1 root root  9431996 mars  13  2019 linux-headers-4.20.6-mvebu-mirabox-tld-12_12.0_armhf.deb
-rw-r--r-- 1 root root 20292840 mars  13  2019 linux-image-4.20.6-mvebu-mirabox-tld-12_12.0_armhf.deb
-rwxr-xr-x 1 root root  4062176 mars  13  2019 zImage-4.20.6-mvebu-mirabox-tld-12*

cp -a zImage-4.20.6-mvebu-mirabox-tld-12 zImage.fdt
cat /tmp/armada-370-netgear-rn102.dtb >> zImage.fdt
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.20.6-mvebu-mirabox-tld-12 -d zImage.fdt uImage

cd ../../../boot/
cp -a uImage uImage.bak
cp -a ../usr/src/mirabox/uImage .
cd
sync && umount /mnt


1. Test the solution for avoiding random MAC.

Moved the USB-stick over to the RN102, attached power and hit the Power button. The complete boot log as well as the 'fw_printenv' output are attached. Logged in with 'ssh' and did:
cat /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

if [ -d /sys/class/leds/nsa326:white:sys ]; then
   echo default-on  > /sys/class/leds/nsa326:white:sys/trigger
   echo none        > /sys/class/leds/nsa326:red:sys/trigger
   echo ide-disk1  > /sys/class/leds/nsa326:white:sata1/trigger
   echo ide-disk2  > /sys/class/leds/nsa326:white:sata2/trigger
   echo usb-host > /sys/class/leds/nsa326:white:usb/trigger
fi

exit 0

fw_printenv | grep eth
bootargs_end=:10.4.50.254:255.255.255.0:KW40:eth0:none
eth1addr=12:34:56:78:90:AB
eth1mtu=1500
ethact=egiga1
ethaddr=00:50:43:00:02:02
ethmtu=1500
ethprime=egiga1
yuk_ethaddr=00:00:00:EE:51:81

ifconfig | grep eth
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether d2:c0:d8:ec:7d:1f  txqueuelen 1024  (Ethernet)

reboot
ifconfig | grep eth
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 2a:a7:7c:56:58:c2  txqueuelen 1024  (Ethernet)
reboot
ifconfig | grep eth
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 56:ca:86:d1:19:63  txqueuelen 1024  (Ethernet)
So the patch seems to have no effect and the mac address is still random.


2. The Backup LED should behave like the Power LED.

The Power LED behaves as before. About 3 seconds into kernel booting, it goes from blinking at, say, 2 Hz to steady on. The Backup LED now behaves as the Power LED. Very well!


Installed 'esekeyd', launched 'keytest', hit and released the power button, hit and released the backup button, hit and released the reset button and hit Cntr-C on the keyboard:
apt install -y esekeyd
keytest
keytest (ESE Key Deamon 1.2.7, SVN-r63)

(input device name as 1st option override autodetection)

Pres ANY (fun)key... or Ctrl-C to exit...

KEY_116 KEY_116 KEY_133 KEY_133 KEY_408 KEY_408 ^C

Caught signal 2, exiting...
So the outstanding task is to write an 'esekeyd' configuration file that executes 'shutdown -h now' when KEY_116 has been received twice, with, say, between 5 and 10 seconds between the two events and else do nothing. The tarball includes 3 simple examples, but none involves timing. Last entry in the change log is dated 2010-07-04. A tiny tutorial here. Maybe I'll be inspired to try implementing it some day.

Regards,
Trond Melen
Attachments:
open | download - bootlog.lst (27.4 KB)
open | download - fw_printenv.lst (2.7 KB)
open | download - diff.lst (5.8 KB)
Re: Debian on Netgear RN102
August 30, 2020 04:10PM
Hi again Bodhi and Trond,
My trip is over so i had some time with my box and tried your LED scripts and DTS files.LED behavior is fine for me except ACT led is constant on. Below is Tronds rc.local config:

if [ -d /sys/class/leds/rn102:blue:pwr ]; then

   # Switch all the LEDs on to bring driver's shadow variables in sync with the LEDs
   echo default-on > /sys/class/leds/rn102:blue:pwr/trigger
   echo default-on > /sys/class/leds/rn102:blue:sata1/trigger
   echo default-on > /sys/class/leds/rn102:blue:sata2/trigger
   echo default-on > /sys/class/leds/rn102:blue:backup/trigger

   # Switch the Power LED off if the Activity LED is on (one power indicator is enough)
   if grep scsi1 /proc/scsi/scsi > /dev/null; then
      echo none    > /sys/class/leds/rn102:blue:pwr/trigger
   fi
   if grep scsi2 /proc/scsi/scsi > /dev/null; then
      echo none    > /sys/class/leds/rn102:blue:pwr/trigger
   fi

   # Make Sata1 and Sata2 LEDs indicate disk activity
   echo ide-disk1  > /sys/class/leds/rn102:blue:sata1/trigger
   echo ide-disk2  > /sys/class/leds/rn102:blue:sata2/trigger

   # Switch the Backup LED off
   echo none       > /sys/class/leds/rn102:blue:backup/trigger
fi

Power and act leds are constantly on.I also agree to trond about one led is enough to determine if power is on.

Driver of g762 fan control chip seems not included in kernel i guess.In driver folder seems all below:

root@debian:~# ls /sys/bus/i2c/drivers/
.  ..  at24  dummy  pca953x  rtc-ds1307  rtc-pcf8563  rtc-s35390a  tcpci

Since i could not find driver for g762, fancontrol is not working.Do i have to compile kernel aganist it?
Will test mac stuff tomorrow.
Suggestions are welcome.
Re: Debian on Netgear RN102
August 30, 2020 04:32PM
Trond,

> Currently, my hypothesis is: Probably the circuit
> design is very similar too, and internally maybe
> RN102 also has 2 Ethernet interfaces, although
> only one is equipped with a connector. This one is
> labeled 'egiga1', while 'egiga0' is unconnected.

Correct. This is the normal behavior for some boxes. It could be either eth0 or eth1 port, depending on how the manufacturer implemented it.

>
> RN104 has 2 Ethernet entries in its device tree
> file ('ethernet@70000' and 'ethernet@74000'),
> while RN102 only has the latter one (diff
> attached). The fact that it's the second entry
> that is shared supports the hypothesis. The fact
> that 'phy = <&phy1>;' for RN104 is 'phy =
> <&phy0>;' for RN102 weakens the hypothesis. If
> 'ethprime' is 'egiga0' on the RN104, that would
> support the hypothesis. What do you make of this?

As I said above, these 2 interfaces are internally support by the SoC. So the logical connections are always there. The physical connection to each port is what make it live. Same thing for SATA ports.

> 1. Test the solution for avoiding random MAC.
> So the patch seems to have no effect and the mac
> address is still random.

Too bad! this solution worked for a majority of MVEBU boxes. But this box is one of those that need to be examined further. The NAS326 (Armada 380) has the same issue. But I have not got enough time to sit down and do a close reading of all relevant DTS files.

> when KEY_116 has been received twice, with, say,
> between 5 and 10 seconds between the two events
> and else do nothing.

OK. So looks like I will need to revisit esekeyd configuration someday. In the mean time, using key number is a good workaround. The correct usage with key names (POWER, RESET, COPY...) are standard Linux so it should work , we are seeing either esekeyd or some mis-configuration.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Netgear RN102
August 30, 2020 04:42PM
whitepawn,

With the latest DTB I've uploaded in previous post, there is no need to use echo in /etc/rc.local. But it does not hurt to set them explicitly like we always do.

> Driver of g762 fan control chip seems not included
> in kernel i guess.In driver folder seems all
> below:

Let me find out more.

Since I will build new kernel for this, you could wait a bit. I would like you and Trond install and test my kernel at least once (either before or after you build your own kernel if you want to do so).

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



Edited 1 time(s). Last edit at 08/30/2020 04:42PM by bodhi.
Re: Debian on Netgear RN102
August 30, 2020 05:09PM
Thanks bodhi.
One more issue:BTRFS seems not included in kernel.I have existing drives with BTRFS with 8TB data on it so i really wanted to use with it.

root@debian:~#  cat /proc/filesystems
nodev	sysfs
nodev	rootfs
nodev	ramfs
nodev	bdev
nodev	proc
nodev	cpuset
nodev	cgroup
nodev	cgroup2
nodev	tmpfs
nodev	devtmpfs
nodev	debugfs
nodev	tracefs
nodev	securityfs
nodev	sockfs
nodev	bpf
nodev	pipefs
nodev	rpc_pipefs
nodev	devpts
	ext3
	ext4
nodev	nfs
nodev	nfs4
nodev	nfsd
nodev	autofs
nodev	mqueue
root@debian:~# lsmod | grep btrfs
root@debian:~# modprobe btrfs
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.20.6-mvebu-mirabox-tld-12/modules.dep.bin'
modprobe: FATAL: Module btrfs not found in directory /lib/modules/4.20.6-mvebu-mirabox-tld-12

I will be patient and wait your kernel release to fancontrol:)
Can test your new kernel anytime.
tme
Re: Debian on Netgear RN102
September 01, 2020 02:06PM
Hi bodhi,

A minor suggestion for your '/etc/rc.local' script: If you use -x rather than -f when testing for '/root/set_persistent_mac_address', one may disable and exnable this script with 'chmod -x' and 'chmod -x'. Nifty?

EDIT: Fixed typo. Substituted -e with -x.

Regards,
Trond Melen



Edited 1 time(s). Last edit at 09/02/2020 02:33AM by tme.
tme
Re: Debian on Netgear RN102
September 01, 2020 02:27PM
Hi bodhi,

Being able to build my own kernel, and boot it, would make it much easier to assist you in supporting the RT102. I solved the 'armel/armhf' issue above, but failed to make my kernel run. After u-boot wispers "Starting kernel ...", nothing happens. The error message about unrecognized/unsupported processor variant is replaced by silence. Hardly a step forward. I'm comfortable with the configuration and build steps, the hard part is what to do with the results. Is there a thread on how you assemble your kernel tarballs? Or will you make one? Or should I start one, and let you fill in the gaps?

I'm eager to test any new root file systems or kernels, both for the RT102 and the NetgearStora.

Regards,
Trond Melen
Re: Debian on Netgear RN102
September 01, 2020 04:00PM
I'm going to release 2 new kernels sometime today. One for the general MVEBU boxes, and a special one for this RN102 and Mirabox.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Netgear RN102
September 02, 2020 06:46AM
Hi Bohdi,
I have just booted your fresh kernel 5.8.5 release.It boots fine.Thank you for your great efforts.Respect man.
Here is my instructions on existing 4.20 kernel:
cd /boot/
 ls
 wget https://www.dropbox.com/s/81g4f67bf2hurzj/linux-5.8.5-mvebu-370xp-tld-1-bodhi.tar.bz2
tar -xjf linux-5.8.5-mvebu-370xp-tld-1-bodhi.tar.bz2
tar -xf linux-dtb-5.8.5-mvebu-370xp-tld-1.tar
dpkg -i linux-image-5.8.5-mvebu-370xp-tld-1_1.0_armhf.deb
cp -a zImage-5.8.5-mvebu-370xp-tld-1 zImage.fdt
cat dts/armada-370-netgear-rn102.dtb >> zImage.fdt
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-5.8.5-mvebu-370xp-tld-1 -d zImage.fdt uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.8.5-mvebu-370xp-tld-1 -d initrd.img-5.8.5-mvebu-370xp-tld-1 uInitrd
sync
sync
sync
shutdown -r now


Here i am adding my bootlog for your check and reference:

BootROM 1.08
Booting from NAND flash


General initialization - Version: 1.0.0

High speed PHY - Version: 2.1.4 (COM-PHY-V20)
Update PEX Device ID 0x6710
High speed PHY - Ended Successfully
0000
DDR3 Training Sequence - Ver 5.7.1
DDR3 Training Sequence - Run without PBS.
DDR3 Training Sequence - Ended Successfully
BootROM: Image checksum verification PASSED

 __   __                      _ _
|  \/  | __ _ _ ____   _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| |  | | (_| | |   \ V /  __/ | |
|_|  |_|\__,_|_|    \_/ \___|_|_|
         _   _     ____              _
        | | | |   | __ )  ___   ___ | |_
        | | | |___|  _ \ / _ \ / _ \| __|
        | |_| |___| |_) | (_) | (_) | |_
         \___/    |____/ \___/ \___/ \__|
 ** LOADER **


U-Boot 2011.12-gec25d27-dirty (Oct 26 2015 - 16:53:05) Marvell version: v2011.12                                                                            2014_T2.0p1
06/23/2015 ReadyNAS-102 V2.0

Board: DB-88F6710-BP
SoC:   MV6710 A1
CPU:   Marvell PJ4B v7 UP (Rev 1) LE
       CPU    @ 1200 [MHz]
       L2     @ 600 [MHz]
       TClock @ 200 [MHz]
       DDR    @ 600 [MHz]
       DDR 16Bit Width, FastPath Memory Access
DRAM:  512 MiB

Map:   Code:            0x1feef000:0x1ff9ef34
       BSS:             0x1ffef0a0
       Stack:           0x1f9eeef8
       Heap:            0x1f9ef000:0x1feef000

NAND:  (ID 0xf12c)      128 MiB
MMC:   MRVL_MMC: 0
Bad block table found at page 65472, version 0x01
Bad block table found at page 65408, version 0x01

Initialize and scan all PCI interfaces
PEX unit.port(active IF[-first bus]):
------------------------------------------
PEX 0: Root Complex Interface, Detected Link X1, GEN 2.0
PEX 1: Root Complex Interface, Detected Link X1, GEN 2.0
FPU not initialized
USB 0: Host Mode
USB 1: Host Mode
Shutting down unused interfaces:
       GBE0
       SDIO
       AUDIO
       TDM
Modules/Interfaces Detected:
       RGMII1 Phy
       PEX0 (Lane 0)
       PEX1 (Lane 1)
       SATA0 (Lane 2)
       SATA1 (Lane 3)
Net:   , egiga1 [PRIME]
Power On!

FDT loaded successfully
Hit any key to stop autoboot:  0
(Re)start USB...
USB:   Active port:     0
Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 2 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found
Loading file "/boot/uImage" from usb device 0:1 ()
5418806 bytes read
Loading file "/boot/uInitrd" from usb device 0:1 ()
7926735 bytes read
## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   Linux-5.8.5-mvebu-370xp-tld-1
   Created:      2020-09-02  11:26:07 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5418742 Bytes = 5.2 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 03000000 ...
   Image Name:   initramfs-5.8.5-mvebu-370xp-tld-
   Created:      2020-09-02  11:27:17 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7926671 Bytes = 7.6 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000][    T0] Booting Linux on physical CPU 0x0
[    0.000000][    T0] Linux version 5.8.5-mvebu-370xp-tld-1 (root@tldDebianVM) (arm-linux-gnueab                                                          ihf-gcc (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0, GNU ld (GNU Binutils for Ubuntu) 2.30) #1.0 S                                                          MP PREEMPT Mon Aug 31 00:00:32 PDT 2020
[    0.000000][    T0] CPU: ARMv7 Processor [561f5811] revision 1 (ARMv7), cr=10c5387d
[    0.000000][    T0] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[    0.000000][    T0] OF: fdt: Machine model: NETGEAR ReadyNAS 102
[    0.000000][    T0] printk: bootconsole [earlycon0] enabled
[    0.000000][    T0] Memory policy: Data cache writeback
[    0.000000][    T0] Zone ranges:
[    0.000000][    T0]   Normal   [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000][    T0]   HighMem  empty
[    0.000000][    T0] Movable zone start for each node
[    0.000000][    T0] Early memory node ranges
[    0.000000][    T0]   node   0: [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000][    T0] Initmem setup node 0 [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000][    T0] CPU: All CPU(s) started in SVC mode.
[    0.000000][    T0] percpu: Embedded 20 pages/cpu s53068 r8192 d20660 u81920
[    0.000000][    T0] Built 1 zonelists, mobility grouping on.  Total pages: 130048
[    0.000000][    T0] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 m                                                          tdparts=pxa3xx_nand-0:0x180000@0(u-boot),0x20000@0x180000(u-boot-env),0x600000@0x200000(uImage),0                                                          x400000@0x800000(minirootfs),-(ubifs) earlyprintk=serial init=/bin/systemd mtdparts=pxa3xx_nand-0                                                          :0x180000@0(u-boot),0x20000@0x180000(u-boot-env),0x600000@0x200000(uImage),0x400000@0x800000(mini                                                          rootfs),-(ubifs) reason=normal bdtype=rn102
[    0.000000][    T0] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000][    T0] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000][    T0] mem auto-init: stack:off, heap alloc:on, heap free:off
[    0.000000][    T0] Memory: 495144K/524288K available (10240K kernel code, 1012K rwdata, 3072K                                                           rodata, 1024K init, 342K bss, 29144K reserved, 0K cma-reserved, 0K highmem)
[    0.000000][    T0] random: get_random_u32 called from ____cache_alloc+0x338/0x794 with crng_i                                                          nit=0
[    0.000000][    T0] rcu: Preemptible hierarchical RCU implementation.
[    0.000000][    T0] rcu:     RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
[    0.000000][    T0]  Trampoline variant of Tasks RCU enabled.
[    0.000000][    T0]  Rude variant of Tasks RCU enabled.
[    0.000000][    T0]  Tracing variant of Tasks RCU enabled.
[    0.000000][    T0] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000][    T0] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000][    T0] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000][    T0] L2C: DT/platform modifies aux control register: 0x12086300 -> 0x1a086302
[    0.000000][    T0] Aurora cache controller enabled, 4 ways, 256 kB
[    0.000000][    T0] Aurora: CACHE_ID 0x00000100, AUX_CTRL 0x1a086302
[    0.000000][    T0] Switching to timer-based delay loop, resolution 53ns
[    0.000006][    T0] sched_clock: 32 bits at 18MHz, resolution 53ns, wraps every 114537122277ns
[    0.007874][    T0] clocksource: armada_370_xp_clocksource: mask: 0xffffffff max_cycles: 0xfff                                                          fffff, max_idle_ns: 101938038664 ns
[    0.019298][    T0] Console: colour dummy device 80x30
[    0.024017][    T0] Calibrating delay loop (skipped), value calculated using timer frequency..                                                           37.49 BogoMIPS (lpj=187492)
[    0.034147][    T0] pid_max: default: 32768 minimum: 301
[    0.039212][    T0] LSM: Security Framework initializing
[    0.044161][    T0] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.051489][    T0] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.060290][    T0] CPU: Testing write buffer coherency: ok
[    0.065731][    T1] CPU0: thread -1, cpu 0, socket -1, mpidr 0
[    0.072068][    T1] Setting up static identity map for 0x100000 - 0x100060
[    0.078760][    T1] mvebu-soc-id: MVEBU SoC ID=0x6710, Rev=0x1
[    0.084193][    T1] mvebu-pmsu: Initializing Power Management Service Unit
[    0.090718][    T1] rcu: Hierarchical SRCU implementation.
[    0.098638][    T1] smp: Bringing up secondary CPUs ...
[    0.103421][    T1] smp: Brought up 1 node, 1 CPU
[    0.107716][    T1] SMP: Total of 1 processors activated (37.49 BogoMIPS).
[    0.114045][    T1] CPU: All CPU(s) started in SVC mode.
[    0.119586][    T1] devtmpfs: initialized
[    0.128196][    T1] VFP support v0.3: implementor 56 architecture 2 part 20 variant 9 rev 6
[    0.137116][    T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns                                                          : 19112604462750000 ns
[    0.146889][    T1] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
[    0.154100][    T1] xor: measuring software checksum speed
[    0.258574][    T1]    arm4regs  :  1103.200 MB/sec
[    0.358572][    T1]    8regs     :   671.200 MB/sec
[    0.458566][    T1]    32regs    :  1062.400 MB/sec
[    0.463020][    T1] xor: using function: arm4regs (1103.200 MB/sec)
[    0.468785][    T1] prandom: seed boundary self test passed
[    0.477388][    T1] prandom: 100 self tests passed
[    0.481801][    T1] pinctrl core: initialized pinctrl subsystem
[    0.488932][    T1] thermal_sys: Registered thermal governor 'step_wise'
[    0.489668][    T1] NET: Registered protocol family 16
[    0.502552][    T1] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.510443][    T1] audit: initializing netlink subsys (disabled)
[    0.516410][   T31] audit: type=2000 audit(0.490:1): state=initialized audit_enabled=0 res=1
[    0.526705][    T1] cpuidle: using governor ladder
[    0.532718][    T1] cpuidle: using governor menu
[    0.537231][    T1] hw-breakpoint: debug architecture 0x4 unsupported.
[    0.809710][    T1] raid6: int32x8  gen()   214 MB/s
[    0.978965][    T1] raid6: int32x8  xor()   135 MB/s
[    1.148650][    T1] raid6: int32x4  gen()   224 MB/s
[    1.318727][    T1] raid6: int32x4  xor()   151 MB/s
[    1.488583][    T1] raid6: int32x2  gen()   414 MB/s
[    1.658568][    T1] raid6: int32x2  xor()   217 MB/s
[    1.828601][    T1] raid6: int32x1  gen()   430 MB/s
[    1.998590][    T1] raid6: int32x1  xor()   201 MB/s
[    2.003121][    T1] raid6: using algorithm int32x1 gen() 430 MB/s
[    2.008694][    T1] raid6: .... xor() 201 MB/s, rmw enabled
[    2.013779][    T1] raid6: using intx1 recovery algorithm
[    2.020121][    T1] vgaarb: loaded
[    2.025088][    T1] SCSI subsystem initialized
[    2.030350][    T1] usbcore: registered new interface driver usbfs
[    2.036048][    T1] usbcore: registered new interface driver hub
[    2.043236][    T1] usbcore: registered new device driver usb
[    2.049946][    T1] mc: Linux media interface: v0.10
[    2.055379][    T1] videodev: Linux video capture interface: v2.00
[    2.061857][    T1] pps_core: LinuxPPS API ver. 1 registered
[    2.067026][    T1] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giom                                                          etti@linux.it>
[    2.076766][    T1] PTP clock support registered
[    2.084598][    T1] clocksource: Switched to clocksource armada_370_xp_clocksource
[    3.073802][    T1] VFS: Disk quotas dquot_6.6.0
[    3.078185][    T1] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    3.113338][    T1] NET: Registered protocol family 2
[    3.120897][    T1] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, li                                                          near)
[    3.129603][    T1] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    3.137650][    T1] TCP bind hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    3.144942][    T1] TCP: Hash tables configured (established 4096 bind 4096)
[    3.151947][    T1] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    3.158758][    T1] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    3.165989][    T1] NET: Registered protocol family 1
[    3.171371][    T1] RPC: Registered named UNIX socket transport module.
[    3.177510][    T1] RPC: Registered udp transport module.
[    3.182438][    T1] RPC: Registered tcp transport module.
[    3.187386][    T1] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    3.193904][    T1] PCI: CLS 0 bytes, default 64
[    3.198514][    T1] Trying to unpack rootfs image as initramfs...
[    3.736184][    T1] Freeing initrd memory: 7744K
[    3.740709][    T1] NetWinder Floating Point Emulator V0.97 (double precision)
[    3.747648][    T1] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters availab                                                          le
[    3.758570][    T1] Initialise system trusted keyrings
[    3.763311][    T1] Key type blacklist registered
[    3.769845][    T1] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[    3.776644][    T1] zbud: loaded
[    3.781248][    T1] NFS: Registering the id_resolver key type
[    3.786957][    T1] Key type id_resolver registered
[    3.791414][    T1] Key type id_legacy registered
[    3.795847][    T1] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    3.802608][    T1] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    3.809484][    T1] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    3.817763][    T1] orangefs_debugfs_init: called with debug mask: :none: :0:
[    3.824483][    T1] orangefs_init: module version upstream loaded
[    3.904228][    T1] async_tx: api initialized (async)
[    3.908935][    T1] Key type asymmetric registered
[    3.913310][    T1] Asymmetric key parser 'x509' registered
[    3.918657][    T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 243)
[    3.926341][    T1] io scheduler bfq registered
[    3.933365][    T1] armada-370-pinctrl d0018000.pin-ctrl: registered pinctrl driver
[    3.949931][    T1] mvebu-pcie soc:pcie@82000000: PCI host bridge to bus 0000:00
[    3.957288][    T1] pci_bus 0000:00: root bus resource [bus 00-ff]
[    3.962937][    T1] pci_bus 0000:00: root bus resource [mem 0xf8000000-0xffdfffff]
[    3.970275][    T1] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[    3.976948][    T1] pci 0000:00:01.0: [11ab:6710] type 01 class 0x060400
[    3.983100][    T1] pci 0000:00:01.0: reg 0x38: [mem 0x00000000-0x000007ff pref]
[    3.990536][    T1] pci 0000:00:02.0: [11ab:6710] type 01 class 0x060400
[    3.996931][    T1] pci 0000:00:02.0: reg 0x38: [mem 0x00000000-0x000007ff pref]
[    4.005391][    T1] PCI: bus0: Fast back to back transfers disabled
[    4.011129][    T1] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfigurin                                                          g
[    4.019179][    T1] pci 0000:00:02.0: bridge configuration invalid ([bus 00-00]), reconfigurin                                                          g
[    4.027564][    T1] pci 0000:01:00.0: [1b4b:9170] type 00 class 0x010601
[    4.033716][    T1] pci 0000:01:00.0: reg 0x10: [io  0xfffffff8-0xffffffff]
[    4.040283][    T1] pci 0000:01:00.0: reg 0x14: [io  0xfffffffc-0xffffffff]
[    4.046748][    T1] pci 0000:01:00.0: reg 0x18: [io  0xfffffff8-0xffffffff]
[    4.053113][    T1] pci 0000:01:00.0: reg 0x1c: [io  0xfffffffc-0xffffffff]
[    4.059561][    T1] pci 0000:01:00.0: reg 0x20: [io  0xfffffff0-0xffffffff]
[    4.065981][    T1] pci 0000:01:00.0: reg 0x24: [mem 0x40000000-0x400001ff]
[    4.072346][    T1] pci 0000:01:00.0: reg 0x30: [mem 0xd0000000-0xd000ffff pref]
[    4.079180][    T1] pci 0000:01:00.0: Enabling fixed DMA alias to 00.1
[    4.085250][    T1] pci 0000:01:00.0: PME# supported from D3hot
[    4.091108][    T1] pci 0000:00:01.0: ASPM: current common clock configuration is inconsistent                                                          , reconfiguring
[    4.125689][    T1] PCI: bus1: Fast back to back transfers disabled
[    4.131428][    T1] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    4.138520][    T1] pci 0000:02:00.0: [1b73:1009] type 00 class 0x0c0330
[    4.144853][    T1] pci 0000:02:00.0: reg 0x10: [mem 0x42000000-0x4200ffff 64bit]
[    4.151698][    T1] pci 0000:02:00.0: reg 0x18: [mem 0x42010000-0x42010fff 64bit]
[    4.158644][    T1] pci 0000:02:00.0: reg 0x20: [mem 0x42011000-0x42011fff 64bit]
[    4.165649][    T1] pci 0000:02:00.0: supports D1
[    4.169948][    T1] pci 0000:02:00.0: PME# supported from D0 D1 D3hot D3cold
[    4.176900][    T1] pci 0000:00:02.0: ASPM: current common clock configuration is inconsistent                                                          , reconfiguring
[    4.215680][    T1] PCI: bus2: Fast back to back transfers disabled
[    4.221419][    T1] pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 02
[    4.228243][    T1] pci 0000:00:01.0: BAR 14: assigned [mem 0xf8000000-0xf80fffff]
[    4.235218][    T1] pci 0000:00:02.0: BAR 14: assigned [mem 0xf8100000-0xf81fffff]
[    4.242131][    T1] pci 0000:00:01.0: BAR 13: assigned [io  0x10000-0x10fff]
[    4.248617][    T1] pci 0000:00:01.0: BAR 6: assigned [mem 0xf8200000-0xf82007ff pref]
[    4.255870][    T1] pci 0000:00:02.0: BAR 6: assigned [mem 0xf8300000-0xf83007ff pref]
[    4.263107][    T1] pci 0000:01:00.0: BAR 6: assigned [mem 0xf8000000-0xf800ffff pref]
[    4.270355][    T1] pci 0000:01:00.0: BAR 5: assigned [mem 0xf8010000-0xf80101ff]
[    4.277210][    T1] pci 0000:01:00.0: BAR 4: assigned [io  0x10000-0x1000f]
[    4.283569][    T1] pci 0000:01:00.0: BAR 0: assigned [io  0x10010-0x10017]
[    4.289947][    T1] pci 0000:01:00.0: BAR 2: assigned [io  0x10018-0x1001f]
[    4.296324][    T1] pci 0000:01:00.0: BAR 1: assigned [io  0x10020-0x10023]
[    4.302683][    T1] pci 0000:01:00.0: BAR 3: assigned [io  0x10024-0x10027]
[    4.309060][    T1] pci 0000:00:01.0: PCI bridge to [bus 01]
[    4.314229][    T1] pci 0000:00:01.0:   bridge window [io  0x10000-0x10fff]
[    4.320605][    T1] pci 0000:00:01.0:   bridge window [mem 0xf8000000-0xf80fffff]
[    4.327465][    T1] pci 0000:02:00.0: BAR 0: assigned [mem 0xf8100000-0xf810ffff 64bit]
[    4.334800][    T1] pci 0000:02:00.0: BAR 2: assigned [mem 0xf8110000-0xf8110fff 64bit]
[    4.342116][    T1] pci 0000:02:00.0: BAR 4: assigned [mem 0xf8111000-0xf8111fff 64bit]
[    4.349448][    T1] pci 0000:00:02.0: PCI bridge to [bus 02]
[    4.354636][    T1] pci 0000:00:02.0:   bridge window [mem 0xf8100000-0xf81fffff]
[    4.361592][    T1] pcieport 0000:00:01.0: enabling device (0140 -> 0143)
[    4.367941][    T1] pcieport 0000:00:02.0: enabling device (0140 -> 0142)
[    4.375438][    T1] mv_xor d0060800.xor: Marvell shared XOR driver
[    4.445980][    T1] mv_xor d0060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    4.456985][    T1] mv_xor d0060900.xor: Marvell shared XOR driver
[    4.526001][    T1] mv_xor d0060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    4.723049][    T1] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    4.735187][    T1] printk: console [ttyS0] disabled
[    4.760925][    T1] d0012000.serial: ttyS0 at MMIO 0xd0012000 (irq = 19, base_baud = 12500000)                                                           is a 16550A
[    4.770169][    T1] printk: console [ttyS0] enabled
[    4.770169][    T1] printk: console [ttyS0] enabled
[    4.779378][    T1] printk: bootconsole [earlycon0] disabled
[    4.779378][    T1] printk: bootconsole [earlycon0] disabled
[    4.792086][    T1] ahci 0000:01:00.0: enabling device (0146 -> 0147)
[    4.799181][    T1] ahci 0000:01:00.0: AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl SATA mo                                                          de
[    4.807423][    T1] ahci 0000:01:00.0: flags: 64bit ncq sntf led only pmp fbs pio slum part sx                                                          s
[    4.818859][    T1] scsi host0: ahci
[    4.823382][    T1] scsi host1: ahci
[    4.827555][    T1] ata1: SATA max UDMA/133 abar m512@0xf8010000 port 0xf8010100 irq 42
[    4.835374][    T1] ata2: SATA max UDMA/133 abar m512@0xf8010000 port 0xf8010180 irq 42
[    4.843794][    T1] sata_mv d00a0000.sata: slots 32 ports 1
[    4.852102][    T1] scsi host2: sata_mv
[    4.856416][    T1] ata3: SATA max UDMA/133 irq 27
[    4.862468][    T1] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xf1
[    4.870056][    T1] nand: Micron MT29F1G08ABADAWP
[    4.874400][    T1] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    4.882884][    T1] Bad block table found at page 65472, version 0x01
[    4.889501][    T1] Bad block table found at page 65408, version 0x01
[    4.895855][    T1] 5 cmdlinepart partitions found on MTD device pxa3xx_nand-0
[    4.902511][    T1] Creating 5 MTD partitions on "pxa3xx_nand-0":
[    4.908195][    T1] 0x000000000000-0x000000180000 : "u-boot"
[    4.915774][    T1] 0x000000180000-0x0000001a0000 : "u-boot-env"
[    4.923986][    T1] 0x000000200000-0x000000800000 : "uImage"
[    4.931989][    T1] 0x000000800000-0x000000c00000 : "minirootfs"
[    4.940389][    T1] 0x000000c00000-0x000008000000 : "ubifs"
[    4.950078][    T1] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[    4.959153][    T1] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. A                                                          ll Rights Reserved.
[    4.972426][    T1] libphy: Fixed MDIO Bus: probed
[    4.981895][    T1] libphy: orion_mdio_bus: probed
[    4.998688][    T1] mvneta d0074000.ethernet eth0: Using random mac address ae:1d:e3:ed:d7:7d
[    5.009628][    T1] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    5.016810][    T1] ehci-pci: EHCI PCI platform driver
[    5.021774][    T1] ehci-orion: EHCI orion driver
[    5.026992][    T1] orion-ehci d0050000.usb: EHCI Host Controller
[    5.032639][    T1] orion-ehci d0050000.usb: new USB bus registered, assigned bus number 1
[    5.040785][    T1] orion-ehci d0050000.usb: irq 25, io mem 0xd0050000
[    5.074644][    T1] orion-ehci d0050000.usb: USB 2.0 started, EHCI 1.00
[    5.081150][    T1] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice=                                                           5.08
[    5.089493][    T1] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    5.096856][    T1] usb usb1: Product: EHCI Host Controller
[    5.102046][    T1] usb usb1: Manufacturer: Linux 5.8.5-mvebu-370xp-tld-1 ehci_hcd
[    5.109086][    T1] usb usb1: SerialNumber: d0050000.usb
[    5.115126][    T1] hub 1-0:1.0: USB hub found
[    5.119594][    T1] hub 1-0:1.0: 1 port detected
[    5.125456][    T1] xhci_hcd 0000:02:00.0: xHCI Host Controller
[    5.131439][    T1] xhci_hcd 0000:02:00.0: new USB bus registered, assigned bus number 2
[    5.139859][    T1] xhci_hcd 0000:02:00.0: hcc params 0x200073a1 hci version 0x100 quirks 0x00                                                          00000000080010
[    5.150110][    T1] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice=                                                           5.08
[    5.158509][    T1] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    5.165901][    T1] usb usb2: Product: xHCI Host Controller
[    5.171093][    T1] usb usb2: Manufacturer: Linux 5.8.5-mvebu-370xp-tld-1 xhci-hcd
[    5.178159][ T1197] ata2: SATA link down (SStatus 0 SControl 300)
[    5.183816][    T1] usb usb2: SerialNumber: 0000:02:00.0
[    5.188892][ T1209] ata3: SATA link down (SStatus 0 SControl F300)
[    5.195594][    T1] hub 2-0:1.0: USB hub found
[    5.200108][    T1] hub 2-0:1.0: 2 ports detected
[    5.205580][    T1] xhci_hcd 0000:02:00.0: xHCI Host Controller
[    5.211413][    T1] xhci_hcd 0000:02:00.0: new USB bus registered, assigned bus number 3
[    5.219033][    T1] xhci_hcd 0000:02:00.0: Host supports USB 3.0 SuperSpeed
[    5.225790][    T1] usb usb3: We don't know the algorithms for LPM for this host, disabling LP                                                          M.
[    5.234079][    T1] usb usb3: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice=                                                           5.08
[    5.242413][    T1] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    5.249764][    T1] usb usb3: Product: xHCI Host Controller
[    5.254946][    T1] usb usb3: Manufacturer: Linux 5.8.5-mvebu-370xp-tld-1 xhci-hcd
[    5.261921][    T1] usb usb3: SerialNumber: 0000:02:00.0
[    5.267761][    T1] hub 3-0:1.0: USB hub found
[    5.272135][    T1] hub 3-0:1.0: 2 ports detected
[    5.278282][    T1] usbcore: registered new interface driver usblp
[    5.284998][    T1] usbcore: registered new interface driver usb-storage
[    5.291982][    T1] mousedev: PS/2 mouse device common for all mice
[    5.299787][    T1] i2c /dev entries driver
[    5.308533][    T1] rtc-ds1307 0-0068: 'wakeup-source' is set, request for an IRQ is disabled!
[    5.321922][    T1] rtc-ds1307 0-0068: registered as rtc0
[    5.328535][    T1] rtc-ds1307 0-0068: setting system clock to 2020-09-02T11:29:35 UTC (159904                                                          6175)
[    5.365422][ T1193] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[    5.372629][    T1] orion_wdt: Initial timeout 229 sec
[    5.379185][    T1] device-mapper: uevent: version 1.0.3
[    5.384156][ T1193] ata1.00: ATA-7: ST940210AS, 3.ALC, max UDMA/100
[    5.391281][    T1] device-mapper: ioctl: 4.42.0-ioctl (2020-02-27) initialised: dm-devel@redhat.com
[    5.399829][ T1193] ata1.00: 78140160 sectors, multi 0: LBA48 NCQ (depth 32)
[    5.407189][    T1] device-mapper: multipath round-robin: version 1.2.0 loaded
[    5.413933][    T1] device-mapper: multipath queue-length: version 0.2.0 loaded
[    5.420919][    T1] device-mapper: multipath service-time: version 0.3.0 loaded
[    5.427761][ T1193] ata1.00: configured for UDMA/100
[    5.432494][    T1] device-mapper: dm-log-userspace: version 1.3.0 loaded
[    5.438852][    T1] device-mapper: raid: Loading target version 1.15.1
[    5.445441][  T187] scsi 0:0:0:0: Direct-Access     ATA      ST940210AS       C    PQ: 0 ANSI: 5
[    5.460907][ T1213] sd 0:0:0:0: [sda] 78140160 512-byte logical blocks: (40.0 GB/37.3 GiB)
[    5.470859][ T1213] sd 0:0:0:0: [sda] Write Protect is off
[    5.477082][ T1213] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    5.486177][   T20] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    5.493669][    T1] marvell-cesa d0090000.crypto: CESA device successfully registered
[    5.501773][    T1] hid: raw HID events driver (C) Jiri Kosina
[    5.510405][    T1] usbcore: registered new interface driver usbhid
[    5.516727][    T1] usbhid: USB HID core driver
[    5.521631][    T1] drop_monitor: Initializing network drop monitor service
[    5.529044][    T1] NET: Registered protocol family 10
[    5.535381][    T1] Segment Routing with IPv6
[    5.539406][    T1] RPL Segment Routing with IPv6
[    5.543814][    T1] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    5.552458][    T1] NET: Registered protocol family 17
[    5.558215][    T1] 8021q: 802.1Q VLAN Support v1.8
[    5.562800][    T1] Key type dns_resolver registered
[    5.567795][    T1] ThumbEE CPU extension supported.
[    5.572382][    T1] Registering SWP/SWPB emulation handler
[    5.578150][    T1] registered taskstats version 1
[    5.582575][    T1] Loading compiled-in X.509 certificates
[    5.588115][    T1] zswap: loaded using pool lzo/zbud
[    5.593232][    T1] Key type ._fscrypt registered
[    5.597713][    T1] Key type .fscrypt registered
[    5.601970][    T1] Key type fscrypt-provisioning registered
[    5.610235][    T1] Key type big_key registered
[    5.624042][    T1] Key type encrypted registered
[    5.633042][    T1] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[    5.675323][ T1213]  sda: sda1
[    5.682095][ T1213] sd 0:0:0:0: [sda] Attached SCSI removable disk
[    5.690883][    T1] Freeing unused kernel memory: 1024K
[    5.698635][   T20] usb 1-1: New USB device found, idVendor=0781, idProduct=5583, bcdDevice= 1.00
[    5.707171][   T20] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    5.714462][   T20] usb 1-1: Product: Ultra Fit
[    5.720768][    T1] Checked W+X mappings: passed, no W+X pages found
[    5.726814][   T20] usb 1-1: Manufacturer: SanDisk
[    5.731268][   T20] usb 1-1: SerialNumber: MASKED
[    5.736825][    T1] Run /init as init process
[    5.746821][   T20] usb-storage 1-1:1.0: USB Mass Storage device detected
[    5.765556][   T20] scsi host3: usb-storage 1-1:1.0
Loading, please wait...
starting version 232
[    5.983433][ T1480] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    6.006166][ T1480] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    6.013608][ T1480] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    6.826412][ T1213] scsi 3:0:0:0: Direct-Access     SanDisk  Ultra Fit        1.00 PQ: 0 ANSI: 6
[    6.855813][ T1404] sd 3:0:0:0: [sdb] 30031872 512-byte logical blocks: (15.4 GB/14.3 GiB)
[    6.878245][ T1404] sd 3:0:0:0: [sdb] Write Protect is off
[    6.885181][ T1404] sd 3:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[    6.949621][ T1404]  sdb: sdb1
[    6.962710][ T1404] sd 3:0:0:0: [sdb] Attached SCSI removable disk
[    7.069288][    C0] random: fast init done
[    7.691527][ T1490] usbcore: registered new interface driver uas
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
[   21.356837][ T1505] process '/bin/fstype' started with executable stack
Begin: Will now check root file system ... fsck from util-linux 2.29.2
[/sbin/fsck.ext3 (1) -- /dev/sdb1] fsck.ext3 -a -C0 /dev/sdb1
rootfs: clean, 24787/938400 files, 380772/3752704 blocks
done.
[   21.640212][ T1515] EXT4-fs (sdb1): mounting ext3 file system using the ext4 subsystem
[   21.690577][ T1515] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
[   22.698541][    T1] systemd[1]: systemd 232 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSV                                   INIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
[   22.735695][    T1] systemd[1]: Detected architecture arm.

Welcome to Debian GNU/Linux 9 (stretch)!

[   22.787421][    T1] systemd[1]: Set hostname to <debian>.
[   23.736897][    T1] systemd[1]: rsyslog.service: Cannot add dependency job, ignoring: Unit rsyslog.service is masked.
[   23.755409][    T1] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Started Dispatch Password Requests to Console Directory Watch.
[   23.796107][    T1] systemd[1]: Listening on Journal Audit Socket.
[  OK  ] Listening on Journal Audit Socket.
[   23.837241][    T1] systemd[1]: Created slice User and Session Slice.
[  OK  ] Created slice User and Session Slice.
[   23.875586][    T1] systemd[1]: Listening on fsck to fsckd communication Socket.
[  OK  ] Listening on fsck to fsckd communication Socket.
[   23.917001][    T1] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[  OK  ] Set up automount Arbitrary Executab…rmats File System Automount Point.
[   23.955760][    T1] systemd[1]: Listening on udev Control Socket.
[  OK  ] Listening on udev Control Socket.
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
[  OK  ] Listening on Journal Socket.
[  OK  ] Listening on RPCbind Server Activation Socket.
[  OK  ] Created slice System Slice.
         Mounting NFSD configuration filesystem...
         Starting Load Kernel Modules...
         Mounting POSIX Message Queue File System...
[  OK  ] Reached target Slices.
         Mounting Debug File System...
[  OK  ] Listening on Journal Socket (/dev/log).
[  OK  ] Started Forward Password Requests to Wall Directory Watch.
[  OK  ] Reached target Encrypted Volumes.
         Starting Create list of required st…ce nodes for the current kernel...
[  OK  ] Reached target Paths.
[  OK  ] Created slice system-getty.slice.
         Starting Remount Root and Kernel File Systems...
[  OK  ] Listening on udev Kernel Socket.
         Starting Journal Service...
[  OK  ] Reached target Swap.
[   24.624140][ T1549] EXT4-fs (sdb1): re-mounted. Opts: errors=remount-ro
         Mounting RPC Pipe File System...
[  OK  ] Created slice system-serial\x2dgetty.slice.
[  OK  ] Mounted NFSD configuration filesystem.
[  OK  ] Mounted Debug File System.
[  OK  ] Mounted POSIX Message Queue File System.
[  OK  ] Mounted RPC Pipe File System.
[  OK  ] Started Load Kernel Modules.
[  OK  ] Started Create list of required sta…vice nodes for the current kernel.
[  OK  ] Started Remount Root and Kernel File Systems.
         Starting udev Coldplug all Devices...
         Starting Load/Save Random Seed...
         Starting Create Static Device Nodes in /dev...
         Starting Apply Kernel Variables...
         Starting pNFS block layout mapping daemon...
[  OK  ] Started Load/Save Random Seed.
[  OK  ] Started Apply Kernel Variables.
[  OK  ] Started pNFS block layout mapping daemon.
[  OK  ] Started Create Static Device Nodes in /dev.
         Starting udev Kernel Device Manager...
[  OK  ] Reached target Local File Systems (Pre).
         Mounting /tmp...
[  OK  ] Mounted /tmp.
[  OK  ] Reached target Local File Systems.
         Starting Raise network interfaces...
         Starting Preprocess NFS configuration...
[  OK  ] Started udev Kernel Device Manager.
[  OK  ] Started Journal Service.
         Starting Flush Journal to Persistent Storage...
[  OK  ] Started Preprocess NFS configuration.
[   26.429350][    C0] random: crng init done
[   26.433154][    C0] random: 7 urandom warning(s) missed due to ratelimiting
         Starting NFSv4 ID-name mapping service...
[  OK  ] Reached target NFS client services.
[  OK  ] Started NFSv4 ID-name mapping service.
[   26.671355][ T1550] systemd-journald[1550]: Received request to flush runtime journal from PID 1
[  OK  ] Started Flush Journal to Persistent Storage.
         Starting Create Volatile Files and Directories...
[  OK  ] Started Create Volatile Files and Directories.
[  OK  ] Reached target System Time Synchronized.
         Starting RPC bind portmap service...
         Starting Update UTMP about System Boot/Shutdown...
[  OK  ] Started RPC bind portmap service.
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[  OK  ] Reached target RPC Port Mapper.
[  OK  ] Started udev Coldplug all Devices.
[  OK  ] Reached target System Initialization.
[  OK  ] Started Daily apt download activities.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
         Starting Avahi mDNS/DNS-SD Stack...
[  OK  ] Started Regular background program processing daemon.
[  OK  ] Started Daily apt upgrade and clean activities.
[  OK  ] Reached target Timers.
[  OK  ] Started D-Bus System Message Bus.
[  OK  ] Started Avahi mDNS/DNS-SD Stack.
         Starting Login Service...
[  OK  ] Found device /dev/ttyS0.
[  OK  ] Started Login Service.
[   30.331842][ T1601] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   30.368301][ T1601] sd 3:0:0:0: Attached scsi generic sg1 type 0
[  *** ] A start job is running for Raise network interfaces (12s / 5min 12s)[   37.030901][ T1669] mvneta d0074000.ethe                                   rnet eth0: PHY [d0072004.mdio-mii:00] driver [Marvell 88E1318S] (irq=POLL)
[   37.040932][ T1669] mvneta d0074000.ethernet eth0: configuring for phy/rgmii-id link mode
[    **] A start job is running for Raise network interfaces (14s / 5min 12s)[   39.145686][ T1379] mvneta d0074000.ethe                                   rnet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[   39.153914][ T1379] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[  OK  ] Started Raise network interfaces.
[  OK  ] Reached target Network.
         Starting OpenBSD Secure Shell server...
[  OK  ] Reached target Network is Online.
         Starting NFS Mount Daemon...
         Starting /etc/rc.local Compatibility...
[  OK  ] Started /etc/rc.local Compatibility.
[  OK  ] Started NFS Mount Daemon.
         Starting NFS server and services...
[  OK  ] Started OpenBSD Secure Shell server.
[   49.289828][ T1768] NFSD: Using UMH upcall client tracking operations.
[   49.296084][ T1768] NFSD: starting 90-second grace period (net f0000021)
[  OK  ] Started NFS server and services.
[  OK  ] Reached target Remote File Systems (Pre).
[  OK  ] Reached target Remote File Systems.
         Starting Permit User Sessions...
         Starting LSB: Start NTP daemon...
         Starting LSB: Starts syslogd...
[  OK  ] Started Permit User Sessions.
[  OK  ] Started Serial Getty on ttyS0.
[  OK  ] Started Getty on tty1.
[  OK  ] Reached target Login Prompts.
[  OK  ] Started LSB: Starts syslogd.
         Starting LSB: Starts klogd...
[  OK  ] Started LSB: Starts klogd.
[   54.778738][ T1790] fbcon: Taking over console

Debian GNU/Linux 9 debian ttyS0

debian login: root
Password:
Last login: Wed Sep  2 04:16:44 PDT 2020 from 192.168.2.158 on pts/0
Linux debian 5.8.5-mvebu-370xp-tld-1 #1.0 SMP PREEMPT Mon Aug 31 00:00:32 PDT 2020 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
debian
192.168.2.174
NETGEAR ReadyNAS 102
Linux version 5.8.5-mvebu-370xp-tld-1 (root@tldDebianVM) (arm-linux-gnueabihf-gcc (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7                                   .5.0, GNU ld (GNU Binutils for Ubuntu) 2.30) #1.0 SMP PREEMPT Mon Aug 31 00:00:32 PDT 2020
Debian 9.13
Wed Sep 2 04:31:36 PDT 2020 up 1 minute
root@debian:~# uname -a
Linux debian 5.8.5-mvebu-370xp-tld-1 #1.0 SMP PREEMPT Mon Aug 31 00:00:32 PDT 2020 armv7l GNU/Linux



Edited 1 time(s). Last edit at 09/02/2020 07:21AM by whitepawn.
tme
Re: Debian on Netgear RN102
September 02, 2020 03:02PM
Hi bodhi,

I have tried to installed your Debian 5.2.9 root file system and your Linux 5.8.5 kernel from scratch on my Netgear ReadyNAS RT102. I did not succeed, but thank you very much for your efforts!

For reference, this is what I did on my PC:
sudo su -
cd /tmp
md5sum *
ffe6bb6a1d591b06be1f3a55273bc236  armada-370-netgear-rn102.dtb
ffa864878dd797241c0bea05d563239a  Debian-5.2.9-mvebu-tld-1-rootfs-bodhi.tar.bz2
8cf3d08dee09d000cf8b50b2df2f4047  linux-4.20.6-mvebu-mirabox-tld-12-bodhi.tar.bz2
17c3e1784dea18b2a3587a6ebb7aa894  linux-5.8.5-mvebu-370xp-tld-1-bodhi.tar.bz2
systemctl stop udisks2.service
lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sdb           8:16   1   3,8G  0 disk 
└─sdb1        8:17   1   3,8G  0 part 

mount /dev/sdb1 /mnt
rm -rf /mnt/*
cd /mnt
tar -xjf /tmp/Debian-5.2.9-mvebu-tld-1-rootfs-bodhi.tar.bz2
cp -a  etc/fw_env.config etc/fw_env.config.orig
/bin/sh
cat <<EOF > etc/fw_env.config
# MTD device name     Device offset   Env. size       Flash sector size       Number of sectors
/dev/mtd1             0x00000         0x20000         0x20000
EOF
exit

cp -a etc/rc.local etc/rc.local.orig
nano etc/rc.local
diff -U 1 etc/rc.local.orig etc/rc.local
--- etc/rc.local.orig	2019-09-05 10:35:02.000000000 +0200
+++ etc/rc.local	2020-09-02 18:43:13.398733026 +0200
@@ -14,3 +14,3 @@
 # Work around to set persistent MAC address in Armada boxes
-if [ -f /root/set_persistent_mac_address ]; then
+if [ -x /root/set_persistent_mac_address ]; then
 	/root/set_persistent_mac_address
@@ -36,2 +36,14 @@
 fi
+
+if [ -d /sys/class/leds/rn102:blue:pwr ]; then
+
+   # Switch the Power LED on, but off again if the Activity LED is on (one power indicator is enough)
+   echo default-on > /sys/class/leds/rn102:blue:pwr/trigger
+   if grep scsi0 /proc/scsi/scsi > /dev/null; then
+      echo none > /sys/class/leds/rn102:blue:pwr/trigger
+   fi
+   if grep scsi1 /proc/scsi/scsi > /dev/null; then
+      echo none > /sys/class/leds/rn102:blue:pwr/trigger
+   fi
+fi
 

mkdir -p usr/local/src/rn102
cd usr/local/src/rn102
tar xf /tmp/linux-5.8.5-mvebu-370xp-tld-1-bodhi.tar.bz2
tar xf linux-dtb-5.8.5-mvebu-370xp-tld-1.tar
cp -a zImage-5.8.5-mvebu-370xp-tld-1 zImage.fdt
cat dts/armada-370-mirabox.dtb >> zImage.fdt
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-5.8.5-mvebu-370xp-tld-1 -d zImage.fdt uImage
cp -a ../../../../boot/uImage ../../../../boot/uImage.bak              # failed with no such file
cp -a uImage ../../../../boot/
sync
cd
umount /mnt
exit

So what I did was steps 1 and 2 of the procedure here, then
  • mofified 'fw_env.config' for the RN102
  • modifed 'rc.local' to test if 'set_persistent_mac_address' is executable so it may disabled by 'chmod -x'
  • modifed 'rc.local' to turn the Power LED off when the Activity LED is on (including fixing sata2 -> sata0)
  • build and installed uImage from linux-5.8.5-mvebu-370xp-tld-1-bodhi.tar.bz2
Plugged the USB-stick into RN102's front connector, attached power and hit the power button. Since my u-boot environment had already been modified, I should not need a USB-to-TTL adapter (it died) to interrupt u-boot on the serial console. Well. This kernel does not boot. After 54 seconds the box shuts down completely. Apparently, u-boot times out waiting for something that never happen.

So I had to revert to Linux kernel 4.20.6. Plugged the USB stick into the PC, became 'root', mounted it and did:
cd /mnt
mkdir -p usr/local/src/mirabox
cd usr/local/src/mirabox
tar xf /tmp/linux-4.20.6-mvebu-mirabox-tld-12-bodhi.tar.bz2 
tar xf linux-dtb-4.20.6-mvebu-mirabox-tld-12.tar 
cp -a zImage-4.20.6-mvebu-mirabox-tld-12 zImage.fdt
cat dts/armada-370-mirabox.dtb >> zImage.fdt
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-2.20.6-mvebu-mirabox-tld-12 -d zImage.fdt uImage
cp -a ../../../../boot/uImage ../../../../boot/uImage.bak
cp -a uImage ../../../../boot/
sync
cd
umount /mnt
exit

Plugged the USB-stick into RN102's front connector again, attached power and hit the power button. The Power LED blinked at 2 Hz for about 53 seconds. Then all the five LEDs became steady on, except the Sata LEDs which started indicating disk activity. Success! Logged in with 'ssh root@debian.local' and to comlete the installation of Linux kernel 5.8.5 from within the box like whitepawn above:
root@debian.local's password: 
Linux debian 4.20.6-mvebu-mirabox-tld-12 #6 SMP PREEMPT Wed Mar 13 14:43:16 PDT 2019 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Sep  5 01:58:44 2019 from 192.168.0.100
debian
192.168.1.142
NETGEAR ReadyNAS 102
Linux version 4.20.6-mvebu-mirabox-tld-12 (root@tldDebianVM) (gcc version 7.3.0 (Ubuntu/Linaro 7.3.0-27ubuntu1~18.04)) #6 SMP PREEMPT Wed Mar 13 14:43:16 PDT 2019
Debian 10.0
Wed Sep 2 11:14:28 PDT 2020 up 2 minutes

cd /boot
tar xjf /tmp/linux-5.8.5-mvebu-370xp-tld-1-bodhi.tar.bz2
tar xf linux-dtb-5.8.5-mvebu-370xp-tld-1.tar
dpkg -i linux-image-5.8.5-mvebu-370xp-tld-1_1.0_armhf.deb
cp -a zImage-5.8.5-mvebu-370xp-tld-1 zImage.fdt
cat dts/armada-370-netgear-rn102.dtb >> zImage.fdt
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-5.8.5-mvebu-370xp-tld-1 -d zImage.fdt uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.8.5-mvebu-370xp-tld-1 -d initrd.img-5.8.5-mvebu-370xp-tld-1 uInitrd
sync
shutdown -h now

EDIT: The comand 'cp -a zImage-5.8.5-mvebu-370xp-tld-1 zImage.fdt' in the code frame above was missing and has been added. This caused the boot failure below. Skip to my next post for a successful boot! :TIDE

Waited for the box to shut down, and hit the power button. The Power LED started blinking at 2 Hz and never stopped. So no success this way neither. Sorry, no serial console today. Should have done 'fw_printenv' before shutting down, but didn't. Sorry, but I believe the u-boot output in this post is still valid. If I haven't missed something, my working u-boot environment for Linux 4.20.6 does not work for 5.8.5.

If you have any suggestions, I will try them out, else I will have to wait for a new USB-to-TTL adapter. Anyhow, thank you very much for your effort!

Regards,
Trond Melen



Edited 1 time(s). Last edit at 09/03/2020 01:09AM by tme.
Re: Debian on Netgear RN102
September 02, 2020 04:33PM
whitepawn,

> I have just booted your fresh kernel 5.8.5
> release.

Looks perfect!

Both BTRFS and Fan control are configured as loadable module in this kernel. You might try to load them manually with modprobe to see if they work well.

Then later add them to /etc/initramfs-tools/modules (or systemd target equivalence) so that they are loaded automatically during boot.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Netgear RN102
September 02, 2020 04:42PM
Trond,

Quote

Waited for the box to shut down, and hit the power button. The Power LED started blinking at 2 Hz and never stopped.

This means the kernel was never loaded during u-boot booting.

Quote

Sorry, no serial console today. Should have done 'fw_printenv' before shutting down, but didn't. Sorry, but I believe the u-boot output in this post is still valid.

So chance is that either the kernel files on the rootfs, or the u-boot envs for booting are not good.

If I see anything strange in your post above, I'll post back. Otherwise, I think serial console is a must have to see what's going on.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Netgear RN102
September 02, 2020 04:51PM
Trond,


cd /boot
tar xjf /tmp/linux-5.8.5-mvebu-370xp-tld-1-bodhi.tar.bz2
tar xf linux-dtb-5.8.5-mvebu-370xp-tld-1.tar
dpkg -i linux-image-5.8.5-mvebu-370xp-tld-1_1.0_armhf.deb

You've missed a step here:

Need to copy zImage-5.8.5-mvebu-370xp-tld-1 to zImage.fdt


cat dts/armada-370-netgear-rn102.dtb >> zImage.fdt
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-5.8.5-mvebu-370xp-tld-1 -d zImage.fdt uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.8.5-mvebu-370xp-tld-1 -d initrd.img-5.8.5-mvebu-370xp-tld-1 uInitrd
sync
shutdown -h now

So mount your rootfs on a different Linux box, log in as root and remake uImage.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Netgear RN102
September 03, 2020 04:44AM
bodhi Wrote:
-------------------------------------------------------
> whitepawn,
>
> > I have just booted your fresh kernel 5.8.5
> > release.
>
> Looks perfect!
>
> Both BTRFS and Fan control are configured as
> loadable module in this kernel. You might try to
> load them manually with modprobe to see if they
> work well.
>
> Then later add them to
> /etc/initramfs-tools/modules (or systemd target
> equivalence) so that they are loaded automatically
> during boot.

Hi Bodhi,

BTRFS works fine now.It automaticly recognises BTRFS formatted drives now without extra effort.

root@debian:~# cat /proc/filesystems 
nodev	sysfs
nodev	tmpfs
nodev	bdev
nodev	proc
nodev	cgroup
nodev	cgroup2
nodev	cpuset
nodev	devtmpfs
nodev	debugfs
nodev	tracefs
nodev	securityfs
nodev	sockfs
nodev	bpf
nodev	pipefs
nodev	ramfs
nodev	rpc_pipefs
nodev	devpts
	ext3
	ext4
	vfat
	msdos
	exfat
	iso9660
nodev	nfs
nodev	nfs4
nodev	nfsd
nodev	jffs2
nodev	autofs
nodev	overlay
nodev	pvfs2
	udf
	f2fs
nodev	mqueue
nodev	ubifs
	btrfs

root@debian:~# lsmod
Module                  Size  Used by
btrfs                1138688  0
blake2b_generic        36864  0
sg                     32768  0
g762                   16384  0
uio_pdrv_genirq        16384  0
uio                    20480  1 uio_pdrv_genirq
ip_tables              20480  0
x_tables               24576  1 ip_tables
uas                    20480  0




Fancontrol also works with your i2c g762 driver which included in kernel.These modules for g762 and BTRFS are loaded automaticly.
apt install fancontrol
pwmconfig 
systemctl enable fancontrol
Here is my fancontrol config in /etc/fancontrol for reference:

root@debian:~# cat /etc/fancontrol 
# Configuration file generated by pwmconfig, changes will be lost
INTERVAL=10
DEVPATH=hwmon0=devices/virtual/thermal/thermal_zone0 hwmon1=devices/platform/soc/soc:internal-regs/d0011000.i2c/i2c-0/0-003e
DEVNAME=hwmon0=d0018300.thermal hwmon1=g762
FCTEMPS=hwmon1/pwm1=hwmon0/temp1_input
FCFANS= hwmon1/pwm1=hwmon1/fan1_input
MINTEMP=hwmon1/pwm1=42
MAXTEMP=hwmon1/pwm1=65
MINSTART=hwmon1/pwm1=100
MINSTOP=hwmon1/pwm1=90
MINPWM=hwmon1/pwm1=90
MAXPWM=hwmon1/pwm1=255



I have also stripped my mac and serial number on mtd backups and shared in my post for whom may have bricked device.Serial number filled with 1234567891011 and macs 11:22:33:44:55:66 in u-bootenvs.Mac address are not included in mtd0 u-boot i believe, mtd0 is untouched.Could you please check bodhi?
Warning:Please use u-boot and u-boot envs at your own risk.
md5sums for mtd backups are:

01d70962932cd5c0ebabc233b4d1bb08  mtd0stockuboot

df174cee4210a809fb14b88b72e11dc6  mtd1ubootenvsstripped

I believe i have a stange problem with either usb flash disk or kernel driver.When i load system with stress program or updating packages with apt kernel complains about usb reset and i/o errors.Sometimes also freezes.Partial log is here:

[   55.409274][ T1864] mvneta d0074000.ethernet eth0: PHY [d0072004.mdio-mii:00]                                                                   driver [Marvell 88E1318S] (irq=POLL)
[   55.419314][ T1864] mvneta d0074000.ethernet eth0: configuring for phy/rgmii-                                                                  id link mode
[   57.545419][    T5] mvneta d0074000.ethernet eth0: Link is Up - 100Mbps/Full                                                                   - flow control rx/tx
[   57.553648][    T5] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   63.524689][ T1445] usb 1-1: reset high-speed USB device number 2 using orion                                                                  -ehci
[***   ] A start job is running for Raise network interfaces (37s / 5min 28s)
[   63.727264][    C0] sd 3:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_ERROR                                                                   driverbyte=DRIVER_OK cmd_age=0s
[   63.736521][    C0] sd 3:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 6c 8d f0 0                                                                  0 00 10 00
[   63.743966][    C0] blk_update_request: I/O error, dev sdc, sector 7114224 op                                                                  [     *] A start job is running for Raise ne…rk interfaces (1min 8s / 5min 28s)
[   94.114847][ T1445] usb 1-1: reset high-speed USB device number 2 using orion                                                                  -ehci
[   94.317048][    T7] sd 3:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_TIME_                                                                  OUT driverbyte=DRIVER_OK cmd_age=30s
[   94.326669][    T7] sd 3:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 6c ab 20 0                                                                  0 00 e0 00
[   94.334123][    T7] blk_update_request: I/O error, dev sdc, sector 7121696 op                                                                  [***   ] A start job is running for Raise ne…k interfaces (1min 38s / 5min 28s)
[  124.834835][ T1445] usb 1-1: reset high-speed USB device number 2 using orion                                                                  [  *** ] A start job is running for Raise ne…rk interfaces (2min 9s / 5min 28s)
[  155.554666][ T1445] usb 1-1: reset high-speed USB device number 2 using orion                                                                  -ehci
[  155.757235][    T7] sd 3:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_TIME_                                                                  OUT driverbyte=DRIVER_OK cmd_age=30s
[  155.766854][    T7] sd 3:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 6c b2 c8 0                                                                  0 00 20 00
[  155.774306][    T7] blk_update_request: I/O error, dev sdc, sector 7123656 op                                                                  [   ***] A start job is running for Raise ne…k interfaces (2min 40s / 5min 28s)
[  186.274834][ T1445] usb 1-1: reset high-speed USB device number 2 using orion                                                                  [***   ] A start job is running for Raise ne…k interfaces (3min 39s / 5min 28s)
[*[ T1594] mvneta d0074000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[**    ] A start job is running for Raise ne…k interfaces (4min 48s / 5min 28s)



[  366.584868][  T398] INFO: task scsi_eh_3:1443 blocked for more than 122 seconds.
[  366.591706][  T398]       Not tainted 5.8.5-mvebu-370xp-tld-1 #1.0
[  366.598796][  T398] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  366.607516][  T398] scsi_eh_3       D    0  1443      2 0x00000000
[  366.613266][  T398] [<c0ab810c>] (__schedule) from [<c0ab82a0>] (schedule+0xc0/0x120)
[  366.621887][  T398] [<c0ab82a0>] (schedule) from [<c0ab8680>] (schedule_preempt_disabled+0x14/0x20)
[  366.631114][  T398] [<c0ab8680>] (schedule_preempt_disabled) from [<c0ab9700>] (__mutex_lock.constprop.8+0x170/0x2e0)
[  366.641718][  T398] [<c0ab9700>] (__mutex_lock.constprop.8) from [<c07c99e8>] (device_reset+0x1c/0x48)
[  366.651182][  T398] [<c07c99e8>] (device_reset) from [<c06d51a4>] (scsi_try_bus_device_reset+0x24/0x48)
[  366.660680][  T398] [<c06d51a4>] (scsi_try_bus_device_reset) from [<c06d67e8>] (scsi_eh_ready_devs+0x378/0x990)
[  366.670856][  T398] [<c06d67e8>] (scsi_eh_ready_devs) from [<c06d7d24>] (scsi_error_handler+0x298/0x56c)
[  366.680426][  T398] [<c06d7d24>] (scsi_error_handler) from [<c014704c>] (kthread+0x13c/0x148)
[  366.689153][  T398] [<c014704c>] (kthread) from [<c0100148>] (ret_from_fork+0x14/0x2c)
[  366.697298][  T398] Exception stack(0xdda67fb0 to 0xdda67ff8)
[  366.702616][  T398] 7fa0:                                     00000000 00000000 00000000 00000000
[  366.712151][  T398] 7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  366.721135][  T398] 7fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[  366.728787][  T398] INFO: task usb-storage:1445 blocked for more than 123 seconds.
[  366.736657][  T398]       Not tainted 5.8.5-mvebu-370xp-tld-1 #1.0
[  366.742370][  T398] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  366.751797][  T398] usb-storage     D    0  1445      2 0x00000000
[  366.758389][  T398] [<c0ab810c>] (__schedule) from [<c0ab82a0>] (schedule+0xc0/0x120)
[  366.766489][  T398] [<c0ab82a0>] (schedule) from [<c0aba530>] (schedule_timeout+0x24/0xe8)
[  366.774136][  T398] [<c0aba530>] (schedule_timeout) from [<c0ab8c34>] (do_wait_for_common+0xac/0x12c)
[  366.784023][  T398] [<c0ab8c34>] (do_wait_for_common) from [<c0ab8d1c>] (wait_for_common+0x30/0x48)
[  366.793194][  T398] [<c0ab8d1c>] (wait_for_common) from [<c079104c>] (usb_sg_wait+0x70/0x170)
[  366.801931][  T398] [<c079104c>] (usb_sg_wait) from [<c07ca3c0>] (usb_stor_bulk_transfer_sglist.part.2+0x80/0xc4)
[  366.812228][  T398] [<c07ca3c0>] (usb_stor_bulk_transfer_sglist.part.2) from [<c07ca664>] (usb_stor_bulk_srb+0x44/0x74)
[  366.823046][  T398] [<c07ca664>] (usb_stor_bulk_srb) from [<c07ca9e4>] (usb_stor_Bulk_transport+0x13c/0x350)
[  366.832943][  T398] [<c07ca9e4>] (usb_stor_Bulk_transport) from [<c07cadb4>] (usb_stor_invoke_transport+0x2c/0x438)
[  366.843457][  T398] [<c07cadb4>] (usb_stor_invoke_transport) from [<c07cbc7c>] (usb_stor_control_thread+0x1d8/0x224)
[  366.854171][  T398] [<c07cbc7c>] (usb_stor_control_thread) from [<c014704c>] (kthread+0x13c/0x148)
[  366.863354][  T398] [<c014704c>] (kthread) from [<c0100148>] (ret_from_fork+0x14/0x2c)
[  366.871443][  T398] Exception stack(0xdd423fb0 to 0xdd423ff8)
[  366.877588][  T398] 3fa0:                                     00000000 00000000 00000000 00000000
[  366.886574][  T398] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  366.895593][  T398] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[  366.902447][  T398] INFO: task kworker/u2:5:1452 blocked for more than 123 seconds.
[  366.910897][  T398]       Not tainted 5.8.5-mvebu-370xp-tld-1 #1.0
[  366.917466][  T398] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  366.926157][  T398] kworker/u2:5    D    0  1452      2 0x00000000
[  366.931905][  T398] Workqueue: writeback wb_workfn (flush-8:32)
[  366.938769][  T398] [<c0ab810c>] (__schedule) from [<c0ab82a0>] (schedule+0xc0/0x120)
[  366.946857][  T398] [<c0ab82a0>] (schedule) from [<c0ab8740>] (io_schedule+0x14/0x24)
[  366.954106][  T398] [<c0ab8740>] (io_schedule) from [<c056d270>] (blk_mq_get_tag+0x168/0x270)
[  366.963294][  T398] [<c056d270>] (blk_mq_get_tag) from [<c0569a34>] (__blk_mq_alloc_request+0xec/0x134)
[  366.972834][  T398] [<c0569a34>] (__blk_mq_alloc_request) from [<c056ab44>] (blk_mq_make_request+0xd0/0x4c8)
[  366.982715][  T398] [<c056ab44>] (blk_mq_make_request) from [<c0560790>] (generic_make_request+0xe8/0x1d8)
[  366.992487][  T398] [<c0560790>] (generic_make_request) from [<c05608bc>] (submit_bio+0x3c/0x1a4)
[  367.001484][  T398] [<c05608bc>] (submit_bio) from [<c02cc984>] (submit_bh_wbc.constprop.24+0x188/0x198)
[  367.011157][  T398] [<c02cc984>] (submit_bh_wbc.constprop.24) from [<c02ced10>] (__block_write_full_page+0x288/0x3a4)
[  367.021763][  T398] [<c02ced10>] (__block_write_full_page) from [<c02cef2c>] (block_write_full_page+0x50/0xac)
[  367.031846][  T398] [<c02cef2c>] (block_write_full_page) from [<c02418b8>] (__writepage+0x14/0x58)
[  367.040940][  T398] [<c02418b8>] (__writepage) from [<c0243434>] (write_cache_pages+0x2d4/0x384)
[  367.049927][  T398] [<c0243434>] (write_cache_pages) from [<c0243530>] (generic_writepages+0x4c/0x80)
[  367.059253][  T398] [<c0243530>] (generic_writepages) from [<c0243d34>] (do_writepages+0x34/0x68)
[  367.068375][  T398] [<c0243d34>] (do_writepages) from [<c02c2988>] (__writeback_single_inode+0xe4/0x4c4)
[  367.077948][  T398] [<c02c2988>] (__writeback_single_inode) from [<c02c32e4>] (writeback_sb_inodes+0x258/0x43c)
[  367.088129][  T398] [<c02c32e4>] (writeback_sb_inodes) from [<c02c352c>] (__writeback_inodes_wb+0x64/0xa0)
[  367.097912][  T398] [<c02c352c>] (__writeback_inodes_wb) from [<c02c37c0>] (wb_writeback+0x258/0x394)
[  367.107295][  T398] [<c02c37c0>] (wb_writeback) from [<c02c43d8>] (wb_workfn+0x180/0x3e4)
[  367.115789][  T398] [<c02c43d8>] (wb_workfn) from [<c0141dbc>] (process_one_work+0x210/0x358)
[  367.123674][  T398] [<c0141dbc>] (process_one_work) from [<c01426d4>] (worker_thread+0x228/0x2cc)
[  367.133303][  T398] [<c01426d4>] (worker_thread) from [<c014704c>] (kthread+0x13c/0x148)
[  367.141587][  T398] [<c014704c>] (kthread) from [<c0100148>] (ret_from_fork+0x14/0x2c)
[  367.149728][  T398] Exception stack(0xdd449fb0 to 0xdd449ff8)
[  367.155844][  T398] 9fa0:                                     00000000 00000000 00000000 00000000
[  367.164041][  T398] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  367.173631][  T398] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[  367.181263][  T398] INFO: task host:1897 blocked for more than 123 seconds.
[  367.188566][  T398]       Not tainted 5.8.5-mvebu-370xp-tld-1 #1.0
[  367.194280][  T398] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  367.203518][  T398] host            D    0  1897      1 0x00000001
[  367.210093][  T398] [<c0ab810c>] (__schedule) from [<c0ab82a0>] (schedule+0xc0/0x120)
[  367.218136][  T398] [<c0ab82a0>] (schedule) from [<c0ab8740>] (io_schedule+0x14/0x24)
[  367.226299][  T398] [<c0ab8740>] (io_schedule) from [<c056d270>] (blk_mq_get_tag+0x168/0x270)
[  367.234185][  T398] [<c056d270>] (blk_mq_get_tag) from [<c0569a34>] (__blk_mq_alloc_request+0xec/0x134)
[  367.244181][  T398] [<c0569a34>] (__blk_mq_alloc_request) from [<c056ab44>] (blk_mq_make_request+0xd0/0x4c8)
[  367.254166][  T398] [<c056ab44>] (blk_mq_make_request) from [<c0560790>] (generic_make_request+0xe8/0x1d8)
[  367.263908][  T398] [<c0560790>] (generic_make_request) from [<c05608bc>] (submit_bio+0x3c/0x1a4)
[  367.272957][  T398] [<c05608bc>] (submit_bio) from [<c035a5a0>] (ext4_mpage_readpages+0xd0/0x738)
[  367.281965][  T398] [<c035a5a0>] (ext4_mpage_readpages) from [<c02445c4>] (read_pages+0x50/0x130)
[  367.291017][  T398] [<c02445c4>] (read_pages) from [<c0244770>] (page_cache_readahead_unbounded+0xcc/0x1c4)
[  367.300825][  T398] [<c0244770>] (page_cache_readahead_unbounded) from [<c023d32c>] (filemap_fault+0x10c/0x414)
[  367.311003][  T398] [<c023d32c>] (filemap_fault) from [<c0345d30>] (ext4_filemap_fault+0x28/0x3c)
[  367.320020][  T398] [<c0345d30>] (ext4_filemap_fault) from [<c0265bdc>] (__do_fault+0x54/0x7c)
[  367.333446][  T398] [<c0265bdc>] (__do_fault) from [<c0269664>] (handle_mm_fault+0x538/0x938)
[  367.342660][  T398] [<c0269664>] (handle_mm_fault) from [<c01199c0>] (do_page_fault+0x18c/0x314)
[  367.351687][  T398] [<c01199c0>] (do_page_fault) from [<c0119ca4>] (do_DataAbort+0x38/0xb8)
[  367.360193][  T398] [<c0119ca4>] (do_DataAbort) from [<c01015dc>] (__dabt_usr+0x3c/0x40)
[  367.368488][  T398] Exception stack(0xdd6f9fb0 to 0xdd6f9ff8)
[  367.373807][  T398] 9fa0:                                     001f8133 bebd2a6c b617afe0 b617ca28
[  367.383417][  T398] 9fc0: b6f2a378 b617ca28 b617ca28 fca7219a b617e7e8 b4641e56 b4630260 00000000
[  367.392424][  T398] 9fe0: 0000010c bebd2a08 b6f140a5 b6f140ec 200d0030 ffffffff
[  367.400006][  T398] INFO: task systemd-udevd:1923 blocked for more than 123 seconds.
[  367.408069][  T398]       Not tainted 5.8.5-mvebu-370xp-tld-1 #1.0
[  367.413783][  T398] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  367.423034][  T398] systemd-udevd   D    0  1923   1569 0x00000001
[  367.429601][  T398] [<c0ab810c>] (__schedule) from [<c0ab82a0>] (schedule+0xc0/0x120)
[  367.437653][  T398] [<c0ab82a0>] (schedule) from [<c0ab8740>] (io_schedule+0x14/0x24)
[  367.445790][  T398] [<c0ab8740>] (io_schedule) from [<c056d270>] (blk_mq_get_tag+0x168/0x270)
[  367.453677][  T398] [<c056d270>] (blk_mq_get_tag) from [<c0569a34>] (__blk_mq_alloc_request+0xec/0x134)
[  367.463643][  T398] [<c0569a34>] (__blk_mq_alloc_request) from [<c0569ad8>] (blk_mq_alloc_request+0x5c/0xac)
[  367.473721][  T398] [<c0569ad8>] (blk_mq_alloc_request) from [<c055e960>] (blk_get_request+0x80/0xb0)
[  367.483242][  T398] [<c055e960>] (blk_get_request) from [<c06d8370>] (__scsi_execute+0x38/0x178)
[  367.492296][  T398] [<c06d8370>] (__scsi_execute) from [<c06d99ec>] (scsi_test_unit_ready+0x64/0xe8)
[  367.501518][  T398] [<c06d99ec>] (scsi_test_unit_ready) from [<c06e4134>] (sd_check_events+0xd0/0x124)
[  367.510952][  T398] [<c06e4134>] (sd_check_events) from [<c05713d0>] (disk_check_events+0x4c/0x14c)
[  367.520099][  T398] [<c05713d0>] (disk_check_events) from [<c0572b04>] (disk_clear_events+0xa4/0x124)
[  367.529519][  T398] [<c0572b04>] (disk_clear_events) from [<c02d100c>] (check_disk_change+0x18/0x48)
[  367.538750][  T398] [<c02d100c>] (check_disk_change) from [<c06e3aa0>] (sd_open+0x84/0x158)
[  367.547308][  T398] [<c06e3aa0>] (sd_open) from [<c02d2a38>] (__blkdev_get+0x3cc/0x448)
[  367.555504][  T398] [<c02d2a38>] (__blkdev_get) from [<c02d2b10>] (blkdev_get+0x5c/0x134)
[  367.563075][  T398] [<c02d2b10>] (blkdev_get) from [<c0295e30>] (do_dentry_open+0x2f0/0x34c)
[  367.572218][  T398] [<c0295e30>] (do_dentry_open) from [<c02a7cf0>] (path_openat+0x65c/0xa78)
[  367.581031][  T398] [<c02a7cf0>] (path_openat) from [<c02a8148>] (do_filp_open+0x3c/0x9c)
[  367.589491][  T398] [<c02a8148>] (do_filp_open) from [<c0296d8c>] (do_sys_openat2+0x6c/0xd4)
[  367.598087][  T398] [<c0296d8c>] (do_sys_openat2) from [<c0296ed4>] (do_sys_open+0x3c/0x5c)
[  367.606709][  T398] [<c0296ed4>] (do_sys_open) from [<c0100060>] (ret_fast_syscall+0x0/0x54)
[  367.614504][  T398] Exception stack(0xde3affa8 to 0xde3afff0)
[  367.621083][  T398] ffa0:                   b6f2f000 b6f5b968 ffffff9c 0052ac70 000a8800 00000000
[  367.630099][  T398] ffc0: b6f2f000 b6f5b968 00000000 00000142 0050b918 00505e28 00503b58 00000004
[  367.639050][  T398] ffe0: 00000142 be9de748 b6ec725d b6e50746





root@debian:~# [ 3475.974770][ T1445] usb 1-1: reset high-speed USB device number 2 using orion-ehci
[ 3532.514735][ T1445] usb 1-1: reset high-speed USB device number 2 using orion-ehci

I get these errors on serial cable.Is new ehci driver failing?Since it freezes i cannot get full log.Any recommendations are welcome.
By the way could you please share kernel soruce code with us to compile ourselves bodhi if possible?
Attachments:
open | download - Changed_Parts.jpg (179.4 KB)
open | download - ubootrn102envs.tar.gz (404.6 KB)
tme
Re: Debian on Netgear RN102
September 03, 2020 04:53AM
Hi bodhi,

Spot on. Success! Thank you very much! Pasting commands both on the terminal and to my test report is clearly too much for my intellectual capacity. I have edited my latest post above and added the missing step to the last code frame.

Plugged the USB-stick into RN102's front connector again and hit the power button. Logged in with 'ssh root@debian.local' when boot completed:

root@debian.local's password: 
Linux debian 5.8.5-mvebu-370xp-tld-1 #1.0 SMP PREEMPT Mon Aug 31 00:00:32 PDT 2020 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Sep  2 11:14:27 2020 from 192.168.1.128
debian
192.168.1.142
NETGEAR ReadyNAS 102
Linux version 5.8.5-mvebu-370xp-tld-1 (root@tldDebianVM) (arm-linux-gnueabihf-gcc (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0, GNU ld (GNU Binutils for Ubuntu) 2.30) #1.0 SMP PREEMPT Mon Aug 31 00:00:32 PDT 2020
Debian 10.0
Wed Sep 2 22:00:37 PDT 2020 up 1 minute

uname -a
Linux debian 5.8.5-mvebu-370xp-tld-1 #1.0 SMP PREEMPT Mon Aug 31 00:00:32 PDT 2020 armv7l GNU/Linux

cat /proc/version
Linux version 5.8.5-mvebu-370xp-tld-1 (root@tldDebianVM) (arm-linux-gnueabihf-gcc (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0, GNU ld (GNU Binutils for Ubuntu) 2.30) #1.0 SMP PREEMPT Mon Aug 31 00:00:32 PDT 2020

cat /etc/fw_env.config
# MTD device name     Device offset   Env. size       Flash sector size       Number of sectors
/dev/mtd1             0x00000         0x20000         0x20000

cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00180000 00020000 "u-boot"
mtd1: 00020000 00020000 "u-boot-env"
mtd2: 00600000 00020000 "uImage"
mtd3: 00400000 00020000 "minirootfs"
mtd4: 07400000 00020000 "ubifs"

dmesg > dmesg.lst
fw_printenv > fw_printenv.lst
fconfig | grep eth
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 00:50:43:00:02:02  txqueuelen 1024  (Ethernet)

fw_printenv | grep eth
bootargs_end=:10.4.50.254:255.255.255.0:KW40:eth0:none
eth1addr=12:34:56:78:90:AB
eth1mtu=1500
ethact=egiga1
ethaddr=00:50:43:00:02:02
ethmtu=1500
ethprime=egiga1
yuk_ethaddr=00:00:00:EE:51:81

cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath] [faulty] 
unused devices: <none>

ls -lF /sys/bus/i2c/drivers/ | grep g762
drwxr-xr-x  2 root root 0 Sep  2 22:09 g762/

ls -lF /boot
total 157052
drwxr-xr-x  3 root root      4096 Sep  2 11:19 ./
drwxrwxrwx 21 root root      4096 Jan 20  2017 ../
-rw-------  1 root root   3266081 Aug 19  2019 System.map-5.2.9-mvebu-tld-1
-rw-r--r--  1 root root   4232673 Aug 31 00:00 System.map-5.8.5-mvebu-370xp-tld-1
-rw-r--r--  1 root root    183639 Aug 19  2019 config-5.2.9-mvebu-tld-1
-rw-r--r--  1 root root    197818 Aug 31 00:00 config-5.8.5-mvebu-370xp-tld-1
drwxr-xr-x  2 root root      4096 Aug 24 01:28 dts/
-rw-r--r--  1 root root   9488554 Aug 26  2019 initrd.img-5.2.9-mvebu-tld-1
-rw-r--r--  1 root root   9504707 Sep  2 11:19 initrd.img-5.8.5-mvebu-370xp-tld-1
-rw-r--r--  1 root root  38423398 Sep  2 11:16 linux-5.8.5-mvebu-370xp-tld-1-bodhi.tar.bz2
-rw-r--r--  1 root root     75684 Aug 30 16:05 linux-5.8.5-mvebu-370xp-tld-1.patch
-rw-r--r--  1 root root   1003520 Aug 30 15:23 linux-dtb-5.8.5-mvebu-370xp-tld-1.tar
-rw-r--r--  1 root root   9676808 Aug 19  2019 linux-headers-5.2.9-mvebu-tld-1_1.0_armhf.deb
-rw-r--r--  1 root root   7573820 Aug 31 01:09 linux-headers-5.8.5-mvebu-370xp-tld-1_1.0_armhf.deb
-rw-r--r--  1 root root  25132700 Aug 31 01:09 linux-image-5.8.5-mvebu-370xp-tld-1_1.0_armhf.deb
-rw-r--r--  1 root staff  5418806 Sep  2 22:11 uImage
-rw-r--r--  1 root staff  5417257 Sep  2 10:58 uImage.bak
-rw-r--r--  1 root root   9504771 Sep  2 22:11 uInitrd
-rw-------  1 root root   5057632 Aug 19  2019 vmlinuz-5.2.9-mvebu-tld-1
-rwxr-xr-x  1 root root   5404000 Aug 31 00:00 vmlinuz-5.8.5-mvebu-370xp-tld-1*
-rwxr-xr-x  1 root root   5057632 Aug 19  2019 zImage*
-rwxr-xr-x  1 root root   5057632 Aug 19  2019 zImage-5.2.9-mvebu-tld-1*
-rwxr-xr-x  1 root root   5404000 Aug 31 01:03 zImage-5.8.5-mvebu-370xp-tld-1*
-rwxr-xr-x  1 root root   5418742 Sep  2 22:10 zImage.fdt*
A few comments:
  • The fw_env.config is wrong for RT102 (but correct for Mirabox, I assume).
  • The Ethernet port comes up as 'eth0' with mac address from 'ethaddr', while stock RN102 probably uses 'eth1' and 'eth1addr' (to be confirmed)
  • Compiled in kernel support for RAID and g762 has been added.
  • Orderly shut down through a long push on the power button is missing.
  • Automatic restart after a power loss from real time clock alarm is missing.
  • It remains to be figured out how to do the complete install while the USB stick is still in the PC.
  • Stock u-boot v2011.12 is old and somewhat outdated.
The LEDs behave like this: After hitting the power button, the Power LED blinks at 2 Hz. If there is are any disks in the disk compartments, the Activity LED and the corresponding Sata1 and Sata2 LEDs are steady on. After 62 seconds the Power LED and the Backup LED are switched on, while the Sata1 and Sata2 LEDs start indicating disk activity. This is the result of kernel initialization. After another 50 seconds, the Power and Backup LEDs are switched off by the 'rc.local' script.

I'm running 'systemd' rather than 'init'. From 'dmesg' output:
[   27.104494] systemd-udevd[1710]: Could not generate persistent MAC address for eth0: No such file or directory
Do you know which file is not found?

The outputs from 'fw_printenv' and 'dmesg' are attached', as well as 'rc.local'. Anything else you would like to see tested?

Again, thank you very much!

Regards,
Trond Melen
Attachments:
open | download - dmesg.lst (25.7 KB)
open | download - fw_printenv.lst (2.4 KB)
open | download - rc.local (1.8 KB)
Re: Debian on Netgear RN102
September 03, 2020 05:07AM
Hi bodhi again,
I was able to get log for my orion-ehci problem with my serial cable:
Debian GNU/Linux 10 debian ttyS0

debian login: root
Password:
Last login: Wed Sep  2 16:18:37 PDT 2020 from 192.168.2.134 on pts/1
Linux debian 5.8.5-mvebu-370xp-tld-1 #1.0 SMP PREEMPT Mon Aug 31 00:00:32 PDT 2020 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
debian
192.168.2.240
NETGEAR ReadyNAS 102
Linux version 5.8.5-mvebu-370xp-tld-1 (root@tldDebianVM) (arm-linux-gnueabihf-gcc (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0, GNU ld (GNU Binutils for Ubuntu) 2.30) #1.0 SMP PREEMPT Mon Aug 31 00:00:32 PDT 2020
Debian 10.5
Thu Sep 3 02:22:16 PDT 2020 up 1 minute
root@debian:~# [ 1500.294733][ T1445] usb 1-1: reset high-speed USB device number 2 using orion-ehci
sdsd[ 1545.094738][ T1445] usb 1-1: reset high-speed USB device number 2 using orion-ehci
[ 1937.414736][ T1445] usb 1-1: reset high-speed USB device number 2 using orion-ehci
[ 2087.446449][ T2586] usb 1-1: USB disconnect, device number 2
[ 2087.484781][ T1495] blk_update_request: I/O error, dev sdc, sector 62216 op 0x1:(WRITE) flags 0x800 phys_seg 5 prio class 0
[ 2087.495383][ T1526] Aborting journal on device sdc1-8.
[ 2087.500548][ T1495] blk_update_request: I/O error, dev sdc, sector 23078104 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 2087.511156][ T1570] blk_update_request: I/O error, dev sdc, sector 7383096 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
[ 2087.522006][ T1495] blk_update_request: I/O error, dev sdc, sector 23078104 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 2087.532666][ T1495] blk_update_request: I/O error, dev sdc, sector 23078104 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 2087.543364][ T1495] blk_update_request: I/O error, dev sdc, sector 23078104 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 2087.553967][ T1495] blk_update_request: I/O error, dev sdc, sector 23078104 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 2087.564560][ T1495] blk_update_request: I/O error, dev sdc, sector 23078104 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 2087.575152][ T1495] blk_update_request: I/O error, dev sdc, sector 23078104 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 2087.585747][ T1495] blk_update_request: I/O error, dev sdc, sector 23078104 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 2087.599416][ T2764] EXT4-fs error (device sdc1) in ext4_reserve_inode_write:5651: Journal has aborted
[ 2087.614942][ T1526] Buffer I/O error on dev sdc1, logical block 1436, lost sync page write
[ 2087.622598][ T1526] JBD2: Error -5 detected when updating journal superblock for sdc1-8.
[ 2087.654956][ T2764] Buffer I/O error on dev sdc1, logical block 0, lost sync page write
[ 2087.662374][ T2764] EXT4-fs (sdc1): I/O error while writing superblock
[ 2087.764767][ T2764] EXT4-fs (sdc1): Remounting filesystem read-only
[ 2087.770569][ T2764] EXT4-fs error (device sdc1): ext4_dirty_inode:5853: inode #522255: comm stress: mark_inode_dirty error
[ 2087.834855][ T2764] Buffer I/O error on dev sdc1, logical block 0, lost sync page write
[ 2087.842273][ T2764] EXT4-fs (sdc1): I/O error while writing superblock
[ 2087.944779][ T2764] EXT4-fs error (device sdc1) in ext4_dirty_inode:5855: Journal has aborted
[ 2087.952731][ T2764] Buffer I/O error on dev sdc1, logical block 0, lost sync page write
[ 2087.994818][ T2764] EXT4-fs (sdc1): I/O error while writing superblock
[ 2088.096023][ T2764] EXT4-fs error (device sdc1): ext4_wait_block_bitmap:521: comm stress: Cannot read block bitmap - block_group = 26, block_bitmap = 851968
[ 2088.237059][ T2764] EXT4-fs error (device sdc1): ext4_discard_preallocations:4185: comm stress: Error -5 loading buddy information for 26
[ 2088.414841][ T2764] EXT4-fs error (device sdc1): ext4_wait_block_bitmap:521: comm stress: Cannot read block bitmap - block_group = 26, block_bitmap = 851968
[ 2088.584786][ T2586] usb 1-1: new high-speed USB device number 3 using orion-ehci
[ 2088.604930][ T2764] EXT4-fs error (device sdc1): ext4_discard_preallocations:4185: comm stress: Error -5 loading buddy information for 26
[ 2088.806883][ T2586] usb 1-1: New USB device found, idVendor=0781, idProduct=5583, bcdDevice= 1.00
[ 2088.844743][ T2586] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2088.851977][ T2586] usb 1-1: Product: Ultra Fit
[ 2088.874819][ T2764] EXT4-fs error (device sdc1): ext4_wait_block_bitmap:521: comm stress: Cannot read block bitmap - block_group = 26, block_bitmap = 851968
[ 2088.887835][ T2586] usb 1-1: Manufacturer: SanDisk
[ 2088.892261][ T2586] usb 1-1: SerialNumber: 4C530000301215108532
[ 2088.935999][ T2586] usb-storage 1-1:1.0: USB Mass Storage device detected
[ 2088.965179][ T2586] scsi host4: usb-storage 1-1:1.0
[ 2089.065019][ T2764] EXT4-fs error (device sdc1): ext4_discard_preallocations:4193: comm stress: Error -5 reading block bitmap for 26
[ 2089.214880][ T2764] EXT4-fs error (device sdc1): ext4_wait_block_bitmap:521: comm stress: Cannot read block bitmap - block_group = 29, block_bitmap = 950272
[ 2089.915955][    T1] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[ 2089.923671][    T1] CPU: 0 PID: 1 Comm: systemd Not tainted 5.8.5-mvebu-370xp-tld-1 #1.0
[ 2089.931125][    T1] Hardware name: Marvell Armada 370/XP (Device Tree)
[ 2089.937174][    T1] [<c0115b10>] (unwind_backtrace) from [<c01106d8>] (show_stack+0x10/0x14)
[ 2089.944966][    T1] [<c01106d8>] (show_stack) from [<c05f0d84>] (dump_stack+0x80/0x9c)
[ 2089.952277][    T1] [<c05f0d84>] (dump_stack) from [<c0129088>] (panic+0xe4/0x2f0)
[ 2089.959261][    T1] [<c0129088>] (panic) from [<c012c914>] (do_exit+0x1b4/0xa28)
[ 2089.966080][    T1] [<c012c914>] (do_exit) from [<c012dde0>] (do_group_exit+0x58/0xb8)
[ 2089.973383][    T1] [<c012dde0>] (do_group_exit) from [<c01391ac>] (get_signal+0x224/0x6d4)
[ 2089.981081][    T1] [<c01391ac>] (get_signal) from [<c010fc1c>] (do_work_pending+0xd8/0x438)
[ 2089.988858][    T1] [<c010fc1c>] (do_work_pending) from [<c01000cc>] (slow_work_pending+0xc/0x20)
[ 2089.997030][    T1] Exception stack(0xdf487fb0 to 0xdf487ff8)
[ 2090.002326][    T1] 7fa0:                                     00000000 be3b519c 592e3300 592e3300
[ 2090.010501][    T1] 7fc0: 00589ebc be3b5390 be3b5394 00000007 bebb4990 00000000 00000000 00000000
[ 2090.018674][    T1] 7fe0: 000000ae be3b52d8 00526e6d 004ab184 60000030 ffffffff
[ 2090.025425][    T1] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b ]---
Seems kernel panicing because rootfs usb deattached.
My stress command is:

root@debian:~# stress -c 1 -i 2 -m 1 -d 1
stress: info: [2760] dispatching hogs: 1 cpu, 2 io, 1 vm, 1 hdd

After few minutes it freezes.
After power cycle it seems damaged filesystem:
BootROM 1.08
Booting from NAND flash


General initialization - Version: 1.0.0

High speed PHY - Version: 2.1.4 (COM-PHY-V20)
Update PEX Device ID 0x6710
High speed PHY - Ended Successfully
0000
DDR3 Training Sequence - Ver 5.7.1
DDR3 Training Sequence - Run without PBS.
DDR3 Training Sequence - Ended Successfully
BootROM: Image checksum verification PASSED

 __   __                      _ _
|  \/  | __ _ _ ____   _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| |  | | (_| | |   \ V /  __/ | |
|_|  |_|\__,_|_|    \_/ \___|_|_|
         _   _     ____              _
        | | | |   | __ )  ___   ___ | |_
        | | | |___|  _ \ / _ \ / _ \| __|
        | |_| |___| |_) | (_) | (_) | |_
         \___/    |____/ \___/ \___/ \__|
 ** LOADER **


U-Boot 2011.12-gec25d27-dirty (Oct 26 2015 - 16:53:05) Marvell version: v2011.12                                                                 2014_T2.0p1
06/23/2015 ReadyNAS-102 V2.0

Board: DB-88F6710-BP
SoC:   MV6710 A1
CPU:   Marvell PJ4B v7 UP (Rev 1) LE
       CPU    @ 1200 [MHz]
       L2     @ 600 [MHz]
       TClock @ 200 [MHz]
       DDR    @ 600 [MHz]
       DDR 16Bit Width, FastPath Memory Access
DRAM:  512 MiB

Map:   Code:            0x1feef000:0x1ff9ef34
       BSS:             0x1ffef0a0
       Stack:           0x1f9eeef8
       Heap:            0x1f9ef000:0x1feef000

NAND:  (ID 0xf12c)      128 MiB
MMC:   MRVL_MMC: 0
Bad block table found at page 65472, version 0x01
Bad block table found at page 65408, version 0x01

Initialize and scan all PCI interfaces
PEX unit.port(active IF[-first bus]):
------------------------------------------
PEX 0: Root Complex Interface, Detected Link X1, GEN 2.0
PEX 1: Root Complex Interface, Detected Link X1, GEN 2.0
FPU not initialized
USB 0: Host Mode
USB 1: Host Mode
Shutting down unused interfaces:
       GBE0
       SDIO
       AUDIO
       TDM
Modules/Interfaces Detected:
       RGMII1 Phy
       PEX0 (Lane 0)
       PEX1 (Lane 1)
       SATA0 (Lane 2)
       SATA1 (Lane 3)
Net:   , egiga1 [PRIME]
Power On!

FDT loaded successfully
Hit any key to stop autoboot:  0
(Re)start USB...
USB:   Active port:     0
Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 2 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found
Loading file "/boot/uImage" from usb device 0:1 ()
5418806 bytes read
Loading file "/boot/uInitrd" from usb device 0:1 ()
7926735 bytes read
## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   Linux-5.8.5-mvebu-370xp-tld-1
   Created:      2020-09-02  11:26:07 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5418742 Bytes = 5.2 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 03000000 ...
   Image Name:   initramfs-5.8.5-mvebu-370xp-tld-
   Created:      2020-09-02  11:27:17 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7926671 Bytes = 7.6 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000][    T0] Booting Linux on physical CPU 0x0
[    0.000000][    T0] Linux version 5.8.5-mvebu-370xp-tld-1 (root@tldDebianVM)                                                                 (arm-linux-gnueabihf-gcc (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0, GNU ld (GNU                                                                 Binutils for Ubuntu) 2.30) #1.0 SMP PREEMPT Mon Aug 31 00:00:32 PDT 2020
[    0.000000][    T0] CPU: ARMv7 Processor [561f5811] revision 1 (ARMv7), cr=10                                                                c5387d
[    0.000000][    T0] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction                                                                 cache
[    0.000000][    T0] OF: fdt: Machine model: NETGEAR ReadyNAS 102
[    0.000000][    T0] printk: bootconsole [earlycon0] enabled
[    0.000000][    T0] Memory policy: Data cache writeback
[    0.000000][    T0] Zone ranges:
[    0.000000][    T0]   Normal   [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000][    T0]   HighMem  empty
[    0.000000][    T0] Movable zone start for each node
[    0.000000][    T0] Early memory node ranges
[    0.000000][    T0]   node   0: [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000][    T0] Initmem setup node 0 [mem 0x0000000000000000-0x000000001f                                                                ffffff]
[    0.000000][    T0] CPU: All CPU(s) started in SVC mode.
[    0.000000][    T0] percpu: Embedded 20 pages/cpu s53068 r8192 d20660 u81920
[    0.000000][    T0] Built 1 zonelists, mobility grouping on.  Total pages: 13                                                                0048
[    0.000000][    T0] Kernel command line: console=ttyS0,115200 root=LABEL=root                                                                fs rootdelay=10 mtdparts=pxa3xx_nand-0:0x180000@0(u-boot),0x20000@0x180000(u-boo                                                                t-env),0x600000@0x200000(uImage),0x400000@0x800000(minirootfs),-(ubifs) earlypri                                                                ntk=serial init=/bin/systemd mtdparts=pxa3xx_nand-0:0x180000@0(u-boot),0x20000@0                                                                x180000(u-boot-env),0x600000@0x200000(uImage),0x400000@0x800000(minirootfs),-(ub                                                                ifs) reason=normal bdtype=rn102
[    0.000000][    T0] Dentry cache hash table entries: 65536 (order: 6, 262144                                                                 bytes, linear)
[    0.000000][    T0] Inode-cache hash table entries: 32768 (order: 5, 131072 b                                                                ytes, linear)
[    0.000000][    T0] mem auto-init: stack:off, heap alloc:on, heap free:off
[    0.000000][    T0] Memory: 495144K/524288K available (10240K kernel code, 10                                                                12K rwdata, 3072K rodata, 1024K init, 342K bss, 29144K reserved, 0K cma-reserved                                                                , 0K highmem)
[    0.000000][    T0] random: get_random_u32 called from ____cache_alloc+0x338/                                                                0x794 with crng_init=0
[    0.000000][    T0] rcu: Preemptible hierarchical RCU implementation.
[    0.000000][    T0] rcu:     RCU restricting CPUs from NR_CPUS=4 to nr_cpu_id                                                                s=1.
[    0.000000][    T0]  Trampoline variant of Tasks RCU enabled.
[    0.000000][    T0]  Rude variant of Tasks RCU enabled.
[    0.000000][    T0]  Tracing variant of Tasks RCU enabled.
[    0.000000][    T0] rcu: RCU calculated value of scheduler-enlistment delay i                                                                s 10 jiffies.
[    0.000000][    T0] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_id                                                                s=1
[    0.000000][    T0] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000][    T0] L2C: DT/platform modifies aux control register: 0x1208630                                                                0 -> 0x1a086302
[    0.000000][    T0] Aurora cache controller enabled, 4 ways, 256 kB
[    0.000000][    T0] Aurora: CACHE_ID 0x00000100, AUX_CTRL 0x1a086302
[    0.000000][    T0] Switching to timer-based delay loop, resolution 53ns
[    0.000007][    T0] sched_clock: 32 bits at 18MHz, resolution 53ns, wraps eve                                                                ry 114537122277ns
[    0.007874][    T0] clocksource: armada_370_xp_clocksource: mask: 0xffffffff                                                                 max_cycles: 0xffffffff, max_idle_ns: 101938038664 ns
[    0.019299][    T0] Console: colour dummy device 80x30
[    0.024018][    T0] Calibrating delay loop (skipped), value calculated using                                                                 timer frequency.. 37.49 BogoMIPS (lpj=187492)
[    0.034148][    T0] pid_max: default: 32768 minimum: 301
[    0.039213][    T0] LSM: Security Framework initializing
[    0.044160][    T0] Mount-cache hash table entries: 1024 (order: 0, 4096 byte                                                                s, linear)
[    0.051489][    T0] Mountpoint-cache hash table entries: 1024 (order: 0, 4096                                                                 bytes, linear)
[    0.060291][    T0] CPU: Testing write buffer coherency: ok
[    0.065736][    T1] CPU0: thread -1, cpu 0, socket -1, mpidr 0
[    0.072072][    T1] Setting up static identity map for 0x100000 - 0x100060
[    0.078757][    T1] mvebu-soc-id: MVEBU SoC ID=0x6710, Rev=0x1
[    0.084189][    T1] mvebu-pmsu: Initializing Power Management Service Unit
[    0.090712][    T1] rcu: Hierarchical SRCU implementation.
[    0.098536][    T1] smp: Bringing up secondary CPUs ...
[    0.103420][    T1] smp: Brought up 1 node, 1 CPU
[    0.107714][    T1] SMP: Total of 1 processors activated (37.49 BogoMIPS).
[    0.114042][    T1] CPU: All CPU(s) started in SVC mode.
[    0.119585][    T1] devtmpfs: initialized
[    0.128196][    T1] VFP support v0.3: implementor 56 architecture 2 part 20 v                                                                ariant 9 rev 6
[    0.137114][    T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffff                                                                ffff, max_idle_ns: 19112604462750000 ns
[    0.146888][    T1] futex hash table entries: 256 (order: 2, 16384 bytes, lin                                                                ear)
[    0.154102][    T1] xor: measuring software checksum speed
[    0.258574][    T1]    arm4regs  :  1103.200 MB/sec
[    0.358572][    T1]    8regs     :   671.200 MB/sec
[    0.458567][    T1]    32regs    :  1062.400 MB/sec
[    0.463020][    T1] xor: using function: arm4regs (1103.200 MB/sec)
[    0.468785][    T1] prandom: seed boundary self test passed
[    0.477388][    T1] prandom: 100 self tests passed
[    0.481801][    T1] pinctrl core: initialized pinctrl subsystem
[    0.488931][    T1] thermal_sys: Registered thermal governor 'step_wise'
[    0.489675][    T1] NET: Registered protocol family 16
[    0.502536][    T1] DMA: preallocated 256 KiB pool for atomic coherent alloca                                                                tions
[    0.510425][    T1] audit: initializing netlink subsys (disabled)
[    0.516393][   T31] audit: type=2000 audit(0.490:1): state=initialized audit_                                                                enabled=0 res=1
[    0.526678][    T1] cpuidle: using governor ladder
[    0.532693][    T1] cpuidle: using governor menu
[    0.537209][    T1] hw-breakpoint: debug architecture 0x4 unsupported.
[    0.809563][    T1] raid6: int32x8  gen()   214 MB/s
[    0.978963][    T1] raid6: int32x8  xor()   135 MB/s
[    1.148646][    T1] raid6: int32x4  gen()   224 MB/s
[    1.318712][    T1] raid6: int32x4  xor()   151 MB/s
[    1.488585][    T1] raid6: int32x2  gen()   414 MB/s
[    1.658571][    T1] raid6: int32x2  xor()   217 MB/s
[    1.828600][    T1] raid6: int32x1  gen()   430 MB/s
[    1.998590][    T1] raid6: int32x1  xor()   201 MB/s
[    2.003121][    T1] raid6: using algorithm int32x1 gen() 430 MB/s
[    2.008693][    T1] raid6: .... xor() 201 MB/s, rmw enabled
[    2.013778][    T1] raid6: using intx1 recovery algorithm
[    2.020109][    T1] vgaarb: loaded
[    2.025086][    T1] SCSI subsystem initialized
[    2.030350][    T1] usbcore: registered new interface driver usbfs
[    2.036047][    T1] usbcore: registered new interface driver hub
[    2.043237][    T1] usbcore: registered new device driver usb
[    2.049941][    T1] mc: Linux media interface: v0.10
[    2.055370][    T1] videodev: Linux video capture interface: v2.00
[    2.061854][    T1] pps_core: LinuxPPS API ver. 1 registered
[    2.067023][    T1] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodol                                                                fo Giometti <giometti@linux.it>
[    2.076777][    T1] PTP clock support registered
[    2.084608][    T1] clocksource: Switched to clocksource armada_370_xp_clocks                                                                ource
[    3.073828][    T1] VFS: Disk quotas dquot_6.6.0
[    3.078210][    T1] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096                                                                 bytes)
[    3.112855][    T1] NET: Registered protocol family 2
[    3.120432][    T1] tcp_listen_portaddr_hash hash table entries: 512 (order:                                                                 0, 6144 bytes, linear)
[    3.129122][    T1] TCP established hash table entries: 4096 (order: 2, 16384                                                                 bytes, linear)
[    3.137162][    T1] TCP bind hash table entries: 4096 (order: 3, 32768 bytes,                                                                 linear)
[    3.144352][    T1] TCP: Hash tables configured (established 4096 bind 4096)
[    3.151449][    T1] UDP hash table entries: 256 (order: 1, 8192 bytes, linear                                                                )
[    3.158256][    T1] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, l                                                                inear)
[    3.165492][    T1] NET: Registered protocol family 1
[    3.170867][    T1] RPC: Registered named UNIX socket transport module.
[    3.177010][    T1] RPC: Registered udp transport module.
[    3.181937][    T1] RPC: Registered tcp transport module.
[    3.186885][    T1] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    3.193404][    T1] PCI: CLS 0 bytes, default 64
[    3.198019][    T1] Trying to unpack rootfs image as initramfs...
[    3.738213][    T1] Freeing initrd memory: 7744K
[    3.742739][    T1] NetWinder Floating Point Emulator V0.97 (double precision                                                                )
[    3.749684][    T1] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7                                                                 counters available
[    3.760615][    T1] Initialise system trusted keyrings
[    3.767313][    T1] Key type blacklist registered
[    3.771916][    T1] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[    3.778689][    T1] zbud: loaded
[    3.783288][    T1] NFS: Registering the id_resolver key type
[    3.788989][    T1] Key type id_resolver registered
[    3.793445][    T1] Key type id_legacy registered
[    3.797875][    T1] nfs4filelayout_init: NFSv4 File Layout Driver Registering                                                                ...
[    3.804762][    T1] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    3.811506][    T1] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat                                                                , Inc.
[    3.819771][    T1] orangefs_debugfs_init: called with debug mask: :none: :0:
[    3.826687][    T1] orangefs_init: module version upstream loaded
[    3.906092][    T1] async_tx: api initialized (async)
[    3.910723][    T1] Key type asymmetric registered
[    3.915172][    T1] Asymmetric key parser 'x509' registered
[    3.920590][    T1] Block layer SCSI generic (bsg) driver version 0.4 loaded                                                                 (major 243)
[    3.928207][    T1] io scheduler bfq registered
[    3.935296][    T1] armada-370-pinctrl d0018000.pin-ctrl: registered pinctrl                                                                 driver
[    3.951957][    T1] mvebu-pcie soc:pcie@82000000: PCI host bridge to bus 0000                                                                :00
[    3.959197][    T1] pci_bus 0000:00: root bus resource [bus 00-ff]
[    3.965247][    T1] pci_bus 0000:00: root bus resource [mem 0xf8000000-0xffdf                                                                ffff]
[    3.972160][    T1] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[    3.978831][    T1] pci 0000:00:01.0: [11ab:6710] type 01 class 0x060400
[    3.985066][    T1] pci 0000:00:01.0: reg 0x38: [mem 0x00000000-0x000007ff pr                                                                ef]
[    3.992402][    T1] pci 0000:00:02.0: [11ab:6710] type 01 class 0x060400
[    3.998751][    T1] pci 0000:00:02.0: reg 0x38: [mem 0x00000000-0x000007ff pr                                                                ef]
[    4.007069][    T1] PCI: bus0: Fast back to back transfers disabled
[    4.012806][    T1] pci 0000:00:01.0: bridge configuration invalid ([bus 00-0                                                                0]), reconfiguring
[    4.020981][    T1] pci 0000:00:02.0: bridge configuration invalid ([bus 00-0                                                                0]), reconfiguring
[    4.029387][    T1] pci 0000:01:00.0: [1b4b:9170] type 00 class 0x010601
[    4.035756][    T1] pci 0000:01:00.0: reg 0x10: [io  0xfffffff8-0xffffffff]
[    4.042124][    T1] pci 0000:01:00.0: reg 0x14: [io  0xfffffffc-0xffffffff]
[    4.048595][    T1] pci 0000:01:00.0: reg 0x18: [io  0xfffffff8-0xffffffff]
[    4.055050][    T1] pci 0000:01:00.0: reg 0x1c: [io  0xfffffffc-0xffffffff]
[    4.061415][    T1] pci 0000:01:00.0: reg 0x20: [io  0xfffffff0-0xffffffff]
[    4.067834][    T1] pci 0000:01:00.0: reg 0x24: [mem 0x40000000-0x400001ff]
[    4.074198][    T1] pci 0000:01:00.0: reg 0x30: [mem 0xd0000000-0xd000ffff pr                                                                ef]
[    4.081032][    T1] pci 0000:01:00.0: Enabling fixed DMA alias to 00.1
[    4.087100][    T1] pci 0000:01:00.0: PME# supported from D3hot
[    4.092952][    T1] pci 0000:00:01.0: ASPM: current common clock configuratio                                                                n is inconsistent, reconfiguring
[    4.125699][    T1] PCI: bus1: Fast back to back transfers disabled
[    4.131438][    T1] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to                                                                 01
[    4.138525][    T1] pci 0000:02:00.0: [1b73:1009] type 00 class 0x0c0330
[    4.144860][    T1] pci 0000:02:00.0: reg 0x10: [mem 0x42000000-0x4200ffff 64                                                                bit]
[    4.151705][    T1] pci 0000:02:00.0: reg 0x18: [mem 0x42010000-0x42010fff 64                                                                bit]
[    4.158648][    T1] pci 0000:02:00.0: reg 0x20: [mem 0x42011000-0x42011fff 64                                                                bit]
[    4.165653][    T1] pci 0000:02:00.0: supports D1
[    4.169951][    T1] pci 0000:02:00.0: PME# supported from D0 D1 D3hot D3cold
[    4.176900][    T1] pci 0000:00:02.0: ASPM: current common clock configuratio                                                                n is inconsistent, reconfiguring
[    4.215692][    T1] PCI: bus2: Fast back to back transfers disabled
[    4.221429][    T1] pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to                                                                 02
[    4.228253][    T1] pci 0000:00:01.0: BAR 14: assigned [mem 0xf8000000-0xf80f                                                                ffff]
[    4.235230][    T1] pci 0000:00:02.0: BAR 14: assigned [mem 0xf8100000-0xf81f                                                                ffff]
[    4.242143][    T1] pci 0000:00:01.0: BAR 13: assigned [io  0x10000-0x10fff]
[    4.248629][    T1] pci 0000:00:01.0: BAR 6: assigned [mem 0xf8200000-0xf8200                                                                7ff pref]
[    4.255883][    T1] pci 0000:00:02.0: BAR 6: assigned [mem 0xf8300000-0xf8300                                                                7ff pref]
[    4.263119][    T1] pci 0000:01:00.0: BAR 6: assigned [mem 0xf8000000-0xf800f                                                                fff pref]
[    4.270367][    T1] pci 0000:01:00.0: BAR 5: assigned [mem 0xf8010000-0xf8010                                                                1ff]
[    4.277221][    T1] pci 0000:01:00.0: BAR 4: assigned [io  0x10000-0x1000f]
[    4.283581][    T1] pci 0000:01:00.0: BAR 0: assigned [io  0x10010-0x10017]
[    4.289959][    T1] pci 0000:01:00.0: BAR 2: assigned [io  0x10018-0x1001f]
[    4.296335][    T1] pci 0000:01:00.0: BAR 1: assigned [io  0x10020-0x10023]
[    4.302694][    T1] pci 0000:01:00.0: BAR 3: assigned [io  0x10024-0x10027]
[    4.309071][    T1] pci 0000:00:01.0: PCI bridge to [bus 01]
[    4.314240][    T1] pci 0000:00:01.0:   bridge window [io  0x10000-0x10fff]
[    4.320615][    T1] pci 0000:00:01.0:   bridge window [mem 0xf8000000-0xf80ff                                                                fff]
[    4.327474][    T1] pci 0000:02:00.0: BAR 0: assigned [mem 0xf8100000-0xf810f                                                                fff 64bit]
[    4.334808][    T1] pci 0000:02:00.0: BAR 2: assigned [mem 0xf8110000-0xf8110                                                                fff 64bit]
[    4.342124][    T1] pci 0000:02:00.0: BAR 4: assigned [mem 0xf8111000-0xf8111                                                                fff 64bit]
[    4.349455][    T1] pci 0000:00:02.0: PCI bridge to [bus 02]
[    4.354643][    T1] pci 0000:00:02.0:   bridge window [mem 0xf8100000-0xf81ff                                                                fff]
[    4.361596][    T1] pcieport 0000:00:01.0: enabling device (0140 -> 0143)
[    4.367947][    T1] pcieport 0000:00:02.0: enabling device (0140 -> 0142)
[    4.375450][    T1] mv_xor d0060800.xor: Marvell shared XOR driver
[    4.445987][    T1] mv_xor d0060800.xor: Marvell XOR (Registers Mode): ( xor                                                                 cpy intr )
[    4.457005][    T1] mv_xor d0060900.xor: Marvell shared XOR driver
[    4.526007][    T1] mv_xor d0060900.xor: Marvell XOR (Registers Mode): ( xor                                                                 cpy intr )
[    4.725083][    T1] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    4.736391][    T1] printk: console [ttyS0] disabled
[    4.762148][    T1] d0012000.serial: ttyS0 at MMIO 0xd0012000 (irq = 19, base                                                                _baud = 12500000) is a 16550A
[    4.771157][    T1] printk: console [ttyS0] enabled
[    4.771157][    T1] printk: console [ttyS0] enabled
[    4.780362][    T1] printk: bootconsole [earlycon0] disabled
[    4.780362][    T1] printk: bootconsole [earlycon0] disabled
[    4.793058][    T1] ahci 0000:01:00.0: enabling device (0146 -> 0147)
[    4.800157][    T1] ahci 0000:01:00.0: AHCI 0001.0000 32 slots 2 ports 6 Gbps                                                                 0x3 impl SATA mode
[    4.808398][    T1] ahci 0000:01:00.0: flags: 64bit ncq sntf led only pmp fbs                                                                 pio slum part sxs
[    4.819798][    T1] scsi host0: ahci
[    4.824329][    T1] scsi host1: ahci
[    4.828491][    T1] ata1: SATA max UDMA/133 abar m512@0xf8010000 port 0xf8010                                                                100 irq 42
[    4.836312][    T1] ata2: SATA max UDMA/133 abar m512@0xf8010000 port 0xf8010                                                                180 irq 42
[    4.845204][    T1] sata_mv d00a0000.sata: slots 32 ports 1
[    4.853102][    T1] scsi host2: sata_mv
[    4.857407][    T1] ata3: SATA max UDMA/133 irq 27
[    4.863467][    T1] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xf1
[    4.871069][    T1] nand: Micron MT29F1G08ABADAWP
[    4.875644][    T1] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048,                                                                 OOB size: 64
[    4.883888][    T1] Bad block table found at page 65472, version 0x01
[    4.890505][    T1] Bad block table found at page 65408, version 0x01
[    4.896860][    T1] 5 cmdlinepart partitions found on MTD device pxa3xx_nand-                                                                0
[    4.903516][    T1] Creating 5 MTD partitions on "pxa3xx_nand-0":
[    4.909199][    T1] 0x000000000000-0x000000180000 : "u-boot"
[    4.916696][    T1] 0x000000180000-0x0000001a0000 : "u-boot-env"
[    4.925028][    T1] 0x000000200000-0x000000800000 : "uImage"
[    4.932913][    T1] 0x000000800000-0x000000c00000 : "minirootfs"
[    4.941300][    T1] 0x000000c00000-0x000008000000 : "ubifs"
[    4.950981][    T1] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com                                                                 for information.
[    4.960065][    T1] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Ja                                                                son@zx2c4.com>. All Rights Reserved.
[    4.973346][    T1] libphy: Fixed MDIO Bus: probed
[    4.982792][    T1] libphy: orion_mdio_bus: probed
[    4.997330][    T1] mvneta d0074000.ethernet eth0: Using random mac address f                                                                e:89:b1:c9:df:2b
[    5.009724][    T1] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Drive                                                                r
[    5.017142][    T1] ehci-pci: EHCI PCI platform driver
[    5.022115][    T1] ehci-orion: EHCI orion driver
[    5.027197][    T1] orion-ehci d0050000.usb: EHCI Host Controller
[    5.032845][    T1] orion-ehci d0050000.usb: new USB bus registered, assigned                                                                 bus number 1
[    5.040960][    T1] orion-ehci d0050000.usb: irq 25, io mem 0xd0050000
[    5.074655][    T1] orion-ehci d0050000.usb: USB 2.0 started, EHCI 1.00
[    5.081154][    T1] usb usb1: New USB device found, idVendor=1d6b, idProduct=                                                                0002, bcdDevice= 5.08
[    5.089499][    T1] usb usb1: New USB device strings: Mfr=3, Product=2, Seria                                                                lNumber=1
[    5.096864][    T1] usb usb1: Product: EHCI Host Controller
[    5.102053][    T1] usb usb1: Manufacturer: Linux 5.8.5-mvebu-370xp-tld-1 ehc                                                                i_hcd
[    5.109092][    T1] usb usb1: SerialNumber: d0050000.usb
[    5.115137][    T1] hub 1-0:1.0: USB hub found
[    5.119604][    T1] hub 1-0:1.0: 1 port detected
[    5.125462][    T1] xhci_hcd 0000:02:00.0: xHCI Host Controller
[    5.131448][    T1] xhci_hcd 0000:02:00.0: new USB bus registered, assigned b                                                                us number 2
[    5.139883][    T1] xhci_hcd 0000:02:00.0: hcc params 0x200073a1 hci version                                                                 0x100 quirks 0x0000000000080010
[    5.150129][    T1] usb usb2: New USB device found, idVendor=1d6b, idProduct=                                                                0002, bcdDevice= 5.08
[    5.158525][    T1] usb usb2: New USB device strings: Mfr=3, Product=2, Seria                                                                lNumber=1
[    5.165918][    T1] usb usb2: Product: xHCI Host Controller
[    5.171109][    T1] usb usb2: Manufacturer: Linux 5.8.5-mvebu-370xp-tld-1 xhc                                                                i-hcd
[    5.178189][    T1] usb usb2: SerialNumber: 0000:02:00.0
[    5.184132][    T1] hub 2-0:1.0: USB hub found
[    5.188391][ T1209] ata3: SATA link down (SStatus 0 SControl F300)
[    5.194460][    T1] hub 2-0:1.0: 2 ports detected
[    5.199930][    T1] xhci_hcd 0000:02:00.0: xHCI Host Controller
[    5.205854][    T1] xhci_hcd 0000:02:00.0: new USB bus registered, assigned b                                                                us number 3
[    5.213329][    T1] xhci_hcd 0000:02:00.0: Host supports USB 3.0 SuperSpeed
[    5.220020][    T1] usb usb3: We don't know the algorithms for LPM for this h                                                                ost, disabling LPM.
[    5.228529][    T1] usb usb3: New USB device found, idVendor=1d6b, idProduct=                                                                0003, bcdDevice= 5.08
[    5.236864][    T1] usb usb3: New USB device strings: Mfr=3, Product=2, Seria                                                                lNumber=1
[    5.244159][    T1] usb usb3: Product: xHCI Host Controller
[    5.249347][    T1] usb usb3: Manufacturer: Linux 5.8.5-mvebu-370xp-tld-1 xhc                                                                i-hcd
[    5.256368][    T1] usb usb3: SerialNumber: 0000:02:00.0
[    5.262190][    T1] hub 3-0:1.0: USB hub found
[    5.266645][    T1] hub 3-0:1.0: 2 ports detected
[    5.272697][    T1] usbcore: registered new interface driver usblp
[    5.279362][    T1] usbcore: registered new interface driver usb-storage
[    5.286576][    T1] mousedev: PS/2 mouse device common for all mice
[    5.294247][    T1] i2c /dev entries driver
[    5.302799][    T1] rtc-ds1307 0-0068: 'wakeup-source' is set, request for an                                                                 IRQ is disabled!
[    5.316181][    T1] rtc-ds1307 0-0068: registered as rtc0
[    5.322213][    T1] rtc-ds1307 0-0068: setting system clock to 2020-09-03T10:                                                                09:03 UTC (1599127743)
[    5.354663][ T1198] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[    5.361067][ T1194] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[    5.369152][    T1] orion_wdt: Initial timeout 229 sec
[    5.375739][ T1198] ata2.00: ATA-7: ST940210AS, 3.ALC, max UDMA/100
[    5.382020][    T1] device-mapper: uevent: version 1.0.3
[    5.387379][ T1198] ata2.00: 78140160 sectors, multi 0: LBA48 NCQ (depth 32)
[    5.394463][    T1] device-mapper: ioctl: 4.42.0-ioctl (2020-02-27) initialis                                                                ed: dm-devel@redhat.com
[    5.403745][    T1] device-mapper: multipath round-robin: version 1.2.0 loade                                                                d
[    5.410655][    T1] device-mapper: multipath queue-length: version 0.2.0 load                                                                ed
[    5.417507][ T1198] ata2.00: configured for UDMA/100
[    5.422272][    T1] device-mapper: multipath service-time: version 0.3.0 load                                                                ed
[    5.429159][    T1] device-mapper: dm-log-userspace: version 1.3.0 loaded
[    5.435493][    T1] device-mapper: raid: Loading target version 1.15.1
[    5.448859][    T1] marvell-cesa d0090000.crypto: CESA device successfully re                                                                gistered
[    5.456894][    T1] hid: raw HID events driver (C) Jiri Kosina
[    5.463513][    T1] usbcore: registered new interface driver usbhid
[    5.469813][    T1] usbhid: USB HID core driver
[    5.474966][    T1] drop_monitor: Initializing network drop monitor service
[    5.482254][    T1] NET: Registered protocol family 10
[    5.487151][   T20] usb 1-1: new high-speed USB device number 2 using orion-e                                                                hci
[    5.495855][    T1] Segment Routing with IPv6
[    5.499883][    T1] RPL Segment Routing with IPv6
[    5.504339][    T1] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    5.512896][    T1] NET: Registered protocol family 17
[    5.518634][    T1] 8021q: 802.1Q VLAN Support v1.8
[    5.523226][    T1] Key type dns_resolver registered
[    5.528211][    T1] ThumbEE CPU extension supported.
[    5.532796][    T1] Registering SWP/SWPB emulation handler
[    5.538422][    T1] registered taskstats version 1
[    5.542846][    T1] Loading compiled-in X.509 certificates
[    5.548425][    T1] zswap: loaded using pool lzo/zbud
[    5.553544][    T1] Key type ._fscrypt registered
[    5.557993][    T1] Key type .fscrypt registered
[    5.562249][    T1] Key type fscrypt-provisioning registered
[    5.570670][    T1] Key type big_key registered
[    5.584297][    T1] Key type encrypted registered
[    5.593335][    T1] input: gpio-keys as /devices/platform/gpio-keys/input/inp                                                                ut0
[    5.687703][   T20] usb 1-1: New USB device found, idVendor=0781, idProduct=5                                                                583, bcdDevice= 1.00
[    5.695977][   T20] usb 1-1: New USB device strings: Mfr=1, Product=2, Serial                                                                Number=3
[    5.703249][   T20] usb 1-1: Product: Ultra Fit
[    5.707482][   T20] usb 1-1: Manufacturer: SanDisk
[    5.711906][   T20] usb 1-1: SerialNumber: 4C530000301215108532
[    5.719258][   T20] usb-storage 1-1:1.0: USB Mass Storage device detected
[    5.727068][   T20] scsi host3: usb-storage 1-1:1.0
[    5.827598][ T1194] ata1.00: HPA detected: current 231496650, native 23444164                                                                8
[    5.834447][ T1194] ata1.00: ATA-7: TOSHIBA MK1234GSX, AH001D, max UDMA/100
[    5.840954][ T1194] ata1.00: 231496650 sectors, multi 16: LBA48 NCQ (depth 32                                                                ), AA
[    5.849963][ T1194] ata1.00: configured for UDMA/100
[    5.865643][  T370] scsi 0:0:0:0: Direct-Access     ATA      TOSHIBA MK1234GS                                                                 1D   PQ: 0 ANSI: 5
[    5.877239][    T7] sd 0:0:0:0: [sda] 231496650 512-byte logical blocks: (119                                                                 GB/110 GiB)
[    5.886402][   T15] scsi 1:0:0:0: Direct-Access     ATA      ST940210AS                                                                       C    PQ: 0 ANSI: 5
[    5.896524][    T7] sd 0:0:0:0: [sda] Write Protect is off
[    5.905139][ T1452] sd 1:0:0:0: [sdb] 78140160 512-byte logical blocks: (40.0                                                                 GB/37.3 GiB)
[    5.915570][    T7] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabl                                                                ed, doesn't support DPO or FUA
[    5.924974][ T1452] sd 1:0:0:0: [sdb] Write Protect is off
[    5.930419][ T1452] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabl                                                                ed, doesn't support DPO or FUA
[    5.997927][    T7]  sda: sda1 sda2 < sda5 >
[    6.008098][    T7] sd 0:0:0:0: [sda] Attached SCSI removable disk
[    6.104936][ T1452] GPT:Primary header thinks Alt. header is not at the end o                                                                f the disk.
[    6.112413][ T1452] GPT:78140158 != 78140159
[    6.116427][ T1452] GPT:Alternate GPT header not at the end of the disk.
[    6.122611][ T1452] GPT:78140158 != 78140159
[    6.126592][ T1452] GPT: Use GNU Parted to correct GPT errors.
[    6.132030][ T1452]  sdb: sdb1
[    6.138869][ T1452] sd 1:0:0:0: [sdb] Attached SCSI removable disk
[    6.147660][    T1] Freeing unused kernel memory: 1024K
[    6.176904][    T1] Checked W+X mappings: passed, no W+X pages found
[    6.182809][    T1] Run /init as init process
Loading, please wait...
starting version 232
[    6.415334][ T1490] random: systemd-udevd: uninitialized urandom read (16 byt                                                                es read)
[    6.423867][ T1490] random: systemd-udevd: uninitialized urandom read (16 byt                                                                es read)
[    6.442867][ T1491] random: udevadm: uninitialized urandom read (16 bytes rea                                                                d)
[    6.747178][ T1452] scsi 3:0:0:0: Direct-Access     SanDisk  Ultra Fit                                                                        1.00 PQ: 0 ANSI: 6
[    6.775895][    T7] sd 3:0:0:0: [sdc] 30031872 512-byte logical blocks: (15.4                                                                 GB/14.3 GiB)
[    6.798174][    T7] sd 3:0:0:0: [sdc] Write Protect is off
[    6.809547][    T7] sd 3:0:0:0: [sdc] Write cache: disabled, read cache: enab                                                                led, doesn't support DPO or FUA
[    6.877609][    T7]  sdc: sdc1
[    6.895430][    T7] sd 3:0:0:0: [sdc] Attached SCSI removable disk
[    6.975396][    C0] random: fast init done
[    8.120018][ T1499] usbcore: registered new interface driver uas
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
[   21.123902][ T1515] process '/bin/fstype' started with executable stack
Begin: Will now check root file system ... fsck from util-linux 2.29.2
[/sbin/fsck.ext3 (1) -- /dev/sdc1] fsck.ext3 -a -C0 /dev/sdc1
rootfs: recovering journal
[   23.474855][ T1445] usb 1-1: reset high-speed USB device number 2 using orion                                                                -ehci
[   23.677126][    C0] sd 3:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_ERROR                                                                 driverbyte=DRIVER_OK cmd_age=0s
[   23.686380][    C0] sd 3:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 68 08 00 0                                                                0 00 08 00
[   23.693824][    C0] blk_update_request: I/O error, dev sdc, sector 6817792 op                                                                 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
[   54.434854][ T1445] usb 1-1: reset high-speed USB device number 2 using orion-ehci

Trond may i ask you to try stress command on your box with front usb attached?



Edited 1 time(s). Last edit at 09/03/2020 05:16AM by whitepawn.
tme
Re: Debian on Netgear RN102
September 03, 2020 05:56AM
Quote
tme
I'm running 'systemd' rather than 'init'.

No, I'm not:
[    5.792411] Run /init as init process
[    5.796597]   with arguments:
[    5.796604]     /init
[    5.796608]   with environment:
[    5.796613]     HOME=/
[    5.796616]     TERM=linux
[    5.796621]     reason=normal
[    5.796624]     bdtype=rn102

So even '/init' uses 'systemd-udevd' to generate persistent MAC address. I will investigate further.

Quote
whitepawn
Trond, may I ask you to try stress command on your box with front usb attached?

I will look at it. Just give me some time.

Regards,
Trond Melen
tme
Re: Debian on Netgear RN102
September 03, 2020 02:56PM
Hi bodhi,

I am puzzeld by what code in the Linux 5.8.5 source tree that (see my previous post) prints
[   27.104494] systemd-udevd[1710]: Could not generate persistent MAC address for eth0: No such file or directory
in the 'dmesg' log, since both these commands terminate silently:
find ~/kernel/linux-5.8.5 -type f -exec grep -nHo 'systemd-udevd' {} \;
find ~/kernel/linux-5.8.5 -type f -exec grep -nHo 'Could not generate persistent MAC address for' {} \;
Where is the ghost hiding?

The rumors about the death of my USB-to-TTL adapter have been greatly exaggerated. It had just broken a lead, and after careful treatment with a solder iron it's back in business. Attached my serial console bootlog.

Hooked it up with my second (and unhacked) RN102, interrupted u-boot and did:
printenv
bootargs_end=:10.4.50.254:255.255.255.0:KW40:eth0:none
eth1addr=BA:09:87:65:43:21
eth1mtu=1500
ethact=egiga1
ethaddr=00:50:43:00:02:02
ethmtu=1500
ethprime=egiga1
yuk_ethaddr=00:00:00:EE:51:81
Booted stock firmware. Logged in as root:
cat /proc/version
Linux version 4.4.190.armada.1 (root@blocks) (gcc version 4.6.4 (Marvell GCC release 20160226-c4af733b 64K MAXPAGESIZE ALIGN) ) #1 
SMP Mon Oct 28 02:07:39 UTC 2019

ifconfig | grep eth
eth0      Link encap:Ethernet  HWaddr BA:09:87:65:43:21

dmesg | grep eth
[    4.019043] mvneta d0074000.ethernet eth0: Using device tree mac address BA:09:87:65:43:21
[    5.220425] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

Quote
tme
.., while stock RN102 probably uses 'eth1' and 'eth1addr' (to be confirmed)

Plain wrong. The stock kernel uses 'eth0', claims that the mac address is taken from the device tree, but actually takes it from 'eth1addr'. Both 'ethaddr', 'yuk_ethaddr' and the u-boot version are the same on both boxes. Using 'ethaddr' would make all RT-102 boxes running bodhi kernels have the same mac address. Clearly not desirable.

A simple fix would be to copy 'eth1addr' to 'ethaddr' after first Debian boot:
fw_setenv ethaddr $(fw_printenv eth1addr)
Tested on my first RN102, worked for me and could be added to the installation procedure. Any better ideas?

Attached for reference the 'dmesg' output from the Netgear stock firmware with no network, nor any disks, attached.

Regards,
Trond Melen
Attachments:
open | download - bootlog1.lst (32.9 KB)
open | download - dmesg2.lst (25.7 KB)
tme
Re: Debian on Netgear RN102
September 03, 2020 03:55PM
Hi whitepawn,

Quote

Trond, may ask you to try stress command on your box with front usb attached?

I did:
apt install -y stress
stress -cpu 1 -io 2 -vm 1 -hdd 1 --timeout 10s
The USB driver reset and disconnected, but no kernel panic. The 'etx4' file system ended up in a bad state, so this test is destructive and the file system must be rebuild from scratch. Output attached in 'console-with-stress.lst'.

The line
[ 1819.352012][ T2859] EXT4-fs error (device sdb1): __ext4_find_entry:1537: inode #231073: comm ntpd: reading directory lblock 0
repeats over and over again with different 'inode #', and still hasn't stopped after an hour.

I issued a 'ls' command on the console during the test. It crashed with a segmentation fault, but the shell survived. Now 'ls' fails with Input/output error:
ls
[ 2718.122097][ T3063] EXT4-fs error (device sdb1): __ext4_find_entry:1537: inode #127489: comm bash: reading directory lblock 0
[ 2718.132852][ T3063] EXT4-fs error (device sdb1): __ext4_find_entry:1537: inode #127489: comm bash: reading directory lblock 0
[ 2718.144143][ T3063] EXT4-fs error (device sdb1): __ext4_find_entry:1537: inode #127489: comm bash: reading directory lblock 0
-bash: /bin/ls: Input/output error
You could repeat the test with 'ext3' on the USB stick, since 'ext4' file systems might be more vulnerable to this kind of tests. My USB stick is industrial grade, designed to withstand repeated power losses at any time. It costs at least an order of magnitude more than a commercial grade one with same capacity (4 GB). This might explain why I got no kernel panic. Btw, there are significant quality differences between commercial grade USB sticks from different vendors, so you should probably buy a new one of a well known brand.

Regards,
Trond Melen
Attachments:
open | download - console-with-stress.lst (14.4 KB)
Re: Debian on Netgear RN102
September 03, 2020 04:43PM
There are quite a bit to digest here. So please remind me if I have not addressed any issue above.

@whitepawn,

Your log was cut off on the right so I could not see what capacity the Ultra Fit is.

- The 32GB Ultra Fit has problems using as rootfs. This also likely has something to do with it is a USB 3.0 drive, plugged into a USB 2.0 port. I cannot prove it, but my hunch is the controller in the drive has some problem. I have seen this error with the Sandisk Ultra Fit 32GB. Just clone it to another USB drive is usually make things go smoother.

- If you have not enable swap, do that and use swap file that is at least 4x the memory. So the swap file should be at least 2GB.


Update: I can see it now by putting your post in edit mode. It is a 16 GB Ultra Fit. A very good USB drive (this is what I use for rootfs in ~10 of my boxes). But to prove to yourself that the system does not have any problem, you could try to use a Sandisk USB 2.0 thumb drive.


@Trond,

systemd-udevd running is normal. Don't worry about it. In the old days, it is just udev. Since systemd and udev have merged into systemd source tree, udev name has changed to systemd-udev, but there is no systemd involved in running udev under sysvinit.

Since the kernel assigns eth0 to the port, you can set the env ethaddr to the same MAC address as eth1addr in u-boot. So it will be correct regardless of kernel behavior.

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



Edited 1 time(s). Last edit at 09/03/2020 05:10PM by bodhi.
Re: Debian on Netgear RN102
September 03, 2020 05:02PM
Trond,


Quote

The fw_env.config is wrong for RT102 (but correct for Mirabox, I assume).

No it is not wrong as I can tell from your fw_printenv output. Could you repost what you think is wrong?

Quote

Orderly shut down through a long push on the power button is missing.

This is not missing. As I mentioned, you will need to set it up with esekeyd.

Quote

Automatic restart after a power loss from real time clock alarm is missing.

I will need to look at this issue. It must be because the RTC chip is a non-Marvell chip. If I am correct, the mainline driver for this isl12057 chip is old and needs some update to conform to the latest binding. I've seen this issue on one of the other Kirkwood boxes.

Update:

Try this to see it is really not in the /sys/class:
ls -l  /sys/class/rtc/rtc0/device/power/wakeup

Update 2:

It was the NSA310S that has similar problem with rtcwake. I have not sucessfully patched the driver yet. But it is under investigation.

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



Edited 3 time(s). Last edit at 09/03/2020 10:48PM by bodhi.
tme
Re: Debian on Netgear RN102
September 04, 2020 03:16AM
Hi bodhi,

Quote

[   27.104494] systemd-udevd[1710]: Could not generate persistent MAC address for eth0: No such file or directory
udev name has changed to systemd-udev, but there is no systemd involved in running udev under sysvinit.

Thanks! I don't want to dig deeper into this right now.

Quote

you can set the env ethaddr to the same MAC address as eth1addr in u-boot

We agree, but this requires a serial console, so my suggestion is to do it with 'fw_setenv' after first boot.

Quote

Quote

The fw_env.config is wrong for RT102 (but correct for Mirabox, I assume).

No it is not wrong as I can tell from your fw_printenv output. Could you repost what you think is wrong?

I'm sorry for having been unclear. Maybe the source of this misunderstanding is that when I wrote "wrong" or "missing", I did not clarify if it was wrong or missing in the latest kernel, or wrong or missing from the system consisting of the latest root file system and the kernel?

This is what is wrong for RT102:
tar xf /tmp/Debian-5.2.9-mvebu-tld-1-rootfs-bodhi.tar.bz2 ./etc/fw_env.config 
cat ./etc/fw_env.config
# MTD device name	Device offset	Env. size	Flash sector size	Number of sectors
/dev/mtd1		0x0000		0x80000		0x20000			4
And this is correct for RT102:
# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors
/dev/mtd1               0x00000         0x20000         0x20000
I suggest you include both versions in your next root file system, say, 'fw_env.config-512k' and 'fw_env.config-128k', and let 'rc.local' copy the correct one to 'fw_env.config' depending on some criteria. Of course, the criteria must be based on some information from the kernel and not information from the u-boot environment, since access to that environment depends on 'fw_env.config'.

Quote

As I mentioned, you will need to set it up with esekeyd.

We agree. It's only the setup that is missing.

I'll come back to you about 'rtcwake'.

First I hope you can help me resolve a 5.8.5 boot issue. Armed with serial console again:
Tail of RT102 serial console:
[    5.582241][    T1] 5 cmdlinepart partitions found on MTD device pxa3xx_nand-0
[    5.589433][ T1202] sd 0:0:0:0: [sda] Attached SCSI removable disk
[    5.595794][    T1] Creating 5 MTD partitions on "pxa3xx_nand-0":
[    5.601436][    T1] 0x000000000000-0x000000180000 : "u-boot"
[    5.608934][    T1] 0x000000180000-0x0000001a0000 : "u-boot-env"
[    5.617393][    T1] 0x000000200000-0x000000800000 : "uImage"
[    5.625515][    T1] 0x000000800000-0x000000c00000 : "minirootfs"
[    5.633742][    T1] 0x000000c00000-0x000008000000 : "ubifs"
[    5.643547][    T1] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[    5.652672][    T1] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[    5.666189][    T1] libphy: Fixed MDIO Bus: probed
[    5.675790][    T1] libphy: orion_mdio_bus: probed
[    5.695371][    T1] mdio_bus d0072004.mdio-mii: MDIO device at address 1 is missing.
As reported here:

Quote

After 54 seconds the box shuts down completely.

When first installing Linux kernel 4.20.6 and then upgrading to 5.8.5, this was not an issue:
From Linux kernel 5.8.5 dmesg output:
[    4.992159] 5 cmdlinepart partitions found on MTD device pxa3xx_nand-0
[    4.998869] Creating 5 MTD partitions on "pxa3xx_nand-0":
[    5.004489] 0x000000000000-0x000000180000 : "u-boot"
[    5.011986] 0x000000180000-0x0000001a0000 : "u-boot-env"
[    5.020327] 0x000000200000-0x000000800000 : "uImage"
[    5.028393] 0x000000800000-0x000000c00000 : "minirootfs"
[    5.036819] 0x000000c00000-0x000008000000 : "ubifs"
[    5.046779] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[    5.055791] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[    5.069036] libphy: Fixed MDIO Bus: probed
[    5.078776] libphy: orion_mdio_bus: probed
[    5.101027] mvneta d0074000.ethernet eth0: Using random mac address ca:12:4b:b8:64:79
The full serial console output from the failing 5.8.5 boot and the full 'dmesg' output from the successful 5.8.5 boot are both attached.

So, is it really necessary to use Linux kernel 4.20.6 as a stepping stone to install 5.8.5?

Regards,
Trond Melen
Attachments:
open | download - dmesg.lst (25.7 KB)
open | download - bootlog-54-seconds.lst (21.2 KB)
Re: Debian on Netgear RN102
September 04, 2020 03:57AM
Trond,

What I've epxplained was the whole story why the udev name changed. The udev source code is now in the same code tree as systemd, but it can be run independently. There is nothing more than that.

Regarding the env mtd in the rootfs:
/dev/mtd1		0x0000		0x80000		0x20000			4

I can see why you were confused about /etc/fw_env.config. The rootfs is a generic rootfs for all MVEBU boxes. This is only an example for a typical fw_env.config. It does not apply to all MVEBU boxes. Each of these boxes has a different u-boot version and different mtd definition..

Although actually this is the definition for NAS326 env mtd. The basic rootfs does not contain specific info for any box. The installation step for a specific box must include this information so that the envs can be accessed later in Debian.

Similarly, the rootfs /etc/rc.local has several echo commands to control the LEDs, but those do not apply to all MVEBU boxes. They serve as examples only.

> So, is it really necessary to use Linux kernel
> 4.20.6 as a stepping stone to install 5.8.5?

No, it is not necessary. You could use kernel 5.8.5 in the same instruction steps for the Mirabox installation.

Let me take a look at the boot logs to see why it was reset at 54 seconds.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Netgear RN102
September 04, 2020 04:20AM
whitepawn,

> By the way could you please share kernel soruce
> code with us to compile ourselves bodhi if
> possible?

It's all in the released tarball that you've downloaded! This tarball have the deb, DTBs, and zImage files for installation, and also has the kernel patch and config.

Quote

Download at Dropbox

linux-5.8.5-mvebu-370xp-tld-1-bodhi.tar.bz2

md5:
17c3e1784dea18b2a3587a6ebb7aa894
sha256:
655646c0bd09b047b6c9ec198579cd2e345e19c5a8f32787a0979532a3b601d4

This tarball contains 6 files:

Quote

linux-image-5.8.5-mvebu-370xp-tld-1_1.0_armhf.deb
linux-headers-5.8.5-mvebu-370xp-tld-1_1.0_armhf.deb
zImage-5.8.5-mvebu-370xp-tld-1
config-5.8.5-mvebu-370xp-tld-1
linux-dtb-5.8.5-mvebu-370xp-tld-1.tar
linux-5.8.5-mvebu-370xp-tld-1.patch

You only need these 2 files to build your own kernel.
linux-5.8.5-mvebu-370xp-tld-1.patch
config-5.8.5-mvebu-370xp-tld-1
Get the mainline kernel source tree for 5.8.5 from kernel.org (or clone Linux GitHub). Apply the patch. Copy the config to the source tree. And build.

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

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: