WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
July 11, 2016 03:37AM
Hi all,

a few weeks ago i got a WD My Cloud Mirror Gen2 (WDMCMG2) as the wrapping for two WD Red 6TB HDDs (complete system was cheaper, than the single disks ;-)). The factory firmware seems to be buggy and insufficient, but imho the hardware is worth to be hacked to run a clean debian with openmediavault, where i need and hope to get your help for.

The box has an ARMv7 Armada 385 dualcore cpu @1,3GHz and 512 MB RAM

I disassembled the box and found the serial interface (see attached pictures). I connected my FTDI and logged the output:
BootROM - 1.73
Booting from NAND flash

General initialization - Version: 1.0.0
Detected Device ID 6820
High speed PHY - Version: 2.0

Load WD GrandTeton Serdes Config:
board SerDes lanes topology details:
 | Lane #  | Speed |  Type       |
 --------------------------------
 |   0    |  06   |  SATA0      |
 |   1    |  05   |  PCIe0      |
 |   2    |  06   |  SATA1      |
 |   3    |  05   |  USB3 HOST1 |
 |   4    |  05   |  USB3 HOST0 |
 |   5    |  00   |  SGMII2     |
 --------------------------------
PCIe, Idx 0: detected no link
High speed PHY - Ended Successfully
DDR3 Training Sequence - Ver TIP-1.26.0
mvSysEnvGetTopologyUpdateInfo: TWSI Read failed
DDR3 Training Sequence - Switching XBAR Window to FastPath Window
DDR3 Training Sequence - Ended Successfully
BootROM: Image checksum verification PASSED

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


U-Boot 2013.01_v1.03 (Jul 30 2015 - 11:39:08) Marvell version: 2014_T3.0p6

mvBoardIdIndexGet(boardId) = 1
Board: GrandTeton DB6820
SoC:   MV88F6820 Rev A0
       running 2 CPUs
CPU:   ARM Cortex A9 MPCore (Rev 1) LE
       CPU 0
       CPU    @ 1332 [MHz]
       L2     @ 666 [MHz]
       TClock @ 200 [MHz]
       DDR    @ 666 [MHz]
       DDR 32 Bit Width, FastPath Memory Access, DLB Enabled, ECC Disabled
DRAM:  512 MiB

Map:   Code:                    0x1fece000:0x1ff95bd4
       BSS:                     0x1ffef254
       Stack:                   0x1f9cdf20
       Heap:                    0x1f9ce000:0x1fece000
raise: Signal # 8 caught
raise: Signal # 8 caught
       U-Boot Environment:      0x00000000:0x00080000 (NAND)

NAND:  ID: daad ,256 MiB
MMC:   mv_sdh: 0
PCI-e 0: Detected No Link.
USB2.0 0: Host Mode
USB3.0 0: Host Mode
USB3.0 1: Host Mode
Board configuration detected:
Creating 1 MTD partitions on "nand0":
0x00000f500000-0x00000ff00000 : "mtd=7"
UBI: attaching mtd1 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: attached mtd1 to ubi0
UBI: MTD device name:            "mtd=7"
UBI: MTD device size:            10 MiB
UBI: number of good PEBs:        80
UBI: number of bad 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:             32
UBI: total number of reserved PEBs: 48
UBI: number of PEBs reserved for bad PEB handling: 2
UBI: max/mean erase counter: 2/0
UBIFS: mounted UBI device 0, volume 0, name "reserve2"
UBIFS: mounted read-only
UBIFS: file system size:   4063232 bytes (3968 KiB, 3 MiB, 32 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:  200807 bytes (196 KiB)
Loading file '/mac_addr' to addr 0x02000000 with size 18 (0x00000012)...
Done
Set lan 2 WakeOnLan ok
Enable HD1
Enable HD2
Net:
|  port  | Interface | PHY address  |
|--------|-----------|--------------|
| egiga0 |   RGMII   |   In-Band    |
| egiga1 |   RGMII   |   In-Band    |
| egiga2 |   SGMII   |     0x00     |
egiga0, egiga1, egiga2 [PRIME]
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-382
   Created:      2015-08-02   3:54:03 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4093292 Bytes = 3.9 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 00f00000 ...
   Image Name:   Ramdisk
   Created:      2016-03-21  20:16:03 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    2274640 Bytes = 2.2 MiB
   Load Address: 00e00000
   Entry Point:  00e00000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Initializing cgroup subsys cpuacct
Linux version 3.10.39 (kman@kmachine) (gcc version 4.6.4 (Linaro GCC branch-4.6.4. Marvell GCC Dev 201310-2126.3d181f66 64K MAXPAGESIZE ALIGN) ) #1 SMP Sun Aug 2 11:53:57 CST 2015 2014T30p5 Build-git3e9fe59
CPU: ARMv7 Processor [414fc091] revision 1 (ARMv7), cr=10c53c7d
CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine: Marvell Armada 380/381/382/385/388 (Device Tree), model: Marvell Armada 385 Development Board
Memory policy: ECC disabled, Data cache writealloc
PERCPU: Embedded 1 pages/cpu @c0930000 s8320 r8192 d16256 u32768
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16364
Kernel command line: root=/dev/ram console=ttyS0,115200
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 131072 bytes of page_cgroup
please try 'cgroup_disable=memory' option if you don't want memory cgroups
Memory: 512MB = 512MB total
Memory: 511744k/511744k available, 12544k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff8000   (  32 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xe0800000 - 0xfff00000   ( 503 MB)
    lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .text : 0xc0008000 - 0xc0714278   (7217 kB)
      .init : 0xc0718000 - 0xc075a080   ( 265 kB)
      .data : 0xc075c000 - 0xc07a7e40   ( 304 kB)
       .bss : 0xc07a7e40 - 0xc0871570   ( 806 kB)
Hierarchical RCU implementation.
        RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
NR_IRQS:16 nr_irqs:16 16

  LSP version: linux-3.10.39-2014_T3.0p5

sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 171798ms
L310 cache controller enabled
l2x0: 16 ways, CACHE_ID 0x410054c9, AUX_CTRL 0x16070000, Cache size: 1048576 B
Console: colour dummy device 80x30
Calibrating delay loop... 2655.84 BogoMIPS (lpj=13279232)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 4096
Initializing cgroup subsys memory
Initializing cgroup subsys devices
Initializing cgroup subsys freezer
Initializing cgroup subsys blkio
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0xc056c2b0 - 0xc056c308
mvebu-pmsu: Initializing Power Management Service Unit
Initializing CPU Reset module
CPU1: Booted secondary processor
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
Brought up 2 CPUs
SMP: Total of 2 processors activated (5311.69 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
mvebu-soc-id: MVEBU SoC ID=0x6820, Rev=0x4
xor: measuring software checksum speed
   arm4regs  :  1424.000 MB/sec
   8regs     :   940.800 MB/sec
   32regs    :   918.400 MB/sec
xor: using function: arm4regs (1424.000 MB/sec)
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
irq: Cannot allocate irq_descs @ IRQ196, assuming pre-allocated
irq: Cannot allocate irq_descs @ IRQ228, assuming pre-allocated
bio: create slab <bio-0> at 0
raid6: int32x1    355 MB/s
raid6: int32x2    347 MB/s
raid6: int32x4    447 MB/s
raid6: int32x8    384 MB/s
raid6: using algorithm int32x4 (447 MB/s)
raid6: using intx1 recovery algorithm
mvebu-pcie pcie-controller.3: PCIe0.0: link down
mvebu-pcie pcie-controller.3: PCIe1.0: link down
mvebu-pcie pcie-controller.3: PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
pci_bus 0000:00: root bus resource [mem 0xe0000000-0xe8000000]
pci_bus 0000:00: root bus resource [bus 00-ff]
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: bus1: Fast back to back transfers enabled
PCI: bus2: Fast back to back transfers enabled
pci 0000:00:01.0: PCI bridge to [bus 01]
pci 0000:00:02.0: PCI bridge to [bus 02]
PCI: enabling device 0000:00:01.0 (0140 -> 0143)
PCI: enabling device 0000:00:02.0 (0140 -> 0143)
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
Switching to clocksource armada_370_xp_clocksource
NET: Registered protocol family 2
TCP established hash table entries: 4096 (order: 0, 32768 bytes)
TCP bind hash table entries: 4096 (order: 0, 32768 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP: reno registered
UDP hash table entries: 1024 (order: 0, 32768 bytes)
UDP-Lite hash table entries: 1024 (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: 2176K (c0f08000 - c1128000)
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.22)
SGI XFS with security attributes, large block/inode numbers, no debug enabled
msgmni has been set to 1002
async_tx: api initialized (async)
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
armada-38x-pinctrl f1018000.pinctrl: registered pinctrl driver
mv_xor f1060800.xor: Marvell shared XOR driver
mv_xor f1060800.xor: Marvell XOR: ( xor cpy intr )
mv_xor f1060800.xor: freeing 1 in use descriptors!
mv_xor f1060800.xor: Marvell XOR: ( crc32c )
mv_xor f1060900.xor: Marvell shared XOR driver
mv_xor f1060900.xor: Marvell XOR: ( xor cpy intr )
mv_xor f1060900.xor: freeing 1 in use descriptors!
mv_xor f1060900.xor: Marvell XOR: ( crc32c )
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 44) is a 16550A
console [ttyS0] enabled
f1012100.serial: ttyS1 at MMIO 0xf1012100 (irq = 45) is a 16550A
brd: module loaded
loop: module loaded
ahci_mv f10a8000.sata: AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl platform mode
ahci_mv f10a8000.sata: flags: 64bit ncq sntf led only pmp fbs pio slum part sxs
scsi0 : ahci_mv_platform
scsi1 : ahci_mv_platform
ata1: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x100 irq 58
ata2: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x180 irq 58
armada-nand f10d0000.nand: Initialize HAL based NFC in 8bit mode with DMA Disabled using BCH 4bit ECC
Nand Flash Timing = [WP : 12], [WH : 10]
NAND device: Manufacturer ID: 0xad, Chip ID: 0xda (Hynix NAND 256MiB 3,3V 8-bit), 256MiB, page size: 2048, OOB size: 64
Bad block table found at page 131008, version 0x01
Bad block table found at page 130944, version 0x01
8 ofpart partitions found on MTD device armada-nand
Creating 8 MTD partitions on "armada-nand":
0x000000000000-0x000000500000 : "U-Boot"
0x000000500000-0x000000a00000 : "uImage"
0x000000a00000-0x000000f00000 : "uRamdisk"
0x000000f00000-0x00000c800000 : "image.cfs"
0x00000c800000-0x00000d700000 : "rescue fw"
0x00000d700000-0x00000eb00000 : "config"
0x00000eb00000-0x00000f500000 : "reserve1"
0x00000f500000-0x00000ff00000 : "reserve2"
SoC: model = 0x6820, revision = 0x4
mvPncVirtBase = 0xe0e00000, pncTcamSize = 1024
  o 3 Giga ports supported
  o SKB recycle supported (Disabled)
  o NETA acceleration mode 4
  o BM supported for CPU: 4 BM pools
  o PnC supported (Enabled)
  o RX Queue support: 8 Queues * 256 Descriptors
  o TX Queue support: 8 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 Driver INFO statistics enabled
  o Driver DEBUG statistics enabled

port #0: is_sgmii=0, is_rgmii=1, phy_addr=2
  o Loading network interface(s) for port #0: cpu_mask=0x3, tx_csum_limit=9800

  o Port 0 is connected to Linux netdevice
    o egiga0, ifindex = 2, GbE port = 0
        giga p=0: mtu=1500, mac=00:50:43:02:02:01 (platform)

port #1: is_sgmii=0, is_rgmii=1, phy_addr=1
  o Loading network interface(s) for port #1: cpu_mask=0x3, tx_csum_limit=2048

  o Port 1 is connected to Linux netdevice
    o egiga1, ifindex = 3, GbE port = 1
        giga p=1: mtu=1500, mac=00:50:43:02:02:02 (platform)

port #2: is_sgmii=1, is_rgmii=0, phy_addr=0
  o Loading network interface(s) for port #2: cpu_mask=0x3, tx_csum_limit=2048

  o Port 2 is connected to Linux netdevice
    o egiga2, ifindex = 4, GbE port = 2
        giga p=2: mtu=1500, mac=00:50:43:02:02:03 (platform)

libphy: orion_mdio_bus: probed
mdio_bus f1072004.mdio-mi: cannot get PHY at address 2
mdio_bus f1072004.mdio-mi: cannot get PHY at address 1
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
ehci-orion: EHCI orion driver
orion-ehci f1058000.usb: EHCI Host Controller
orion-ehci f1058000.usb: new USB bus registered, assigned bus number 1
orion-ehci f1058000.usb: irq 50, io mem 0xf1058000
orion-ehci f1058000.usb: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
xhci-hcd f10f0000.usb3: xHCI Host Controller
xhci-hcd f10f0000.usb3: new USB bus registered, assigned bus number 2
xhci-hcd f10f0000.usb3: irq 48, io mem 0xf10f0000
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
xhci-hcd f10f0000.usb3: xHCI Host Controller
xhci-hcd f10f0000.usb3: new USB bus registered, assigned bus number 3
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 1 port detected
xhci-hcd f10f8000.usb3: xHCI Host Controller
xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 4
xhci-hcd f10f8000.usb3: irq 49, io mem 0xf10f8000
hub 4-0:1.0: USB hub found
hub 4-0:1.0: 1 port detected
xhci-hcd f10f8000.usb3: xHCI Host Controller
xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 5
hub 5-0:1.0: USB hub found
hub 5-0:1.0: 1 port detected
usbcore: registered new interface driver usb-storage
ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
ata1.00: ATA-8: Hitachi HDS5C3020ALA632, ML6OAA10, max UDMA/133
ata1.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata2.00: ATA-8: Hitachi HDS5C3020ALA632, ML6OAA10, max UDMA/133
ata2.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata1.00: configured for UDMA/133
ata2.00: configured for UDMA/133
scsi 0:0:0:0: Direct-Access     ATA      Hitachi HDS5C302 ML6O PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
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
sd 0:0:0:0: Attached scsi generic sg0 type 0
scsi 1:0:0:0: Direct-Access     ATA      Hitachi HDS5C302 ML6O PQ: 0 ANSI: 5
sd 1:0:0:0: [sdb] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
sd 1:0:0:0: [sdb] Write Protect is off
sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 1:0:0:0: Attached scsi generic sg1 type 0
 sda: sda1 sda2 sda3 sda4
sd 0:0:0:0: [sda] Attached SCSI disk
 sdb: sdb1 sdb2 sdb3 sdb4
sd 1:0:0:0: [sdb] Attached SCSI disk
mvebu-rtc f10a3800.rtc: rtc core: registered f10a3800.rtc as rtc0
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
device-mapper: ioctl: 4.24.0-ioctl (2013-01-15) initialised: dm-devel@redhat.com
dm_crypt using the OCF package.
cpuidle: using governor ladder
armada-cesa-ocf f109d000.crypto: mv_get_cesa_resources: Total CESA HW channels supported 2
armada-cesa-ocf f109d000.crypto: mv_get_cesa_resources: CESA feature: chain(0)
mvCesaInit: channels=2, session=640, queue=256
armada-cesa-ocf f109d000.crypto: cesa_ocf_probe: CESA driver operate in ocf(0) mode
cesadev_init(c0734f0c)
TCP: cubic registered
NET: Registered protocol family 17
8021q: 802.1Q VLAN Support v1.8
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
registered taskstats version 1
mvebu-rtc f10a3800.rtc: setting system clock to 2016-06-24 17:32:34 UTC (1466789554)
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: Scanned 0 and added 0 devices.
md: autorun ...
md: ... autorun DONE.
RAMDISK: gzip image found at block 0
VFS: Mounted root (ext2 filesystem) readonly on device 1:0.
devtmpfs: mounted
Freeing unused kernel memory: 256K (c0718000 - c0758000)
init started: BusyBox v1.20.2 (2014-10-30 15:28:59 CST)
starting pid 1280, 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: hotPlug.sh: not found
offset_flag=1,vaule_flag=1,bit_flag=0
offset_flag=1,vaule_flag=1,bit_flag=0
offset_flag=1,vaulUBI: attaching mtd5 to ubi0
e_flag=1,bit_flag=0
offset_flag=1,vaule_flag=1,bit_flag=0
UBI: scanning is finished
UBI: attached mtd5 (name "config", size 20 MiB) to ubi0
UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
UBI: VID header offset: 2048 (aligned 2048), data offset: 4096
UBI: good PEBs: 160, bad PEBs: 0, corrupted PEBs: 0
UBI: user volume: 1, internal volumes: 1, max. volumes count: 128
UBI: max/mean erase counter: 22/15, WL threshold: 4096, image sequence number: 379348779
UBI: available PEBs: 22, total reserved PEBs: 138, PEBs reserved for bad PEB handling: 10
UBI: background thread "ubi_bgt0d" started, PID 1302
UBI device number 0, total 160 LEBs (20316160 bytes, 19.4 MiB), available 22 LEBs (2793472 bytes, 2.7 MiB), LEB size 126976 bytes (124.0 KiB)
UBIFS: background thread "ubifs_bgt0_0" started, PID 1307
UBIFS: recovery needed
UBIFS: recovery completed
UBIFS: mounted UBI device 0, volume 0, name "config"
UBIFS: LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
UBIFS: FS size: 14475264 bytes (13 MiB, 114 LEBs), journal size 1015809 bytes (0 MiB, 6 LEBs)
UBIFS: reserved for root: 683702 bytes (667 KiB)
UBIFS: media format: w4/r0 (latest is w4/r0), UUID AE98572A-39B8-4422-A213-57C310B3CDDA, small LPT model
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 = 110747648 , image checksum = 9df075aa
umount: can't umount /usr/local/tmp: Invalid argument
dump image checksum=9df075aa
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: /usr/sbin/./transmission-daemon: File exists
ln: /usr/sbin/./transmission-remote: File exists
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
egiga0    Link encap:Ethernet  HWaddr 00:50:43:02:02:01
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:532
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:193

egiga2    Link encap:Ethernet  HWaddr 00:50:43:02:02:03
   egiga0: mac address changed
       BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:532
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:195

Do Lan Port Switch
egiga2: mac address changed
not_egiga0: mac address changed
jnl: driver (UFSD_HEAD UFSD_HEAD_r244402_b37, LBD=ON) loaded at bf000000
ufsd: module license 'Commercial product' taints kernel.
Disabling lock debugging due to kernel taint
ufsd:: trace mask set to 0000000f
ufsd: driver (UFSD_HEAD UFSD_HEAD_r244402_b37, build_host("swtest6"), acl, ioctl, bdi, sd2(0), fua, bz, tr, rsrc) loaded at bf020000
NTFS support included
Hfs+/HfsJ support included
optimized: speed
Build_for__WD_Yellowstone_k3.10.39_2015-02-12_16T_UFSD_HEAD_r244402_b37

bio: create slab <bio-1> at 1
Btrfs loaded
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
lrwxrwxrwx    1 root     0               17 Jun 24 17:32 /usr/sbin//raid_config -> /usr/sbin/diskmgr
lrwxrwxrwx    1 root     0               17 Jun 24 17:32 /usr/sbin//raid_expand -> /usr/sbin/diskmgr
lrwxrwxrwx    1 root     0               17 Jun 24 17:32 /usr/sbin//raid_expand_disks -> /usr/sbin/diskmgr
lrwxrwxrwx    1 root     0               17 Jun 24 17:32 /usr/sbin//raid_update_info -> /usr/sbin/diskmgr
hardware init
pool #1: pkt_size=1536, buf_size=1600 - 2048 of 2048 buffers added
egiga1: link up
egiga1: started
pool #0: pkt_size=1536, buf_size=1600 - 2048 of 2048 buffers added
egiga2: link up
egiga2: started
mtd check v1.06.06032015
config mtd type is UBIFS
device = /usr/local/config
Total size     = 12384 Kbytes
Used size     = 196 Kbytes
Free size     = 12188 Kbytes
percentage = 2
/usr/local/config free size is 12480512
** 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: scanning is finished
UBI: attached mtd6 (name "reserve1", size 10 MiB) to ubi1
UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
UBI: VID header offset: 2048 (aligned 2048), data offset: 4096
UBI: good PEBs: 80, bad PEBs: 0, corrupted PEBs: 0
UBI: user volume: 1, internal volumes: 1, max. volumes count: 128
UBI: max/mean erase counter: 3/1, WL threshold: 4096, image sequence number: 2179809531
UBI: available PEBs: 30, total reserved PEBs: 50, PEBs reserved for bad PEB handling: 12
UBI: background thread "ubi_bgt1d" started, PID 3432
UBI device number 1, total 80 LEBs (10158080 bytes, 9.7 MiB), available 30 LEBs (3809280 bytes, 3.6 MiB), LEB size 126976 bytes (124.0 KiB)
UBIFS: background thread "ubifs_bgt1_0" started, PID 3450
UBIFS: mounted UBI device 1, volume 0, name "reserve"
UBIFS: LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
UBIFS: FS size: 3047424 bytes (2 MiB, 24 LEBs), journal size 1015809 bytes (0 MiB, 6 LEBs)
UBIFS: reserved for root: 143937 bytes (140 KiB)
UBIFS: media format: w4/r0 (latest is w4/r0), UUID 27EB37EE-6C69-42ED-9525-C16ECD780B35, small LPT model
UBIFS: un-mount UBI device 1, volume 0
UBIFS: background thread "ubifs_bgt1_0" stops
UBI: attaching mtd7 to ubi2
UBI: scanning is finished
UBI: attached mtd7 (name "reserve2", size 10 MiB) to ubi2
UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
UBI: VID header offset: 2048 (aligned 2048), data offset: 4096
UBI: good PEBs: 80, bad PEBs: 0, corrupted PEBs: 0
UBI: user volume: 1, internal volumes: 1, max. volumes count: 128
UBI: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 1017015744
UBI: available PEBs: 20, total reserved PEBs: 60, PEBs reserved for bad PEB handling: 14
UBI: background thread "ubi_bgt2d" started, PID 3465
UBI device number 2, total 80 LEBs (10158080 bytes, 9.7 MiB), available 20 LEBs (2539520 bytes, 2.4 MiB), LEB size 126976 bytes (124.0 KiB)
mknod: /dev/mtd7: File exists
UBIFS: background thread "ubifs_bgt2_0" started, PID 3478
UBIFS: mounted UBI device 2, volume 0, name "reserve2"
UBIFS: LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
UBIFS: FS size: 4063232 bytes (3 MiB, 32 LEBs), journal size 1015809 bytes (0 MiB, 6 LEBs)
UBIFS: reserved for root: 191915 bytes (187 KiB)
UBIFS: media format: w4/r0 (latest is w4/r0), UUID B08D71E6-2261-481A-AF47-E101DF7B74A7, small LPT model
/dev/mtd7 mount ok(ubi)
cp: can't stat '/mnt/ubi2/hidden_eccryption': No such file or directory
UBIFS: un-mount UBI device 2, volume 0
UBIFS: background thread "ubifs_bgt2_0" stops
mac1 = 00:90:A9:E8:51:D7
lan0:ifconfig egiga0 hegiga0: mac address changed
w ether 00:90:A9:E8:51:D7
pool #2: pkt_size=1536, buf_size=1600 - 2048 of 2048 buffers added
egiga0: link up
egiga0: started
set lan0 speed
Model ID : GT
GT
ln: /usr/local/model/web/pages/images/./icon: File exists
hidden encryption: 0
Not support chk_sata
old firmware ver:2.11.140.0321.2016
new firmware ver:2.11.140.0321.2016
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 192.168.151.214...
Lease of 192.168.151.214 obtained, lease time 604800
deleting routers
route: SIOCDELRT: No such process
killall: crond: no process killed
crond[3701]: crond: crond (busybox 1.20.2) started, log level 8
RTNETLINK answers: Operation not supported
RTNETLINK answers: Operation not supported
call load_module network
Initializing UPnP Sdk with
        ipaddress = (null) port = 0
UPnP Initialized
        ipaddress= 192.168.151.214 port = 49152
Specifying the webserver root directory -- /etc/upnp
Registering the RootDevice
         with desc_doc_url: http://192.168.151.214:49152/nasdevicedesc.xml
RootDevice Registered
Initializing State Table
State Table Initialized
crond[3760]: crond: crond (busybox 1.20.2) started, log level 8
/usr/local/modules/script/system_init: line 844: getHddWhiteList.sh: not found
Initializing UPnP Sdk with
        ipaddress = (null) port = 0
UPnP Initialized
        ipaddress= 192.168.151.214 port = 49153
Specifying the webserver root directory -- /etc/upnp
Registering the RootDevice
         with desc_doc_url: http://192.168.151.214:49153/nasdevicedesc.xml
RootDevice Registered
Initializing State Table
State Table Initialized
sh: you need to specify whom to kill
Advertisements Sent
Advertisements Sent
*** Copy CacheVolume data from flash ****
*** set Time Zone ****
$Usage: apache {start|stop|restart} {web/dav}
Fri Jun 24 17:33:08 PDT 2016
*** get Time from rtc and set it into system ****
rtc: RTC time = 2016/6/24 Fri 17:33:8
Fri Jun 24 10:33:08 PDT 2016
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)

Module IPC SERVER Version:(1.00.20090706)

ads=0
created mail daemon thread 0
2016-06-24 10:33:09.130197 (+0800) +0.5 +/- 0.424682 time.windows.com 40.118.103.7 s3
NTP Server connected successfully!!!
POWER ON DEVICE!!
md0 state is
mdadm: /dev/sda1 appears to be part of a raid array:
    level=raid1 devices=2 ctime=Fri Jun 24 10:08:16 2016
mdadm: /dev/sdb1 appears to be part of a raid array:
    level=raid1 devices=2 ctime=Fri Jun 24 10:08:16 2016
mdadm: size set to 2097088K
mdadm: creation continuing despite oddities due to --run
md: bind<sda1>
md: bind<sdb1>
md/raid1:md0: active with 2 out of 2 mirrors
md0: bitmap file is out of date (0 < 1) -- forcing full recovery
created bitmap (16 pages) for device md0
md0: bitmap file is out of date, doing full recovery
md0: bitmap initialized from disk: read 2 pages, set 262136 of 262136 bits
md0: detected capacity change from 0 to 2147418112
mdadm: array /dev/md0 started.
 md0: unknown partition table
Setting up swapspace version 1, size = 2147385344 bytes
UUID=8dccf999-7632-4573-90d6-0039314754fe
Adding 2097056k swap on /dev/md0.  Priority:-1 extents:1 across:2097056k
EXT4-fs (sda4): mounted filesystem with ordered data mode. Opts: (null)
EXT4-fs (sdb4): mounted filesystem with ordered data mode. Opts: (null)
--->isVolumeExist 0
rtc: system time: 2016/6/24 Fri 17:33:13
setRTCTime
EXT4-fs (sda2): barriers disabled
EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: barrier=0,usrquota,grpquota
--->isVolumeExist 0
EXT4-fs (sdb2): barriers disabled
EXT4-fs (sdb2): mounted filesystem with ordered data mode. Opts: barrier=0,usrquota,grpquota

Up_Send_Ctl : Can not find specified command "ErrStatus"
restart sysinfod...
sysinfod: full update begin...
cat: can't open '/tmp/hw_detect_sata': No such file or directory
sysinfod: disk connected: previous=0xffffffff, now=0x0
sh: getHddWhiteList.sh: not found
sysinfod: Disk1(sda) detected.
sysinfod: Disk2(sdb) detected.
sysinfod: Creating a new entry for md0.
mdadm: No md superblock detected on /dev/sda2.
mdadm: No md superblock detected on /dev/sdb2.
mount: mount point /proc/bus/usb does not exist
WD hwlib start..............
Starting system message bus
Starting wdtms
wdtms started
PHY_LAN_NUMBER=1
BOND_ENABLE=0
VLAN0_ENABLE=0
VLAN1_ENABLE=0
**LLTD START**
LLTDIF0=egiga0
I/O warning : failed to load external entity "/var/www/xml/internal_backup.xml"
/usr/local/modules/script/system_init: line 1063: /mnt/tmp6/ibuki/avahi_tm_serv: not found
--2016-06-24 10:33:26--  http://download.wdc.com/apps/WDMyCloudMirrorG2/WDMyCloudMirrorG2.xml
Resolving download.wdc.com... cat: can't open '/var/run/traceroute_wd.pid': No such file or directory
ash: you need to specify whom to kill
84.53.142.82, 84.53.142.89
Connecting to download.wdc.com|84.53.142.82|:80... killall: traceroute: no process killed
connected.
HTTP request sent, awaiting response... 200 OK
Length: 7698 (7.5K) [application/xml]
Saving to: '/var/www/xml/app_info.xml'

100%[======================================>] 7,698       --.-K/s   in 0.007s

2016-06-24 10:33:26 (1.07 MB/s) - '/var/www/xml/app_info.xml' saved [7698/7698]

I/O warning : failed to load external entity "/var/www/xml/app_update.xml"

 -------------use hwlib instead of fan_control b c-------------
sysinfod: disk connected: previous=0x0, now=0x3
sh: getHddWhiteList.sh: not found
waiting : [10]
mcu version 1.06
chk_io v1.04.20141112
system daemon v1.04.20141211
PIP is disabled, exiting.
Fri Jun 24 10:33:36 PDT 2016 - %W - Communication Manager - startup is disabled, use 'enable' to start process
/usr/local/modules/script/system_init: line 1289: vvctl: not found
dev.raid.speed_limit_max = 200000

Please press Enter to activate this console. killall: chk_hotplug: no process killed
call load_module
### create systemfile ###
### sata_reload_application start ###
PID file /var/run/mediaserver.pid not found, stopping server anyway...
killall: twonkystarter: no process killed

Starting /usr/local/twonky/twonkystarter ... -appdata /mnt/HD/HD_a2/.twonkymedia ¦Vlogfile /mnt/HD/HD_a2/.twonkymedia/twonkymedia-log.txt
Daemonizing...
Detaching from parent

Initializing UPnP Sdk with
        ipaddress = (null) port = 0
UPnP Initialized
        ipaddress= 192.168.151.214 port = 49154
Specifying the webserver root directory -- /etc/upnp
Registering the RootDevice
         with desc_doc_url: http://192.168.151.214:49154/nasdevicedesc.xml
RootDevice Registered
Initializing State Table
State Table Initialized
Starting atopacctd
cannot switch on process accounting: Function not implemented
Starting atop system monitor  atop
atop started
*** APKG Daemon is starting ... ***
sh: you need to specify whom to kill
160624 10:33:48 mysqld_safe Logging to '/mnt/HD_a4/.@database@/WDMyCloudMirror.err'.
killall: smbd: no process killed
Starting wdnotifier
Advertisements Sent
LOCK itunes.sh
Touch itunes tmp file
sh: you need to specify whom to kill
160624 10:33:48 mysqld_safe Starting mysqld daemon with databases from /mnt/HD_a4/.@database@
sh: you need to specify whom to kill
wdnotifier started
mt-daapd started.....
UNLOCK itunes.sh
Starting wdmcserver
Starting wdphotodbmerger
WDPhotodbmerger started  0
Fri Jun 24 10:33:51 PDT 2016 /etc/init.d/onbrdnetloccommd - Start
killall: smbd: no process killed
cp: can't stat '/etc/NAS_CFG/ftp.xml': No such file or directory
cp: can't stat '/etc/NAS_CFG/ftp.xml': No such file or directory
killall: chk_blockip: no process killed
killall: chk_blockip: no process killed
sysinfod: full update begin...
mdadm: No md superblock detected on /dev/sda2.
mdadm: No md superblock detected on /dev/sdb2.
 4160 root      4224 S    avahi-daemon: running [WDMyCloudMirror.local]
killall: elephantdriveDaemon: no process killed
Setting up docker
Loading ipv6
NET: Registered protocol family 10
Loading drivers
Loading /usr/local/modules/driver/nf_conntrack.ko
nf_conntrack version 0.5.0 (8034 buckets, 32136 max)
Loading /usr/local/modules/driver/nf_nat.ko
Loading /usr/local/modules/driver/nf_defrag_ipv4.ko
Loading /usr/local/modules/driver/nf_conntrack_ipv4.ko
Loading /usr/local/modules/driver/nf_nat_ipv4.ko
Loading /usr/local/modules/driver/x_tables.ko
Loading /usr/local/modules/driver/xt_conntrack.ko
Loading /usr/local/modules/driver/xt_addrtype.ko
Loading /usr/local/modules/driver/xt_tcpudp.ko
Loading /usr/local/modules/driver/xt_nat.ko
Loading /usr/local/modules/driver/ipt_MASQUERADE.ko
Loading /usr/local/modules/driveip_tables: (C) 2000-2006 Netfilter Core Team
r/ip_tables.ko
Loading /usr/local/modules/driver/iptable_filter.ko
Loading /usr/local/modules/driver/iptable_nat.ko
Loading /usr/local/modules/driver/llc.ko
Loading /usr/local/modules/driver/stp.ko
Loading /usr/local/modules/driver/bridge.ko
Bridge firewalling registered
Setting up cgroup
Get http:///var/run/docker.sock/v1.19/containers/json: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?
wdappmgr_auto_start finished modifying wd apps exit code
Starting Docker
umount: /mnt/HD/HD_a2/Nas_Prog/_docker/devicemapper: not mounted
Total RAM: 514176 KB
Creating /sys/fs/cgroup/memory/docker
Docker quota: 171392 KB
Set memory quota for docker: 175505408
Docker pid 6018
Stopping wdappmgr
wdappmgr is already stopped
Starting wdappmgr
parent exiting!
wdappmgr started
bio: create slab <bio-2> at 2
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100     2  100     2    0     0     78      0 --:--:-- --:--:-- --:--:--    80
wdappmgr_auto_start done
### sata_reload_application end ###
Create USB dev node
rm: can't remove '/tmp/disk_uuid': No such file or directory
sysinfod: full update begin...
LED_POWER_ON
sysinfod: inform: all drives status=Healthy.
mdadm: No md superblock detected on /dev/sda2.
mdadm: No md superblock detected on /dev/sdb2.

starting pid 4838, tty '/dev/ttyS0': '/bin/login'
Password of admin:


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

root@WDMyCloudMirror / #


Hitting a key didn't interrupt the bootprocess, but shortening RX and TX did. This is the factory preset environment:
Marvell>> printenv
CASset=max
MALLOC_len=5
MPmode=SMP
autoload=no
baudrate=115200
boot_order=hd_scr usb_scr mmc_scr hd_img usb_img mmc_img pxe net_img net_scr
bootargs=root=/dev/ram console=ttyS0,115200
bootargs_dflt=$console $nandEcc $mtdparts $bootargs_root nfsroot=$serverip:$rootpath ip=$ipaddr:$serverip$bootargs_end $mvNetConfig video=dovefb:lcd0:$lcd0_params clcd.lcd0_enable=$lcd0_enable clcd.lcd_panel=$lcd_panel
bootargs_end=:10.4.50.254:255.255.255.0:Armada38x:eth0:none
bootargs_root=root=/dev/nfs rw
bootcmd=nand read.e 0xa00000 0x500000 0x500000;nand read.e 0xf00000 0xa00000 0x500000;bootm 0xa00000 0xf00000
bootcmd_auto=stage_boot $boot_order
bootcmd_fdt=tftpboot 0x2000000 $image_name;tftpboot $fdtaddr $fdtfile;setenv bootargs $console $nandEcc $mtdparts $bootargs_root nfsroot=$serverip:$rootpath ip=$ipaddr:$serverip$bootargs_end $mvNetConfig video=dovefb:lcd0:$lcd0_params clcd.lcd0_enable=$lcd0_enable clcd.lcd_panel=$lcd_panel; bootz 0x2000000 - $fdtaddr;
bootcmd_fdt_boot=tftpboot 0x2000000 $image_name; setenv bootargs $console $nandEcc $mtdparts $bootargs_root nfsroot=$serverip:$rootpath ip=$ipaddr:$serverip$bootargs_end $mvNetConfig video=dovefb:lcd0:$lcd0_params clcd.lcd0_enable=$lcd0_enable clcd.lcd_panel=$lcd_panel; bootz 0x2000000 - $fdtaddr;
bootcmd_fdt_edit=tftpboot $fdtaddr $fdtfile; fdt addr $fdtaddr; setenv bootcmd $bootcmd_fdt_boot
bootcmd_lgcy=tftpboot 0x2000000 $image_name; setenv bootargs $bootargs_dflt; bootm 0x2000000;
bootdelay=1
cacheShare=no
console=console=ttyS0,115200
device_partition=0:1
disaMvPnp=no
eeeEnable=no
enaClockGating=no
enaCpuStream=no
enaFPU=yes
enaMonExt=no
enaWrAllo=no
eth1addr=00:50:43:20:0d:40
eth1mtu=1500
eth2addr=00:50:43:20:dc:40
eth2mtu=1500
eth3addr=00:50:43:0d:dc:20
eth3mtu=1500
ethact=egiga2
ethaddr=00:50:43:dc:0d:40
ethmtu=1500
ethprime=egiga2
fdt_addr=2040000
fdt_skip_update=no
fdtaddr=0x1000000
fdtfile=armada-38x-modular.dtb
filesize=12
ide_path=/
image_name=uImage
initrd_name=uInitrd
ipaddr=192.168.11.110
kernel_addr_r=2080000
lcd0_enable=0
lcd0_params=640x480-16@60
lcd_panel=0
loadaddr=0x02000000
loads_echo=0
mtddevname=u-boot
mtddevnum=0
mtdids=nand0=armada-nand
mtdparts=mtdparts=armada-nand:5m(u-boot)ro,5m@5m(kernel),5m@10m(uRamdisk),185m@15m(image.cfs),15m@200m(rescue_fw),20m@215m(config),10m@235m(reserve1),10m@245m(reserve2)
mvNetConfig=mv_net_config=4,(00:50:43:11:11:11,0:1:2:3),mtu=1500
mv_pon_addr=00:50:43:40:dc:20
nandEcc=nfcConfig=4bitecc
netbsd_en=no
netmask=255.255.255.0
netretry=no
partition=nand0,0
pcieTune=no
pexMode=RC
pxe_files_load=:default.arm-armadaxp-db:default.arm-armadaxp:default.arm
pxefile_addr_r=3100000
ramdisk_addr_r=2880000
rootpath=/srv/nfs/
sata_delay_reset=0
sata_dma_mode=yes
script_addr_r=3000000
script_name=boot.scr
serverip=192.168.11.114
standalone=fsload 0x2000000 $image_name;setenv bootargs $console $nandEcc $mtdparts root=/dev/mtdblock0 rw ip=$ipaddr:$serverip$bootargs_end; bootm 0x2000000;
stderr=serial
stdin=serial
stdout=serial
usb0Mode=host
usbActive=0
usbType=3
vxworks_en=no
yuk_ethaddr=00:00:00:EE:51:81

Environment size: 3209/524284 bytes

These are the available commands in the uBoot-console:
Marvell>> help
?       - alias for 'help'
Creset  - Creset        - Run 'reset' or boot command in a loop, while counting.

SatR    - Sample At Reset sub-system
active_units- print active units on board
base    - print or set address offset
bdinfo  - print Board Info structure
boot    - boot default, i.e., run 'bootcmd'
boot_menu- command allows to select boot script from boot device
        example: boot_menu
bootd   - boot default, i.e., run 'bootcmd'
bootelf - Boot from an ELF image in memory
bootm   - boot application image from memory
bootp   - boot image via network using BOOTP/TFTP protocol
bootvx  - Boot vxWorks from an ELF image
bootz   - boot Linux zImage image from memory
bubt    - bubt  - Burn an image on the Boot Nand Flash.

chpart  - change active partition
cmp     - memory compare
coninfo - print console devices and information
cp      - memory copy
crc32   - checksum calculation
date    - get/set/reset date & time
ddrPhyRead- ddrPhyRead - Read DDR PHY register

ddrPhyWrite- ddrPhyWrite - Write DDR PHY register

dhcp    - boot image via network using DHCP/TFTP protocol
diskboot- diskboot- boot from IDE device

dma     - dma   - Perform DMA using the XOR engine

echo    - echo args to console
editenv - edit environment variable
eeprom  - EEPROM sub-system
env     - environment handling commands
exit    - exit script
ext2load- load binary file from a Ext2 filesystem
ext2ls  - list files in a directory (default /)
ext4load- load binary file from a Ext4 filesystem
ext4ls  - list files in a directory (default /)
ext4write- create a file in the root directory
false   - do nothing, unsuccessfully
fatinfo - print information about filesystem
fatload - load binary file from a dos filesystem
fatls   - list files in a directory (default /)
fdt     - flattened device tree utility commands
fsinfo  - print information about filesystems
fsload  - load binary file from a filesystem image
go      - start application at address 'addr'
help    - print command description/usage
i2c     - I2C sub-system
ide     - ide     - IDE sub-system

iminfo  - print header information for application image
imxtract- extract a part of a multi-image
ir      - ir    - reading and changing MV internal register values.

itest   - return true/false on integer compare
loadb   - load binary file over serial line (kermit mode)
loads   - load S-Record file over serial line
loadx   - load binary file over serial line (xmodem mode)
loady   - load binary file over serial line (ymodem mode)
loop    - infinite loop on address range
ls      - list files in a directory (default /)
map     - map   - Display address decode windows

md      - memory display
me      - me    - PCIe master enable

mm      - memory modify (auto-incrementing address)
mmc     - MMC sub system
mmcinfo - display MMC info
mp      - mp    - map PCIe BAR

mtdparts- define flash/nand partitions
mtest   - simple RAM read/write test
mw      - memory write (fill)
nand    - NAND sub-system
nboot   - boot from NAND device
nfs     - boot image via network using NFS protocol
nm      - memory modify (constant address)
pci     - list and access PCI Configuration Space
pciePhyRead- phyRead    - Read PCI-E Phy register

pciePhyWrite- pciePhyWrite      - Write PCI-E Phy register

phyRead - phyRead       - Read Phy register

phyWrite- phyWrite      - Write Phy register

ping    - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
pxe     - commands to get and boot from pxe files
rcvr    - rcvr  - Start recovery process (with TFTP server)

reset   - Perform RESET of the CPU
resetenv- resetenv      - Erase environment sector to reset all variables to default.

run     - run commands in an environment variable
scsi    - SCSI sub-system
scsiboot- boot from SCSI device
se      - se    - PCIe Slave enable

setenv  - set environment variables
sg      - sg    - scanning the PHYs status

showvar - print local hushshell variables
sleep   - delay execution for some time
source  - run script from memory
sp      - scan and detect all devices on PCI-e interface
stage_boot- command to load script/image from different devices
        example: stage_boot hd_img pxe
sys_restore- sys_restore        - Search for install script on USB DOK and start installation of linux kernel and rootfs.

sysboot - command to get and boot from syslinux files
temp    - temp  - Display the device temperature.

tempCmd0- tempCmd - This command allocated for monitor extinction

tempCmd1- tempCmd - This command allocated for monitor extinction

tempCmd2- tempCmd - This command allocated for monitor extinction

tempCmd3- tempCmd - This command allocated for monitor extinction

test    - minimal test like /bin/sh
tftpboot- boot image via network using TFTP protocol
training- training      - prints the results of the DDR3 Training.

trainingStability- training     - prints the results of the DDR3 Training.

true    - do nothing, successfully
ts_report- ts_report    - report touch screen coordinate

ts_test - ts_test       - test touch screen

ubi     - ubi commands
ubifsload- load file from an UBIFS filesystem
ubifsls - list files in a directory
ubifsmount- mount UBIFS volume
ubifsumount- unmount UBIFS volume
usb     - USB sub-system
usbboot - boot from USB device
version - print monitor, compiler and linker version
whoAmI  - - reading CPU ID

These infos may be also enlightening:
Marvell>> version

U-Boot 2013.01_v1.03 (Jul 30 2015 - 11:39:08) Marvell version: 2014_T3.0p6
arm-marvell-linux-gnueabi-gcc (Linaro GCC branch-4.6.4. Marvell GCC Dev 201310-2126.3d181f66 64K MAXPAGESIZE ALIGN) 4.6.4
GNU ld (Linaro GCC branch-4.6.4. Marvell GCC Dev 201310-2126.3d181f66 64K MAXPAGESIZE ALIGN) 2.22.0.20120801

Marvell>> bdinfo
arch_number = 0x00000210
boot_params = 0x00000100
DRAM bank   = 0x00000000
-> start    = 0x00000000
-> size     = 0x20000000
DRAM bank   = 0x00000001
-> start    = 0x00000000
-> size     = 0x00000000
ethaddr     = 00:50:43:6c:28:27
ip_addr     = 192.168.151.232
baudrate    = 115200 bps
TLB addr    = 0x1FFF0000
relocaddr   = 0x1FECE000
reloc off   = 0x1FECE000
irq_sp      = 0x1F9CDF30
sp start    = 0x1F9CDF20
FB base     = 0x00000000

Marvell>> coninfo
List of available devices:
serial   80000003 SIO stdin stdout stderr


Marvell>> fsinfo
### filesystem type is JFFS2
Scanning JFFS2 FS:  done.
Compression: NONE
        frag count: 0
        compressed sum: 0
        uncompressed sum: 0
Compression: ZERO
        frag count: 0
        compressed sum: 0
        uncompressed sum: 0
Compression: RTIME
        frag count: 0
        compressed sum: 0
        uncompressed sum: 0
Compression: RUBINMIPS
        frag count: 0
        compressed sum: 0
        uncompressed sum: 0
Compression: COPY
        frag count: 0
        compressed sum: 0
        uncompressed sum: 0
Compression: DYNRUBIN
        frag count: 0
        compressed sum: 0
        uncompressed sum: 0
Compression: ZLIB
        frag count: 0
        compressed sum: 0
        uncompressed sum: 0


Marvell>> map

CPU Interface
-------------
SDRAM_CS0 ....base 000000000, size 512MB
SDRAM_CS1 ....disable
SDRAM_CS2 ....disable
SDRAM_CS3 ....disable
DEVICE_CS0 ....no such
DEVICE_CS1 ....no such
DEVICE_CS2 ....no such
DEVICE_CS3 ....no such
PEX0_MEM ....base 0e0000000, size  32MB
PEX0_IO ....no such
PEX1_MEM ....base 0e2000000, size  32MB
PEX1_IO ....no such
PEX2_MEM ....base 0e4000000, size  32MB
PEX2_IO ....no such
PEX3_MEM ....base 0e6000000, size  32MB
PEX3_IO ....no such
INTER_REGS ....base 0f1000000, size   1MB
DMA_UART ....no such
SPI0_CS0 ....no such
SPI0_CS1 ....no such
SPI0_CS2 ....no such
SPI0_CS3 ....no such
SPI1_CS0 ....no such
SPI1_CS1 ....no such
SPI1_CS2 ....no such
SPI1_CS3 ....no such
BOOT_ROM_CS ....no such
DEV_BOOTCS ....base 0fd000000, size  16MB
CRYPT1_ENG ....no such
CRYPT2_ENG ....no such
PNC_BM ....no such
PSS_PORTS ....no such
NSS_MAC_NIC ....no such
NSS_MGMT ....no such

AHB To MBUS Bridge:
-------------------
win0 - PEX0_MEM base e0000000, ....size  32MB
win1 - PEX1_MEM base e2000000, ....size  32MB
win2 - PEX2_MEM base e4000000, ....size  32MB
win3 - PEX3_MEM base e6000000, ....size  32MB
win4 - disable
win5 - disable
win6 - disable
win7 - disable
win8 - disable
win9 - DEV_BOOTCS base fd000000, ....size  16MB
win10 - disable
win11 - disable
win12 - disable
win13 - disable
win14 - disable
win15 - disable
win16 - disable
win17 - disable
win18 - disable
win19 - disable
win20 - INTER_REGS base f1000000, ....size   1MB

PEX0:
-----

Pex Bars

Internal Regs Bar0.... base f1000000, size   1MB
DRAM Bar1............. base 00000000, size 512MB
Devices Bar2.......... disable

Pex Decode Windows

win0 - SDRAM_CS0 base 00000000, ....size 512MB
win1 - disable
win2 - disable
win3 - disable
win4 - disable
win5 - disable
default win - SDRAM_CS0
Expansion ROM - SDRAM_CS0

USB 0:
----
win0 - SDRAM_CS0 base 00000000, ....size 512MB
win1 - PEX0_MEM base e0000000, ....size  32MB
win2 - disable
win3 - disable
win4 - mvUsbWinRead (dev=0): ERR. Invalid winNum 4
win5 - mvUsbWinRead (dev=0): ERR. Invalid winNum 5
win6 - mvUsbWinRead (dev=0): ERR. Invalid winNum 6
win7 - mvUsbWinRead (dev=0): ERR. Invalid winNum 7
win8 - mvUsbWinRead (dev=0): ERR. Invalid winNum 8
win9 - mvUsbWinRead (dev=0): ERR. Invalid winNum 9
win10 - mvUsbWinRead (dev=0): ERR. Invalid winNum 10
win11 - mvUsbWinRead (dev=0): ERR. Invalid winNum 11
win12 - mvUsbWinRead (dev=0): ERR. Invalid winNum 12
win13 - mvUsbWinRead (dev=0): ERR. Invalid winNum 13
win14 - mvUsbWinRead (dev=0): ERR. Invalid winNum 14
win15 - mvUsbWinRead (dev=0): ERR. Invalid winNum 15

ETH 0:
----
win0 - SDRAM_CS0 base 00000000, ....size 512MB
win1 - disable
win2 - disable
win3 - disable
win4 - disable
win5 - disable
win6 - mvNetaWinGet: ERR. Invalid winNum 6
win7 - mvNetaWinGet: ERR. Invalid winNum 7
win8 - mvNetaWinGet: ERR. Invalid winNum 8
win9 - mvNetaWinGet: ERR. Invalid winNum 9
win10 - mvNetaWinGet: ERR. Invalid winNum 10
win11 - mvNetaWinGet: ERR. Invalid winNum 11
win12 - mvNetaWinGet: ERR. Invalid winNum 12
win13 - mvNetaWinGet: ERR. Invalid winNum 13
win14 - mvNetaWinGet: ERR. Invalid winNum 14
win15 - mvNetaWinGet: ERR. Invalid winNum 15

ETH 1:
----
win0 - SDRAM_CS0 base 00000000, ....size 512MB
win1 - disable
win2 - disable
win3 - disable
win4 - disable
win5 - disable
win6 - mvNetaWinGet: ERR. Invalid winNum 6
win7 - mvNetaWinGet: ERR. Invalid winNum 7
win8 - mvNetaWinGet: ERR. Invalid winNum 8
win9 - mvNetaWinGet: ERR. Invalid winNum 9
win10 - mvNetaWinGet: ERR. Invalid winNum 10
win11 - mvNetaWinGet: ERR. Invalid winNum 11
win12 - mvNetaWinGet: ERR. Invalid winNum 12
win13 - mvNetaWinGet: ERR. Invalid winNum 13
win14 - mvNetaWinGet: ERR. Invalid winNum 14
win15 - mvNetaWinGet: ERR. Invalid winNum 15

ETH 2:
----
win0 - SDRAM_CS0 base 00000000, ....size 512MB
win1 - disable
win2 - disable
win3 - disable
win4 - disable
win5 - disable
win6 - mvNetaWinGet: ERR. Invalid winNum 6
win7 - mvNetaWinGet: ERR. Invalid winNum 7
win8 - mvNetaWinGet: ERR. Invalid winNum 8
win9 - mvNetaWinGet: ERR. Invalid winNum 9
win10 - mvNetaWinGet: ERR. Invalid winNum 10
win11 - mvNetaWinGet: ERR. Invalid winNum 11
win12 - mvNetaWinGet: ERR. Invalid winNum 12
win13 - mvNetaWinGet: ERR. Invalid winNum 13
win14 - mvNetaWinGet: ERR. Invalid winNum 14
win15 - mvNetaWinGet: ERR. Invalid winNum 15

XOR 0:
----
win0 - SDRAM_CS0 base 00000000, ....size 512MB
win1 - PEX0_MEM base e0000000, ....size  32MB
win2 - PEX1_MEM base e2000000, ....size  32MB
win3 - PEX2_MEM base e4000000, ....size  32MB
win4 - PEX3_MEM base e6000000, ....size  32MB
win5 - disable
win6 - disable
win7 - disable
win8 - win9 - win10 - win11 - win12 - win13 - win14 - win15 -
XOR 1:
----
win0 - SDRAM_CS0 base 00000000, ....size 512MB
win1 - PEX0_MEM base e0000000, ....size  32MB
win2 - PEX1_MEM base e2000000, ....size  32MB
win3 - PEX2_MEM base e4000000, ....size  32MB
win4 - PEX3_MEM base e6000000, ....size  32MB
win5 - disable
win6 - disable
win7 - disable
win8 - win9 - win10 - win11 - win12 - win13 - win14 - win15 -
Sata 0:
----
win0 - SDRAM_CS0 base 00000000, ....size 512MB
win1 - disable
win2 - disable
win3 - disable
win4 - mvSata3WinRead (dev=0): ERR. Invalid winNum 4
win5 - mvSata3WinRead (dev=0): ERR. Invalid winNum 5
win6 - mvSata3WinRead (dev=0): ERR. Invalid winNum 6
win7 - mvSata3WinRead (dev=0): ERR. Invalid winNum 7
win8 - mvSata3WinRead (dev=0): ERR. Invalid winNum 8
win9 - mvSata3WinRead (dev=0): ERR. Invalid winNum 9
win10 - mvSata3WinRead (dev=0): ERR. Invalid winNum 10
win11 - mvSata3WinRead (dev=0): ERR. Invalid winNum 11
win12 - mvSata3WinRead (dev=0): ERR. Invalid winNum 12
win13 - mvSata3WinRead (dev=0): ERR. Invalid winNum 13
win14 - mvSata3WinRead (dev=0): ERR. Invalid winNum 14
win15 - mvSata3WinRead (dev=0): ERR. Invalid winNum 15

Sata 1:
----
win0 - # it stopped here and needed a hardreset


Best regards
Jan



Edited 2 time(s). Last edit at 07/11/2016 11:01AM by JanN.
Attachments:
open | download - WDMCMG2_board_bottom_ser_small.jpg (793.1 KB)
open | download - WDMCMG2_board_top_edt_small.jpg (776.8 KB)
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
July 11, 2016 04:00AM
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
July 11, 2016 04:16AM
I'm in contact with fox_exe, the russian guy, who hacked different WD boxes. With his great help i managed to use the serial interface and to boot a kernel and rootfs that he compiled, via tftp with these commands:
dhcp; setenv serverip 192.168.151.4; tftp 0xa00000 uImage; tftp 0xf00000 uRamdisk; bootm 0xa00000 0xf00000
It works, but there is a problem with the network interface, so i can't connect to the box via ssh or http...:
Marvell>> dhcp
BOOTP broadcast 1
*** Unhandled DHCP Option in OFFER/ACK: 42
*** Unhandled DHCP Option in OFFER/ACK: 42
DHCP client bound to address 192.168.151.227

Marvell>> setenv serverip 192.168.151.4; tftp 0xa00000 uImage; tftp 0xf00000 uRamdisk; bootm 0xa00000 0xf00000
Using egiga2 device
TFTP from server 192.168.151.4; our IP address is 192.168.151.227
Filename 'uImage'.
Load address: 0xa00000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ############################################
         1.5 MiB/s
done
Bytes transferred = 4882732 (4a812c hex)
Using egiga2 device
TFTP from server 192.168.151.4; our IP address is 192.168.151.227
Filename 'uRamdisk'.
Load address: 0xf00000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ####
         2 MiB/s
done
Bytes transferred = 2682706 (28ef52 hex)
## Booting image at 00a00000 ...
## Booting kernel from Legacy Image at 00a00000 ...
   Image Name:   Linux
   Created:      2016-06-25  12:03:22 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4882668 Bytes = 4.7 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 00f00000 ...
   Image Name:   Ramdisk
   Created:      2016-06-25  10:57:34 UTC
   Image Type:   ARM Linux RAMDisk Image (lzma compressed)
   Data Size:    2682642 Bytes = 2.6 MiB
   Load Address: 00e00000
   Entry Point:  00e00000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Initializing cgroup subsys cpuacct
Linux version 3.10.39 (root@buildserver-x86) (gcc version 4.6.4 (Marvell GCC release 20150204-c4af733b 64K MAXPAGESIZE ALIGN CVE-2015-0235) ) #1 SMP Sat Jun 25 17:02:43 YEKT 2016
CPU: ARMv7 Processor [414fc091] revision 1 (ARMv7), cr=10c53c7d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: Marvell Armada 380/381/382/385/388 (Device Tree), model: Marvell Armada 385 Development Board
Memory policy: ECC disabled, Data cache writealloc
PERCPU: Embedded 8 pages/cpu @c1698000 s8576 r8192 d16000 u32768
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 129792
Kernel command line: root=/dev/ram console=ttyS0,115200
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
allocated 1048576 bytes of page_cgroup
please try 'cgroup_disable=memory' option if you don't want memory cgroups
Memory: 512MB = 512MB total
Memory: 505324k/505324k available, 18964k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xe0800000 - 0xfff00000   ( 503 MB)
    lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .text : 0xc0008000 - 0xc0889124   (8709 kB)
      .init : 0xc088a000 - 0xc08ca180   ( 257 kB)
      .data : 0xc08cc000 - 0xc09212a0   ( 341 kB)
       .bss : 0xc09212a0 - 0xc096f23c   ( 312 kB)
Hierarchical RCU implementation.
        RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
NR_IRQS:16 nr_irqs:16 16

  LSP version: linux-3.10.39-2014_T3.0p5

sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 171798ms
L310 cache controller enabled
l2x0: 16 ways, CACHE_ID 0x410054c9, AUX_CTRL 0x16070000, Cache size: 1048576 B
Console: colour dummy device 80x30
Calibrating delay loop... 2655.84 BogoMIPS (lpj=13279232)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
Initializing cgroup subsys memory
Initializing cgroup subsys devices
Initializing cgroup subsys freezer
Initializing cgroup subsys blkio
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0xc0684238 - 0xc0684290
mvebu-pmsu: Initializing Power Management Service Unit
Initializing CPU Reset module
CPU1: Booted secondary processor
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
Brought up 2 CPUs
SMP: Total of 2 processors activated (5311.69 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
mvebu-soc-id: MVEBU SoC ID=0x6820, Rev=0x4
xor: measuring software checksum speed
   arm4regs  :  2361.600 MB/sec
   8regs     :  1594.800 MB/sec
   32regs    :  1360.000 MB/sec
xor: using function: arm4regs (2361.600 MB/sec)
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
irq: Cannot allocate irq_descs @ IRQ196, assuming pre-allocated
irq: Cannot allocate irq_descs @ IRQ228, assuming pre-allocated
bio: create slab <bio-0> at 0
raid6: int32x1    169 MB/s
raid6: int32x2    245 MB/s
raid6: int32x4    311 MB/s
raid6: int32x8    316 MB/s
raid6: using algorithm int32x8 (316 MB/s)
raid6: using intx1 recovery algorithm
mvebu-pcie pcie-controller.3: PCIe0.0: link down
mvebu-pcie pcie-controller.3: PCIe1.0: link down
mvebu-pcie pcie-controller.3: PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
pci_bus 0000:00: root bus resource [mem 0xe0000000-0xe8000000]
pci_bus 0000:00: root bus resource [bus 00-ff]
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: bus1: Fast back to back transfers enabled
PCI: bus2: Fast back to back transfers enabled
pci 0000:00:01.0: PCI bridge to [bus 01]
pci 0000:00:02.0: PCI bridge to [bus 02]
PCI: enabling device 0000:00:01.0 (0140 -> 0143)
PCI: enabling device 0000:00:02.0 (0140 -> 0143)
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.16
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
Switching to clocksource armada_370_xp_clocksource
cfg80211: Calling CRDA to update world regulatory domain
FS-Cache: Loaded
NET: Registered protocol family 2
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP: reno registered
UDP hash table entries: 256 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 256 (order: 1, 8192 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...
Freeing initrd memory: 2612K (c0f01000 - c118e000)
VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
squashfs: version 4.0 (2009/01/31) Phillip Lougher
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
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 251)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
armada-38x-pinctrl f1018000.pinctrl: registered pinctrl driver
mv_xor f1060800.xor: Marvell shared XOR driver
mv_xor f1060800.xor: Marvell XOR: ( xor cpy intr )
mv_xor f1060800.xor: freeing 1 in use descriptors!
mv_xor f1060800.xor: Marvell XOR: ( crc32c )
mv_xor f1060900.xor: Marvell shared XOR driver
mv_xor f1060900.xor: Marvell XOR: ( xor cpy intr )
mv_xor f1060900.xor: freeing 1 in use descriptors!
mv_xor f1060900.xor: Marvell XOR: ( crc32c )
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 44) is a 16550A
console [ttyS0] enabled
f1012100.serial: ttyS1 at MMIO 0xf1012100 (irq = 45) is a 16550A
brd: module loaded
loop: module loaded
ahci_mv f10a8000.sata: AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl platform mode
ahci_mv f10a8000.sata: flags: 64bit ncq sntf led only pmp fbs pio slum part sxs
scsi0 : ahci_mv_platform
scsi1 : ahci_mv_platform
ata1: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x100 irq 58
ata2: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x180 irq 58
armada-nand f10d0000.nand: Initialize HAL based NFC in 8bit mode with DMA Disabled using BCH 4bit ECC
Nand Flash Timing = [WP : 12], [WH : 10]
NAND device: Manufacturer ID: 0xad, Chip ID: 0xda (Hynix NAND 256MiB 3,3V 8-bit), 256MiB, page size: 2048, OOB size: 64
Bad block table found at page 131008, version 0x01
Bad block table found at page 130944, version 0x01
8 ofpart partitions found on MTD device armada-nand
Creating 8 MTD partitions on "armada-nand":
0x000000000000-0x000000500000 : "U-Boot"
0x000000500000-0x000000a00000 : "uImage"
0x000000a00000-0x000000f00000 : "uRamdisk"
0x000000f00000-0x00000c800000 : "image.cfs"
0x00000c800000-0x00000d700000 : "rescue fw"
0x00000d700000-0x00000eb00000 : "config"
0x00000eb00000-0x00000f500000 : "reserve1"
0x00000f500000-0x00000ff00000 : "reserve2"
bonding: Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
SoC: model = 0x6820, revision = 0x4
mvPncVirtBase = 0xe1c00000, pncTcamSize = 1024
  o 3 Giga ports supported
  o SKB recycle supported (Disabled)
  o NETA acceleration mode 4
  o BM supported for CPU: 4 BM pools
  o PnC supported (Enabled)
  o RX Queue support: 8 Queues * 256 Descriptors
  o TX Queue support: 8 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 Driver INFO statistics enabled
  o Driver DEBUG statistics enabled

port #0: is_sgmii=0, is_rgmii=1, phy_addr=2
  o Loading network interface(s) for port #0: cpu_mask=0x3, tx_csum_limit=9800

  o Port 0 is connected to Linux netdevice
    o eth0, ifindex = 3, GbE port = 0
        giga p=0: mtu=1500, mac=00:50:43:02:02:01 (platform)

port #1: is_sgmii=0, is_rgmii=1, phy_addr=1
  o Loading network interface(s) for port #1: cpu_mask=0x3, tx_csum_limit=2048

  o Port 1 is connected to Linux netdevice
    o eth1, ifindex = 4, GbE port = 1
        giga p=1: mtu=1500, mac=00:50:43:02:02:02 (platform)

port #2: is_sgmii=1, is_rgmii=0, phy_addr=0
  o Loading network interface(s) for port #2: cpu_mask=0x3, tx_csum_limit=2048

  o Port 2 is connected to Linux netdevice
    o eth2, ifindex = 5, GbE port = 2
        giga p=2: mtu=1500, mac=00:50:43:02:02:03 (platform)

libphy: orion_mdio_bus: probed
mdio_bus f1072004.mdio-mi: cannot get PHY at address 2
mdio_bus f1072004.mdio-mi: cannot get PHY at address 1
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
ehci-orion: EHCI orion driver
orion-ehci f1058000.usb: EHCI Host Controller
orion-ehci f1058000.usb: new USB bus registered, assigned bus number 1
orion-ehci f1058000.usb: irq 50, io mem 0xf1058000
orion-ehci f1058000.usb: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
xhci-hcd f10f0000.usb3: xHCI Host Controller
xhci-hcd f10f0000.usb3: new USB bus registered, assigned bus number 2
xhci-hcd f10f0000.usb3: irq 48, io mem 0xf10f0000
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
xhci-hcd f10f0000.usb3: xHCI Host Controller
xhci-hcd f10f0000.usb3: new USB bus registered, assigned bus number 3
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 1 port detected
xhci-hcd f10f8000.usb3: xHCI Host Controller
xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 4
xhci-hcd f10f8000.usb3: irq 49, io mem 0xf10f8000
hub 4-0:1.0: USB hub found
hub 4-0:1.0: 1 port detected
xhci-hcd f10f8000.usb3: xHCI Host Controller
xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 5
hub 5-0:1.0: USB hub found
hub 5-0:1.0: 1 port detected
usbcore: registered new interface driver usb-storage
ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
ata2.00: ATA-8: Hitachi HDS5C3020ALA632, ML6OAA10, max UDMA/133
ata2.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata1.00: ATA-8: Hitachi HDS5C3020ALA632, ML6OAA10, max UDMA/133
ata1.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata2.00: configured for UDMA/133
ata1.00: configured for UDMA/133
scsi 0:0:0:0: Direct-Access     ATA      Hitachi HDS5C302 ML6O PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
sd 0:0:0:0: Attached scsi generic sg0 type 0
scsi 1:0:0:0: Direct-Access     ATA      Hitachi HDS5C302 ML6O PQ: 0 ANSI: 5
sd 1:0:0:0: [sdb] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
sd 1:0:0:0: [sdb] Write Protect is off
sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 1:0:0:0: Attached scsi generic sg1 type 0
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
 sdb: sdb1 sdb2 sdb3 sdb4
sd 1:0:0:0: [sdb] Attached SCSI disk
 sda: sda1 sda2 sda3 sda4
sd 0:0:0:0: [sda] Attached SCSI disk
mvebu-rtc f10a3800.rtc: rtc core: registered f10a3800.rtc as rtc0
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
device-mapper: ioctl: 4.24.0-ioctl (2013-01-15) initialised: dm-devel@redhat.com
dm_crypt using the OCF package.
cpuidle: using governor ladder
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
armada-cesa-ocf f109d000.crypto: mv_get_cesa_resources: Total CESA HW channels supported 2
armada-cesa-ocf f109d000.crypto: mv_get_cesa_resources: CESA feature: chain(0)
mvCesaInit: channels=2, session=640, queue=256
armada-cesa-ocf f109d000.crypto: cesa_ocf_probe: CESA driver operate in ocf(0) mode
cesadev_init(c08a9e9c)
Netfilter messages via NETLINK v0.30.
nfnl_acct: registering with nfnetlink.
nf_conntrack version 0.5.0 (7936 buckets, 31744 max)
arp_tables: (C) 2002 David S. Miller
TCP: cubic registered
NET: Registered protocol family 10
sit: IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
Bridge firewalling registered
8021q: 802.1Q VLAN Support v1.8
Key type dns_resolver registered
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
registered taskstats version 1
mvebu-rtc f10a3800.rtc: setting system clock to 2016-07-10 10:36:18 UTC (1468146978)
Freeing unused kernel memory: 256K (c088a000 - c08ca000)
# Loading, please wait...
# Mounting filesystems...
# Runing a shell...
pool #0: pkt_size=1536, buf_size=1600 - 2048 of 2048 buffers added
eth0: link up
eth0: started
udhcpc (v1.24.1) started
Setting IP address 0.0.0.0 on eth0
Sending discover...
Sending discover...
Sending discover...
No lease, failing
/ #

What i would like to get: The machine boots an automatic updateable debian 8.5 kernel and rootfs from a partition on first manually partitioned HDD (also including a data partition) or from a USB-thumbdrive (with logging to RAM-disk or HDD to prevent excessive wear). Do you think, this is possible? As i'm not a programmer and linuxfreak, i would greatly appreciate your patient help.

Many thanks in advance
Jan
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
July 11, 2016 08:53AM
JanN,

> What i would like to get: The machine boots an
> automatic updateable debian 8.5 kernel and rootfs
> from a partition on first manually partitioned HDD
> (also including a data partition)

This should be achievable even with stock u-boot. Interrupt serial console and do the tests:

ide reset
ext2ls ide 0:1 /

> USB-thumbdrive (with logging to RAM-disk or HDD to
> prevent excessive wear). Do you think, this is
> possible?

This will not be possible in the near term. Since there is no USB 2.0 port exposed, only USB 3.0. The latest mainline u-boot does not have a working USB 3.0 support. This is one of the missing functionalities that I've been monitoring mainline code to see when there will be enough base code that I could start helping making this available. Currently, with USB 3.0, the kernel uImage and/or uInitrd and/or DTB must reside on NAND, or loaded with tftp or nfs over the network. And then it will complete booting the rootfs on USB 3.0 partition, if it is so specified in kernel bootargs env.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
July 11, 2016 01:31PM
bodhi,

many thanks for your help.

Results:
Marvell>> ide reset
Reset IDE:
Marvell Serial ATA Adapter
no device found

Marvell>> ext2ls ide 0:1 /
** Bad device ide 0 **
:-(
No active unit for ide-devices?
Marvell>> active_units                                                                                                  
Active: cpu0, cpu1, pex0, egiga0, egiga1, egiga2, usb0, usb1, usb2, nand, i2c0



Edited 1 time(s). Last edit at 07/11/2016 04:09PM by JanN.
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
July 11, 2016 01:40PM
JanN,

> Marvell>> ide reset
> Reset IDE:
> Marvell Serial ATA Adapter
> no device found

Is any SATA drive in the slot? if there is, then this ide command was activated but does nothing in their u-boot. I also notice there is usb command, but don't think that would do anything either.

Try:
usb start

If what I think is true, then stock u-boot can only boot NAND, tftp and possiby nfs.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
July 17, 2016 03:16AM
bodhi,

there are SATA-drives in the slots...

Marvell>> usb start
(Re)start USB...
USB0:   Port (usbActive) : 0    Interface (usbType = 3) : USB XHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
       scanning usb for ethernet devices... 0 Ethernet Device(s) found

BR
Jan
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
July 18, 2016 03:38AM
Jan,

This is just a place holder for USB 3.0.

Neither SATA or USB is working then we need new u-boot before even bother trying to boot new kernel.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
July 21, 2016 07:19AM
bodhi,

i tried a bit ...

Marvell>> setenv usbActive 1
Marvell>> usb start
(Re)start USB...
USB0:   Port (usbActive) : 1    Interface (usbType = 3) : USB XHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
       scanning usb for ethernet devices... 0 Ethernet Device(s) found
Marvell>> usb info
1: Hub,  USB Revision 3.0
 - u-boot XHCI Host Controller
 - Class: Hub
 - PacketSize: 9  Configurations: 1
 - Vendor: 0x0000  Product 0x0000 Version 1.0
   Configuration: 1
   - Interfaces: 1 Self Powered 0mA
     Interface: 0
     - Alternate Setting 0, Endpoints: 1
     - Class Hub
     - Endpoint 1 In Interrupt MaxPacket 8 Interval 255ms

2: Mass Storage,  USB Revision 3.0
 -          USB DISK 15071003007159
 - Class: (from Interface) Mass Storage
 - PacketSize: 9  Configurations: 1
 - Vendor: 0x1f75  Product 0x0917 Version 0.1
   Configuration: 1
   - Interfaces: 1 Bus Powered 76mA
     Interface: 0
     - Alternate Setting 0, Endpoints: 2
     - Class Mass Storage, Transp. SCSI, Bulk only
     - Endpoint 2 Out Bulk MaxPacket 1024
     - Endpoint 1 In Bulk MaxPacket 1024

...with stock u-Boot...
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
July 21, 2016 02:28PM
JanN Wrote:
-------------------------------------------------------
> bodhi,
>
> i tried a bit ...
>
>
> Marvell>> setenv usbActive 1
> Marvell>> usb start
> (Re)start USB...
> USB0:   Port (usbActive) : 1    Interface (usbType
> = 3) : USB XHCI 1.00
> scanning bus 0 for devices... 2 USB Device(s)
> found
>        scanning usb for storage devices... 1
> Storage Device(s) found
>        scanning usb for ethernet devices... 0
> Ethernet Device(s) found
> Marvell>> usb info
> 1: Hub,  USB Revision 3.0
>  - u-boot XHCI Host Controller
>  - Class: Hub
>  - PacketSize: 9  Configurations: 1
>  - Vendor: 0x0000  Product 0x0000 Version 1.0
>    Configuration: 1
>    - Interfaces: 1 Self Powered 0mA
>      Interface: 0
>      - Alternate Setting 0, Endpoints: 1
>      - Class Hub
>      - Endpoint 1 In Interrupt MaxPacket 8
> Interval 255ms
> 
> 2: Mass Storage,  USB Revision 3.0
>  -          USB DISK 15071003007159
>  - Class: (from Interface) Mass Storage
>  - PacketSize: 9  Configurations: 1
>  - Vendor: 0x1f75  Product 0x0917 Version 0.1
>    Configuration: 1
>    - Interfaces: 1 Bus Powered 76mA
>      Interface: 0
>      - Alternate Setting 0, Endpoints: 2
>      - Class Mass Storage, Transp. SCSI, Bulk
> only
>      - Endpoint 2 Out Bulk MaxPacket 1024
>      - Endpoint 1 In Bulk MaxPacket 1024
>
>
> ...with stock u-Boot...


That's very encouraging! now try to see if you can read

ext2ls usb 0:1 /

If this works then you can boot with USB :)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
July 21, 2016 03:19PM
bodhi,

the thumbdrive (USB 3) is fat formatted (and was obviously used for Windows before ;-)) - thats why i tried
Marvell>> fatls usb 0:1 /
 22851472   mbam-setup-2.2.1.1043.exe
     1399   malwarescanreport.txt
            autoruns/
            processexplorer/
            system volume information/
  4883863   uimage
  2682706   uramdisk

4 file(s), 3 dir(s)
after
ext2ls usb 0:1 /
brought me a system halt...

In the first unsuccessful attempt a few days ago i used another USB 3 thumbdrive, that wasn`t recognized...

uimage and uramdisk are from fox_exe and boot the box (with already discovered GPIOs for the HDD-LEDs :-)), when i load them via tftp. In the moment it's necessary to stop eth0 and start eth2 manually and pass an IP via ifconfig, before the system is reachable via telnet.

Do you have an idea which commands could load uimage and uramdisk from USB-Thumbdrive?

BR
Jan
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
July 21, 2016 04:06PM
Jan,

Format the USB drive as Ext3. And put the kernel files on it and try again

ext2ls usb 0:1 /

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
July 21, 2016 06:10PM
Bodhi,
> Format the USB drive as Ext3. And put the kernel
> files on it and try again
> ext2ls usb 0:1 /
I'll do that later.
I tried a bit more in the meantime:
Marvell>> setenv usbActive 1
Marvell>> usb start
(Re)start USB...
USB0:   Port (usbActive) : 1    Interface (usbType = 3) : USB XHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
       scanning usb for ethernet devices... 0 Ethernet Device(s) found
Marvell>> fatload usb 0:1 0xa00000 uImage; fatload usb 0:1 0xf00000 uRamdisk
reading uImage
4883863 bytes read in 85 ms (54.8 MiB/s)
reading uRamdisk
2682706 bytes read in 59 ms (43.4 MiB/s)
Marvell>> bootm 0xa00000 0xf00000
## Booting image at 00a00000 ...
## Booting kernel from Legacy Image at 00a00000 ...
   Image Name:   Linux
   Created:      2016-07-18  17:06:02 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4883799 Bytes = 4.7 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 00f00000 ...
   Image Name:   Ramdisk
   Created:      2016-06-25  10:57:34 UTC
   Image Type:   ARM Linux RAMDisk Image (lzma compressed)
   Data Size:    2682642 Bytes = 2.6 MiB
   Load Address: 00e00000
   Entry Point:  00e00000
   Verifying Checksum ... OK
Do you have any idea, why the system halts here?

BR
Jan
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
July 21, 2016 10:08PM
Jan,

1. You can't boot Linux on the FAT drive.
2. Which rootfs are you trying to boot?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
July 27, 2016 04:09PM
bodhi,

> 1. You can't boot Linux on the FAT drive.
I didn't try to boot it on a FAT drive - i only read the image files from it into the RAM, from where i tried to boot the images. And that obviously works up to the moment when they should boot, as far as i understand it...

> 2. Which rootfs are you trying to boot?
I tried to boot the above mentioned rootfs, that the russion WD-hacker Fox_exe has build for me, and that are bootable, when i load them via TFTP into the RAM.

BR
Jan
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
July 27, 2016 04:54PM
Jan,

> I didn't try to boot it on a FAT drive - i only
> read the image files from it into the RAM, from
> where i tried to boot the images. And that
> obviously works up to the moment when they should
> boot, as far as i understand it...

Sure, you can load the kernel files (uImage and uInitrd) from the FAT drive, no problem. But when the kernel has started, it has to mount the rootfs from some disk drive (or from NAND). That disk drive must not be FAT, it must be Ext2/3/4 or (other Linux-compatile filesystem).


>
> > 2. Which rootfs are you trying to boot?
> I tried to boot the above mentioned rootfs

If this above mentioned rootfs is this one, then it will not work.

Quote

Marvell>> fatls usb 0:1 /
22851472 mbam-setup-2.2.1.1043.exe
1399 malwarescanreport.txt
autoruns/
processexplorer/
system volume information/
4883863 uimage
2682706 uramdisk

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
July 28, 2016 05:23AM
bodhi,

>
> Sure, you can load the kernel files (uImage and
> uInitrd) from the FAT drive, no problem.
Instead of uInitrd Fox_exe build a uramdisk, what is - as far as i understand - a compressed rootfs-image including the uInit, that should be installed in RAM. When i load the same files (uimage=kernel and uramdisk=ramdisk-rootfs) via TFTP into the RAM and boot them with bootm, it works.


> > > 2. Which rootfs are you trying to boot?
> > I tried to boot the above mentioned rootfs
>
> If this above mentioned rootfs is this one, then
> it will not work.
>
>
Quote

Marvell>> fatls usb 0:1 /
> 22851472 mbam-setup-2.2.1.1043.exe
> 1399 malwarescanreport.txt
> autoruns/
> processexplorer/
> system volume information/
> 4883863 uimage
> 2682706 uramdisk
See above: not the content of the USB-thumbdrive is the rootfs; it is in uramdisk...

BR
Jan
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
September 13, 2016 01:00AM
Hello Jan,
any progress on your MyCloud, as I get now a EX2 Ultra (basicly the Mirror Gen2 with 1gb ram)

Did you managed to write uBoot-env's?


Cheers Carl
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
September 14, 2016 03:05AM
Peacemaker Wrote:
-------------------------------------------------------

> Did you managed to write uBoot-env's?

Sorry, Carl, but there was no progress on this project in the last weeks because i had holidays...

I'll inform you, when i get news.

Fox_exe (the russian WD-Hacker) found out, that "resetenv" and "saveenv" are deactivated by WD-developers to prevent erasing the device-serialnumber and the individual MAC-address, that are stored in the environment...

BR
Jan
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
September 14, 2016 03:23AM
JanN Wrote:

> Fox_exe (the russian WD-Hacker) found out, that
> "resetenv" and "saveenv" are deactivated by
> WD-developers to prevent erasing the
> device-serialnumber and the individual
> MAC-address, that are stored in the
> environment...

OK, got this,
maybe I'll try to recompile uBoot with saveenv and flash it.
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
September 21, 2016 02:05AM
Building / Recompiling UBoot is quite easy with the gpl-sources.
But I didn't found out how to boot or restore uBoot over UART / Xmodem or so if sth. went wrong.
Any idea or experience how to do so on a 38x ?

Compiling a 4.4 oder 4.6 Kernel was not so easy, and I had no sucess in booting this image.
Recompile vendors 3.10.38 Kernel was there better, could add modules for dvb, wireless,.. and it boots with Stock OS and
Debian

But for now without saving ubootenv debian makes no sens.

So either I'll get some knowledge for fixing a bad Uboot or I'll try to stick to Stock OS, with Modifications and do all other things in Docker.

And PS.:
Quote
Hitting a key didn't interrupt the bootprocess, but shortening RX and TX did. This is the factory preset environment:
"1" is the Key thats interrupting the bootprocess :-)



Edited 1 time(s). Last edit at 09/25/2016 06:39AM by Peacemaker.
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
September 25, 2016 11:42AM
Okay for now I managed to boot a 4.6 Kernel with vendors *.dtb

So I've tried to port the vendors *.dts to the mainline kernel. But I ran into some trouble:

peacemaker@debianvm:/media/data/linux-4.6.7$ make -j8 zImage armada-385-ex2.dtb
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  DTC     arch/arm/boot/dts/armada-385-ex2.dtb
ERROR (duplicate_property_names): Duplicate property name status in /soc/internal-regs/nand@d0000
ERROR: Input tree has errors, aborting (use -f to force output)
scripts/Makefile.lib:307: die Regel für Ziel „arch/arm/boot/dts/armada-385-ex2.dtb“ scheiterte
make[1]: *** [arch/arm/boot/dts/armada-385-ex2.dtb] Fehler 2
arch/arm/Makefile:334: die Regel für Ziel „armada-385-ex2.dtb“ scheiterte
make: *** [armada-385-ex2.dtb] Fehler 2

maybe someone here has an idea?
I attached the vendors dts and dtsi (armada-385-db is for ex2 ultra and mirror gen2)
Attachments:
open | download - armada-38x.dtsi (12.7 KB)
open | download - armada-385-db.dts (3.7 KB)
open | download - armada-385-388.dtsi (4.2 KB)
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
October 01, 2016 12:53PM
So update :-)

I fixed these problems with new dts file and can boot debian.
.dts and .config for a 4.6.7 kernel is attached

Problems left:
- uBoot not writeable / need to change bootarg's every boot
- fan control not working -> fan only 100% rpm
- Ethernet is renamed every boot (?!) -> Done
- CPU-load from kworker/1:2
- only one instead of 7 mtd-partitons


So my "plans" or "ideas" to solve these probs:
uBoot / bootarg's:
Hardcode root partition into the initrd/initramfs -> For no idea how to do this
or:
get writeaccess from debian to uboot

fancontrol
first idea was to run vendors thermal control on debian, but this is not working
So i need to find out how this is working or get source's

Update:
It seems that fan and power (wol, alarmclock, poweroff...) is controlled by an Weltrend MCU
This MCU is either connect by the second serial interface or i2c -> but loging the commands or so failed so far.

Ethernet
Update:
Removing all not connected phys from dts worked out

CPU-load from kworker/1:2
no idea so far

mtd-partitons
maybe somethink in the dts is wrong


So I would be very pleased to get some ideas or help with the problems :-)



Edited 1 time(s). Last edit at 10/06/2016 01:40AM by Peacemaker.
Attachments:
open | download - armada-385-ex2.dts (4.3 KB)
open | download - 4.6.7_ex2u.config (93.8 KB)
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
October 24, 2016 03:54PM
Small update:
MCU is attached to ttyS1 @ 19200

Powerled & Hardreset like MCM gen1

# Led on: "\\xfa\\x03\\x06\\x01\\x00\\x01\\xfb"
# Led off: "\\xfa\\x03\\x06\\x00\\x00\\x01\\xfb"
# Led blink: "\\xfa\\x03\\x06\\x02\\x00\\x01\\xfb"
# Hard shutdown: "\\xfa\\x03\\x03\\x01\\x01\\x14\\xfb"

Fan seams to be different.
MM
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
November 16, 2016 02:00PM
fancontrol (on original firmware is)
echo -e "\372\2\0\0\0\0\373" > /dev/ttyS1 # for minimum speed
echo -e "\372\2\0\377\0\0\373" > /dev/ttyS1 # for maximum speed

speed is encoded in 4th byte from 0 to 255

tested on an Mycloud EX2 ultra

Maybe this helps
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
November 16, 2016 03:09PM
MM Wrote:
-------------------------------------------------------
> fancontrol (on original firmware is)
> echo -e "\372\2\0\0\0\0\373" > /dev/ttyS1 # for
> minimum speed
> echo -e "\372\2\0\377\0\0\373" > /dev/ttyS1 # for
> maximum speed
>
> speed is encoded in 4th byte from 0 to 255
>
> tested on an Mycloud EX2 ultra
>
> Maybe this helps

Thanks, I allready find that out and started to modify the mcu-control programm from A Boehle,

Fan control is working fine with that, reboot, halt and powerdown is not working right -> direct and allways reboot.
WOL, Alarm, RTC was not testet from me.

Further more, I build a own initrd for booting to partition with label "rootfs", (usb or hdd)

Kernel I'm using for now Fox's 3.10 as the 4.8. makes some trouble, with eth and led.

If someone is interrested just write me a PM as all is still more alpha then beta status.
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
November 22, 2016 02:53PM
Sooooo,...finaly I would say BETA :-)

You can find in my Dropbox:

WD Folder

+ Ramdisk / uInitrd
+ 4.8.6 Kernel
+ Rootfs (MCMgen2-jessie-basic-armhf.tar.xz)

Short howto:

+ Create a partiton labeled "rootfs" and extract rootfs as root or sudo
sudo tar -xJvf MCMgen2-jessie-basic-armhf.tar.xz
sync

You can use USB-Drive or HDD;
ext3/4, btrfs, xfs are supported

Attach drive to NAS

+ Load uInitrd and Kernel via tftp from uBoot or flash it to Nand
e.g.:
set ipaddr 192.168.0.180; set serverip 192.168.0.104; tftp 1200000 uImage-4.8.6_ex2u tftp 2000000 uInitrd; bootm 0x1200000 0x2000000

+Debian should boot and get IP via dhcp
hostname: WDebian
user: root
passwd: root

#####################

What is working:
+Debian - Kernel 4.8.6
+Network with WD-MAC
+fancontrol works

What is not working:
- LED's and Reset-Button
- WoL
- reboot / shutdown / halt (buggy: most of the time NAS is just shutting down and don't reboot)
- booting from raid (working but not automatic - fix should be easy)
- booting from encrypted part.
- Initrd recovery still buggy / ssh work but you can't log in :-/


What I'm not happy with:
- MCU (fan, power) control how this working: nativ kernel module would be great but will be lots and lots of work
- Fancontrol only off/low/full (stepless is possible)
- Initrd rescue

I'm happy for every input, feedback and help

I'll update my sources to github later this week

thanks to:
Fox_exe - https://anionix.ru/
A. Boehler - https://www.aboehler.at/doku/doku.php/projects:dns320l
MM
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
November 28, 2016 11:40AM
Hi Peacemaker,

thanks a lot.

I tried it and it worked. I put your kernel and ramdisk on partition 1 on a fat-filesystem in /boot/uramdisk and /boot/uimage and your tar file on partition 2 with an ext4 filesystem together on an usb-stick.

I can boot it by pressing and holding the reset-button for 40s while powering the device on.

The hd1-LED is blinking fast red/blue, the other two LEDs are solid blue.

I did a debian update and installed some stuff an it seems to work fine.

Do you know how WOL works on the original firmware? I tried etherwake on it, but it didn't start.
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
November 28, 2016 12:54PM
MM Wrote:
-------------------------------------------------------
> Hi Peacemaker,
>
> thanks a lot.
>
> I tried it and it worked. I put your kernel and
> ramdisk on partition 1 on a fat-filesystem in
> /boot/uramdisk and /boot/uimage and your tar file
> on partition 2 with an ext4 filesystem together on
> an usb-stick.
>
> I can boot it by pressing and holding the
> reset-button for 40s while powering the device
> on.

Did, not know that you can do it this way, is this permanet or temporary?
Some day I will pack a *.bin for flashing form WD firmware.

> I did a debian update and installed some stuff an
> it seems to work fine.

Sound's good.

> Do you know how WOL works on the original
> firmware? I tried etherwake on it, but it didn't
> start.
All of this is managed by the Welltrend-MCU and the MCU is controlled by internal serial.
So the control-daemon (mcm) should do this job and if you connect via telnet it says: WoL is ON
But it's not working :-/
MM
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
November 28, 2016 01:34PM
The trick with holding the reset button while powering on is temporary. It boots a single time the uimage und uramdisk from an usb-stick located in /boot/ on a fat16 filesystem. It's just meant for recovery purposes, when the firmware is broken.

I just wanted to try the debian and obtain some performance figures. I did not want to replace the original firmware, since I guess I will still need it for reverse engeneering.

I also read the WOL message from the serial terminal, but was not able to wake it up, even with the original firmware.

Have you documented somwhere how you prepared kernel, ramdisk and root-filesystem and what changes you had to do?
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: