Welcome! Log In Create A New Profile

Advanced

Changing NAND boot process on Western Digital My Cloud Mirror Gen1

Posted by buco 
Changing NAND boot process on Western Digital My Cloud Mirror Gen1
December 28, 2021 03:03PM
Hi,

I adopted someone's old Western Digital My Cloud Mirror Gen1 (Marvell-370) which was under a water leak and no longer booted. I took it apart, I cleaned it up, solderde a serial connection on UART, put other disks in it, installed Debian on it and sure enough, it's up and running again! This is my first time playing with the ARM boot process and it's been a learning curve so far.

Now I'd like to take it just a little step further. I'd like to boot the uImage from NAND, no longer from my TFTP server. Also it'd be nice if I can also install busybox on NAND.

But no idea where and how to start. Is there someone who can get me started?

Thanks a lot!
Re: Changing NAND boot process on Western Digital My Cloud Mirror Gen1
December 28, 2021 04:49PM
buco,

> installed Debian on
> it and sure enough, it's up and running again!

> Now I'd like to take it just a little step
> further. I'd like to boot the uImage from NAND, no
> longer from my TFTP server. Also it'd be nice if I
> can also install busybox on NAND.

Power up, interrupt serial console at count down, and

printenv
And then boot as you have been doing.

Log in to Debian, and

cat /proc/mtd

And post the entire serial console log (from u-boot banner until the last output of this session).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Changing NAND boot process on Western Digital My Cloud Mirror Gen1
December 29, 2021 01:11AM
@bodhi, thanks for your reply. Asking support, no info given, ... sorry :)

BootROM 1.08
Booting from NAND flash
lHigh speed PHY - Version: 2.1.2 (COM-PHY-V20) 
Update PEX Device ID 0x67100
High speed PHY - Ended Successfully
DDR3 Training Sequence - Ver 4.5.0 
DDR3 Training Sequence - Ended Successfully 
Status = MV_OK
BootROM: Image checksum verification PASSED

 ** LOADER **


U-Boot 2011.12 (Dec 24 2013 - 20:21:45) Marvell version: v2011.12 2013_Q1.2 (ALPHA U-BOOT : 1.0)

Board: RD-88F6710_ALpha_KingsCanyon
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
l
Map:   Code:		0x1fef5000:0x1ff9faac
       BSS:		0x1ffef784
       Stack:		0x1f9f4ef8
       Heap:		0x1f9f5000:0x1fef5000

NAND:  flash id : daad
256 MiB
MMC:   MRVL_MMC: 0
Bad block table found at page 131008, version 0x01
Bad block table found at page 130944, version 0x01
nand_read_bbt: Bad block at 0x000005a60000
PEX 0: Root Complex Interface, Detected Link X1, GEN 2.0
PEX 0.1(1): Detected No Link.
FPU not initialized
USB 0: Host Mode
USB 1: Host Mode
Modules/Interfaces Detected:
       RGMII1 Phy
       PEX0 (Lane 0)
       PEX1 (Lane 1)
       SATA0 (Lane 2)
       SATA1 (Lane 3)
Not Marvell PHY id1 ffff id2 ffff
Enable HD1
Enable HD2
Net:   egiga1
Warning: egiga1 MAC addresses don't match:
Address in SROM is         00:50:43:02:00:00
Address in environment is  00:50:43:02:02:00

Hit any key to stop autoboot:  0 

NAND read: device 0 offset 0x500000, size 0x500000
 5242880 bytes read: OK

NAND read: device 0 offset 0xa00000, size 0x500000
 5242880 bytes read: OK
## Booting image at 00a00000 ...
## Booting kernel from Legacy Image at 00a00000 ...
   Image Name:   Linux-3.2.40
   Created:      2018-11-16   4:28:51 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3115296 Bytes = 3 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 00f00000 ...
   Image Name:   Ramdisk
   Created:      2018-12-20   7:27:48 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    2104783 Bytes = 2 MiB
   Load Address: 00e00000
   Entry Point:  00e00000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
mInitializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Linux version 3.2.40 (kman@kmachine) (gcc version 4.6.4 (Linaro GCC branch-4.6.4. Marvell GCC Dev 201310-2126.3d181f66 64K MAXPAGESIZE ALIGN) ) #1 Fri Nov 16 12:28:49 CST 2018
CPU: Marvell PJ4Bv7 Processor [561f5811] revision 1 (ARMv7), cr=10c53c7d
CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
Machine: Marvell Armada-370
Using UBoot passing parameters structure
>>>>>>>Tag MAC 00:02:02:43:50:00
>>>>>>>Tag MAC 00:00:02:43:50:00
Memory policy: ECC disabled, Data cache writealloc
Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 16368
Kernel command line: root=/dev/ram console=ttyS0,115200 max_loop=32
PID hash table entries: 2048 (order: -2, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 3, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 2, 131072 bytes)
allocated 262144 bytes of page_cgroup
please try 'cgroup_disable=memory' option if you don't want memory cgroups
Memory: 512MB = 512MB total
Memory: 506528k/506528k available, 17760k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff8000   (  32 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xa0800000 - 0xfa800000   (1440 MB)
    lowmem  : 0x80000000 - 0xa0000000   ( 512 MB)
    modules : 0x7f000000 - 0x80000000   (  16 MB)
      .text : 0x80008000 - 0x805b8000   (5824 kB)
      .init : 0x805b8000 - 0x805e8000   ( 192 kB)
      .data : 0x805e8000 - 0x80620a20   ( 227 kB)
       .bss : 0x80620a44 - 0x8066aa38   ( 296 kB)
NR_IRQS:256
a370_time_init
sched_clock: 32 bits at 600MHz, resolution 1ns, wraps every 7158ms
Calibrating delay loop... 1196.85 BogoMIPS (lpj=5984256)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 4096
Initializing cgroup subsys cpuacct
Initializing cgroup subsys memory
Initializing cgroup subsys devices
CPU: Testing write buffer coherency: ok
hw perfevents: no hardware support available
devtmpfs: initialized
xor: measuring software checksum speed
   arm4regs  :   169.600 MB/sec
   8regs     :   166.400 MB/sec
   32regs    :   166.400 MB/sec
xor: using function: arm4regs (169.600 MB/sec)
NET: Registered protocol family 16
L0 cache Enabled
Speculative Prefetch Disabled
Aurora L2 Cache Enabled
Support IO coherency.
Enable DLB and DRAM write coalescing

CPU Interface
-------------
SDRAM_CS0 ....base 00000000, size 512MB 
SDRAM_CS1 ....disable
SDRAM_CS2 ....disable
SDRAM_CS3 ....disable
DEVICE_CS0 ....base f2000000, size  32MB 
DEVICE_CS1 ....no such
DEVICE_CS2 ....no such
DEVICE_CS3 ....no such
PEX0_MEM ....base e0000000, size  32MB 
PEX0_IO ....base f1100000, size   1MB 
PEX1_MEM ....base e2000000, size  32MB 
PEX1_IO ....base f1200000, size   1MB 
INTER_REGS ....base f1000000, size   1MB 
DMA_UART ....no such
SPI_CS0 ....base f0000000, size  16MB 
SPI_CS1 ....no such
SPI_CS2 ....no such
SPI_CS3 ....no such
SPI_CS4 ....no such
SPI_CS5 ....no such
SPI_CS6 ....no such
SPI_CS7 ....no such
BOOT_ROM_CS ....no such
DEV_BOOTCS ....base f5000000, size  16MB 
PMU_SCRATCHPAD ....no such
CRYPT0_ENG ....base c8010000, size  64KB 

  Marvell Armada370 Board-- RD-88F6710_Alpha  Soc: MV6710 A1 LE
  LSP version: linux-3.2.y-2013_Q1.2p2 (32KB SW Page Size)


 Detected Tclk 200000000, SysClk 600000000, FabricClk 600000000
Marvell USB EHCI Host controller #0: 90017920
Marvell USB EHCI Host controller #1: 90017720
PCI: bus0: Fast back to back transfers disabled
PCI: bus1: Fast back to back transfers enabled
pci 0000:00:00.0: BAR 0: assigned [mem 0xe0000000-0xe0001fff 64bit]
pci 0000:00:00.0: BAR 0: set to [mem 0xe0000000-0xe0001fff 64bit] (PCI address [0xe0000000-0xe0001fff])
bio: create slab <bio-0> at 0
raid6: int32x1    340 MB/s
raid6: int32x2    353 MB/s
raid6: int32x4    275 MB/s
raid6: int32x8    280 MB/s
raid6: using algorithm int32x2 (353 MB/s)
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Switching to clocksource armada370_clocksource
NET: Registered protocol family 2
IP route cache hash table entries: 8192 (order: 0, 32768 bytes)
TCP established hash table entries: 16384 (order: 2, 131072 bytes)
TCP bind hash table entries: 16384 (order: 1, 65536 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP reno registered
UDP hash table entries: 2048 (order: 0, 32768 bytes)
UDP-Lite hash table entries: 2048 (order: 0, 32768 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Trying to unpack rootfs image as initramfs...
rootfs image is not initramfs (no cpio magic); looks like an initrd
Freeing initrd memory: 2016K
CESA test started: bufNum = 1, bufSize = 20000
Cesa Test Start: pMbufSrc=90024060, pFragsSrc=90272000, pMbufDst=90023860, pFragsDst=90270000
mvCesaInit: channels=1, session=32, queue=256
cesadev_init(805bfbe4)
Armada XP hwmon thermal sensor initialized.
Initializing Armada-XP CPU power management  (WFI)
VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 8192 (order 0, 32768 bytes)
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
fuse init (API version 7.17)
SGI XFS with security attributes, large block/inode numbers, no debug enabled
msgmni has been set to 992
async_tx: api initialized (async)
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Initializing ths8200_init
Initializing dove_adi9889_init
mv_xor_shared mv_xor_shared.0: Marvell shared XOR driver
mv_xor_shared mv_xor_shared.1: Marvell shared XOR driver
mv_xor mv_xor.0: Marvell XOR: ( xor )
mv_xor mv_xor.1: Marvell XOR: ( xor )
mv_xor mv_xor.2: Marvell XOR: ( cpy )
mv_xor mv_xor.3: Marvell XOR: ( fill cpy )
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 41) is a 16550A
console [ttyS0] enabled
serial8250.1: ttyS1 at MMIO 0xf1012100 (irq = 42) is a 16550A
brd: module loaded
loop: module loaded
sata_mv sata_mv.0: slots 32 ports 2
scsi0 : sata_mv
scsi1 : sata_mv
ata1: SATA max UDMA/133 irq 55
ata2: SATA max UDMA/133 irq 55
armada-nand armada-nand.0: Initialize HAL based NFC in 8bit mode with DMA Disabled using BCH 4bit ECC
flash read_id : daad
NAND device: Manufacturer ID: 0xad, Chip ID: 0xda (Hynix NAND 256MiB 3,3V 8-bit)
Bad block table found at page 131008, version 0x01
Bad block table found at page 130944, version 0x01
nand_read_bbt: bad block at 0x000005a60000
Creating 7 MTD partitions on "armada-nand":
0x000000000000-0x000000500000 : "u-Boot"
0x000000500000-0x000000a00000 : "uImage"
0x000000a00000-0x000000f00000 : "ramdisk"
0x000000f00000-0x00000d800000 : "image.cfs"
0x00000dd00000-0x00000ec00000 : "rescue firmware"
0x00000ec00000-0x000010000000 : "config"
0x00000d800000-0x00000dd00000 : "reserve"
mv_eth_probe: port_mask=0x3, cpu_mask=0x1 
  o 2 Giga ports supported
  o SKB recycle supported (Enabled)
  o NETA acceleration mode 1
  o RX Queue support: 1 Queues * 128 Descriptors
  o TX Queue support: 1 Queues * 532 Descriptors
  o GSO supported
  o GRO supported
  o Receive checksum offload supported
  o Transmit checksum offload supported
  o Driver ERROR statistics enabled

  o Loading network interface(s)

  o Warning: GbE port 0 is not connected to PHY/RGMII/Switch, skip initialization


  o Port 1 is connected to Linux netdevice
	giga p=1: mtu=1500, mac=900b1e6c
    o egiga0, ifindex = 2, GbE port = 1

sky2: driver version 1.30
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci_marvell ehci_marvell.0: Marvell Orion EHCI
ehci_marvell ehci_marvell.0: new USB bus registered, assigned bus number 1
ehci_marvell ehci_marvell.0: irq 45, io base 0xfbb50100
ehci_marvell ehci_marvell.0: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
ehci_marvell ehci_marvell.1: Marvell Orion EHCI
ehci_marvell ehci_marvell.1: new USB bus registered, assigned bus number 2
ehci_marvell ehci_marvell.1: irq 46, io base 0xfbb51100
ehci_marvell ehci_marvell.1: USB 2.0 started, EHCI 1.00
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
xhci_hcd 0000:00:00.0: xHCI Host Controller
xhci_hcd 0000:00:00.0: new USB bus registered, assigned bus number 3
xhci_hcd 0000:00:00.0: irq 58, io mem 0xe0000000
xhci_hcd 0000:00:00.0: Failed to enable MSI-X
xhci_hcd 0000:00:00.0: failed to allocate MSI entry
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 2 ports detected
xhci_hcd 0000:00:00.0: xHCI Host Controller
xhci_hcd 0000:00:00.0: new USB bus registered, assigned bus number 4
hub 4-0:1.0: USB hub found
hub 4-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
i2c /dev entries driver
md: linear personality registered for level -1
md: raid0 personality registered for level 0
md: raid1 personality registered for level 1
md: raid10 personality registered for level 10
md: raid6 personality registered for level 6
md: raid5 personality registered for level 5
md: raid4 personality registered for level 4
ata1: SATA link down (SStatus 0 SControl F300)
device-mapper: ioctl: 4.22.0-ioctl (2011-10-19) initialised: dm-devel@redhat.com
cpuidle: using governor ladder
cpuidle: using governor menu
TCP cubic registered
NET: Registered protocol family 17
8021q: 802.1Q VLAN Support v1.8
VFP support v0.3: implementor 56 architecture 2 part 20 variant 9 rev 6
registered taskstats version 1
ata2: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
ata2.00: ATA-9: WDC WD30EZRX-00DC0B0, 80.00A80, max UDMA/133
ata2.00: 5860533168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata2.00: configured for UDMA/133
scsi 1:0:0:0: Direct-Access     ATA      WDC WD30EZRX-00D 80.0 PQ: 0 ANSI: 5
sd 1:0:0:0: [sda] 5860533168 512-byte logical blocks: (3.00 TB/2.72 TiB)
sd 1:0:0:0: [sda] 4096-byte physical blocks
sd 1:0:0:0: Attached scsi generic sg0 type 0
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sda: sda1 sda2 sda3 sda4 sda5 sda6 sda7 sda8
sd 1:0:0:0: [sda] Attached SCSI disk
md: Skipping autodetection of RAID arrays. (raid=autodetect will force)
RAMDISK: gzip image found at block 0
VFS: Mounted root (ext2 filesystem) on device 1:0.
Freeing init memory: 192K
init started: BusyBox v1.20.2 (2014-10-30 15:26:14 CST)
starting pid 478, tty '': '/etc/rc.sh'
** Mounting /etc/fstab
umount: can't umount /proc: Invalid argument
umount: can't umount /usr/local/modules: Invalid argument
sh: hotPlug.sh: not found
sh: can't open '/usr/sbin/pre_usb.sh'
sh: can't open '/usr/sbin/pre_usb.sh'
sh: can't open '/usr/sbin/pre_usb.sh'
sh: can't open '/usr/sbin/pre_usb.sh'
UBI: attaching mtd5 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    126976 bytes
UBI: smallest flash I/O unit:    2048
UBI: VID header offset:          2048 (aligned 2048)
UBI: data offset:                4096
UBI: max. sequence number:       58585
UBI: attached mtd5 to ubi0
UBI: MTD device name:            "config"
UBI: MTD device size:            20 MiB
UBI: number of good PEBs:        152
UBI: number of bad PEBs:         8
UBI: number of corrupted PEBs:   0
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     1
UBI: available PEBs:             22
UBI: total number of reserved PEBs: 130
UBI: number of PEBs reserved for bad PEB handling: 2
UBI: max/mean erase counter: 521/385
UBI: image sequence number:  -913937646
UBI: background thread "ubi_bgt0d" started, PID 502
UBI device number 0, total 152 LEBs (19300352 bytes, 18.4 MiB), available 22 LEBs (2793472 bytes, 2.7 MiB), LEB size 126976 bytes (124.0 KiB)
UBIFS: mounted UBI device 0, volume 0, name "config"
UBIFS: file system size:   14602240 bytes (14260 KiB, 13 MiB, 115 LEBs)
UBIFS: journal size:       1015809 bytes (992 KiB, 0 MiB, 6 LEBs)
UBIFS: media format:       w4/r0 (latest is w4/r0)
UBIFS: default compressor: lzo
UBIFS: reserved for root:  689699 bytes (673 KiB)
umount: can't umount /usr/local/tmp/image.cfs: No such file or directory
rm: can't remove '/usr/local/tmp/image.cfs': No such file or directory
umount: can't umount /usr/local/tmp: Invalid argument
first good block is 0
image len = 100331520 , image checksum = 77ba3883
umount: can't umount /usr/local/tmp: Invalid argument
dump image checksum=77ba3883
mount cmd:busybox mount -t squashfs -o loop /usr/local/tmp/image.cfs /usr/local/modules
cp: can't stat '/tmp1/*': No such file or directory
ln: /lib/./liblber-2.4.so.2.5.6: File exists
ln: /lib/./libminiupnpc.so: File exists
ln: /lib/./libnatpmp.so: File exists
ln: /lib/./libpam.so.0.81.6: File exists
ln: /usr/local/sbin/alert_email_config.sh: File exists
ln: /usr/sbin/language.sh: File exists
dev.raid.speed_limit_max = 1000
jnl: driver (lke_9.0.0 lke_9.0.0_r239626_b47, LBD=ON) loaded at 7f000000
ufsd: module license 'Commercial product' taints kernel.
Disabling lock debugging due to kernel taint
ufsd:: trace mask set to 0000000f
ufsd: driver (lke_9.0.0 lke_9.0.0_r239626_b47, LBD=ON, acl, ioctl, bdi, sd2(0), fua, bz, tr) loaded at 7f020000
NTFS support included
Hfs+/HfsJ support included
optimized: speed
Build_for__WD_Kings_Canyon_k3.2.40_32k_hybrid_2014-07-28_lke_9.0.0_r239626_b47

tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
lrwxrwxrwx    1 root     0               17 Jan  1 00:00 /usr/sbin//raid_config -> /usr/sbin/diskmgr
lrwxrwxrwx    1 root     0               17 Jan  1 00:00 /usr/sbin//raid_expand -> /usr/sbin/diskmgr
lrwxrwxrwx    1 root     0               17 Jan  1 00:00 /usr/sbin//raid_expand_disks -> /usr/sbin/diskmgr
lrwxrwxrwx    1 root     0               17 Jan  1 00:00 /usr/sbin//raid_update_info -> /usr/sbin/diskmgr
hardware init
first good block is 0
mtd check v1.06.06032015
config mtd type is UBIFS
device = /usr/local/config
Total size     = 12500 Kbytes
Used size     = 552 Kbytes
Free size     = 11948 Kbytes
percentage = 5
/usr/local/config free size is 12234752
** copy config files
*** Copy orion.db from flash ****
cp: can't stat '/usr/local/modules/files/fan_temperature.txt': No such file or directory
*** symlink onbrd.ini from flash ****
/etc/sysinit.d/wdlog: line 13: /etc/system.conf: No such file or directory
** set loopback interface
UBI: attaching mtd6 to ubi1
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    126976 bytes
UBI: smallest flash I/O unit:    2048
UBI: VID header offset:          2048 (aligned 2048)
UBI: data offset:                4096
UBI: max. sequence number:       74
UBI: attached mtd6 to ubi1
UBI: MTD device name:            "reserve"
UBI: MTD device size:            5 MiB
UBI: number of good PEBs:        40
UBI: number of bad PEBs:         0
UBI: number of corrupted PEBs:   0
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     1
UBI: available PEBs:             0
UBI: total number of reserved PEBs: 40
UBI: number of PEBs reserved for bad PEB handling: 2
UBI: max/mean erase counter: 3/2
UBI: image sequence number:  1575340750
UBI: background thread "ubi_bgt1d" started, PID 2454
UBI device number 1, total 40 LEBs (5079040 bytes, 4.8 MiB), available 0 LEBs (0 bytes), LEB size 126976 bytes (124.0 KiB)
UBIFS: mounted UBI device 1, volume 0, name "reserve"
UBIFS: file system size:   3174400 bytes (3100 KiB, 3 MiB, 25 LEBs)
UBIFS: journal size:       1015809 bytes (992 KiB, 0 MiB, 6 LEBs)
UBIFS: media format:       w4/r0 (latest is w4/r0)
UBIFS: default compressor: lzo
UBIFS: reserved for root:  149934 bytes (146 KiB)
UBIFS: un-mount UBI device 1, volume 0
first good block is 0
mac1 = 00:90:A9:E3:4F:01
lan0:ifconfig egiga0 hw ether 00:90:A9:E3:4F:01
egiga0: mac address changed
egiga0: link up
egiga0: started
set lan0 speed
Model ID : Zion
first good block is 0
Zion
ln: /usr/local/model/web/pages/images/./icon: File exists
first good block is 0
hidden encryption: 1
old firmware ver:2.12.127.1219.2018
new firmware ver:2.12.127.1219.2018
rm: can't remove '/tmp/fix_wd_config': No such file or directory
*** execute rc.init.sh
awk: /var/run/udhcpc0.pid: No such file or directory
udhcpc (v1.20.2) started
cat: can't open '/tmp/setip.0': No such file or directory
Sending discover...
Sending select for 10.10.10.248...
Lease of 10.10.10.248 obtained, lease time 86400
deleting routers
route: SIOCDELRT: No such process
killall: crond: no process killed
crond[2703]: crond: crond (busybox 1.20.2) started, log level 8
RTNETLINK answers: Operation not supported
RTNETLINK answers: Operation not supported
call load_module network
Cannot get device settings: No such device
Cannot get wake-on-lan settings: No such device
Cannot get message level: No such device
Cannot get link status: No such device
Initializing UPnP Sdk with
	ipaddress = (null) port = 0
UPnP Initialized
	ipaddress= 10.10.10.248 port = 49152
Specifying the webserver root directory -- /etc/upnp
Registering the RootDevice
	 with desc_doc_url: http://10.10.10.248:49152/nasdevicedesc.xml
RootDevice Registered
Initializing State Table
State Table Initialized
Advertisements Sent
crond[2778]: crond: crond (busybox 1.20.2) started, log level 8
--1970-01-01 00:00:42--  http://download.wdc.com/nas/WDMyCloudEX2_HDD_Blacklist.xml
Resolving download.wdc.com... 34.216.127.94, 35.165.176.197, 34.209.94.17, ...
Connecting to download.wdc.com|34.216.127.94|:80... Cannot get device settings: No such device
Cannot get wake-on-lan settings: No such device
Cannot get message level: No such device
Cannot get link status: No such device
Initializing UPnP Sdk with
	ipaddress = (null) port = 0
UPnP Initialized
	ipaddress= 10.10.10.248 port = 49153
Specifying the webserver root directory -- /etc/upnp
Registering the RootDevice
	 with desc_doc_url: http://10.10.10.248:49153/nasdevicedesc.xml
RootDevice Registered
Initializing State Table
State Table Initialized
sh: you need to specify whom to kill
connected.
HTTP request sent, awaiting response... Advertisements Sent
200 OK
Length: 256 [text/xml]
Saving to: '/tmp/temp_list.xml'

100%[======================================>] 256         --.-K/s   in 0s      

1970-01-01 00:00:43 (5.23 MB/s) - '/tmp/temp_list.xml' saved [256/256]

*** Copy CacheVolume data from flash ****
*** set Time Zone ****
$Usage: apache {start|stop|restart} {web/dav}
Thu Jan  1 01:00:44 CET 1970
*** get Time from rtc and set it into system ****
rtc: RTC time = 2021/12/27 Mon 16:9:34
Mon Dec 27 17:09:34 CET 2021
Set Date & time : sntp -K /dev/null -S -r time.windows.com
sntp 4.2.8@1.3265 Fri Jan  9 06:42:54 UTC 2015 (8)
2021-12-27 17:09:34.239680 (-0100) +0.944710 +/- 0.655436 time.windows.com 20.101.57.9 s3
NTP Server connected successfully!!!

Module IPC SERVER Version:(1.00.20090706)

ads=0
created mail daemon thread 0
POWER ON DEVICE!!
md0 state is 

Up_Send_Ctl : Can not find specified command "ErrStatus"
restart sysinfod...
sysinfod: full update begin...

rtc: system time: 2021/12/27 Mon 16:9:40
cat: can't open '/tmp/hw_detect_sata': No such file or directory
sysinfod: disk connected: previous=0xffffffff, now=0x0
--2021-12-27 17:09:40--  http://download.wdc.com/nas/WDMyCloudEX2_HDD_Blacklist.xml
Resolving download.wdc.com... 34.216.118.116, 34.209.94.17, 34.210.173.110, ...
Connecting to download.wdc.com|34.216.118.116|:80... 
connected.
HTTP request sent, awaiting response... 200 OK
Length: 256 [text/xml]
Saving to: '/tmp/temp_list.xml'

100%[======================================>] 256         --.-K/s   in 0s      

2021-12-27 17:09:41 (7.31 MB/s) - '/tmp/temp_list.xml' saved [256/256]

sysinfod: Disk2(sda) detected.
Starting system message bus
Loading x_tables.ko
Loading nf_conntrack.ko
nf_conntrack version 0.5.0 (7949 buckets, 31796 max)
Loading xt_conntrack.ko
Loading xt_state.ko
Loading xt_tcpudp.ko
Loading xt_recent.ko
Loading xt_limit.ko
Loading ip_tables.ko
ip_tables: (C) 2000-2006 Netfilter Core Team
Loading iptable_filter.ko
Loading nf_defrag_ipv4.ko
Loading nf_conntrack_ipv4.ko
Loading ipt_LOG.ko
PHY_LAN_NUMBER=1
BOND_ENABLE=0
VLAN0_ENABLE=0
VLAN1_ENABLE=0
--2021-12-27 17:09:43--  http://download.wdc.com/apps/WDMyCloudMirror/WDMyCloudMirror.xml
Resolving download.wdc.com... I/O warning : failed to load external entity "/var/www/xml/internal_backup.xml"
34.216.118.116, 44.226.106.124, 44.229.153.191, ...
Connecting to download.wdc.com|34.216.118.116|:80... /usr/local/modules/script/system_init: line 1040: /mnt/tmp6/ibuki/avahi_tm_serv: not found
cat: can't open '/var/run/traceroute_wd.pid': No such file or directory
ash: you need to specify whom to kill
killall: traceroute: no process killed
connected.
HTTP request sent, awaiting response... 200 OK
Length: 12025 (12K) [text/xml]
Saving to: '/var/www/xml/app_info.xml'

100%[======================================>] 12,025      --.-K/s   in 0.001s  

2021-12-27 17:09:44 (18.3 MB/s) - '/var/www/xml/app_info.xml' saved [12025/12025]

I/O warning : failed to load external entity "/var/www/xml/app_update.xml"
 3077 root      4096 S    avahi-daemon: running [WDMyCloudMirror.local]
sysinfod: disk connected: previous=0x0, now=0x2
--2021-12-27 17:09:52--  http://download.wdc.com/nas/WDMyCloudEX2_HDD_Blacklist.xml
Resolving download.wdc.com... 35.165.176.197, 44.226.106.124, 44.229.153.191, ...
Connecting to download.wdc.com|35.165.176.197|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 256 [text/xml]
Saving to: '/tmp/temp_list.xml'

100%[======================================>] 256         --.-K/s   in 0s      

2021-12-27 17:09:52 (7.18 MB/s) - '/tmp/temp_list.xml' saved [256/256]

waiting : [10]
^[[Amcu version 1.04

chk_io v1.04.20141112
system daemon v1.04.20141211
PIP is disabled, exiting.
Mon Dec 27 17:09:58 CET 2021 - %I - Communication Manager - Start

/usr/local/modules/script/system_init: line 1266: vvctl: not found
dev.raid.speed_limit_max = 200000

starting pid 3963, tty '/dev/ttyS0': '/bin/login'


BusyBox v1.20.2 (2014-10-30 15:26:14 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

root@WDMyCloudMirror / # 
root@WDMyCloudMirror / # 
root@WDMyCloudMirror / # 
root@WDMyCloudMirror / # killall: chk_hotplug: no process killed
call load_module
### create systemfile ###
/usr/sbin/load_module: line 541: can't create /sys/block/sdb/queue/read_ahead_kb: nonexistent directory
### sata_reload_application start ###
reboot
root@WDMyCloudMirror / # killall: quotacheck: no process killed
killall: chk_hotplug: no process killed
killall: op_server: no process killed
Cannot get device settings: No such device
Cannot get wake-on-lan settings: No such device
Cannot get message level: No such device
Cannot get link status: No such device
Initializing UPnP Sdk with
	ipaddress = (null) port = 0
UPnP Initialized
	ipaddress= 10.10.10.248 port = 49154
Specifying the webserver root directory -- /etc/upnp
Registering the RootDevice
	 with desc_doc_url: http://10.10.10.248:49154/nasdevicedesc.xml
RootDevice Registered
Initializing State Table
State Table Initialized
Starting atopacctd
Advertisements Sent
Starting atop system monitor  atop
atop started
*** APKG Daemon is starting ... ***
Rename is FAILE
USE 2nd Rename 
killall: smbd: no process killed
Starting wdnotifier
sh: you need to specify whom to kill
kill_running_process all...
sh: you need to specify whom to kill
LOCK itunes.sh
Touch itunes tmp file
sh: you need to specify whom to kill
wdnotifier started
Starting wdmcserver
mt-daapd db path no found .....
UNLOCK itunes.sh
sh: you need to specify whom to kill
killall: rsync: no process killed
Shutting down AFP services:
killall: netatalk: no process killed
Starting wdphotodbmerger
WDPhotodbmerger started  0
killall: smbd: no process killed
killall: chk_blockip: no process killed
killall: chk_blockip: no process killed
Stopping atopacct
Stopping atop system monitor atop 4390
Stopping wdnotifier
wdnotifier failed to stop
Stopping wdphotodbmerger
killall: sysinfod: no process killed
Stopping wdmcserver
 3077 root      4096 S    avahi-daemon: running [WDMyCloudMirror.local]
killall: elephantdriveDaemon: no process killed
### sata_reload_application end ###
/usr/sbin/kill_running_process: line 121: vvctl: not found
PHY_LAN_NUMBER=1
BOND_ENABLE=0
VLAN0_ENABLE=0
VLAN1_ENABLE=0
**LLTD DISABLE****
kill_running_process done.
!!! ### APKG Server Terminated ### !!!
killall: snmpd: no process killed
restart sysinfod...
sysinfod: full update begin...
sysinfod: disk connected: previous=0xffffffff, now=0x2
--2021-12-27 17:10:27--  http://download.wdc.com/nas/WDMyCloudEX2_HDD_Blacklist.xml
Resolving download.wdc.com... 44.229.153.191, 35.165.176.197, 44.226.106.124, ...
Connecting to download.wdc.com|44.229.153.191|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 256 [text/xml]
Saving to: '/tmp/temp_list.xml'

100%[======================================>] 256         --.-K/s   in 0s      

2021-12-27 17:10:27 (7.53 MB/s) - '/tmp/temp_list.xml' saved [256/256]

sysinfod: Disk2(sda) detected.
UBIFS: un-mount UBI device 0, volume 0
killall: system_daemon: no process killed
killall: fan_control: no process killed

Marvell>> printenv
CASset=min
MALLOC_len=5
autoload=no
baudrate=115200
bootargs=root=/dev/ram console=ttyS0,115200 max_loop=32
bootargs_end=:10.4.50.254:255.255.255.0:KW40:eth0:none
bootargs_root=root=/dev/nfs rw
bootcmd=nand read.e 0xa00000 0x500000 0x500000;nand read.e 0xf00000 0xa00000 0x500000;bootm 0xa00000 0xf00000
bootdelay=1
cacheShare=no
console=console=ttyS0,115200
disL2Cache=yes
disaMvPnp=no
eeeEnable=no
enaAutoRecovery=yes
enaClockGating=no
enaFPU=no
enaWrAllo=no
eth1addr=00:50:43:02:00:00
eth1mtu=1500
ethact=egiga1
ethaddr=00:50:43:02:02:00
ethmtu=1500
ethprime=egiga0
image_name=uImage
initrd_name=uInitrd
ipaddr=2.66.66.200
loadaddr=0x02000000
loads_echo=0
mtdids=nand0=armada-nand
mtdparts=mtdparts=armada-nand:4m(boot),-(rootfs)
mvNetConfig=mv_net_config=1,(00:50:43:11:11:11,0:1:2:3:4),mtu=1500
mv_pon_addr=00:50:43:00:00:02
nandEcc=1bit
netbsd_en=no
netmask=255.255.255.0
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
rootpath=/srv/oneiric
sata_delay_reset=0
sata_dma_mode=yes
serverip=2.66.66.32
standalone=fsload 0x2000000 $image_name;setenv bootargs $console $mtdparts root=/dev/mtdblock0 rw ip=$ipaddr:$serverip$bootargs_end; bootm 0x2000000;
stderr=serial
stdin=serial
stdout=serial
usb0Mode=host
usb1Mode=host
usb2Mode=device
usbActive=1
vxworks_en=no
yuk_ethaddr=00:00:00:EE:51:81

Environment size: 1516/524284 bytes

There seems to be no NAND recognized. I never tinkered with it but I guess it's because I have not compiled that into the kernel.
root@mcm:~# cat /proc/mtd 
dev:    size   erasesize  name
root@mcm:~# dmesg | grep mtd
root@mcm:~# dmesg | grep -i mtd
root@mcm:~# dmesg | grep -i nand
root@mcm:/usr/src/linux-stable# grep -i nand /usr/src/linux-stable/.config        
# NAND
# CONFIG_MTD_ONENAND is not set
# CONFIG_MTD_RAW_NAND is not set
# CONFIG_MTD_SPI_NAND is not set
# CONFIG_MTD_NAND_ECC_SW_HAMMING is not set
# CONFIG_MTD_NAND_ECC_SW_BCH is not set
# end of NAND
root@mcm:/usr/src/linux-stable# uname -r
5.16.0-rc7

EDIT 1:
I reconfigured the kernel and rebuilt it. But still no luck:

root@mcm:~# mtdinfo
Count of MTD devices:           0
root@mcm:~# cat /proc/mtd
dev:    size   erasesize  name
root@mcm:~# dmesg | grep mt
[    2.694784] mtdoops: mtd device (mtddev=name/number) must be supplied
root@mcm:~# dmesg | grep nand
[    2.700217] marvell-nfc soc:internal-regs:nand@d0000: invalid resource
[    2.705536] marvell-nfc: probe of soc:internal-regs:nand@d0000 failed with error -22
root@mcm:~# grep CONFIG_MTD /usr/src/linux-stable/.config | grep -v '\=y'
# CONFIG_MTD_TESTS is not set
# CONFIG_MTD_AR7_PARTS is not set
CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
# CONFIG_MTD_CFI_I4 is not set
# CONFIG_MTD_CFI_I8 is not set
# CONFIG_MTD_OTP is not set
# CONFIG_MTD_RAM is not set
# CONFIG_MTD_ROM is not set
# CONFIG_MTD_ABSENT is not set
# CONFIG_MTD_PHYSMAP is not set
# CONFIG_MTD_IMPA7 is not set
# CONFIG_MTD_PCI is not set
# CONFIG_MTD_INTEL_VR_NOR is not set
# CONFIG_MTD_PLATRAM is not set
# CONFIG_MTD_PMC551 is not set
# CONFIG_MTD_DATAFLASH is not set
# CONFIG_MTD_MCHP23K256 is not set
# CONFIG_MTD_MCHP48L640 is not set
# CONFIG_MTD_SST25L is not set
# CONFIG_MTD_SLRAM is not set
# CONFIG_MTD_PHRAM is not set
# CONFIG_MTD_MTDRAM is not set
# CONFIG_MTD_DOCG3 is not set
# CONFIG_MTD_ONENAND_VERIFY_WRITE is not set
# CONFIG_MTD_ONENAND_GENERIC is not set
# CONFIG_MTD_ONENAND_OTP is not set
# CONFIG_MTD_ONENAND_2X_PROGRAM is not set
# CONFIG_MTD_NAND_DENALI_PCI is not set
# CONFIG_MTD_NAND_DENALI_DT is not set
# CONFIG_MTD_NAND_CAFE is not set
# CONFIG_MTD_NAND_BRCMNAND is not set
# CONFIG_MTD_NAND_MXIC is not set
# CONFIG_MTD_NAND_CADENCE is not set
# CONFIG_MTD_NAND_ARASAN is not set
# CONFIG_MTD_NAND_INTEL_LGM is not set
# CONFIG_MTD_NAND_NANDSIM is not set
# CONFIG_MTD_NAND_RICOH is not set
# CONFIG_MTD_NAND_DISKONCHIP is not set
# CONFIG_MTD_LPDDR is not set
# CONFIG_MTD_LPDDR2_NVM is not set
# CONFIG_MTD_SPI_NOR_SWP_DISABLE is not set
# CONFIG_MTD_SPI_NOR_SWP_KEEP is not set
CONFIG_MTD_UBI_WL_THRESHOLD=4096
CONFIG_MTD_UBI_BEB_LIMIT=20
# CONFIG_MTD_UBI_FASTMAP is not set
# CONFIG_MTD_UBI_GLUEBI is not set
# CONFIG_MTD_UBI_BLOCK is not set
root@mcm:~#

It seems to be a Linux problem that it does not see the nand. I can "probe" it in U-boot.
Marvell>> nand info         

Device 0: nand0, sector size 128 KiB
  Page size      2048 b
  OOB size         64 b
  Erase size   131072 b
Marvell>> mt
  mtest mtdparts
Marvell>> mtdparts 

device nand0 <armada-nand>, # parts = 2
 #: name                size            offset          mask_flags
 0: boot                0x000000400000          0x000000000000          0
 1: rootfs              0x00000fc00000          0x000000400000          0

active partition: nand0,0 - (boot) 0x000000400000 @ 0x000000000000

defaults:
mtdids  : none
mtdparts: none
Marvell>>



Edited 2 time(s). Last edit at 12/29/2021 03:21AM by buco.
Re: Changing NAND boot process on Western Digital My Cloud Mirror Gen1
December 29, 2021 03:31AM
Second post since the post length was too long for one post.

This is the boot process from U-boot till the Debian prompt with my "custom" kernel. It might very well be that I "forgot" to enable something in the kernel. I do see a lot of errors which I still need to sift through :)

EDIT: I attached the .config file of my kernel.

EDIT2: I think the erorrs are unrelated. I guess they come from the Device Tree drivers which I guess are not needed, so I'll be compiling it again with the Device Tree drivers left out.

EDIT3: I think the error 'mtdoops: mtd device (mtddev=name/number) must be supplied' is a symptom of no /dev/mtd* being present. See Line 372 of mtdoops.c

EDIT4: I did load the mtdoops.ko module. Now it no longer borks but I still don't have any /dev/mtd* device
root@mcm:/lib/modules/5.16.0-rc7# insmod ./kernel/drivers/mtd/mtdoops.ko mtddev=/dev/oops
root@mcm:/lib/modules/5.16.0-rc7# echo $?
0
root@mcm:/lib/modules/5.16.0-rc7# ls -lah /dev/oops
ls: cannot access '/dev/oops': No such file or directory
root@mcm:/lib/modules/5.16.0-rc7# cat /proc/mtd 
dev:    size   erasesize  name
root@mcm:/lib/modules/5.16.0-rc7# ls /dev/m 
mapper/ md0     mem     
root@mcm:/lib/modules/5.16.0-rc7# cat /proc/mtd 
dev:    size   erasesize  name

EDIT 5: finally something:
root@mcm:/sys/devices# dmesg | grep -i nand
[    2.694272] marvell-nfc soc:internal-regs:nand@d0000: invalid resource
[    2.699538] marvell-nfc: probe of soc:internal-regs:nand@d0000 failed with error -22
root@mcm:/sys/devices#

EDIT 6:
Maybe the kernel looks in the wrong area? I found a similar discussion here. Maybe it's the DTS that is incorrect for my device?

Quote
Miquèl
Perhaps the issues comes from your device tree, as this lines says. You
should check the bindings and verify they are in sync.


I copied the info I guess is relevant. How do I check the .dts below is "in sync" with errr, somehting else?
nand@d0000 {
	status = "okay";
	compatible = "marvell,armada370-nand";
	num-cs = <1>;
	marvell,nand-enable-arbiter;
	nand-on-flash-bbt;
	nand-ecc-strength = <4>;
	nand-ecc-step-size = <512>;
					
	partitions {
		compatible = "fixed-partitions";
		#address-cells = <1>;
		#size-cells = <1>;
		
		partition@0 {
			label = "u-Boot";
			reg = <0x00000000 0x00500000>;	// Warning: New style: <start size> not old <start end> !
			read-only;
		};
		partition@500000 {
			label = "uImage";
			reg = <0x00500000 0x00500000>;
		};
		partition@a00000 {
			label = "ramdisk";
			reg = <0x00A00000 0x00500000>;
		};
		partition@f00000 {
			label = "image.cfs";
			reg = <0x00f00000 0x0c900000>;
		};
		partition@dd00000 {
			label = "rescue firmware";
			reg = <0x0dd00000 0x00f00000>;
		};
		partition@ec00000 {
			label = "config";
			reg = <0x0ec00000 0x01400000>;
		};
		partition@d800000 {
			label = "reserve";
			reg = <0x0d800000 0x00500000>;
	};
};

I'm not sure if it's relevant but part of printenv looks different then the information in the .dts.
mtdparts=mtdparts=armada-nand:4m(boot),-(rootfs)


EDIT 7: I'm currently compiling a ~recent 4.14 LTS kernel to see if my issue disappears if I boot in a pre 4.16.1 kernel. I did enabled these options:
CONFIG_MTD_NAND_ECC=y
CONFIG_MTD_NAND=y
CONFIG_MTD_NAND_PXA3xx=y

Marvell>> dhcp
BOOTP broadcast 1
BOOTP broadcast 2
*** Unhandled DHCP Option in OFFER/ACK: 28
*** Unhandled DHCP Option in OFFER/ACK: 119
*** Unhandled DHCP Option in OFFER/ACK: 28
*** Unhandled DHCP Option in OFFER/ACK: 119
DHCP client bound to address 10.10.10.145
Marvell>> setenv serverip 10.10.10.10
Marvell>> tftp ${loadaddr} uImage-nand-enabled
Using egiga1 device
TFTP from server 10.10.10.10; our IP address is 10.10.10.145
Filename 'uImage-nand-enabled'.
Load address: 0x2000000
Loading: #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 ###########################################
done
Bytes transferred = 4446765 (43da2d hex)
Marvell>> setenv bootargs 'root=/dev/md0 console=ttyS0,115200 max_loop=32 raid=autodetect'
Marvell>> set bootcmd "dhcp; tftp ${loadaddr} ${serverip}:uImage-nand-enabled; bootm"
Marvell>> bootm
## Booting image at 02000000 ...
## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   armada-370-wdmc-mirror-gen1
   Created:      2021-12-29   8:40:20 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4446701 Bytes = 4.2 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

DTB:0x00441FA0 (0x00003A4D)
C:0x000080E0-0x00445A60->0x00E7FE00-0x012BD780
DTB:0x012B9CC0 (0x00003AA2)
Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 5.16.0-rc7 (root@htpc) (gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2) #2 SMP Wed Dec 29 09:22:11 CET 2021
CPU: ARMv7 Processor [561f5811] revision 1 (ARMv7), cr=10c5387d
CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
OF: fdt: Machine model: WD MyCloud Mirror
Memory policy: Data cache writeback
Zone ranges:
  Normal   [mem 0x0000000000000000-0x000000001fffffff]
  HighMem  empty
Movable zone start for each node
Early memory node ranges
  node   0: [mem 0x0000000000000000-0x000000001fffffff]
Initmem setup node 0 [mem 0x0000000000000000-0x000000001fffffff]
CPU: All CPU(s) started in SVC mode.
percpu: Embedded 11 pages/cpu s14412 r8192 d22452 u45056
Built 1 zonelists, mobility grouping on.  Total pages: 129920
Kernel command line: root=/dev/md0 console=ttyS0,115200 max_loop=32 raid=autodetect
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
mem auto-init: stack:off, heap alloc:off, heap free:off
Memory: 504956K/524288K available (9216K kernel code, 508K rwdata, 2176K rodata, 1024K init, 337K bss, 19332K reserved, 0K cma-reserved, 0K highmem)
rcu: Hierarchical RCU implementation.
rcu: 	RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
L2C: DT/platform modifies aux control register: 0x12086302 -> 0x1a086302
Aurora cache controller enabled, 4 ways, 256 kB
Aurora: CACHE_ID 0x00000100, AUX_CTRL 0x1a086302
random: get_random_bytes called from start_kernel+0x480/0x630 with crng_init=0
Switching to timer-based delay loop, resolution 53ns
sched_clock: 32 bits at 18MHz, resolution 53ns, wraps every 114532461029ns
clocksource: armada_370_xp_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 101933890472 ns
Console: colour dummy device 80x30
Calibrating delay loop (skipped), value calculated using timer frequency.. 37.50 BogoMIPS (lpj=187500)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket -1, mpidr 0
Setting up static identity map for 0x100000 - 0x100060
mvebu-soc-id: MVEBU SoC ID=0x6710, Rev=0x1
mvebu-pmsu: Initializing Power Management Service Unit
rcu: Hierarchical SRCU implementation.
smp: Bringing up secondary CPUs ...
smp: Brought up 1 node, 1 CPU
SMP: Total of 1 processors activated (37.50 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 56 architecture 2 part 20 variant 9 rev 6
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 256 (order: 2, 16384 bytes, linear)
pinctrl core: initialized pinctrl subsystem
NET: Registered PF_NETLINK/PF_ROUTE protocol family
DMA: preallocated 256 KiB pool for atomic coherent allocations
thermal_sys: Registered thermal governor 'step_wise'
cpuidle: using governor ladder
cryptd: max_cpu_qlen set to 1000
raid6: int32x8  gen()   376 MB/s
raid6: int32x8  xor()   228 MB/s
raid6: int32x4  gen()   382 MB/s
raid6: int32x4  xor()   220 MB/s
raid6: int32x2  gen()   531 MB/s
raid6: int32x2  xor()   251 MB/s
raid6: int32x1  gen()   471 MB/s
raid6: int32x1  xor()   207 MB/s
raid6: using algorithm int32x2 gen() 531 MB/s
raid6: .... xor() 251 MB/s, rmw enabled
raid6: using intx1 recovery algorithm
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
Bluetooth: Core ver 2.22
NET: Registered PF_BLUETOOTH protocol family
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Bluetooth: L2CAP socket layer initialized
Bluetooth: SCO socket layer initialized
clocksource: Switched to clocksource armada_370_xp_clocksource
VFS: Disk quotas dquot_6.6.0
VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
FS-Cache: Loaded
CacheFiles: Loaded
NET: Registered PF_INET protocol family
IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)
tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
TCP bind hash table entries: 4096 (order: 3, 32768 bytes, linear)
TCP: Hash tables configured (established 4096 bind 4096)
UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
NET: Registered PF_UNIX/PF_LOCAL protocol family
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
PCI: CLS 0 bytes, default 64
Initialise system trusted keyrings
workingset: timestamp_bits=14 max_order=17 bucket_order=3
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
FS-Cache: Netfs 'cifs' registered for caching
Key type cifs.idmap registered
xor: measuring software checksum speed
   arm4regs        :  1151 MB/sec
   8regs           :   880 MB/sec
   32regs          :  1151 MB/sec
xor: using function: 32regs (1151 MB/sec)
async_tx: api initialized (async)
Key type asymmetric registered
Asymmetric key parser 'x509' registered
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
io scheduler kyber registered
armada-370-pinctrl f1018000.pin-ctrl: registered pinctrl driver
mvebu-pcie soc:pcie@82000000: host bridge /soc/pcie@82000000 ranges:
mvebu-pcie soc:pcie@82000000:      MEM 0x00f1040000..0x00f1041fff -> 0x0000040000
mvebu-pcie soc:pcie@82000000:      MEM 0x00f1080000..0x00f1081fff -> 0x0000080000
mvebu-pcie soc:pcie@82000000:      MEM 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
mvebu-pcie soc:pcie@82000000:       IO 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
mvebu-pcie soc:pcie@82000000:      MEM 0xffffffffffffffff..0x00fffffffe -> 0x0200000000
mvebu-pcie soc:pcie@82000000:       IO 0xffffffffffffffff..0x00fffffffe -> 0x0200000000
mvebu-pcie soc:pcie@82000000: PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [bus 00-ff]
pci_bus 0000:00: root bus resource [mem 0xf1040000-0xf1041fff] (bus address [0x00040000-0x00041fff])
pci_bus 0000:00: root bus resource [mem 0xf1080000-0xf1081fff] (bus address [0x00080000-0x00081fff])
pci_bus 0000:00: root bus resource [mem 0xf8000000-0xffdfffff]
pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
pci 0000:00:01.0: [11ab:6710] type 01 class 0x060400
pci 0000:00:01.0: reg 0x38: [mem 0x00000000-0x000007ff pref]
pci 0000:00:02.0: [11ab:6710] type 01 class 0x060400
pci 0000:00:02.0: reg 0x38: [mem 0x00000000-0x000007ff pref]
PCI: bus0: Fast back to back transfers disabled
pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
pci 0000:00:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
pci 0000:01:00.0: [1912:0015] type 00 class 0x0c0330
pci 0000:01:00.0: reg 0x10: [mem 0x40000000-0x40001fff 64bit]
pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
PCI: bus1: Fast back to back transfers disabled
pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
PCI: bus2: Fast back to back transfers enabled
pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 02
pci 0000:00:01.0: BAR 8: assigned [mem 0xf8000000-0xf80fffff]
pci 0000:00:01.0: BAR 6: assigned [mem 0xf8100000-0xf81007ff pref]
pci 0000:00:02.0: BAR 6: assigned [mem 0xf8200000-0xf82007ff pref]
pci 0000:01:00.0: BAR 0: assigned [mem 0xf8000000-0xf8001fff 64bit]
pci 0000:00:01.0: PCI bridge to [bus 01]
pci 0000:00:01.0:   bridge window [mem 0xf8000000-0xf80fffff]
pci 0000:00:02.0: PCI bridge to [bus 02]
mv_xor f1060800.xor: Marvell shared XOR driver
mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
mv_xor f1060900.xor: Marvell shared XOR driver
mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
printk: console [ttyS0] disabled
f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 28, base_baud = 12500000) is a 16550A
printk: console [ttyS0] enabled
f1012100.serial: ttyS1 at MMIO 0xf1012100 (irq = 29, base_baud = 12500000) is a 16550A
brd: module loaded
loop: module loaded
sata_mv f10a0000.sata: slots 32 ports 2
scsi host0: sata_mv
scsi host1: sata_mv
ata1: SATA max UDMA/133 irq 37
ata2: SATA max UDMA/133 irq 37
mtdoops: mtd device (mtddev=name/number) must be supplied
marvell-nfc soc:internal-regs:nand@d0000: invalid resource
marvell-nfc: probe of soc:internal-regs:nand@d0000 failed with error -22
libphy: Fixed MDIO Bus: probed
libphy: orion_mdio_bus: probed
mvneta f1074000.ethernet eth0: Using hardware mac address 00:50:43:02:02:00
usbcore: registered new interface driver lan78xx
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-orion: EHCI orion driver
orion-ehci f1050000.usb: EHCI Host Controller
orion-ehci f1050000.usb: new USB bus registered, assigned bus number 1
orion-ehci f1050000.usb: irq 35, io mem 0xf1050000
orion-ehci f1050000.usb: USB 2.0 started, EHCI 1.00
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.16
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: EHCI Host Controller
usb usb1: Manufacturer: Linux 5.16.0-rc7 ehci_hcd
usb usb1: SerialNumber: f1050000.usb
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
usbcore: registered new interface driver usb-storage
ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
ata1.00: ATA-9: WDC WD30EZRX-00DC0B0, 80.00A80, max UDMA/133
ata1.00: 5860533168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata1.00: configured for UDMA/133
scsi 0:0:0:0: Direct-Access     ATA      WDC WD30EZRX-00D 0A80 PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 5860533168 512-byte logical blocks: (3.00 TB/2.73 TiB)
sd 0:0:0:0: [sda] 4096-byte physical blocks
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sda: sda1
sd 0:0:0:0: [sda] Attached SCSI disk
rtc-mv f1010300.rtc: internal RTC not ticking
i2c_dev: i2c /dev entries driver
mv64xxx_i2c f1011000.i2c: can't get pinctrl, bus recovery not supported
ata2: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
device-mapper: ioctl: 4.45.0-ioctl (2021-03-22) initialised: dm-devel@redhat.com
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
ata2.00: ATA-9: WDC WD30EZRX-00DC0B0, 80.00A80, max UDMA/133
ata2.00: 5860533168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ledtrig-cpu: registered to indicate activity on CPUs
marvell-cesa f1090000.crypto: CESA device successfully registered
hid: raw HID events driver (C) Jiri Kosina
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
NET: Registered PF_INET6 protocol family
Segment Routing with IPv6
In-situ OAM (IOAM) with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered PF_PACKET protocol family
Bridge firewalling registered
8021q: 802.1Q VLAN Support v1.8
Key type dns_resolver registered
Registering SWP/SWPB emulation handler
ata2.00: configured for UDMA/133
scsi 1:0:0:0: Direct-Access     ATA      WDC WD30EZRX-00D 0A80 PQ: 0 ANSI: 5
sd 1:0:0:0: [sdb] 5860533168 512-byte logical blocks: (3.00 TB/2.73 TiB)
sd 1:0:0:0: [sdb] 4096-byte physical blocks
Loading compiled-in X.509 certificates
sd 1:0:0:0: [sdb] Write Protect is off
Key type ._fscrypt registered
Key type .fscrypt registered
Key type fscrypt-provisioning registered
sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
armada-370-pinctrl f1018000.pin-ctrl: unsupported function gpio on pin mpp54
pinctrl core: failed to register map default (0): invalid type given
 sdb: sdb1
sd 1:0:0:0: [sdb] Attached SCSI disk
input: gpio-keys as /devices/platform/gpio-keys/input/input0
### dt-test ### start of unittest - you will see error messages
### dt-test ### EXPECT \ : Duplicate name in testcase-data, renamed to "duplicate-name#1"
Duplicate name in testcase-data, renamed to "duplicate-name#1"
### dt-test ### EXPECT / : Duplicate name in testcase-data, renamed to "duplicate-name#1"
### dt-test ### EXPECT \ : OF: /testcase-data/phandle-tests/consumer-a: could not get #phandle-cells-missing for /testcase-data/phandle-tests/provider1
OF: /testcase-data/phandle-tests/consumer-a: could not get #phandle-cells-missing for /testcase-data/phandle-tests/provider1
### dt-test ### EXPECT / : OF: /testcase-data/phandle-tests/consumer-a: could not get #phandle-cells-missing for /testcase-data/phandle-tests/provider1
### dt-test ### EXPECT \ : OF: /testcase-data/phandle-tests/consumer-a: could not get #phandle-cells-missing for /testcase-data/phandle-tests/provider1
OF: /testcase-data/phandle-tests/consumer-a: could not get #phandle-cells-missing for /testcase-data/phandle-tests/provider1
### dt-test ### EXPECT / : OF: /testcase-data/phandle-tests/consumer-a: could not get #phandle-cells-missing for /testcase-data/phandle-tests/provider1
### dt-test ### EXPECT \ : OF: /testcase-data/phandle-tests/consumer-a: could not find phandle
OF: /testcase-data/phandle-tests/consumer-a: could not find phandle 12345678
### dt-test ### EXPECT / : OF: /testcase-data/phandle-tests/consumer-a: could not find phandle
### dt-test ### EXPECT \ : OF: /testcase-data/phandle-tests/consumer-a: could not find phandle
OF: /testcase-data/phandle-tests/consumer-a: could not find phandle 12345678
### dt-test ### EXPECT / : OF: /testcase-data/phandle-tests/consumer-a: could not find phandle
### dt-test ### EXPECT \ : OF: /testcase-data/phandle-tests/consumer-a: #phandle-cells = 3 found -1
OF: /testcase-data/phandle-tests/consumer-a: #phandle-cells = 3 found -1
### dt-test ### EXPECT / : OF: /testcase-data/phandle-tests/consumer-a: #phandle-cells = 3 found -1
### dt-test ### EXPECT \ : OF: /testcase-data/phandle-tests/consumer-a: #phandle-cells = 3 found -1
OF: /testcase-data/phandle-tests/consumer-a: #phandle-cells = 3 found -1
### dt-test ### EXPECT / : OF: /testcase-data/phandle-tests/consumer-a: #phandle-cells = 3 found -1
### dt-test ### EXPECT \ : OF: /testcase-data/phandle-tests/consumer-b: could not get #phandle-missing-cells for /testcase-data/phandle-tests/provider1
OF: /testcase-data/phandle-tests/consumer-b: could not get #phandle-missing-cells for /testcase-data/phandle-tests/provider1
### dt-test ### EXPECT / : OF: /testcase-data/phandle-tests/consumer-b: could not get #phandle-missing-cells for /testcase-data/phandle-tests/provider1
### dt-test ### EXPECT \ : OF: /testcase-data/phandle-tests/consumer-b: could not find phandle
OF: /testcase-data/phandle-tests/consumer-b: could not find phandle 12345678
### dt-test ### EXPECT / : OF: /testcase-data/phandle-tests/consumer-b: could not find phandle
### dt-test ### EXPECT \ : OF: /testcase-data/phandle-tests/consumer-b: #phandle-cells = 2 found -1
OF: /testcase-data/phandle-tests/consumer-b: #phandle-cells = 2 found -1
### dt-test ### EXPECT / : OF: /testcase-data/phandle-tests/consumer-b: #phandle-cells = 2 found -1
### dt-test ### FAIL of_unittest_dma_ranges_one():923 of_dma_get_range: wrong DMA addr 0x00000000 (expecting 100000000) on node /testcase-data/address-tests/bus@80000000/device@1000
### dt-test ### EXPECT \ : platform testcase-data:testcase-device2: IRQ index 0 not found
platform testcase-data:testcase-device2: IRQ index 0 not found
### dt-test ### EXPECT / : platform testcase-data:testcase-device2: IRQ index 0 not found
### dt-test ### EXPECT \ : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unittest0/status
OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unittest0/status
### dt-test ### EXPECT / : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unittest0/status
### dt-test ### EXPECT \ : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unittest1/status
OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unittest1/status
### dt-test ### EXPECT / : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unittest1/status
### dt-test ### EXPECT \ : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unittest2/status
OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unittest2/status
### dt-test ### EXPECT / : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unittest2/status
### dt-test ### EXPECT \ : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unittest3/status
OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unittest3/status
### dt-test ### EXPECT / : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unittest3/status
### dt-test ### EXPECT \ : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unittest5/status
OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unittest5/status
### dt-test ### EXPECT / : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unittest5/status
### dt-test ### EXPECT \ : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unittest6/status
OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unittest6/status
### dt-test ### EXPECT / : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unittest6/status
### dt-test ### EXPECT \ : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unittest7/status
OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unittest7/status
### dt-test ### EXPECT / : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unittest7/status
### dt-test ### EXPECT \ : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unittest8/status
OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unittest8/status
### dt-test ### EXPECT / : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unittest8/status
### dt-test ### EXPECT \ : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unittest8/property-foo
OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unittest8/property-foo
### dt-test ### EXPECT / : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unittest8/property-foo
### dt-test ### EXPECT \ : OF: overlay: node_overlaps_later_cs: #6 overlaps with #7 @/testcase-data/overlay-node/test-bus/test-unittest8
### dt-test ### EXPECT \ : OF: overlay: overlay #6 is not topmost
OF: overlay: node_overlaps_later_cs: #6 overlaps with #7 @/testcase-data/overlay-node/test-bus/test-unittest8
OF: overlay: overlay #6 is not topmost
### dt-test ### EXPECT / : OF: overlay: overlay #6 is not topmost
### dt-test ### EXPECT / : OF: overlay: node_overlaps_later_cs: #6 overlaps with #7 @/testcase-data/overlay-node/test-bus/test-unittest8
### dt-test ### EXPECT \ : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/i2c-test-bus/test-unittest12/status
OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/i2c-test-bus/test-unittest12/status
### dt-test ### EXPECT / : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/i2c-test-bus/test-unittest12/status
### dt-test ### EXPECT \ : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/i2c-test-bus/test-unittest13/status
OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/i2c-test-bus/test-unittest13/status
### dt-test ### EXPECT / : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/i2c-test-bus/test-unittest13/status
### dt-test ### EXPECT \ : i2c i2c-1: Added multiplexed i2c bus 3
### dt-test ### EXPECT / : i2c i2c-1: Added multiplexed i2c bus 3
### dt-test ### EXPECT \ : gpio-<<int>> (line-B-input): hogged as input
### dt-test ### EXPECT \ : gpio-<<int>> (line-A-input): hogged as input
gpio-509 (line-B-input): hogged as input
gpio-503 (line-A-input): hogged as input
### dt-test ### EXPECT / : gpio-<<int>> (line-A-input): hogged as input
### dt-test ### EXPECT / : gpio-<<int>> (line-B-input): hogged as input
### dt-test ### EXPECT \ : gpio-<<int>> (line-D-input): hogged as input
gpio-501 (line-D-input): hogged as input
### dt-test ### EXPECT / : gpio-<<int>> (line-D-input): hogged as input
### dt-test ### EXPECT \ : gpio-<<int>> (line-C-input): hogged as input
gpio-495 (line-C-input): hogged as input
### dt-test ### EXPECT / : gpio-<<int>> (line-C-input): hogged as input
### dt-test ### EXPECT \ : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data-2/substation@100/status
### dt-test ### EXPECT \ : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data-2/fairway-1/status
### dt-test ### EXPECT \ : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data-2/fairway-1/ride@100/track@30/incline-up
### dt-test ### EXPECT \ : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data-2/fairway-1/ride@100/track@40/incline-up
### dt-test ### EXPECT \ : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data-2/lights@40000/status
### dt-test ### EXPECT \ : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data-2/lights@40000/color
### dt-test ### EXPECT \ : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data-2/lights@40000/rate
### dt-test ### EXPECT \ : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/hvac_2
### dt-test ### EXPECT \ : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/ride_200
### dt-test ### EXPECT \ : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/ride_200_left
### dt-test ### EXPECT \ : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/ride_200_right
OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data-2/substation@100/status
OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data-2/fairway-1/status
OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data-2/fairway-1/ride@100/track@30/incline-up
OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data-2/fairway-1/ride@100/track@40/incline-up
OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data-2/lights@40000/status
OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data-2/lights@40000/color
OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data-2/lights@40000/rate
OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/hvac_2
OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/ride_200
OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/ride_200_left
OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/ride_200_right
### dt-test ### EXPECT / : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/ride_200_right
### dt-test ### EXPECT / : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/ride_200_left
### dt-test ### EXPECT / : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/ride_200
### dt-test ### EXPECT / : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/hvac_2
### dt-test ### EXPECT / : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data-2/lights@40000/rate
### dt-test ### EXPECT / : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data-2/lights@40000/color
### dt-test ### EXPECT / : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data-2/lights@40000/status
### dt-test ### EXPECT / : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data-2/fairway-1/ride@100/track@40/incline-up
### dt-test ### EXPECT / : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data-2/fairway-1/ride@100/track@30/incline-up
### dt-test ### EXPECT / : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data-2/fairway-1/status
### dt-test ### EXPECT / : OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data-2/substation@100/status
### dt-test ### EXPECT \ : OF: overlay: ERROR: multiple fragments add and/or delete node /testcase-data-2/substation@100/motor-1/controller
### dt-test ### EXPECT \ : OF: overlay: ERROR: multiple fragments add, update, and/or delete property /testcase-data-2/substation@100/motor-1/controller/name
OF: overlay: ERROR: multiple fragments add and/or delete node /testcase-data-2/substation@100/motor-1/controller
OF: overlay: ERROR: multiple fragments add, update, and/or delete property /testcase-data-2/substation@100/motor-1/controller/name
### dt-test ### EXPECT / : OF: overlay: ERROR: multiple fragments add, update, and/or delete property /testcase-data-2/substation@100/motor-1/controller/name
### dt-test ### EXPECT / : OF: overlay: ERROR: multiple fragments add and/or delete node /testcase-data-2/substation@100/motor-1/controller
### dt-test ### EXPECT \ : OF: overlay: ERROR: multiple fragments add and/or delete node /testcase-data-2/substation@100/motor-1/electric
### dt-test ### EXPECT \ : OF: overlay: ERROR: multiple fragments add, update, and/or delete property /testcase-data-2/substation@100/motor-1/electric/rpm_avail
### dt-test ### EXPECT \ : OF: overlay: ERROR: multiple fragments add, update, and/or delete property /testcase-data-2/substation@100/motor-1/electric/name
OF: overlay: ERROR: multiple fragments add and/or delete node /testcase-data-2/substation@100/motor-1/electric
OF: overlay: ERROR: multiple fragments add, update, and/or delete property /testcase-data-2/substation@100/motor-1/electric/rpm_avail
OF: overlay: ERROR: multiple fragments add, update, and/or delete property /testcase-data-2/substation@100/motor-1/electric/name
### dt-test ### EXPECT / : OF: overlay: ERROR: multiple fragments add, update, and/or delete property /testcase-data-2/substation@100/motor-1/electric/name
### dt-test ### EXPECT / : OF: overlay: ERROR: multiple fragments add, update, and/or delete property /testcase-data-2/substation@100/motor-1/electric/rpm_avail
### dt-test ### EXPECT / : OF: overlay: ERROR: multiple fragments add and/or delete node /testcase-data-2/substation@100/motor-1/electric
### dt-test ### end of unittest - 255 passed, 1 failed
md: Waiting for all devices to be available before autodetect
md: If you don't use raid, use raid=noautodetect
md: Autodetecting RAID arrays.
md: autorun ...
md: running: <sdb1><sda1>
md0: detected capacity change from 0 to 11721058304
md: ... autorun DONE.
random: fast init done
EXT4-fs (md0): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
VFS: Mounted root (ext4 filesystem) readonly on device 9:0.
devtmpfs: mounted
Freeing unused kernel image (initmem) memory: 1024K
Run /sbin/init as init process
INIT: version 2.96 booting
Using makefile-style concurrent boot in runlevel S.
Files under mount point '/run' will be hidden. ... (warning).
Starting hotplug events dispatcher: systemd-udevdrandom: crng init done
.
Synthesizing the initial hotplug events (subsystems)...done.
Synthesizing the initial hotplug events (devices)...done.
Waiting for /dev to be fully populated...sd 0:0:0:0: Attached scsi generic sg0 type 0
sd 1:0:0:0: Attached scsi generic sg1 type 0
done.
Setting hostname to 'mcm'...done.
Activating swap:.
EXT4-fs (md0): re-mounted. Opts: (null). Quota mode: none.
Will now check root file system:[/sbin/fsck.ext3 (1) -- /] fsck.ext3 -y -C0 /dev/md0 
e2fsck 1.46.2 (28-Feb-2021)
/dev/md0: clean, 156631/183144448 files, 220589812/1465132288 blocks
.
EXT4-fs (md0): re-mounted. Opts: errors=remount-ro. Quota mode: none.
Will now check all file systems.
Checking all file systems.
UUID=11b0ad4f-fe83-4644-a42b-59f24ec8c048 is mounted
Done checking file systems.
Log is being saved in /var/log/fsck/checkfs if that location is writable.
Cleaning up temporary files...Cleaning /tmp...done.
 /tmp.
Will now mount local filesystems:.
Will now activate swapfile swap, if any:done.
Checking minimum space in /tmp...done.
Cleaning up temporary files....
Starting Setting kernel variables: sysctl.
Initializing random number generator...done.
mvneta f1074000.ethernet eth0: PHY [f1072004.mdio-mii:00] driver [Marvell 88E1510] (irq=POLL)
mvneta f1074000.ethernet eth0: configuring for phy/rgmii-id link mode
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/

Listening on LPF/eth0/00:50:43:02:02:00
Sending on   LPF/eth0/00:50:43:02:02:00
Sending on   Socket/fallback
DHCPREQUEST for 10.10.10.145 on eth0 to 255.255.255.255 port 67
mvneta f1074000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
DHCPREQUEST for 10.10.10.145 on eth0 to 255.255.255.255 port 67
DHCPREQUEST for 10.10.10.145 on eth0 to 255.255.255.255 port 67
DHCPACK of 10.10.10.145 from 10.10.10.10
bound to 10.10.10.145 -- renewal in 40270 seconds.
done.
Starting RPC port mapper daemon: rpcbind.
Starting NFS common utilities: statd idmapd.
Cleaning up temporary files....
INIT: Entering runlevel: 2
Using makefile-style concurrent boot in runlevel 2.
Not starting NFS kernel daemon: no exports. ... (warning).
Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
1931 (syslogd)
.
Starting periodic command scheduler: cron.
Starting system message bus: dbus.
Starting MCU control daemon for fan and LEDs: mcm-daemon.
Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
Starting NTP server: ntpd.
Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
1957 (klogd)
.
Starting rsync daemon: rsync.
Starting OpenBSD Secure Shell server: sshd.
Starting S.M.A.R.T. daemon: smartd.
Running local boot scripts (/etc/rc.local)
Configuration file wrong or corrupted
<13>Jan  1 01:00:56 root[2096]: Cannot read u-boot env ethaddr
.

Debian GNU/Linux 11 mcm ttyS0

mcm login:



Edited 10 time(s). Last edit at 12/29/2021 08:21AM by buco.
Attachments:
open | download - kernel.config (131.7 KB)
Re: Changing NAND boot process on Western Digital My Cloud Mirror Gen1
December 29, 2021 12:04PM
ha :)

root@mcm:~# cat /proc/mtd    
dev:    size   erasesize  name
mtd0: 10000000 00020000 "pxa3xx_nand-0"
mtd1: 00500000 00020000 "u-Boot"
mtd2: 00500000 00020000 "uImage"
mtd3: 00500000 00020000 "ramdisk"
mtd4: 0c900000 00020000 "image.cfs"
mtd5: 00f00000 00020000 "rescue firmware"
mtd6: 01400000 00020000 "config"
mtd7: 00500000 00020000 "reserve"
root@mcm:~# uname -r
4.14.260
root@mcm:~#

So I booted with an old-new kernel and it works now, I can access nand #partytime.

What's the best way to proceed now? How do I put a valid uImage there? Can I take the one that is on my TFTP server which I know boots well?

And maybe the most important question, is there a safety net? What if I write something non-functional over the nand flash? Can I recover somehow with the serial connection?
Re: Changing NAND boot process on Western Digital My Cloud Mirror Gen1
December 29, 2021 03:27PM
> root@mcm:~# cat /proc/mtd
> dev:    size   erasesize  name
> mtd0: 10000000 00020000 "pxa3xx_nand-0"
> mtd1: 00500000 00020000 "u-Boot"
> mtd2: 00500000 00020000 "uImage"
> mtd3: 00500000 00020000 "ramdisk"
> mtd4: 0c900000 00020000 "image.cfs"
> mtd5: 00f00000 00020000 "rescue firmware"
> mtd6: 01400000 00020000 "config"
> mtd7: 00500000 00020000 "reserve"

> root@mcm:~# uname -r
> 4.14.260
> root@mcm:~#

> So I booted with an old-new kernel and it works
> now, I can access nand #partytime.

1. The old kernel NAND driver name is armada_nand. The later kernel version is pxa3xx_nand. Usually, the best way to test is booting a known working kernel such as one I released:

linux-5.15.5-mvebu-tld-1-bodhi.tar.bz2

And the compare the kernel configs related to NAND.

2. Before you flash uImage to NAND, it is best to try UART booting first to see if it works. That will be the ultimate recovery path. Here is an example:

https://forum.doozan.com/read.php?3,51739,51919#msg-51919

Find a newer u-boot image for your box if you can. As long as it's for Armada 370 and have the same RAM then it will be a good candidate. If you cannot find it then back up your NAND. It is the best practice in all scenarios, even though you will not touch u-boot in mtd0. Do this for each mtd 0 to 7:

nanddump --noecc --omitoob mtd0.wd_my_cloud /dev/mtd0

And use the file mtd0.wd_my_cloud to try kwboot. Any Linux distro will have kwboot binary after you've installed u-boot-tools package.

3. Your box envs look very similar to other WD My Cloud series. So I guess you don't have access to the USB drive in u-boot (that's why you load the kernel using tftp)? At serial console try if you can use the USB drive:

usb start
ext2ls usb 0:1 /
If it works, then loading from USB is better.

4. Please post the dmesg for this kernel booting. It is best to see everything to catch any problem before messing with NAND.

Quote

> root@mcm:~# uname -r
4.14.260


5. Flashing uImage to NAND:

Let me look at the mtd definition and post the commands to flash in a separate post. In the mean time please do number 4 (dmesg), so I can doublecheck for any error.

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



Edited 1 time(s). Last edit at 12/29/2021 03:32PM by bodhi.
Re: Changing NAND boot process on Western Digital My Cloud Mirror Gen1
December 29, 2021 09:46PM
buco,


Here is the flashing instruction. Please do not attempt until you do 1 and 2:

1. Try kwboot the box successfully. If not successful,

2. Post the dmesg for me to double check before flashing.

===================================================

Backup all mtds as described in previous post.

Normalize the Debian uImage to 5MB:

dd if=uImage-nand-enabled of=uImage-nand-enabled.kwb bs=5120k conv=sync

List the image to see if it is exactly 5MB:
ls -lh uImage-nand-enabled.kwb

Erase mtd2 and flash the image

flash_erase /dev/mtd2 0 0
nandwrite  /dev/mtd2 uImage-nand-enabled.kwb

If there is any error during flashing, stop and post the errors. Do not reboot.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Changing NAND boot process on Western Digital My Cloud Mirror Gen1
December 30, 2021 03:48PM
I didn't see .2 properly, I flashed it already and luckily it works well!

It's with a 4.14.260 because of a bug starting from 4.16.1 where the nand flash is no longer probed correctly by the kernel. I tried 5.16 and still no luck. It doesn't bother me too much.

root@mcm:~# dmesg   
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.260 (root@htpc) (gcc version 10.2.1 20210110 (Debian 10.2.1-6)) #1 SMP Wed Dec 29 16:38:05 CET 2021
[    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: WD MyCloud Mirror
[    0.000000] Memory policy: Data cache writeback
[    0.000000] On node 0 totalpages: 131072
[    0.000000] free_area_init_node: node 0, pgdat c0c46cc0, node_mem_map dfb78000
[    0.000000]   Normal zone: 1152 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 131072 pages, LIFO batch:31
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] percpu: Embedded 15 pages/cpu s28684 r8192 d24564 u61440
[    0.000000] pcpu-alloc: s28684 r8192 d24564 u61440 alloc=15*4096
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 129920
[    0.000000] Kernel command line: root=/dev/md0 console=ttyS0,115200 max_loop=32 raid=autodetect
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    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: 507332K/524288K available (7352K kernel code, 288K rwdata, 1768K rodata, 1024K init, 207K bss, 16956K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
                   vector  : 0xffff0000 - 0xffff1000   (   4 kB)
                   fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
                   vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
                   lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
                   pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
                   modules : 0xbf000000 - 0xbfe00000   (  14 MB)
                     .text : 0xc0008000 - 0xc082e3b0   (8345 kB)
                     .init : 0xc0b00000 - 0xc0c00000   (1024 kB)
                     .data : 0xc0c00000 - 0xc0c483e0   ( 289 kB)
                      .bss : 0xc0c4a000 - 0xc0c7dc90   ( 208 kB)
[    0.000000] Hierarchical RCU implementation.
[    0.000000] 	RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
[    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: 0x12086302 -> 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.000006] sched_clock: 32 bits at 18MHz, resolution 53ns, wraps every 114532461029ns
[    0.000019] clocksource: armada_370_xp_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 101933890472 ns
[    0.000351] Console: colour dummy device 80x30
[    0.000373] Calibrating delay loop (skipped), value calculated using timer frequency.. 37.50 BogoMIPS (lpj=187500)
[    0.000384] pid_max: default: 32768 minimum: 301
[    0.000504] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000512] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000965] CPU: Testing write buffer coherency: ok
[    0.001185] CPU0: thread -1, cpu 0, socket -1, mpidr 0
[    0.001472] Setting up static identity map for 0x100000 - 0x100060
[    0.001726] mvebu-soc-id: MVEBU SoC ID=0x6710, Rev=0x1
[    0.001803] mvebu-pmsu: Initializing Power Management Service Unit
[    0.001909] Hierarchical SRCU implementation.
[    0.002251] smp: Bringing up secondary CPUs ...
[    0.002258] smp: Brought up 1 node, 1 CPU
[    0.002264] SMP: Total of 1 processors activated (37.50 BogoMIPS).
[    0.002269] CPU: All CPU(s) started in SVC mode.
[    0.002800] devtmpfs: initialized
[    0.005107] random: get_random_u32 called from bucket_table_alloc+0x100/0x22c with crng_init=0
[    0.005321] VFP support v0.3: implementor 56 architecture 2 part 20 variant 9 rev 6
[    0.005481] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.005494] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.005551] xor: measuring software checksum speed
[    0.100056]    arm4regs  :  1104.000 MB/sec
[    0.200058]    8regs     :   846.400 MB/sec
[    0.300056]    32regs    :  1103.200 MB/sec
[    0.300061] xor: using function: arm4regs (1104.000 MB/sec)
[    0.300069] pinctrl core: initialized pinctrl subsystem
[    0.300297] regulator-dummy: no parameters
[    0.301366] NET: Registered protocol family 16
[    0.301677] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.302277] cpuidle: using governor ladder
[    0.500217] raid6: int32x1  gen()   162 MB/s
[    0.670076] raid6: int32x1  xor()   214 MB/s
[    0.840197] raid6: int32x2  gen()   255 MB/s
[    1.010162] raid6: int32x2  xor()   248 MB/s
[    1.180212] raid6: int32x4  gen()   264 MB/s
[    1.350112] raid6: int32x4  xor()   204 MB/s
[    1.520243] raid6: int32x8  gen()   303 MB/s
[    1.690076] raid6: int32x8  xor()   203 MB/s
[    1.690081] raid6: using algorithm int32x8 gen() 303 MB/s
[    1.690085] raid6: .... xor() 203 MB/s, rmw enabled
[    1.690089] raid6: using intx1 recovery algorithm
[    1.690221] reg-fixed-voltage regulators:regulator@1: could not find pctldev for node /soc/internal-regs/pin-ctrl@18000/xhci-pwr-pin, deferring probe
[    1.690249] reg-fixed-voltage regulators:regulator@2: could not find pctldev for node /soc/internal-regs/pin-ctrl@18000/sata-1-pwr-pin, deferring probe
[    1.690269] reg-fixed-voltage regulators:regulator@3: could not find pctldev for node /soc/internal-regs/pin-ctrl@18000/sata-2-pwr-pin, deferring probe
[    1.690642] SCSI subsystem initialized
[    1.693019] libata version 3.00 loaded.
[    1.693208] usbcore: registered new interface driver usbfs
[    1.693246] usbcore: registered new interface driver hub
[    1.693283] usbcore: registered new device driver usb
[    1.693362] pps_core: LinuxPPS API ver. 1 registered
[    1.693366] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    1.693381] PTP clock support registered
[    1.695317] Bluetooth: Core ver 2.22
[    1.695359] NET: Registered protocol family 31
[    1.695363] Bluetooth: HCI device and connection manager initialized
[    1.695372] Bluetooth: HCI socket layer initialized
[    1.695378] Bluetooth: L2CAP socket layer initialized
[    1.695397] Bluetooth: SCO socket layer initialized
[    1.695729] clocksource: Switched to clocksource armada_370_xp_clocksource
[    1.695839] VFS: Disk quotas dquot_6.6.0
[    1.695888] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    1.695956] FS-Cache: Loaded
[    1.696254] CacheFiles: Loaded
[    1.710868] NET: Registered protocol family 2
[    1.710992] IP idents hash table entries: 8192 (order: 4, 65536 bytes)
[    1.711389] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    1.711420] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[    1.711456] TCP: Hash tables configured (established 4096 bind 4096)
[    1.711514] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    1.711528] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    1.711613] NET: Registered protocol family 1
[    1.712484] RPC: Registered named UNIX socket transport module.
[    1.712492] RPC: Registered udp transport module.
[    1.712495] RPC: Registered tcp transport module.
[    1.712499] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.712507] PCI: CLS 0 bytes, default 64
[    1.713790] Initialise system trusted keyrings
[    1.714343] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[    1.715061] NFS: Registering the id_resolver key type
[    1.715081] Key type id_resolver registered
[    1.715085] Key type id_legacy registered
[    1.715094] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    1.715408] FS-Cache: Netfs 'cifs' registered for caching
[    1.719805] async_tx: api initialized (async)
[    1.719817] Key type asymmetric registered
[    1.719821] Asymmetric key parser 'x509' registered
[    1.719882] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    1.719888] io scheduler noop registered
[    1.719892] io scheduler deadline registered
[    1.719916] io scheduler cfq registered (default)
[    1.719920] io scheduler kyber registered
[    1.720588] armada-370-pinctrl f1018000.pin-ctrl: registered pinctrl driver
[    1.721490] gpio gpiochip0: (f1018100.gpio): added GPIO chardev (254:0)
[    1.721560] gpiochip_setup_dev: registered GPIOs 0 to 31 on device: gpiochip0 (f1018100.gpio)
[    1.722005] gpio gpiochip1: (f1018140.gpio): added GPIO chardev (254:1)
[    1.722073] gpiochip_setup_dev: registered GPIOs 32 to 63 on device: gpiochip1 (f1018140.gpio)
[    1.722477] gpio gpiochip2: (f1018180.gpio): added GPIO chardev (254:2)
[    1.722538] gpiochip_setup_dev: registered GPIOs 64 to 65 on device: gpiochip2 (f1018180.gpio)
[    1.722808] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/soc/pcie@82000000/pcie@1,0[0]'
[    1.722835] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/soc/pcie@82000000/pcie@2,0[0]'
[    1.723020] mvebu-pcie soc:pcie@82000000: PCI host bridge to bus 0000:00
[    1.723033] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    1.723039] pci_bus 0000:00: root bus resource [mem 0xf8000000-0xffdfffff]
[    1.723047] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.723076] pci 0000:00:01.0: [11ab:6710] type 01 class 0x060400
[    1.723247] pci 0000:00:02.0: [11ab:6710] type 01 class 0x060400
[    1.723395] PCI: bus0: Fast back to back transfers disabled
[    1.723404] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.723414] pci 0000:00:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.723517] pci 0000:01:00.0: [1912:0015] type 00 class 0x0c0330
[    1.723558] pci 0000:01:00.0: reg 0x10: [mem 0x40000000-0x40001fff 64bit]
[    1.723688] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[    1.723822] PCI: bus1: Fast back to back transfers disabled
[    1.723832] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    1.723903] PCI: bus2: Fast back to back transfers enabled
[    1.723911] pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 02
[    1.723943] pci 0000:00:01.0: BAR 8: assigned [mem 0xf8000000-0xf80fffff]
[    1.723953] pci 0000:01:00.0: BAR 0: assigned [mem 0xf8000000-0xf8001fff 64bit]
[    1.723968] pci 0000:00:01.0: PCI bridge to [bus 01]
[    1.723977] pci 0000:00:01.0:   bridge window [mem 0xf8000000-0xf80fffff]
[    1.723985] pci 0000:00:02.0: PCI bridge to [bus 02]
[    1.724324] mv_xor f1060800.xor: Marvell shared XOR driver
[    1.786320] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    1.787544] mv_xor f1060900.xor: Marvell shared XOR driver
[    1.846312] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    1.942549] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    1.944844] console [ttyS0] disabled
[    1.965002] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 20, base_baud = 12500000) is a 16550A
[    2.634050] console [ttyS0] enabled
[    2.657179] f1012100.serial: ttyS1 at MMIO 0xf1012100 (irq = 21, base_baud = 12500000) is a 16550A
[    2.670651] brd: module loaded
[    2.691802] loop: module loaded
[    2.694004] sata_mv f10a0000.sata: version 1.28
[    2.694197] sata_mv f10a0000.sata: slots 32 ports 2
[    2.700080] scsi host0: sata_mv
[    2.702423] scsi host1: sata_mv
[    2.704414] ata1: SATA max UDMA/133 irq 29
[    2.707288] ata2: SATA max UDMA/133 irq 29
[    2.711294] pxa3xx-nand f10d0000.nand: This platform can't do DMA on this device
[    2.718278] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xda
[    2.723353] nand: Hynix H27U2G8F2CTR-BC
[    2.725945] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    2.732245] pxa3xx-nand f10d0000.nand: ECC strength 16, ECC step size 2048
[    2.738283] Bad block table found at page 131008, version 0x01
[    2.743341] Bad block table found at page 130944, version 0x01
[    2.748180] nand_read_bbt: bad block at 0x000005a60000
[    2.752086] 7 ofpart partitions found on MTD device pxa3xx_nand-0
[    2.759323] ftl_cs: FTL header not found.
[    2.762544] Creating 7 MTD partitions on "pxa3xx_nand-0":
[    2.766708] 0x000000000000-0x000000500000 : "u-Boot"
[    2.772930] ftl_cs: FTL header not found.
[    2.776194] 0x000000500000-0x000000a00000 : "uImage"
[    2.782359] ftl_cs: FTL header not found.
[    2.785606] 0x000000a00000-0x000000f00000 : "ramdisk"
[    2.791946] ftl_cs: FTL header not found.
[    2.795136] 0x000000f00000-0x00000d800000 : "image.cfs"
[    2.802373] ftl_cs: FTL header not found.
[    2.805634] 0x00000dd00000-0x00000ec00000 : "rescue firmware"
[    2.812688] ftl_cs: FTL header not found.
[    2.815991] 0x00000ec00000-0x000010000000 : "config"
[    2.821730] random: fast init done
[    2.824173] ftl_cs: FTL header not found.
[    2.827481] 0x00000d800000-0x00000dd00000 : "reserve"
[    2.833741] ftl_cs: FTL header not found.
[    2.837300] Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
[    2.844038] mdio_bus fixed-0: GPIO lookup for consumer reset
[    2.844046] mdio_bus fixed-0: using lookup tables for GPIO lookup
[    2.844052] mdio_bus fixed-0: lookup for GPIO reset failed
[    2.844068] libphy: Fixed MDIO Bus: probed
[    2.847441] mdio_bus f1072004.mdio-mii: GPIO lookup for consumer reset
[    2.847446] mdio_bus f1072004.mdio-mii: using device tree for GPIO lookup
[    2.847455] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/soc/internal-regs/mdio@72004[0]'
[    2.847462] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/soc/internal-regs/mdio@72004[0]'
[    2.847466] mdio_bus f1072004.mdio-mii: using lookup tables for GPIO lookup
[    2.847471] mdio_bus f1072004.mdio-mii: lookup for GPIO reset failed
[    2.847475] libphy: orion_mdio_bus: probed
[    2.855010] mvneta f1074000.ethernet eth0: Using random mac address 72:e5:ea:f3:fd:05
[    2.861876] usbcore: registered new interface driver lan78xx
[    2.866271] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    2.871517] ehci-orion: EHCI orion driver
[    2.874348] orion-ehci f1050000.usb: EHCI Host Controller
[    2.878497] orion-ehci f1050000.usb: new USB bus registered, assigned bus number 1
[    2.884893] orion-ehci f1050000.usb: irq 27, io mem 0xf1050000
[    2.915543] orion-ehci f1050000.usb: USB 2.0 started, EHCI 1.00
[    2.920348] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    2.925894] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.931839] usb usb1: Product: EHCI Host Controller
[    2.935429] usb usb1: Manufacturer: Linux 4.14.260 ehci_hcd
[    2.939728] usb usb1: SerialNumber: f1050000.usb
[    2.943620] hub 1-0:1.0: USB hub found
[    2.946297] hub 1-0:1.0: 1 port detected
[    2.949597] usbcore: registered new interface driver usb-storage
[    3.215533] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[    3.222946] ata1.00: ATA-9: WDC WD30EZRX-00DC0B0, 80.00A80, max UDMA/133
[    3.228391] ata1.00: 5860533168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    3.236403] ata1.00: configured for UDMA/133
[    3.239723] scsi 0:0:0:0: Direct-Access     ATA      WDC WD30EZRX-00D 0A80 PQ: 0 ANSI: 5
[    3.247571] sd 0:0:0:0: [sda] 5860533168 512-byte logical blocks: (3.00 TB/2.73 TiB)
[    3.254046] sd 0:0:0:0: [sda] 4096-byte physical blocks
[    3.258580] sd 0:0:0:0: [sda] Write Protect is off
[    3.262107] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    3.262231] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    3.965543] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[    3.995559] ata2.00: ATA-9: WDC WD30EZRX-00DC0B0, 80.00A80, max UDMA/133
[    4.000987] ata2.00: 5860533168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    4.006729] rtc-mv f1010300.rtc: internal RTC not ticking
[    4.010989] i2c /dev entries driver
[    4.024550] (NULL device *): hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
[    4.036539]  sda: sda1
[    4.038530] ata2.00: configured for UDMA/133
[    4.041834] scsi 1:0:0:0: Direct-Access     ATA      WDC WD30EZRX-00D 0A80 PQ: 0 ANSI: 5
[    4.049000] sd 0:0:0:0: [sda] Attached SCSI disk
[    4.053707] sd 1:0:0:0: [sdb] 5860533168 512-byte logical blocks: (3.00 TB/2.73 TiB)
[    4.060246] sd 1:0:0:0: [sdb] 4096-byte physical blocks
[    4.064622] sd 1:0:0:0: [sdb] Write Protect is off
[    4.068182] sd 1:0:0:0: [sdb] Mode Sense: 00 3a 00 00
[    4.068380] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    4.077606] device-mapper: ioctl: 4.37.0-ioctl (2017-09-20) initialised: dm-devel@redhat.com
[    4.085190] sdhci: Secure Digital Host Controller Interface driver
[    4.090149] sdhci: Copyright(c) Pierre Ossman
[    4.093348] sdhci-pltfm: SDHCI platform and OF driver helper
[    4.097926] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-leds/hdd1-blue[0]' - status (0)
[    4.097939] no flags found for gpios
[    4.098036] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-leds/hdd2-blue[0]' - status (0)
[    4.098044] no flags found for gpios
[    4.098112] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-leds/hdd1-red[0]' - status (0)
[    4.098119] no flags found for gpios
[    4.098183] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-leds/hdd2-red[0]' - status (0)
[    4.098190] no flags found for gpios
[    4.099606] ledtrig-cpu: registered to indicate activity on CPUs
[    4.105772] marvell-cesa f1090000.crypto: CESA device successfully registered
[    4.111843] hidraw: raw HID events driver (C) Jiri Kosina
[    4.116107] usbcore: registered new interface driver usbhid
[    4.120395] usbhid: USB HID core driver
[    4.123081] Netfilter messages via NETLINK v0.30.
[    4.126539] nfnl_acct: registering with nfnetlink.
[    4.130127] nf_conntrack version 0.5.0 (8192 buckets, 32768 max)
[    4.135102] arp_tables: arp_tables: (C) 2002 David S. Miller
[    4.139617] NET: Registered protocol family 10
[    4.144574] Segment Routing with IPv6
[    4.147062] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    4.152170] NET: Registered protocol family 17
[    4.155369] Bridge firewalling registered
[    4.158143] 8021q: 802.1Q VLAN Support v1.8
[    4.161064] Key type dns_resolver registered
[    4.164108] Registering SWP/SWPB emulation handler
[    4.168887] Loading compiled-in X.509 certificates
[    4.173309] of_get_named_gpiod_flags: parsed 'gpio' property of node '/regulators/regulator@1[0]' - status (0)
[    4.173356] USB3.0 Port Power: 5000 mV 
[    4.173501] reg-fixed-voltage regulators:regulator@1: USB3.0 Port Power supplying 5000000uV
[    4.173558] armada-370-pinctrl f1018000.pin-ctrl: unsupported function gpio on pin mpp54
[    4.180480] pinctrl core: failed to register map default (0): invalid type given
[    4.186622] reg-fixed-voltage: probe of regulators:regulator@2 failed with error -22
[    4.193246] of_get_named_gpiod_flags: parsed 'gpio' property of node '/regulators/regulator@3[0]' - status (0)
[    4.194348]  sdb: sdb1
[    4.196620] sd 1:0:0:0: [sdb] Attached SCSI disk
[    8.246005] SATA-2 Power: 5000 mV 
[    8.246202] reg-fixed-voltage regulators:regulator@3: SATA-2 Power supplying 5000000uV
[    8.246918] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-keys/reset-button[0]' - status (0)
[    8.246950] gpio-65 (Reset Button): gpiod_set_debounce: missing set() or set_config() operations
[    8.247266] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[    8.253632] hctosys: unable to open rtc device (rtc0)
[    8.266952] md: Waiting for all devices to be available before autodetect
[    8.272467] md: If you don't use raid, use raid=noautodetect
[    8.277841] md: Autodetecting RAID arrays.
[    8.337918] md: autorun ...
[    8.339560] md: running: <sdb1><sda1>
[    8.342337] md0: detected capacity change from 0 to 6001181851648
[    8.347281] md: ... autorun DONE.
[    8.961704] EXT4-fs (md0): mounted filesystem with ordered data mode. Opts: (null)
[    8.968084] VFS: Mounted root (ext4 filesystem) readonly on device 9:0.
[    9.000025] devtmpfs: mounted
[    9.002970] Freeing unused kernel memory: 1024K
[   11.183175] random: crng init done
[   13.977657] evbug: Connected device: input0 (gpio-keys at gpio-keys/input0)
[   14.285746] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   14.315734] sd 1:0:0:0: Attached scsi generic sg1 type 0
[   19.344894] EXT4-fs (md0): re-mounted. Opts: (null)
[   34.321177] EXT4-fs (md0): re-mounted. Opts: errors=remount-ro
[   37.917031] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   42.166686] mvneta f1074000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[   42.173460] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Re: Changing NAND boot process on Western Digital My Cloud Mirror Gen1
December 30, 2021 03:57PM
buco,

> I didn't see .2 properly, I flashed it already and
> luckily it works well!

Cool!

> It's with a 4.14.260 because of a bug starting
> from 4.16.1 where the nand flash is no longer
> probed correctly by the kernel. I tried 5.16 and
> still no luck. It doesn't bother me too much.

It might not be a bug, but could be something has changed in the DTS, or the kernel config is not correct.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Changing NAND boot process on Western Digital My Cloud Mirror Gen1
January 05, 2022 07:44AM
I did use the same .config except for my notes in the paragraph below. I used exactly the same DTS file for both building 4.14.260 and 5.16.rc7.

It does bother me now since I can't upgrade libc6 due to a problem in gcc where it overflows on kernel minor revision numbers greater than 255. Mine is 4.14.260 now. So to work around the problem, I have to boot 5.16.x, apt upgrade libc6, then reboot back to 4.14.260 to regain access to nand. In my setup still workable, but a bit cumbersome.

But anyway

The settings for kernel 4.14.X I set to enable nand:
CONFIG_MTD_NAND_ECC=y
CONFIG_MTD_NAND=y
CONFIG_MTD_NAND_PXA3xx=y
and that worked.

The CONFIG_MTD_NAND_PXA3xx was removed by 4.16.1 and replaced by CONFIG_MTD_NAND_MARVELL . I enabled CONFIG_MTD_NAND_ECC, CONFIG_MTD_NAND and CONFIG_MTD_NAND_MARVELL for 5.15.rc7 but that did not yield a working config for me.

I'm by the way not the only person in the world with this very problem :) https://yhbt.net/lore/all/CAFLxGvyNtHOQZ1OnSsh=Md9Lx7e8j307uRCNvS_qvNp6FW1_pg@mail.gmail.com/T/
Re: Changing NAND boot process on Western Digital My Cloud Mirror Gen1
January 05, 2022 03:18PM
buco,

Try booting this kernel:

GTI Mirabox and Netgear RN120 (Armada 370) Installation & Kernel Upgrade (Linux-5.10.7)

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

Use the zImage-5.10.7-mvebu-370xp-tld-1 and append the MyCloud DTB to it to create uImage.


BTW, I would not use an -rc kernel, just use some 5.15.x stable.

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



Edited 1 time(s). Last edit at 01/05/2022 03:20PM by bodhi.
Re: Changing NAND boot process on Western Digital My Cloud Mirror Gen1
January 07, 2022 11:17PM
That's interesting!

It kernel-panicked but that's OK. I guess it's because possibly I'm using ext4 and for some reason it can't mount rootfs. But at least during boot stages I see the MTD devices so post 4.16.1 does work with the marvell mtd driver.

Do you happen to know what was wrong in my kernel .config file?

armada-nand armada-nand.0: Initialize HAL based NFC in 8bit mode with DMA Disabled using BCH 4bit ECC
flash read_id : daad
NAND device: Manufacturer ID: 0xad, Chip ID: 0xda (Hynix NAND 256MiB 3,3V 8-bit)
Bad block table found at page 131008, version 0x01
Bad block table found at page 130944, version 0x01
nand_read_bbt: bad block at 0x000005a60000
Creating 7 MTD partitions on "armada-nand":
0x000000000000-0x000000500000 : "u-Boot"
0x000000500000-0x000000a00000 : "uImage"
0x000000a00000-0x000000f00000 : "ramdisk"
0x000000f00000-0x00000d800000 : "image.cfs"
0x00000dd00000-0x00000ec00000 : "rescue firmware"
0x00000ec00000-0x000010000000 : "config"
0x00000d800000-0x00000dd00000 : "reserve"
Re: Changing NAND boot process on Western Digital My Cloud Mirror Gen1
January 07, 2022 11:52PM
> Do you happen to know what was wrong in my kernel
> .config file?
>

>
> Creating 7 MTD partitions on "armada-nand":
> 0x000000000000-0x000000500000 : "u-Boot"
> 0x000000500000-0x000000a00000 : "uImage"
> 0x000000a00000-0x000000f00000 : "ramdisk"
> 0x000000f00000-0x00000d800000 : "image.cfs"
> 0x00000dd00000-0x00000ec00000 : "rescue firmware"
> 0x00000ec00000-0x000010000000 : "config"
> 0x00000d800000-0x00000dd00000 : "reserve"
>

With latest kernel, it should not show "armada-nand" like above. It should be

"pxa3xx_nand-0"

There are a couple possible reasons. But first and foremost, the bootargs (not the kernel config) must be defined correctly. I need to see the whole serial bootlog to point out where the problem is. Or at the minimum, post a dmesg output.

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

Your Email:


Subject:


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