WD MyCloud Ex, Armada-370, pxa3xx-nand, marvell-nfc

David Schaefer david.tillmann.schaefer at gmail.com
Tue Dec 15 17:04:24 EST 2020


Hi Miquel,

Am Di., 15. Dez. 2020 um 22:20 Uhr schrieb David Schaefer
<david.tillmann.schaefer at gmail.com>:
>
> Hi Miquèl
>
> > Maybe I should ask you why you are using mtdblock and using dd on top
> > of it? If you want to tackle a NAND issue, you should probably  address
> > the mtd device directly and use the tools provided by the mtd-utils
> > userspace test suite (nandpagetest seems a good fit).
> What I am trying to accomplish is running a debian with a kernel more
> than 4.15 on a WD MyCloud Ex2. I follow a written down approach that
> has been led to success by others. It involves
> dd if=/dev/zero of=/dev/mtdblock1
> dd if=uImage of=/dev/mtdblock1
> dd if=/dev/zero of=/dev/mtdblock2
> dd if=uRamdisk of=/dev/mtdblock2
>
> I could use more appropriate ways to deal with these devices if I knew of any.
>
> > You might want to try a much more recent kernel then. Probably that
> > using a 5.9 or 5.10 is a good target for now.
> I am compiling 5.10 right now and am looking forward to the results. I
> have had 5.4 running already with no mtdblock devices showing up.
>
> > I really don't think using -X theirs blindly is wise, you should
> > definitely try to understand the conflict and merge it by hand.
> I tried but didn't feel to be in the position to make the call.
> Anyhow, since I have seen the commits are all part of kernels 4.17,
> 4.20, 5.0, and 5.10 this will not be an issue now when I run 5.10.
>
> > > - marvell-nfc f10d0000.nand: Timeout waiting for RB signal
> > This one is a real error but got fixed by another commit.
> > > - print_req_error: I/O error, dev mtdblock6, sector 0
> > > print_req_error: I/O error, dev mtdblock6, sector 0
> > > print_req_error: I/O error, dev mtdblock6, sector 0
> > > print_req_error: I/O error, dev mtdblock5, sector 0
> > > print_req_error: I/O error, dev mtdblock5, sector 0
> > > print_req_error: I/O error, dev mtdblock5, sector 0
> > > print_req_error: I/O error, dev mtdblock4, sector 0
> > > print_req_error: I/O error, dev mtdblock4, sector 0
> > > print_req_error: I/O error, dev mtdblock4, sector 0
> > > print_req_error: I/O error, dev mtdblock3, sector 0
> > This one seem related but I don't know from where it comes.
> > > dd: writing '/dev/mtdblock1': Input/output error
> I will check if I see these issues with 5.10 when it's built.

running 5.10 does not show any /dev/mtdblock devices. There are errors
in the boot showing up as
marvell-nfc soc:internal-regs:nand at d0000: invalid resource
marvell-nfc: probe of soc:internal-regs:nand at d0000 failed with error -22

What I am missing in the bootlog of kernel 5.10 is what I saw after
applying all 8 commits to 4.16, namely:

nand: device found, Manufacturer ID: 0xad, Chip ID: 0xda
nand: Hynix H27U2G8F2CTR-BC
nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
Bad block table not found for chip 0
Bad block table not found for chip 0
Scanning device for bad blocks
Bad eraseblock 1854 at 0x00000e7c0000
Bad block table written to 0x00000ffe0000, version 0x01
Bad block table written to 0x00000ffc0000, version 0x01
7 ofpart partitions found on MTD device pxa3xx_nand-0
Creating 7 MTD partitions on "pxa3xx_nand-0":
0x000000000000-0x000000500000 : "u-Boot"
0x000000500000-0x000000a00000 : "uImage"
0x000000a00000-0x000000f00000 : "ramdisk"
0x000000f00000-0x00000d800000 : "image.cfs"
0x00000dd00000-0x00000ec00000 : "rescue firmware"
0x00000ec00000-0x000010000000 : "config"
0x00000d800000-0x00000dd00000 : "reserve"

I have attached the complete bootlog here:

 ** 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

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 0x00000e7c0000
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
Marvell>> dhcp; setenv serverip 192.168.178.34; tftp 0x2000000
uImage510-5; tftp 0x3000000 uRamdisk; bootm 0x2000000 0x3000000
BOOTP broadcast 1
*** Unhandled DHCP Option in OFFER/ACK: 28
*** Unhandled DHCP Option in OFFER/ACK: 42
*** Unhandled DHCP Option in OFFER/ACK: 158
*** Unhandled DHCP Option in OFFER/ACK: 28
*** Unhandled DHCP Option in OFFER/ACK: 42
*** Unhandled DHCP Option in OFFER/ACK: 158
DHCP client bound to address 192.168.178.83
Using egiga1 device
TFTP from server 192.168.178.34; our IP address is 192.168.178.83
Filename 'uImage510-5'.
Load address: 0x2000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         ############################################
done
Bytes transferred = 4458685 (4408bd hex)
Using egiga1 device
TFTP from server 192.168.178.34; our IP address is 192.168.178.83
Filename 'uRamdisk'.
Load address: 0x3000000
Loading: #################################################################
         #################################################################
         #####################################################
done
Bytes transferred = 2679866 (28e43a hex)
## Booting image at 02000000 ...
## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   armada-370-wdmc-mirror-gen1
   Created:      2020-12-15  21:56:29 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4458621 Bytes = 4.3 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 03000000 ...
   Image Name:   Ramdisk
   Created:      2017-02-04  18:43:13 UTC
   Image Type:   ARM Linux RAMDisk Image (lzma compressed)
   Data Size:    2679802 Bytes = 2.6 MiB
   Load Address: 00e00000
   Entry Point:  00e00000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

DTB:0x00444E30 (0x00003A4D)
C:0x000080C0-0x00448920->0x00E7E400-0x012BEC60
DTB:0x012BB170 (0x00003AD6)
Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 5.10.0 (david at debian) (arm-linux-gnueabi-gcc (Debian
8.3.0-2) 8.3.0, GNU ld (GNU Binutils for Debian) 2.31.1) #5 SMP Tue
Dec 15 16:55:38 EST 2020
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 15 pages/cpu s30028 r8192 d23220 u61440
Built 1 zonelists, mobility grouping on.  Total pages: 129920
Kernel command line: root=/dev/ram console=ttyS0,115200 max_loop=32
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: 502320K/524288K available (9066K kernel code, 502K rwdata,
2120K rodata, 1024K init, 364K bss, 21968K 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+0x324/0x4d0 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 protocol family 16
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()   422 MB/s
raid6: int32x8  xor()   264 MB/s
raid6: int32x4  gen()   477 MB/s
raid6: int32x4  xor()   270 MB/s
raid6: int32x2  gen()   526 MB/s
raid6: int32x2  xor()   255 MB/s
raid6: int32x1  gen()   497 MB/s
raid6: int32x1  xor()   217 MB/s
raid6: using algorithm int32x2 gen() 526 MB/s
raid6: .... xor() 255 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 at linux.it>
PTP clock support registered
Bluetooth: Core ver 2.22
NET: Registered protocol family 31
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 protocol family 2
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 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.
PCI: CLS 0 bytes, default 64
Trying to unpack rootfs image as initramfs...
Freeing initrd memory: 2620K
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 at 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           :   901 MB/sec
   32regs          :  1085 MB/sec
xor: using function: arm4regs (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 at 82000000: host bridge /soc/pcie at 82000000 ranges:
mvebu-pcie soc:pcie at 82000000:      MEM 0x00f1040000..0x00f1041fff ->
0x0000040000
mvebu-pcie soc:pcie at 82000000:      MEM 0x00f1080000..0x00f1081fff ->
0x0000080000
mvebu-pcie soc:pcie at 82000000:      MEM
0xffffffffffffffff..0x00fffffffe -> 0x0100000000
mvebu-pcie soc:pcie at 82000000:       IO
0xffffffffffffffff..0x00fffffffe -> 0x0100000000
mvebu-pcie soc:pcie at 82000000:      MEM
0xffffffffffffffff..0x00fffffffe -> 0x0200000000
mvebu-pcie soc:pcie at 82000000:       IO
0xffffffffffffffff..0x00fffffffe -> 0x0200000000
mvebu-pcie soc:pcie at 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
marvell-nfc soc:internal-regs:nand at d0000: invalid resource
marvell-nfc: probe of soc:internal-regs:nand at 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.10
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: EHCI Host Controller
usb usb1: Manufacturer: Linux 5.10.0 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 down (SStatus 0 SControl F300)
ata2: SATA link down (SStatus 0 SControl F300)
rtc-mv f1010300.rtc: internal RTC not ticking
i2c /dev entries driver
device-mapper: ioctl: 4.43.0-ioctl (2020-10-01) initialised: dm-devel at redhat.com
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
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 protocol family 10
Segment Routing with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered protocol family 17
Bridge firewalling registered
8021q: 802.1Q VLAN Support v1.8
Key type dns_resolver registered
Registering SWP/SWPB emulation handler
Loading compiled-in X.509 certificates
Key type ._fscrypt registered
Key type .fscrypt registered
Key type fscrypt-provisioning registered
armada-370-pinctrl f1018000.pin-ctrl: unsupported function gpio on pin mpp54
pinctrl core: failed to register map default (0): invalid type given
reg-fixed-voltage: probe of regulators:regulator at 2 failed with error -22
input: gpio-keys as /devices/platform/gpio-keys/input/input0
Freeing unused kernel memory: 1024K
Run /init as init process
# Loading, please wait...
# Mounting filesystems...
# Check disk and init
### Press any key to stop and run shell... (2)mdadm: No arrays found
in config file or automatically
# /dev/md1 not exist!
# Runing a shell...
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
udhcpc (v1.24.1) started
Setting IP address 0.0.0.0 on eth0
Sending discover...
^[^[OR^[ORSending discover...
mvneta f1074000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Sending discover...
Sending select for 192.168.178.84...
Lease of 192.168.178.84 obtained, lease time 864000
Setting IP address 192.168.178.84 on eth0
Deleting routers
route: SIOCDELRT: No such process
Adding router 192.168.178.1
Recreating /etc/resolv.conf
 Adding DNS server 192.168.178.1
udhcpc (v1.24.1) started
Setting IP address 0.0.0.0 on eth0
Sending discover...
Sending select for 192.168.178.84...
Lease of 192.168.178.84 obtained, lease time 864000
Setting IP address 192.168.178.84 on eth0
Deleting routers
route: SIOCDELRT: No such process
Adding router 192.168.178.1
Recreating /etc/resolv.conf
 Adding DNS server 192.168.178.1






Do you have any idea?

Kind regards
David



More information about the linux-mtd mailing list