Welcome! Log In Create A New Profile

Advanced

Debian on WD MyCloud EX 4100

Posted by saschadd 
Re: Debian on WD MyCloud EX 4100
June 11, 2017 10:03AM
Okay, updated my post.
Re: Debian on WD MyCloud EX 4100
June 11, 2017 02:40PM
> The timing parameters are still not right. I don't
> know if there is a better way, I have not found mo
> re reliable delay parameters.

Exactly! The BootROM 1.73 (used in a38x) has some changes since the good old days that made this difficult. Even the experts could not determine a reliable set of parameters, so they implemented the s and q options. The Armada XP is easier that someone has found a reliable s and q.

But the fact that you and saschadd did get some successful runs, it's encouraging.

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



Edited 1 time(s). Last edit at 06/11/2017 04:57PM by bodhi.
Re: Debian on WD MyCloud EX 4100
June 11, 2017 02:44PM
saschadd ,

> Cool, kwboot is running now!!! :)
>
> UPDATE:
>
> i am using
>
>
> sudo ./kwboot -f -t -B 115200 /dev/ttyAMA0 -b u-bo
> ot-a38x-Yellowstone_2014T30p6_bodhi-tld-1-nand-uar
> t.bin -s 0 -q 1
>
> with your first kwboot for arm (not the 2017-05 ve
> rsion)
>
> First try was 3 times i think.
> Second try was more than 10 times 12 or 13, forgot
> to count from 10 onwards. ;)
> Last try was at 5th try.
>
>
> printenv gives me
>
> CASset=max
> MALLOC_len=5
> MPmode=SMP
> autoload=no
> baudrate=115200
> boot_order=hd_scr usb_scr mmc_scr hd_img usb_img m
> mc_img pxe net_img net_scr
> bootargs=root=/dev/ram console=ttyS0,115200
> bootargs_dflt=$console $nandEcc $mtdparts $bootarg
> s_root nfsroot=$serverip:$rootpath ip=$ipaddr:$ser
> verip$bootargs_end $mvNetConfig video=dovefb:lcd0:
> $lcd0_params clcd.lcd0_enable=$lcd0_enable clcd.lc
> d_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;nan
> d read.e 0xf00000 0xa00000 0x500000;bootm 0xa00000
> 0xf00000
> bootcmd_auto=stage_boot $boot_order
> bootcmd_fdt=tftpboot 0x2000000 $image_name;tftpboo
> t $fdtaddr $fdtfile;setenv bootargs $console $nand
> Ecc $mtdparts $bootargs_root nfsroot=$serverip:$ro
> otpath ip=$ipaddr:$serverip$bootargs_end $mvNetCon
> fig video=dovefb:lcd0:$lcd0_params clcd.lcd0_enabl
> e=$lcd0_enable clcd.lcd_panel=$lcd_panel; bootz 0x
> 2000000 - $fdtaddr;
> bootcmd_fdt_boot=tftpboot 0x2000000 $image_name; s
> etenv bootargs $console $nandEcc $mtdparts $bootar
> gs_root nfsroot=$serverip:$rootpath ip=$ipaddr:$se
> rverip$bootargs_end $mvNetConfig video=dovefb:lcd0
> :$lcd0_params clcd.lcd0_enable=$lcd0_enable clcd.l
> cd_panel=$lcd_panel; bootz 0x2000000 - $fdtaddr;
> bootcmd_fdt_edit=tftpboot $fdtaddr $fdtfile; fdt a
> ddr $fdtaddr; setenv bootcmd $bootcmd_fdt_boot
> bootcmd_lgcy=tftpboot 0x2000000 $image_name; seten
> v 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:58:31:3c
> eth1mtu=1500
> eth2addr=00:50:43:58:54:3c
> eth2mtu=1500
> eth3addr=00:50:43:31:54:58
> eth3mtu=1500
> ethact=egiga0
> ethaddr=00:50:43:54:31:3c
> ethmtu=1500
> ethprime=egiga0
> fdt_addr=2040000
> fdt_skip_update=no
> fdtaddr=0x1000000
> fdtfile=armada-38x-modular.dtb
> filesize=24
> ide_path=/
> image_name=uImage
> initrd_name=uInitrd
> ipaddr=2.66.66.203
> 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(k
> ernel),5m@10m(uRamdisk),441m@15m(image.cfs),15m@45
> 6m(rescue_fw),20m@471m(config),10m@491m(reserve1),
> 10m@501m(reserve2)
> mvNetConfig=mv_net_config=4,(00:50:43:11:11:11,0:1
> :2:3),mtu=1500
> mv_pon_addr=00:50:43:3c:54:58
> 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.ar
> m-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=2.66.66.32
> standalone=fsload 0x2000000 $image_name;setenv boo
> targs $console $nandEcc $mtdparts root=/dev/mtdblo
> ck0 rw ip=$ipaddr:$serverip$bootargs_end; bootm 0x
> 2000000;
> 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: 3202/524284 bytes

Thanks! this looks very good.

Since you are running this u-boot version that has USB patch. You could try to use the envs set that we used before to boot USB and boot all the way into Debian. Please do that and post the serial log here.

I will upload another u-boot version.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on WD MyCloud EX 4100
June 11, 2017 03:48PM
bodhi Wrote:
-------------------------------------------------------
> Since you are running this u-boot version that has
> USB patch. You could try to use the envs set that
> we used before to boot USB and boot all the way in
> to Debian. Please do that and post the serial log
> here.

ok here the serial console output from kwboot and usbboot

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;
bootcmd_usb=usb start; run usb_set_bootargs; run usb_bootcmd; reset
bootdelay=1
bootdev=usb
cacheShare=no
console=console=ttyS0,115200
device=0:1
device_partition=0:1
disaMvPnp=no
eeeEnable=no
enaClockGating=no
enaCpuStream=no
enaFPU=yes
enaMonExt=no
enaWrAllo=no
eth1addr=00:50:43:40:41:2a
eth1mtu=1500
eth2addr=00:50:43:40:96:2a
eth2mtu=1500
eth3addr=00:50:43:41:96:40
eth3mtu=1500
ethact=egiga0
ethaddr=00:50:43:96:41:2a
ethmtu=1500
ethprime=egiga0
fdt_addr=2040000
fdt_skip_update=no
fdtaddr=0x1000000
fdtfile=armada-38x-modular.dtb
filesize=24
ide_path=/
image_name=uImage
initrd_name=uInitrd
ipaddr=2.66.66.203
kernel_addr_r=2080000
lcd0_enable=0
lcd0_params=640x480-16@60
lcd_panel=0
load_image=echo loading Image ...; ext2load $bootdev $device $load_image_addr /boot/uImage
load_image_addr=0x02000000
load_initrd=echo loading uInitrd ...; ext2load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x2900000
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),441m@15m(image.cfs),15m@456m(rescue_fw),20m@471m(config),10m@491m(reserve1),10m@501m(reserve2)
mvNetConfig=mv_net_config=4,(00:50:43:11:11:11,0:1:2:3),mtu=1500
mv_pon_addr=00:50:43:2a:96:40
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=2.66.66.32
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
usb_bootcmd=echo Booting from USB ...; setenv fdt_skip_update yes; usb start; run load_image; run load_initrd ; run usb_set_bootargs; bootm $load_image_addr $load_initrd_addr
usb_set_bootargs=setenv bootargs "console=ttyS0,115200 root=/dev/sda1 rootdelay=10 $mtdparts earlyprintk=serial"
vxworks_en=no
yuk_ethaddr=00:00:00:EE:51:81

Environment size: 3840/524284 bytes
Marvell>> run bootcmd_usb
(Re)start USB...
USB0:   Port (usbActive) : 0    Interface (usbType = 3) : USB XHCI 1.00
scanning bus 0 for devices... 4 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
       scanning usb for ethernet devices... 0 Ethernet Device(s) found
Booting from USB ...
(Re)start USB...
USB0:   Port (usbActive) : 0    Interface (usbType = 3) : USB XHCI 1.00
scanning bus 0 for devices... 4 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
       scanning usb for ethernet devices... 0 Ethernet Device(s) found
loading Image ...
3919325 bytes read in 324 ms (11.5 MiB/s)
loading uInitrd ...
6210503 bytes read in 347 ms (17.1 MiB/s)
## Booting image at 02000000 ...
## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   Linux-4.9.0-mvebu-tld-12
   Created:      2017-06-04   8:57:41 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3919261 Bytes = 3.7 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 02900000 ...
   Image Name:   initramfs-4.9.0-mvebu-tld-12
   Created:      2017-02-03  23:57:32 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    6210439 Bytes = 5.9 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.9.0-mvebu-tld-12 (root@tldDebianVM) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) ) #2 SMP PREEMPT Wed Feb 1 02:31:29 PST 2017
[    0.000000] CPU: ARMv7 Processor [414fc091] revision 1 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt:Machine model: WD My Cloud EX4100
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] percpu: Embedded 15 pages/cpu @eefcd000 s30796 r8192 d22452 u61440
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 522752
[    0.000000] Kernel command line:  console=ttyS0,115200 root=/dev/sda1 rootdelay=10 mtdparts=armada-nand:5m(u-boot)ro,5m@5m(kernel),5m@10m(uRamdisk),441m@15m(image.cfs),15m@456m(rescue_fw),20m@471m(config),10m@491m(reserve1),10m@501m(reserve2) earlyprintk=serial
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Memory: 2060316K/2097152K available (8192K kernel code, 690K rwdata, 2052K rodata, 1024K init, 386K bss, 36836K reserved, 0K cma-reserved, 1310720K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0900000   (9184 kB)
[    0.000000]       .init : 0xc0c00000 - 0xc0d00000   (1024 kB)
[    0.000000]       .data : 0xc0d00000 - 0xc0daca28   ( 691 kB)
[    0.000000]        .bss : 0xc0daca28 - 0xc0e0d4f8   ( 387 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  Build-time adjustment of leaf fanout to 32.
[    0.000000]  RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=2
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] mvebu_mbus: [Firmware Warn]: deprecated mbus-mvebu Device Tree, suspend/resume will not work
[    0.000000] L2C-310 enabling early BRESP for Cortex-A9
[    0.000000] L2C-310 full line of zeros enabled for Cortex-A9
[    0.000000] L2C-310 D prefetch enabled, offset 1 lines
[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
[    0.000000] L2C-310 Coherent cache controller enabled, 16 ways, 1024 kB
[    0.000000] L2C-310 Coherent: CACHE_ID 0x410054c9, AUX_CTRL 0x56070001
[    0.000000] Switching to timer-based delay loop, resolution 40ns
[    0.000003] sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 85899345900ns
[    0.007881] clocksource: armada_370_xp_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76450417870 ns
[    0.019057] Console: colour dummy device 80x30
[    0.023571] Calibrating delay loop (skipped), value calculated using timer frequency.. 50.00 BogoMIPS (lpj=250000)
[    0.033975] pid_max: default: 32768 minimum: 301
[    0.038728] Security Framework initialized
[    0.042921] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.049594] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.057095] CPU: Testing write buffer coherency: ok
[    0.062164] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.067901] Setting up static identity map for 0x100000 - 0x100058
[    0.074205] mvebu-soc-id: MVEBU SoC ID=0x6828, Rev=0x4
[    0.079464] mvebu-pmsu: Initializing Power Management Service Unit
[    0.283911] Booting CPU 1
[    0.286756] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.286804] Brought up 2 CPUs
[    0.295563] SMP: Total of 2 processors activated (100.00 BogoMIPS).
[    0.301882] CPU: All CPU(s) started in SVC mode.
[    0.307113] devtmpfs: initialized
[    0.312392] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[    0.320336] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.330262] prandom: seed boundary self test passed
[    0.336887] prandom: 100 self tests passed
[    0.341047] pinctrl core: initialized pinctrl subsystem
[    0.346972] NET: Registered protocol family 16
[    0.352006] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.393868] cpuidle: using governor ladder
[    0.423866] cpuidle: using governor menu
[    0.427933] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[    0.436002] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.441981] mvebu-pmsu: CPU hotplug support is currently broken on Armada 38x: disabling
[    0.450136] mvebu-pmsu: CPU idle is currently broken on Armada 38x: disabling
[    0.504832] vgaarb: loaded
[    0.507840] SCSI subsystem initialized
[    0.512067] usbcore: registered new interface driver usbfs
[    0.517697] usbcore: registered new interface driver hub
[    0.523121] usbcore: registered new device driver usb
[    0.528441] media: Linux media interface: v0.10
[    0.533084] Linux video capture interface: v2.00
[    0.538571] clocksource: Switched to clocksource armada_370_xp_clocksource
[    0.570140] VFS: Disk quotas dquot_6.6.0
[    0.574168] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.587983] NET: Registered protocol family 2
[    0.592805] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.599953] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    0.606504] TCP: Hash tables configured (established 8192 bind 8192)
[    0.612976] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.618986] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.625490] NET: Registered protocol family 1
[    0.630170] RPC: Registered named UNIX socket transport module.
[    0.636146] RPC: Registered udp transport module.
[    0.640926] RPC: Registered tcp transport module.
[    0.645690] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.652315] Unpacking initramfs...
[    0.859337] Freeing initrd memory: 6068K (c2900000 - c2eed000)
[    0.865311] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.872078] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[    0.881235] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.887439] audit: initializing netlink subsys (disabled)
[    0.892952] audit: type=2000 audit(0.880:1): initialized
[    0.898751] Initialise system trusted keyrings
[    0.903397] workingset: timestamp_bits=30 max_order=19 bucket_order=0
[    0.909975] zbud: loaded
[    0.913042] NFS: Registering the id_resolver key type
[    0.918161] Key type id_resolver registered
[    0.922422] Key type id_legacy registered
[    0.926501] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.933264] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.939808] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.947188] orangefs_debugfs_init: called with debug mask: :none: :0:
[    0.953802] orangefs_init: module version upstream loaded
[    0.961115] Key type asymmetric registered
[    0.965278] Asymmetric key parser 'x509' registered
[    0.970255] bounce: pool size: 64 pages
[    0.974227] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
[    0.981681] io scheduler noop registered
[    0.985669] io scheduler deadline registered
[    0.990022] io scheduler cfq registered (default)
[    0.995588] armada-38x-pinctrl f1018000.pinctrl: registered pinctrl driver
[    1.004001] mvebu-pcie soc:pcie-controller: PCI host bridge to bus 0000:00
[    1.010948] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    1.017270] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xe7ffffff]
[    1.024205] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.030132] PCI: bus0: Fast back to back transfers disabled
[    1.035768] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.043836] pci 0000:00:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.052001] PCI: bus1: Fast back to back transfers enabled
[    1.057657] PCI: bus2: Fast back to back transfers enabled
[    1.063250] pci 0000:00:01.0: PCI bridge to [bus 01]
[    1.068279] pci 0000:00:02.0: PCI bridge to [bus 02]
[    1.073727] mv_xor f1060800.xor: Marvell shared XOR driver
[    1.138977] mv_xor f1060800.xor: Marvell XOR (Descriptor Mode): ( xor cpy intr )
[    1.146584] mv_xor f1060900.xor: Marvell shared XOR driver
[    1.208971] mv_xor f1060900.xor: Marvell XOR (Descriptor Mode): ( xor cpy intr )
[    1.259835] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    1.267475] console [ttyS0] disabled
[    1.291204] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 22, base_baud = 12500000) is a 16550A
[    1.300237] console [ttyS0] enabled
[    1.300237] console [ttyS0] enabled
[    1.307324] bootconsole [earlycon0] disabled
[    1.307324] bootconsole [earlycon0] disabled
[    1.316913] ahci-mvebu f10a8000.sata: AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl platform mode
[    1.326019] ahci-mvebu f10a8000.sata: flags: 64bit ncq sntf led only pmp fbs pio slum part sxs
[    1.335566] scsi host0: ahci-mvebu
[    1.339289] scsi host1: ahci-mvebu
[    1.342897] ata1: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x100 irq 42
[    1.350862] ata2: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x180 irq 42
[    1.358950] ahci-mvebu f10e0000.sata: AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl platform mode
[    1.368038] ahci-mvebu f10e0000.sata: flags: 64bit ncq sntf led only pmp fbs pio slum part sxs
[    1.387423] scsi host2: ahci-mvebu
[    1.391069] scsi host3: ahci-mvebu
[    1.394627] ata3: SATA max UDMA/133 mmio [mem 0xf10e0000-0xf10e1fff] port 0x100 irq 43
[    1.402591] ata4: SATA max UDMA/133 mmio [mem 0xf10e0000-0xf10e1fff] port 0x180 irq 43
[    1.411046] pxa3xx-nand f10d0000.flash: This platform can't do DMA on this device
[    1.418913] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xdc
[    1.425294] nand: Hynix H27U4G8F2DTR-BC
[    1.429173] nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    1.436777] pxa3xx-nand f10d0000.flash: ECC strength 16, ECC step size 2048
[    1.443968] Bad block table found at page 262080, version 0x01
[    1.450155] Bad block table found at page 262016, version 0x01
[    1.456182] nand_read_bbt: bad block at 0x00000dcc0000
[    1.461352] nand_read_bbt: bad block at 0x00000fb00000
[    1.466512] nand_read_bbt: bad block at 0x000012180000
[    1.471680] nand_read_bbt: bad block at 0x0000139a0000
[    1.476841] nand_read_bbt: bad block at 0x000017880000
[    1.482005] nand_read_bbt: bad block at 0x0000178a0000
[    1.487166] nand_read_bbt: bad block at 0x00001a640000
[    1.492331] nand_read_bbt: bad block at 0x00001e9c0000
[    1.497523] 3 ofpart partitions found on MTD device pxa3xx_nand-0
[    1.503649] Creating 3 MTD partitions on "pxa3xx_nand-0":
[    1.509080] 0x000000000000-0x000000800000 : "U-Boot"
[    1.524743] 0x000000800000-0x000001000000 : "Linux"
[    1.540277] 0x000001000000-0x000040000000 : "Filesystem"
[    1.545613] mtd: partition "Filesystem" extends beyond the end of device "pxa3xx_nand-0" -- size truncated to 0x1f000000
[    1.569457] m25p80 spi0.0: unrecognized JEDEC id bytes: ff, ff, ff
[    1.576102] libphy: Fixed MDIO Bus: probed
[    1.580513] libphy: mdio_driver_register: mv88e6085
[    1.585551] libphy: orion_mdio_bus: probed
[    1.595074] mvneta_bm f10c8000.bm: Buffer Manager for network controller enabled
[    1.604120] mvneta f1070000.ethernet eth0: Using random mac address 42:55:87:01:d3:d2
[    1.613514] mvneta f1030000.ethernet eth1: Using random mac address b2:19:be:01:48:46
[    1.621575] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.628142] ehci-pci: EHCI PCI platform driver
[    1.632656] ehci-orion: EHCI orion driver
[    1.636776] orion-ehci f1058000.usb: EHCI Host Controller
[    1.642238] orion-ehci f1058000.usb: new USB bus registered, assigned bus number 1
[    1.649911] orion-ehci f1058000.usb: irq 38, io mem 0xf1058000
[    1.678580] orion-ehci f1058000.usb: USB 2.0 started, EHCI 1.00
[    1.684639] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    1.689866] ata1: SATA link down (SStatus 0 SControl 300)
[    1.696919] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.700004] ata2: SATA link down (SStatus 0 SControl 300)
[    1.709619] usb usb1: Product: EHCI Host Controller
[    1.714517] usb usb1: Manufacturer: Linux 4.9.0-mvebu-tld-12 ehci_hcd
[    1.720998] usb usb1: SerialNumber: f1058000.usb
[    1.725949] hub 1-0:1.0: USB hub found
[    1.729750] hub 1-0:1.0: 1 port detected
[    1.734128] xhci-hcd f10f0000.usb3: xHCI Host Controller
[    1.739496] xhci-hcd f10f0000.usb3: new USB bus registered, assigned bus number 2
[    1.747086] xhci-hcd f10f0000.usb3: hcc params 0x0a000990 hci version 0x100 quirks 0x00010010
[    1.749845] ata4: SATA link down (SStatus 0 SControl 300)
[    1.755668] ata3: SATA link down (SStatus 0 SControl 300)
[    1.766549] xhci-hcd f10f0000.usb3: irq 46, io mem 0xf10f0000
[    1.772407] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[    1.779248] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.786500] usb usb2: Product: xHCI Host Controller
[    1.791407] usb usb2: Manufacturer: Linux 4.9.0-mvebu-tld-12 xhci-hcd
[    1.797874] usb usb2: SerialNumber: f10f0000.usb3
[    1.802891] hub 2-0:1.0: USB hub found
[    1.806675] hub 2-0:1.0: 1 port detected
[    1.810787] xhci-hcd f10f0000.usb3: xHCI Host Controller
[    1.816127] xhci-hcd f10f0000.usb3: new USB bus registered, assigned bus number 3
[    1.823701] usb usb3: We don't know the algorithms for LPM for this host, disabling LPM.
[    1.831895] usb usb3: New USB device found, idVendor=1d6b, idProduct=0003
[    1.838795] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.846048] usb usb3: Product: xHCI Host Controller
[    1.850955] usb usb3: Manufacturer: Linux 4.9.0-mvebu-tld-12 xhci-hcd
[    1.857423] usb usb3: SerialNumber: f10f0000.usb3
[    1.862427] hub 3-0:1.0: USB hub found
[    1.866206] hub 3-0:1.0: 1 port detected
[    1.870381] xhci-hcd f10f8000.usb3: xHCI Host Controller
[    1.875726] xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 4
[    1.883319] xhci-hcd f10f8000.usb3: hcc params 0x0a000990 hci version 0x100 quirks 0x00010010
[    1.891912] xhci-hcd f10f8000.usb3: irq 47, io mem 0xf10f8000
[    1.897762] usb usb4: New USB device found, idVendor=1d6b, idProduct=0002
[    1.904588] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.911848] usb usb4: Product: xHCI Host Controller
[    1.916745] usb usb4: Manufacturer: Linux 4.9.0-mvebu-tld-12 xhci-hcd
[    1.923255] usb usb4: SerialNumber: f10f8000.usb3
[    1.928273] hub 4-0:1.0: USB hub found
[    1.932066] hub 4-0:1.0: 1 port detected
[    1.936164] xhci-hcd f10f8000.usb3: xHCI Host Controller
[    1.941516] xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 5
[    1.949078] usb usb5: We don't know the algorithms for LPM for this host, disabling LPM.
[    1.957260] usb usb5: New USB device found, idVendor=1d6b, idProduct=0003
[    1.964087] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.971347] usb usb5: Product: xHCI Host Controller
[    1.976244] usb usb5: Manufacturer: Linux 4.9.0-mvebu-tld-12 xhci-hcd
[    1.982763] usb usb5: SerialNumber: f10f8000.usb3
[    1.987760] hub 5-0:1.0: USB hub found
[    1.991551] hub 5-0:1.0: 1 port detected
[    1.995735] usbcore: registered new interface driver usblp
[    2.001325] usbcore: registered new interface driver usb-storage
[    2.007527] mousedev: PS/2 mouse device common for all mice
[    2.013489] armada38x-rtc f10a3800.rtc: rtc core: registered f10a3800.rtc as rtc0
[    2.021169] i2c /dev entries driver
[    2.035979] orion_wdt: Initial timeout 171 sec
[    2.041652] marvell-cesa f1090000.crypto: CESA device successfully registered
[    2.048942] hidraw: raw HID events driver (C) Jiri Kosina
[    2.054541] usbcore: registered new interface driver usbhid
[    2.060151] usbhid: USB HID core driver
[    2.064122] drop_monitor: Initializing network drop monitor service
[    2.070458] Netfilter messages via NETLINK v0.30.
[    2.075189] ip_set: protocol 6
[    2.078423] NET: Registered protocol family 10
[    2.083449] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    2.090238] NET: Registered protocol family 17
[    2.094817] 8021q: 802.1Q VLAN Support v1.8
[    2.099173] Key type dns_resolver registered
[    2.103544] ThumbEE CPU extension supported.
[    2.107835] Registering SWP/SWPB emulation handler
[    2.112984] registered taskstats version 1
[    2.117099] Loading compiled-in X.509 certificates
[    2.121951] zswap: loaded using pool lzo/zbud
[    2.168604] usb 2-1: new high-speed USB device number 2 using xhci-hcd
[    2.175303] Key type big_key registered
[    2.182615] Key type encrypted registered
[    2.187575] armada38x-rtc f10a3800.rtc: setting system clock to 2017-06-11 20:37:51 UTC (1497213471)
[    2.197757] Freeing unused kernel memory: 1024K (c0c00000 - c0d00000)
Loading, please wait...
[    2.236254] systemd-udevd[1323]: starting version 215
[    2.242189] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    2.348852] usb 2-1: New USB device found, idVendor=045b, idProduct=0209
[    2.355595] usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.363228] hub 2-1:1.0: USB hub found
[    2.372238] hub 2-1:1.0: 4 ports detected
[    2.488851] usb 3-1: new SuperSpeed USB device number 2 using xhci-hcd
[    2.530176] usb 3-1: New USB device found, idVendor=045b, idProduct=0210
[    2.536912] usb 3-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.544734] hub 3-1:1.0: USB hub found
[    2.548750] hub 3-1:1.0: 4 ports detected
[    2.698592] usb 2-1.3: new high-speed USB device number 3 using xhci-hcd
[    2.829218] usb 2-1.3: New USB device found, idVendor=0781, idProduct=5571
[    2.836124] usb 2-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    2.843478] usb 2-1.3: Product: Cruzer Fit
[    2.847591] usb 2-1.3: Manufacturer: SanDisk
[    2.851886] usb 2-1.3: SerialNumber: 4C530302071223122304
[    2.857813] usb-storage 2-1.3:1.0: USB Mass Storage device detected
[    2.874294] scsi host4: usb-storage 2-1.3:1.0
[    2.880510] usbcore: registered new interface driver uas
[    3.929102] scsi 4:0:0:0: Direct-Access     SanDisk  Cruzer Fit       1.00 PQ: 0 ANSI: 6
[    3.939076] sd 4:0:0:0: [sda] 61489152 512-byte logical blocks: (31.5 GB/29.3 GiB)
[    3.947603] sd 4:0:0:0: Attached scsi generic sg0 type 0
[    3.952973] sd 4:0:0:0: [sda] Write Protect is off
[    3.958552] sd 4:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[    3.970868]  sda: sda1
[    3.979382] sd 4:0:0:0: [sda] Attached SCSI removable disk
[    3.994042] random: fast init done
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
modprobe: module ext3 not found in modules.dep
Begin: Will now check root file system ... fsck from util-linux 2.25.2
fsck: error 2 (No such file or directory) while executing fsck.ext3 for /dev/sda1
fsck exited with status code 8
done.
Warning: File system check failed but did not detect errors
[   17.663632] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
[   17.679396] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
INIT: version 2.88 booting
[info] Using makefile-style concurrent boot in runlevel S.
[....] Starting the hotplug events dispatcher: udevd[   18.443139] systemd-udevd[1530]: starting version 215
. ok
[ ok ] Synthesizing the initial hotplug events...done.
[ ok ] Waiting for /dev to be fully populated...done.
[ ok ] Activating swap...done.
[   19.906781] EXT4-fs (sda1): re-mounted. Opts: (null)
[....] Checking root file system...fsck from util-linux 2.25.2
rootfs: clean, 34130/1925120 files, 299583/7685888 blocks
done.
[   20.024095] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro
[ ok ] Activating lvm and md swap...done.
[....] Checking file systems...fsck from util-linux 2.25.2
done.
[ ok ] Cleaning up temporary files... /tmp.
[ ok ] Mounting local filesystems...done.
[ ok ] Activating swapfile swap...done.
[ ok ] Cleaning up temporary files....
[ ok ] Setting kernel variables ...done.
[   21.088975] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[....] Configuring network interfaces...Internet Systems Consortium DHCP Client 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/42:55:87:01:d3:d2
Sending on   LPF/eth0/42:55:87:01:d3:d2
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 18
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
done.
[....] Starting [   82.595771] random: crng init done
[ ok nd daemon....
[ ok ] Starting NFS common utilities: statd idmapd.
[ ok ] Cleaning up temporary files....
INIT: Entering runlevel: 2
[info] Using makefile-style concurrent boot in runlevel 2.
[warn] Not starting NFS kernel daemon: no exports. ... (warning).
[....] Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
2455 (syslogd)
. ok
[ ok ] Starting NTP server: ntpd.
[ ok ] Starting periodic command scheduler: cron.
[ ok ] Starting OpenBSD Secure Shell server: sshd.
[ ok ] Starting system message bus: dbus.
[ ok ] Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
[....] Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
2454 (klogd)
. ok

Debian GNU/Linux 8 debian ttyS0

debian login: root
Password:
Last login: Fri Feb  3 22:22:51 PST 2017 from 192.168.0.100 on pts/0
Linux debian 4.9.0-mvebu-tld-12 #2 SMP PREEMPT Wed Feb 1 02:31:29 PST 2017 armv7l

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

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
debian

WD My Cloud EX4100
Linux version 4.9.0-mvebu-tld-12 (root@tldDebianVM) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) ) #2 SMP PREEMPT Wed Feb 1 02:31:29 PST 2017
 13:39:53 up 2 min,  1 user,  load average: 0.03, 0.02, 0.00
root@debian:~#

cat /proc/mtd output is wrong i think

dev: size erasesize name
mtd0: 00800000 00020000 "U-Boot"
mtd1: 00800000 00020000 "Linux"
mtd2: 1f000000 00020000 "Filesystem"



Edited 1 time(s). Last edit at 06/11/2017 03:49PM by saschadd.
Re: Debian on WD MyCloud EX 4100
June 11, 2017 04:07PM
saschadd,

The DTB file is old in this run. So you need to redo the uImage on the USB rootfs to append the new one.

Other than that, everything looks great!

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



Edited 1 time(s). Last edit at 06/11/2017 10:32PM by bodhi.
Re: Debian on WD MyCloud EX 4100
June 11, 2017 10:58PM
This WD stock u-boot is of such a low quality that made virtual hacking quite difficult :) I'm scratching my head and said WTF, there is no comments in their patches on top of Marvell's u-boot.

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



Edited 1 time(s). Last edit at 06/11/2017 10:59PM by bodhi.
Re: Debian on WD MyCloud EX 4100
June 12, 2017 03:48AM
bodhi Wrote:
-------------------------------------------------------
> saschadd,
>
> The DTB file is old in this run. So you need to re
> do the uImage on the USB rootfs to append the new
> one.
>
> Other than that, everything looks great!

bodhi, you are right. Was still using the old one.
Just appended the new file and made a new kwboot and usb boot.
Following the output. Unfortunately cat /proc/mtd output is still wrong

Marvell>> setenv bootdev usb
Marvell>> setenv device '0:1'
Marvell>> setenv load_initr 0x2900000
Marvell>> setenv load_imag000000
Marvell>> setenv load_initading uInitrd ...; ext2load $bootdev $device $load_initrd_addr /boot/uInitrd'
> setenv load_imageho loading Image ...; ext2load $bootdev $device $load_image_addr /boot/uImage'
** Bad device usb 0 **
Marvell>> setenv usb_set_b,115200 root=/dev/sda1 rootdelay=10 $mtdparts earlyprintk=serial"'
> setenv usb_bootc'echo Booting from USB ...; setenv fdt_skip_update yes; usb start; run load_image; run load_initrd ; run usb_set_bootargs; bootm $load_image_addr $load_initrd_addr'
> setenv bootcmd_usb start; run usb_set_bootargs; run usb_bootcmd; reset'
> printenv<INTERRUPT>
Marvell>> setenv load_initrd_addr 0x2900000
Marvell>> setenv load_image_addr 0x02000000
Marvell>> setenv load_initrd 'echo loading uInitrd ...; ext2load $bootdev $device $load_initrd_addr /boot/uInitrd'
Marvell>> setenv load_image 'echo loading Image ...; ext2load $bootdev $device $load_image_addr /boot/uImage'
Marvell>> setenv usb_set_bsetenv bootargs "console=ttyS0,115200 root=/dev/sda1 rootdelay=10 $mtdparts earlyprintk=serial"'
> setenv usb_bootc'cho Booting from USB ...; setenv fdt_skip_update yes; usb start; run load_image; run load_initrd ; run usb_set_bootargs; bootm $load_image_addr $load_initrd_addr'
> setenv bootcmd_ub start; run usb_set_bootargs; run usb_bootcmd; reset'<INTERRUPT>
Marvell>> setenv load_initrd 'echo loading uInitrd ...; ext2load $bootdev $device $load_initrd_addr /boot/uInitrd'
Marvell>>
Marvell>> setenv load_image 'echo loading Image ...; ext2load $bootdev $device $load_image_addr /boot/uImage'
Marvell>> setenv usb_set_bootargs 'setenv bootargs "console=ttyS0,115200 root=/dev/sda1 rootdelay=10 $mtdparts earlyprintk=serial"'
Marvell>> setenv usb_bootcmd 'echo Booting from USB ...; setenv fdt_skip_update yes; usb start; run load_image; run load_initrd ; run usb_set_bootargs; bootm $load_image_addr $load_initrd_addr'
Marvell>> setenv bootcmd_usb 'usb start; run usb_set_bootargs; run usb_bootcmd; reset'
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;
bootcmd_usb=usb start; run usb_set_bootargs; run usb_bootcmd; reset
bootdelay=1
bootdev=usb
cacheShare=no
console=console=ttyS0,115200
device=0:1
device_partition=0:1
disaMvPnp=no
eeeEnable=no
enaClockGating=no
enaCpuStream=no
enaFPU=yes
enaMonExt=no
enaWrAllo=no
eth1addr=00:50:43:0a:2d:22
eth1mtu=1500
eth2addr=00:50:43:0a:da:22
eth2mtu=1500
eth3addr=00:50:43:2d:da:0a
eth3mtu=1500
ethact=egiga0
ethaddr=00:50:43:da:2d:22
ethmtu=1500
ethprime=egiga0
fdt_addr=2040000
fdt_skip_update=no
fdtaddr=0x1000000
fdtfile=armada-38x-modular.dtb
filesize=24
ide_path=/
image_name=uImage
initrd_name=uInitrd
ipaddr=2.66.66.203
kernel_addr_r=2080000
lcd0_enable=0
lcd0_params=640x480-16@60
lcd_panel=0
load_image=echo loading Image ...; ext2load $bootdev $device $load_image_addr /boot/uImage
load_image_addr=0x02000000
load_initading=uInitrd ...
load_initr=0x2900000
load_initrd=echo loading uInitrd ...; ext2load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x2900000
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),441m@15m(image.cfs),15m@456m(rescue_fw),20m@471m(config),10m@491m(reserve1),10m@501m(reserve2)
mvNetConfig=mv_net_config=4,(00:50:43:11:11:11,0:1:2:3),mtu=1500
mv_pon_addr=00:50:43:22:da:0a
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=2.66.66.32
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
usb_bootcmd=echo Booting from USB ...; setenv fdt_skip_update yes; usb start; run load_image; run load_initrd ; run usb_set_bootargs; bootm $load_image_addr $load_initrd_addr
usb_set_bootargs=setenv bootargs "console=ttyS0,115200 root=/dev/sda1 rootdelay=10 $mtdparts earlyprintk=serial"
vxworks_en=no
yuk_ethaddr=00:00:00:EE:51:81

Environment size: 3892/524284 bytes
Marvell>> run bootcmd_usb
(Re)start USB...
USB0:   Port (usbActive) : 0    Interface (usbType = 3) : USB XHCI 1.00
scanning bus 0 for devices... 4 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
       scanning usb for ethernet devices... 0 Ethernet Device(s) found
Booting from USB ...
(Re)start USB...
USB0:   Port (usbActive) : 0    Interface (usbType = 3) : USB XHCI 1.00
scanning bus 0 for devices... 4 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
       scanning usb for ethernet devices... 0 Ethernet Device(s) found
loading Image ...
3919325 bytes read in 324 ms (11.5 MiB/s)
loading uInitrd ...
6210503 bytes read in 347 ms (17.1 MiB/s)
## Booting image at 02000000 ...
## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   Linux-4.9.0-mvebu-tld-12
   Created:      2017-06-04   8:57:41 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3919261 Bytes = 3.7 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 02900000 ...
   Image Name:   initramfs-4.9.0-mvebu-tld-12
   Created:      2017-02-03  23:57:32 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    6210439 Bytes = 5.9 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.9.0-mvebu-tld-12 (root@tldDebianVM) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) ) #2 SMP PREEMPT Wed Feb 1 02:31:29 PST 2017
[    0.000000] CPU: ARMv7 Processor [414fc091] revision 1 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt:Machine model: WD My Cloud EX4100
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] percpu: Embedded 15 pages/cpu @eefcd000 s30796 r8192 d22452 u61440
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 522752
[    0.000000] Kernel command line:  console=ttyS0,115200 root=/dev/sda1 rootdelay=10 mtdparts=armada-nand:5m(u-boot)ro,5m@5m(kernel),5m@10m(uRamdisk),441m@15m(image.cfs),15m@456m(rescue_fw),20m@471m(config),10m@491m(reserve1),10m@501m(reserve2) earlyprintk=serial
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Memory: 2060316K/2097152K available (8192K kernel code, 690K rwdata, 2052K rodata, 1024K init, 386K bss, 36836K reserved, 0K cma-reserved, 1310720K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0900000   (9184 kB)
[    0.000000]       .init : 0xc0c00000 - 0xc0d00000   (1024 kB)
[    0.000000]       .data : 0xc0d00000 - 0xc0daca28   ( 691 kB)
[    0.000000]        .bss : 0xc0daca28 - 0xc0e0d4f8   ( 387 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  Build-time adjustment of leaf fanout to 32.
[    0.000000]  RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=2
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] mvebu_mbus: [Firmware Warn]: deprecated mbus-mvebu Device Tree, suspend/resume will not work
[    0.000000] L2C-310 enabling early BRESP for Cortex-A9
[    0.000000] L2C-310 full line of zeros enabled for Cortex-A9
[    0.000000] L2C-310 D prefetch enabled, offset 1 lines
[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
[    0.000000] L2C-310 Coherent cache controller enabled, 16 ways, 1024 kB
[    0.000000] L2C-310 Coherent: CACHE_ID 0x410054c9, AUX_CTRL 0x56070001
[    0.000000] Switching to timer-based delay loop, resolution 40ns
[    0.000003] sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 85899345900ns
[    0.007882] clocksource: armada_370_xp_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76450417870 ns
[    0.019057] Console: colour dummy device 80x30
[    0.023570] Calibrating delay loop (skipped), value calculated using timer frequency.. 50.00 BogoMIPS (lpj=250000)
[    0.033974] pid_max: default: 32768 minimum: 301
[    0.038728] Security Framework initialized
[    0.042922] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.049595] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.057099] CPU: Testing write buffer coherency: ok
[    0.062169] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.067908] Setting up static identity map for 0x100000 - 0x100058
[    0.074212] mvebu-soc-id: MVEBU SoC ID=0x6828, Rev=0x4
[    0.079471] mvebu-pmsu: Initializing Power Management Service Unit
[    0.283913] Booting CPU 1
[    0.286759] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.286808] Brought up 2 CPUs
[    0.295567] SMP: Total of 2 processors activated (100.00 BogoMIPS).
[    0.301886] CPU: All CPU(s) started in SVC mode.
[    0.307121] devtmpfs: initialized
[    0.312402] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[    0.320345] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.330270] prandom: seed boundary self test passed
[    0.336895] prandom: 100 self tests passed
[    0.341055] pinctrl core: initialized pinctrl subsystem
[    0.346972] NET: Registered protocol family 16
[    0.352014] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.393870] cpuidle: using governor ladder
[    0.423868] cpuidle: using governor menu
[    0.427933] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[    0.436002] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.441983] mvebu-pmsu: CPU hotplug support is currently broken on Armada 38x: disabling
[    0.450138] mvebu-pmsu: CPU idle is currently broken on Armada 38x: disabling
[    0.504817] vgaarb: loaded
[    0.507825] SCSI subsystem initialized
[    0.512054] usbcore: registered new interface driver usbfs
[    0.517687] usbcore: registered new interface driver hub
[    0.523110] usbcore: registered new device driver usb
[    0.528431] media: Linux media interface: v0.10
[    0.533075] Linux video capture interface: v2.00
[    0.538569] clocksource: Switched to clocksource armada_370_xp_clocksource
[    0.569975] VFS: Disk quotas dquot_6.6.0
[    0.574002] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.587828] NET: Registered protocol family 2
[    0.592648] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.599795] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    0.606346] TCP: Hash tables configured (established 8192 bind 8192)
[    0.612813] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.618826] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.625333] NET: Registered protocol family 1
[    0.630018] RPC: Registered named UNIX socket transport module.
[    0.635994] RPC: Registered udp transport module.
[    0.640771] RPC: Registered tcp transport module.
[    0.645535] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.652160] Unpacking initramfs...
[    0.859678] Freeing initrd memory: 6068K (c2900000 - c2eed000)
[    0.865653] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.872434] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[    0.881595] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.887802] audit: initializing netlink subsys (disabled)
[    0.893315] audit: type=2000 audit(0.880:1): initialized
[    0.899108] Initialise system trusted keyrings
[    0.903740] workingset: timestamp_bits=30 max_order=19 bucket_order=0
[    0.910319] zbud: loaded
[    0.913387] NFS: Registering the id_resolver key type
[    0.918504] Key type id_resolver registered
[    0.922767] Key type id_legacy registered
[    0.926846] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.933609] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.940156] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.947540] orangefs_debugfs_init: called with debug mask: :none: :0:
[    0.954156] orangefs_init: module version upstream loaded
[    0.961409] Key type asymmetric registered
[    0.965570] Asymmetric key parser 'x509' registered
[    0.970546] bounce: pool size: 64 pages
[    0.974516] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
[    0.981973] io scheduler noop registered
[    0.985960] io scheduler deadline registered
[    0.990314] io scheduler cfq registered (default)
[    0.995882] armada-38x-pinctrl f1018000.pinctrl: registered pinctrl driver
[    1.004310] mvebu-pcie soc:pcie-controller: PCI host bridge to bus 0000:00
[    1.011257] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    1.017579] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xe7ffffff]
[    1.024514] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.030437] PCI: bus0: Fast back to back transfers disabled
[    1.036073] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.044141] pci 0000:00:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.052305] PCI: bus1: Fast back to back transfers enabled
[    1.057963] PCI: bus2: Fast back to back transfers enabled
[    1.063556] pci 0000:00:01.0: PCI bridge to [bus 01]
[    1.068594] pci 0000:00:02.0: PCI bridge to [bus 02]
[    1.074036] mv_xor f1060800.xor: Marvell shared XOR driver
[    1.138976] mv_xor f1060800.xor: Marvell XOR (Descriptor Mode): ( xor cpy intr )
[    1.146583] mv_xor f1060900.xor: Marvell shared XOR driver
[    1.208969] mv_xor f1060900.xor: Marvell XOR (Descriptor Mode): ( xor cpy intr )
[    1.259665] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    1.267289] console [ttyS0] disabled
[    1.291014] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 22, base_baud = 12500000) is a 16550A
[    1.300056] console [ttyS0] enabled
[    1.300056] console [ttyS0] enabled
[    1.307143] bootconsole [earlycon0] disabled
[    1.307143] bootconsole [earlycon0] disabled
[    1.316715] ahci-mvebu f10a8000.sata: AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl platform mode
[    1.325833] ahci-mvebu f10a8000.sata: flags: 64bit ncq sntf led only pmp fbs pio slum part sxs
[    1.335398] scsi host0: ahci-mvebu
[    1.339104] scsi host1: ahci-mvebu
[    1.342708] ata1: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x100 irq 42
[    1.350672] ata2: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x180 irq 42
[    1.358767] ahci-mvebu f10e0000.sata: AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl platform mode
[    1.367854] ahci-mvebu f10e0000.sata: flags: 64bit ncq sntf led only pmp fbs pio slum part sxs
[    1.377225] scsi host2: ahci-mvebu
[    1.380870] scsi host3: ahci-mvebu
[    1.384424] ata3: SATA max UDMA/133 mmio [mem 0xf10e0000-0xf10e1fff] port 0x100 irq 43
[    1.392389] ata4: SATA max UDMA/133 mmio [mem 0xf10e0000-0xf10e1fff] port 0x180 irq 43
[    1.400817] pxa3xx-nand f10d0000.flash: This platform can't do DMA on this device
[    1.408665] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xdc
[    1.415046] nand: Hynix H27U4G8F2DTR-BC
[    1.418911] nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    1.426515] pxa3xx-nand f10d0000.flash: ECC strength 16, ECC step size 2048
[    1.433709] Bad block table found at page 262080, version 0x01
[    1.439901] Bad block table found at page 262016, version 0x01
[    1.445930] nand_read_bbt: bad block at 0x00000dcc0000
[    1.451099] nand_read_bbt: bad block at 0x00000fb00000
[    1.456259] nand_read_bbt: bad block at 0x000012180000
[    1.461426] nand_read_bbt: bad block at 0x0000139a0000
[    1.466586] nand_read_bbt: bad block at 0x000017880000
[    1.471753] nand_read_bbt: bad block at 0x0000178a0000
[    1.476914] nand_read_bbt: bad block at 0x00001a640000
[    1.482082] nand_read_bbt: bad block at 0x00001e9c0000
[    1.487273] 3 ofpart partitions found on MTD device pxa3xx_nand-0
[    1.493399] Creating 3 MTD partitions on "pxa3xx_nand-0":
[    1.498828] 0x000000000000-0x000000800000 : "U-Boot"
[    1.514495] 0x000000800000-0x000001000000 : "Linux"
[    1.530036] 0x000001000000-0x000040000000 : "Filesystem"
[    1.535371] mtd: partition "Filesystem" extends beyond the end of device "pxa3xx_nand-0" -- size truncated to 0x1f000000
[    1.559252] m25p80 spi0.0: unrecognized JEDEC id bytes: ff, ff, ff
[    1.565923] libphy: Fixed MDIO Bus: probed
[    1.570339] libphy: mdio_driver_register: mv88e6085
[    1.575380] libphy: orion_mdio_bus: probed
[    1.585093] mvneta_bm f10c8000.bm: Buffer Manager for network controller enabled
[    1.594133] mvneta f1070000.ethernet eth0: Using random mac address 06:c7:0e:e3:8a:6e
[    1.603534] mvneta f1030000.ethernet eth1: Using random mac address f2:f8:3a:a1:17:79
[    1.611608] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.618175] ehci-pci: EHCI PCI platform driver
[    1.622687] ehci-orion: EHCI orion driver
[    1.626804] orion-ehci f1058000.usb: EHCI Host Controller
[    1.632251] orion-ehci f1058000.usb: new USB bus registered, assigned bus number 1
[    1.639915] orion-ehci f1058000.usb: irq 38, io mem 0xf1058000
[    1.668586] orion-ehci f1058000.usb: USB 2.0 started, EHCI 1.00
[    1.674636] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    1.681467] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.688727] usb usb1: Product: EHCI Host Controller
[    1.689919] ata1: SATA link down (SStatus 0 SControl 300)
[    1.699067] usb usb1: Manufacturer: Linux 4.9.0-mvebu-tld-12 ehci_hcd
[    1.699867] ata2: SATA link down (SStatus 0 SControl 300)
[    1.710958] usb usb1: SerialNumber: f1058000.usb
[    1.715909] hub 1-0:1.0: USB hub found
[    1.719702] hub 1-0:1.0: 1 port detected
[    1.724075] xhci-hcd f10f0000.usb3: xHCI Host Controller
[    1.729433] xhci-hcd f10f0000.usb3: new USB bus registered, assigned bus number 2
[    1.729824] ata3: SATA link down (SStatus 0 SControl 300)
[    1.739835] ata4: SATA link down (SStatus 0 SControl 300)
[    1.747858] xhci-hcd f10f0000.usb3: hcc params 0x0a000990 hci version 0x100 quirks 0x00010010
[    1.756450] xhci-hcd f10f0000.usb3: irq 46, io mem 0xf10f0000
[    1.762310] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[    1.769151] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.776404] usb usb2: Product: xHCI Host Controller
[    1.781311] usb usb2: Manufacturer: Linux 4.9.0-mvebu-tld-12 xhci-hcd
[    1.787779] usb usb2: SerialNumber: f10f0000.usb3
[    1.792797] hub 2-0:1.0: USB hub found
[    1.796581] hub 2-0:1.0: 1 port detected
[    1.800693] xhci-hcd f10f0000.usb3: xHCI Host Controller
[    1.806033] xhci-hcd f10f0000.usb3: new USB bus registered, assigned bus number 3
[    1.813608] usb usb3: We don't know the algorithms for LPM for this host, disabling LPM.
[    1.821801] usb usb3: New USB device found, idVendor=1d6b, idProduct=0003
[    1.828799] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.836052] usb usb3: Product: xHCI Host Controller
[    1.840960] usb usb3: Manufacturer: Linux 4.9.0-mvebu-tld-12 xhci-hcd
[    1.847428] usb usb3: SerialNumber: f10f0000.usb3
[    1.852431] hub 3-0:1.0: USB hub found
[    1.856211] hub 3-0:1.0: 1 port detected
[    1.860386] xhci-hcd f10f8000.usb3: xHCI Host Controller
[    1.865729] xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 4
[    1.873316] xhci-hcd f10f8000.usb3: hcc params 0x0a000990 hci version 0x100 quirks 0x00010010
[    1.881915] xhci-hcd f10f8000.usb3: irq 47, io mem 0xf10f8000
[    1.887765] usb usb4: New USB device found, idVendor=1d6b, idProduct=0002
[    1.894592] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.901852] usb usb4: Product: xHCI Host Controller
[    1.906751] usb usb4: Manufacturer: Linux 4.9.0-mvebu-tld-12 xhci-hcd
[    1.913263] usb usb4: SerialNumber: f10f8000.usb3
[    1.918283] hub 4-0:1.0: USB hub found
[    1.922076] hub 4-0:1.0: 1 port detected
[    1.926174] xhci-hcd f10f8000.usb3: xHCI Host Controller
[    1.931527] xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 5
[    1.939089] usb usb5: We don't know the algorithms for LPM for this host, disabling LPM.
[    1.947271] usb usb5: New USB device found, idVendor=1d6b, idProduct=0003
[    1.954097] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.961357] usb usb5: Product: xHCI Host Controller
[    1.966255] usb usb5: Manufacturer: Linux 4.9.0-mvebu-tld-12 xhci-hcd
[    1.972773] usb usb5: SerialNumber: f10f8000.usb3
[    1.977773] hub 5-0:1.0: USB hub found
[    1.981563] hub 5-0:1.0: 1 port detected
[    1.985748] usbcore: registered new interface driver usblp
[    1.991337] usbcore: registered new interface driver usb-storage
[    1.997541] mousedev: PS/2 mouse device common for all mice
[    2.003504] armada38x-rtc f10a3800.rtc: rtc core: registered f10a3800.rtc as rtc0
[    2.011182] i2c /dev entries driver
[    2.025985] orion_wdt: Initial timeout 171 sec
[    2.031636] marvell-cesa f1090000.crypto: CESA device successfully registered
[    2.038924] hidraw: raw HID events driver (C) Jiri Kosina
[    2.044529] usbcore: registered new interface driver usbhid
[    2.050137] usbhid: USB HID core driver
[    2.054103] drop_monitor: Initializing network drop monitor service
[    2.060442] Netfilter messages via NETLINK v0.30.
[    2.065173] ip_set: protocol 6
[    2.068408] NET: Registered protocol family 10
[    2.073440] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    2.080162] NET: Registered protocol family 17
[    2.084739] 8021q: 802.1Q VLAN Support v1.8
[    2.089146] Key type dns_resolver registered
[    2.093518] ThumbEE CPU extension supported.
[    2.097811] Registering SWP/SWPB emulation handler
[    2.102969] registered taskstats version 1
[    2.107084] Loading compiled-in X.509 certificates
[    2.111936] zswap: loaded using pool lzo/zbud
[    2.158603] usb 2-1: new high-speed USB device number 2 using xhci-hcd
[    2.165296] Key type big_key registered
[    2.172605] Key type encrypted registered
[    2.177570] armada38x-rtc f10a3800.rtc: setting system clock to 2017-06-12 08:25:09 UTC (1497255909)
[    2.187767] Freeing unused kernel memory: 1024K (c0c00000 - c0d00000)
Loading, please wait...
[    2.226333] systemd-udevd[1323]: starting version 215
[    2.232314] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    2.338798] usb 2-1: New USB device found, idVendor=045b, idProduct=0209
[    2.345541] usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.359945] hub 2-1:1.0: USB hub found
[    2.366640] hub 2-1:1.0: 4 ports detected
[    2.479071] usb 3-1: new SuperSpeed USB device number 2 using xhci-hcd
[    2.510108] usb 3-1: New USB device found, idVendor=045b, idProduct=0210
[    2.516840] usb 3-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.524587] hub 3-1:1.0: USB hub found
[    2.528606] hub 3-1:1.0: 4 ports detected
[    2.688591] usb 2-1.3: new high-speed USB device number 3 using xhci-hcd
[    2.819209] usb 2-1.3: New USB device found, idVendor=0781, idProduct=5571
[    2.826115] usb 2-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    2.833467] usb 2-1.3: Product: Cruzer Fit
[    2.837580] usb 2-1.3: Manufacturer: SanDisk
[    2.841874] usb 2-1.3: SerialNumber: 4C530302071223122304
[    2.848117] usb-storage 2-1.3:1.0: USB Mass Storage device detected
[    2.854568] scsi host4: usb-storage 2-1.3:1.0
[    2.860512] usbcore: registered new interface driver uas
[    3.929111] scsi 4:0:0:0: Direct-Access     SanDisk  Cruzer Fit       1.00 PQ: 0 ANSI: 6
[    3.939413] sd 4:0:0:0: Attached scsi generic sg0 type 0
[    3.944863] sd 4:0:0:0: [sda] 61489152 512-byte logical blocks: (31.5 GB/29.3 GiB)
[    3.953959] sd 4:0:0:0: [sda] Write Protect is off
[    3.959092] sd 4:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[    3.971219]  sda: sda1
[    3.979391] sd 4:0:0:0: [sda] Attached SCSI removable disk
[    3.994170] random: fast init done
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
modprobe: module ext3 not found in modules.dep
Begin: Will now check root file system ... fsck from util-linux 2.25.2
fsck: error 2 (No such file or directory) while executing fsck.ext3 for /dev/sda1
fsck exited with status code 8
done.
Warning: File system check failed but did not detect errors
[   17.643619] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
[   17.652687] EXT4-fs (sda1): INFO: recovery required on readonly filesystem
[   17.659605] EXT4-fs (sda1): write access will be enabled during recovery
[   18.430937] EXT4-fs (sda1): recovery complete
[   18.437855] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
INIT: version 2.88 booting
[info] Using makefile-style concurrent boot in runlevel S.
[....] Starting the hotplug events dispatcher: udevd[   19.154219] systemd-udevd[1530]: starting version 215
. ok
[ ok ] Synthesizing the initial hotplug events...done.
[ ok ] Waiting for /dev to be fully populated...done.
[ ok ] Activating swap...done.
[   20.057122] EXT4-fs (sda1): re-mounted. Opts: (null)
[....] Checking root file system...fsck from util-linux 2.25.2
rootfs: clean, 34132/1925120 files, 299594/7685888 blocks
done.
[   20.171740] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro
[ ok ] Activating lvm and md swap...done.
[....] Checking file systems...fsck from util-linux 2.25.2
done.
[ ok ] Cleaning up temporary files... /tmp.
[ ok ] Mounting local filesystems...done.
[ ok ] Activating swapfile swap...done.
[ ok ] Cleaning up temporary files....
[ ok ] Setting kernel variables ...done.
[   21.198981] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[....] Configuring network interfaces...Internet Systems Consortium DHCP Client 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/06:c7:0e:e3:8a:6e
Sending on   LPF/eth0/06:c7:0e:e3:8a:6e
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on eth0 to 255.255.[   82.452690] random: crng init done
255.255 port 67 interval 10
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 13
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 18
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 15
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
done.
[ ok ] Starting rpcbind daemon....
[ ok ] Starting NFS common utilities: statd idmapd.
[ ok ] Cleaning up temporary files....
INIT: Entering runlevel: 2
[info] Using makefile-style concurrent boot in runlevel 2.
[warn] Not starting NFS kernel daemon: no exports. ... (warning).
[....] Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
2475 (syslogd)
. ok
[ ok ] Starting periodic command scheduler: cron.
[ ok ] Starting NTP server: ntpd.
[ ok ] Starting system message bus: dbus.
[ ok ] Starting OpenBSD Secure Shell server: sshd.
[ ok ] Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
[....] Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
2476 (klogd)
. ok

Debian GNU/Linux 8 debian ttyS0

debian login: root
Password:
Last login: Sun Jun 11 13:39:53 PDT 2017 on ttyS0
Linux debian 4.9.0-mvebu-tld-12 #2 SMP PREEMPT Wed Feb 1 02:31:29 PST 2017 armv7l

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

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
debian

WD My Cloud EX4100
Linux version 4.9.0-mvebu-tld-12 (root@tldDebianVM) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) ) #2 SMP PREEMPT Wed Feb 1 02:31:29 PST 2017
 01:36:51 up 11 min,  1 user,  load average: 0.00, 0.00, 0.00
root@debian:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00800000 00020000 "U-Boot"
mtd1: 00800000 00020000 "Linux"
mtd2: 1f000000 00020000 "Filesystem"

Will be on holiday til Thursday so cant try something till then.

-
happy hacking,

saschadd
Re: Debian on WD MyCloud EX 4100
June 12, 2017 01:38PM
saschadd,

There is no difference in USB vs HDD. The appended DTB determines the mtd partitions. So you should doublecheck the uImage. Or copy it from HDD to USB rootfs.

> Will be on holiday til Thursday so cant try someth
> ing till then.

Have fun :)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on WD MyCloud EX 4100
June 16, 2017 04:28AM
bodhi,

just had the time to test it again. i think i forgot the mdtparts environment and the uImage was not correct.
Copied the /boot folder from SATA drive to USB drive and did another kwboot.

now cat /proc/mtd gives me correct

dev:    size   erasesize  name
mtd0: 00500000 00020000 "U-Boot"
mtd1: 00a00000 00020000 "uImage"
mtd2: 00f00000 00020000 "uRamdisk"
mtd3: 1c800000 00020000 "image.cfs"
mtd4: 03800000 00020000 "rescue_fw"
mtd5: 02900000 00020000 "config"
mtd6: 01500000 00020000 "reserve1"
mtd7: 00b00000 00020000 "reserve2"

/dev/mtd0 0x100000 0x80000 0x20000 in /etc/fw_env.config gives me

Warning: Bad CRC, using default environment
bootargs=
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=3
baudrate=115200
stdin=serial,cros-ec-keyb
stdout=serial,lcd
stderr=serial,lcd

/dev/mtd0 0x500000 0x80000 0x20000 in /etc/fw_env.config gives me

Cannot read bad block mark: Invalid argument

Here are my usbboot envs i am using

setenv bootdev usb
setenv device '0:1'
setenv load_initrd_addr 0x2900000
setenv load_image_addr 0x02000000
setenv load_initrd 'echo loading uInitrd ...; ext2load $bootdev $device $load_initrd_addr /boot/uInitrd'
setenv load_image 'echo loading Image ...; ext2load $bootdev $device $load_image_addr /boot/uImage'
setenv usb_set_bootargs 'setenv bootargs "console=ttyS0,115200 root=/dev/sda1 rootdelay=10 earlyprintk=serial'
setenv mtdparts 'mtdparts=armada-nand-0:5m(u-boot)ro,5m@5m(kernel),5m@10m(uRamdisk),441m@15m(image.cfs),15m@456m(rescue_fw),20m@471m(config),10m@491m(reserve1),10m@501m(reserve2)'
setenv usb_bootcmd 'echo Booting from USB ...; setenv fdt_skip_update yes; usb start; run load_image; run load_initrd ; run usb_set_bootargs; bootm $load_image_addr $load_initrd_addr'
setenv bootcmd_usb 'usb start; run usb_set_bootargs; run usb_bootcmd; reset'
printenv
run bootcmd_usb

and here is the complete console output

sudo ./kwboot -f -t -B 115200 /dev/ttyAMA0 -b u-boot-a38x-Ylowstone_2014T30p6_bodhi-tld-1-nand-uart.bin -s 0 -q 1
Sending boot message. Please reboot the target...|▒"▒&T▒▒▒"3DUfw▒"3DUfw▒"3DUf/▒"3DUfw▒"3DUfw
Sending boot image...
  0 % [......................................................................]
  0 % [......................................................................]
  1 % [......................................................................]
  2 % [......................................................................]
  3 % [......................................................................]
  4 % [......................................................................]
  5 % [......................................................................]
  6 % [......................................................................]
  7 % [......................................................................]
  8 % [......................................................................]
  9 % [......................................................................]
 10 % [......................................................................]
 11 % [......................................................................]
 12 % [......................................................................]
 13 % [......................................................................]
 14 % [......................................................................]
 15 % [......................................................................]
 15 % [......................................................................]
 16 % [......................................................................]
 17 % [......................................................................]
 18 % [......................................................................]
 19 % [......................................................................]
 20 % [......................................................................]
 21 % [......................................................................]
 22 % [......................................................................]
 23 % [......................................................................]
 24 % [......................................................................]
 25 % [......................................................................]
 26 % [......................................................................]
 27 % [......................................................................]
 28 % [......................................................................]
 29 % [......................................................................]
 30 % [......................................................................]
 30 % [......................................................................]
 31 % [......................................................................]
 32 % [......................................................................]
 33 % [......................................................................]
 34 % [......................................................................]
 35 % [......................................................................]
 36 % [......................................................................]
 37 % [......................................................................]
 38 % [......................................................................]
 39 % [......................................................................]
 40 % [......................................................................]
 41 % [......................................................................]
 42 % [......................................................................]
 43 % [......................................................................]
 44 % [......................................................................]
 45 % [......................................................................]
 45 % [......................................................................]
 46 % [......................................................................]
 47 % [......................................................................]
 48 % [......................................................................]
 49 % [......................................................................]
 50 % [......................................................................]
 51 % [......................................................................]
 52 % [......................................................................]
 53 % [......................................................................]
 54 % [......................................................................]
 55 % [......................................................................]
 56 % [......................................................................]
 57 % [......................................................................]
 58 % [......................................................................]
 59 % [......................................................................]
 60 % [......................................................................]
 60 % [......................................................................]
 61 % [......................................................................]
 62 % [......................................................................]
 63 % [......................................................................]
 64 % [......................................................................]
 65 % [......................................................................]
 66 % [......................................................................]
 67 % [......................................................................]
 68 % [......................................................................]
 69 % [......................................................................]
 70 % [......................................................................]
 71 % [......................................................................]
 72 % [......................................................................]
 73 % [......................................................................]
 74 % [......................................................................]
 75 % [......................................................................]
 76 % [......................................................................]
 76 % [......................................................................]
 77 % [......................................................................]
 78 % [......................................................................]
 79 % [......................................................................]
 80 % [......................................................................]
 81 % [......................................................................]
 82 % [......................................................................]
 83 % [......................................................................]
 84 % [......................................................................]
 85 % [......................................................................]
 86 % [......................................................................]
 87 % [......................................................................]
 88 % [......................................................................]
 89 % [......................................................................]
 90 % [......................................................................]
 91 % [......................................................................]
 91 % [......................................................................]
 92 % [......................................................................]
 93 % [......................................................................]
 94 % [......................................................................]
 95 % [......................................................................]
 96 % [......................................................................]
 97 % [......................................................................]
 98 % [......................................................................]
 99 % [.........................................]
[Type Ctrl-\ + c to quit]

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


U-Boot 2013.01_v1.06 (Jun 08 2017 - 21:25:53) Marvell version: 2014_T3.0p6 - bodhi-tld-1

mvBoardSatRRead: Error: Read from S@R failed
mvBoardSatRRead: Error: Read from S@R failed
mvBoardSatRRead: Error: Read from S@R failed
Board: DB-88F6820-BP
SoC:   MV88F6828 Rev A0
       running 2 CPUs
CPU:   ARM Cortex A9 MPCore (Rev 1) LE
       CPU 0
       CPU    @ 1600 [MHz]
       L2     @ 800 [MHz]
       TClock @ 200 [MHz]
       DDR    @ 800 [MHz]
       DDR 32 Bit Width, FastPath Memory Access, DLB Enabled, ECC Disabled
DRAM:  2 GiB

Map:   Code:                    0x7fece000:0x7ff95d14
       BSS:                     0x7ffef254
       Stack:                   0x7f9cdf20
       Heap:                    0x7f9ce000:0x7fece000
raise: Signal # 8 caught
raise: Signal # 8 caught
       U-Boot Environment:      0x00000000:0x00080000 (NAND)

NAND:  ID: dcad ,512 MiB
MMC:   mv_sdh: 0
USB2.0 0: Host Mode
USB3.0 0: Host Mode
USB3.0 1: Host Mode
Board configuration detected:
Creating 1 MTD partitions on "nand0":
0x00001f500000-0x00001ff00000 : "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: 3/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 36 (0x00000024)...
Done
lan mac_addr :  00 90 a9 e5 19 1e
Set lan 0 WakeOnLan ok
Set lan 1 WakeOnLan ok
MicroP Enable HD
Enable HD1
Enable HD2
Enable HD3
Enable HD4
Net:
|  port  | Interface | PHY address  |
|--------|-----------|--------------|
| egiga0 |   RGMII   |     0x00     |
| egiga1 |   SGMII   |     0x01     |
egiga0 [PRIME], egiga1
Hit any key to stop autoboot:  0
Marvell>> setenv bootdev usb
Marvell>> setenv device '0:1'
Marvell>> setenv load_initrd_addr 0x2900000
Marvell>> setenv load_image_addr 0x02000000
Marvell>> setenv load_initrd 'echo loading uInitrd ...; ext2load $bootdev $device $load_initrd_addr /boot/uInitrd'
Marvell>> setenv load_image 'echo loading Image ...; ext2load $bootdev $device $load_image_addr /boot/uImage'
Marvell>> setenv usb_set_bootargs 'setenv bootargs "console=ttyS0,115200 root=/dev/sda1 rootdelay=10 earlyprintk=serial'
Marvell>> setenv mtdparts 'mtdparts=armada-nand-0:5m(u-boot)ro,5m@5m(kernel),5m@10m(uRamdisk),441m@15m(image.cfs),15m@456m(rescue_fw),20m@471m(config),10m@491m(reserve1),10m@501m(reserve2)'
Marvell>> setenv usb_bootcmd 'echo Booting from USB ...; setenv fdt_skip_update yes; usb start; run load_image; run load_initrd ; run usb_set_bootargs; bootm $load_image_addr $load_initrd_addr'
Marvell>> setenv bootcmd_usb 'usb start; run usb_set_bootargs; run usb_bootcmd; reset'
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;
bootcmd_usb=usb start; run usb_set_bootargs; run usb_bootcmd; reset
bootdelay=1
bootdev=usb
cacheShare=no
console=console=ttyS0,115200
device=0:1
device_partition=0:1
disaMvPnp=no
eeeEnable=no
enaClockGating=no
enaCpuStream=no
enaFPU=yes
enaMonExt=no
enaWrAllo=no
eth1addr=00:50:43:e0:2c:2d
eth1mtu=1500
eth2addr=00:50:43:e0:32:2d
eth2mtu=1500
eth3addr=00:50:43:2c:32:e0
eth3mtu=1500
ethact=egiga0
ethaddr=00:50:43:32:2c:2d
ethmtu=1500
ethprime=egiga0
fdt_addr=2040000
fdt_skip_update=no
fdtaddr=0x1000000
fdtfile=armada-38x-modular.dtb
filesize=24
ide_path=/
image_name=uImage
initrd_name=uInitrd
ipaddr=2.66.66.203
kernel_addr_r=2080000
lcd0_enable=0
lcd0_params=640x480-16@60
lcd_panel=0
load_image=echo loading Image ...; ext2load $bootdev $device $load_image_addr /boot/uImage
load_image_addr=0x02000000
load_initrd=echo loading uInitrd ...; ext2load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x2900000
loadaddr=0x02000000
loads_echo=0
mtddevname=u-boot
mtddevnum=0
mtdids=nand0=armada-nand
mtdparts=mtdparts=armada-nand-0:5m(u-boot)ro,5m@5m(kernel),5m@10m(uRamdisk),441m@15m(image.cfs),15m@456m(rescue_fw),20m@471m(config),10m@491m(reserve1),10m@501m(reserve2)
mvNetConfig=mv_net_config=4,(00:50:43:11:11:11,0:1:2:3),mtu=1500
mv_pon_addr=00:50:43:2d:32:e0
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=2.66.66.32
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
usb_bootcmd=echo Booting from USB ...; setenv fdt_skip_update yes; usb start; run load_image; run load_initrd ; run usb_set_bootargs; bootm $load_image_addr $load_initrd_addr
usb_set_bootargs=setenv bootargs "console=ttyS0,115200 root=/dev/sda1 rootdelay=10 earlyprintk=serial
vxworks_en=no
yuk_ethaddr=00:00:00:EE:51:81

Environment size: 3831/524284 bytes
Marvell>> run bootcmd_usb
(Re)start USB...
USB0:   Port (usbActive) : 0    Interface (usbType = 3) : USB XHCI 1.00
scanning bus 0 for devices... 4 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
       scanning usb for ethernet devices... 0 Ethernet Device(s) found
Booting from USB ...
(Re)start USB...
USB0:   Port (usbActive) : 0    Interface (usbType = 3) : USB XHCI 1.00
scanning bus 0 for devices... 4 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
       scanning usb for ethernet devices... 0 Ethernet Device(s) found
loading Image ...
3919689 bytes read in 282 ms (13.3 MiB/s)
loading uInitrd ...
6210503 bytes read in 368 ms (16.1 MiB/s)
## Booting image at 02000000 ...
## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   Linux-4.9.0-mvebu-tld-12
   Created:      2017-06-12   5:14:22 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3919625 Bytes = 3.7 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 02900000 ...
   Image Name:   initramfs-4.9.0-mvebu-tld-12
   Created:      2017-02-03  23:57:32 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    6210439 Bytes = 5.9 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.9.0-mvebu-tld-12 (root@tldDebianVM) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) ) #2 SMP PREEMPT Wed Feb 1 02:31:29 PST 2017
[    0.000000] CPU: ARMv7 Processor [414fc091] revision 1 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt:Machine model: WD My Cloud EX4100
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] percpu: Embedded 15 pages/cpu @eefcd000 s30796 r8192 d22452 u61440
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 522752
[    0.000000] Kernel command line:  console=ttyS0,115200 root=/dev/sda1 rootdelay=10 earlyprintk=serial
[    0.000000]
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Memory: 2060316K/2097152K available (8192K kernel code, 690K rwdata, 2052K rodata, 1024K init, 386K bss, 36836K reserved, 0K cma-reserved, 1310720K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0900000   (9184 kB)
[    0.000000]       .init : 0xc0c00000 - 0xc0d00000   (1024 kB)
[    0.000000]       .data : 0xc0d00000 - 0xc0daca28   ( 691 kB)
[    0.000000]        .bss : 0xc0daca28 - 0xc0e0d4f8   ( 387 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  Build-time adjustment of leaf fanout to 32.
[    0.000000]  RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=2
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] mvebu_mbus: [Firmware Warn]: deprecated mbus-mvebu Device Tree, suspend/resume will not work
[    0.000000] L2C-310 enabling early BRESP for Cortex-A9
[    0.000000] L2C-310 full line of zeros enabled for Cortex-A9
[    0.000000] L2C-310 D prefetch enabled, offset 1 lines
[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
[    0.000000] L2C-310 Coherent cache controller enabled, 16 ways, 1024 kB
[    0.000000] L2C-310 Coherent: CACHE_ID 0x410054c9, AUX_CTRL 0x56070001
[    0.000000] Switching to timer-based delay loop, resolution 40ns
[    0.000003] sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 85899345900ns
[    0.007882] clocksource: armada_370_xp_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76450417870 ns
[    0.019061] Console: colour dummy device 80x30
[    0.023575] Calibrating delay loop (skipped), value calculated using timer frequency.. 50.00 BogoMIPS (lpj=250000)
[    0.033979] pid_max: default: 32768 minimum: 301
[    0.038731] Security Framework initialized
[    0.042925] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.049599] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.057103] CPU: Testing write buffer coherency: ok
[    0.062173] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.067910] Setting up static identity map for 0x100000 - 0x100058
[    0.074215] mvebu-soc-id: MVEBU SoC ID=0x6828, Rev=0x4
[    0.079474] mvebu-pmsu: Initializing Power Management Service Unit
[    0.283911] Booting CPU 1
[    0.286758] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.286806] Brought up 2 CPUs
[    0.295564] SMP: Total of 2 processors activated (100.00 BogoMIPS).
[    0.301884] CPU: All CPU(s) started in SVC mode.
[    0.307116] devtmpfs: initialized
[    0.312412] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[    0.320359] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.330285] prandom: seed boundary self test passed
[    0.336909] prandom: 100 self tests passed
[    0.341069] pinctrl core: initialized pinctrl subsystem
[    0.346988] NET: Registered protocol family 16
[    0.352014] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.393867] cpuidle: using governor ladder
[    0.423865] cpuidle: using governor menu
[    0.427918] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[    0.435986] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.441966] mvebu-pmsu: CPU hotplug support is currently broken on Armada 38x: disabling
[    0.450121] mvebu-pmsu: CPU idle is currently broken on Armada 38x: disabling
[    0.504827] vgaarb: loaded
[    0.507837] SCSI subsystem initialized
[    0.512058] usbcore: registered new interface driver usbfs
[    0.517691] usbcore: registered new interface driver hub
[    0.523125] usbcore: registered new device driver usb
[    0.528450] media: Linux media interface: v0.10
[    0.533087] Linux video capture interface: v2.00
[    0.538574] clocksource: Switched to clocksource armada_370_xp_clocksource
[    0.569957] VFS: Disk quotas dquot_6.6.0
[    0.573984] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.587855] NET: Registered protocol family 2
[    0.592671] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.599819] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    0.606369] TCP: Hash tables configured (established 8192 bind 8192)
[    0.612838] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.618848] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.625354] NET: Registered protocol family 1
[    0.630039] RPC: Registered named UNIX socket transport module.
[    0.636015] RPC: Registered udp transport module.
[    0.640795] RPC: Registered tcp transport module.
[    0.645560] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.652184] Unpacking initramfs...
[    0.859064] Freeing initrd memory: 6068K (c2900000 - c2eed000)
[    0.865024] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.871808] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[    0.880957] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.887162] audit: initializing netlink subsys (disabled)
[    0.892674] audit: type=2000 audit(0.880:1): initialized
[    0.898440] Initialise system trusted keyrings
[    0.903098] workingset: timestamp_bits=30 max_order=19 bucket_order=0
[    0.909675] zbud: loaded
[    0.912740] NFS: Registering the id_resolver key type
[    0.917858] Key type id_resolver registered
[    0.922120] Key type id_legacy registered
[    0.926200] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.932962] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.939509] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.946896] orangefs_debugfs_init: called with debug mask: :none: :0:
[    0.953501] orangefs_init: module version upstream loaded
[    0.960787] Key type asymmetric registered
[    0.964949] Asymmetric key parser 'x509' registered
[    0.969925] bounce: pool size: 64 pages
[    0.973898] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
[    0.981352] io scheduler noop registered
[    0.985340] io scheduler deadline registered
[    0.989693] io scheduler cfq registered (default)
[    0.995257] armada-38x-pinctrl f1018000.pinctrl: registered pinctrl driver
[    1.003688] mvebu-pcie soc:pcie-controller: PCI host bridge to bus 0000:00
[    1.010634] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    1.016956] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xe7ffffff]
[    1.023890] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.029823] PCI: bus0: Fast back to back transfers disabled
[    1.035459] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.043527] pci 0000:00:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.051691] PCI: bus1: Fast back to back transfers enabled
[    1.057342] PCI: bus2: Fast back to back transfers enabled
[    1.062933] pci 0000:00:01.0: PCI bridge to [bus 01]
[    1.067961] pci 0000:00:02.0: PCI bridge to [bus 02]
[    1.073408] mv_xor f1060800.xor: Marvell shared XOR driver
[    1.138980] mv_xor f1060800.xor: Marvell XOR (Descriptor Mode): ( xor cpy intr )
[    1.146580] mv_xor f1060900.xor: Marvell shared XOR driver
[    1.208975] mv_xor f1060900.xor: Marvell XOR (Descriptor Mode): ( xor cpy intr )
[    1.258980] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    1.266640] console [ttyS0] disabled
[    1.290385] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 22, base_baud = 12500000) is a 16550A
[    1.299440] console [ttyS0] enabled
[    1.299440] console [ttyS0] enabled
[    1.306528] bootconsole [earlycon0] disabled
[    1.306528] bootconsole [earlycon0] disabled
[    1.316108] ahci-mvebu f10a8000.sata: AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl platform mode
[    1.325214] ahci-mvebu f10a8000.sata: flags: 64bit ncq sntf led only pmp fbs pio slum part sxs
[    1.334760] scsi host0: ahci-mvebu
[    1.338441] scsi host1: ahci-mvebu
[    1.342075] ata1: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x100 irq 42
[    1.350038] ata2: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x180 irq 42
[    1.358118] ahci-mvebu f10e0000.sata: AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl platform mode
[    1.367217] ahci-mvebu f10e0000.sata: flags: 64bit ncq sntf led only pmp fbs pio slum part sxs
[    1.376591] scsi host2: ahci-mvebu
[    1.380237] scsi host3: ahci-mvebu
[    1.383789] ata3: SATA max UDMA/133 mmio [mem 0xf10e0000-0xf10e1fff] port 0x100 irq 43
[    1.391754] ata4: SATA max UDMA/133 mmio [mem 0xf10e0000-0xf10e1fff] port 0x180 irq 43
[    1.400175] pxa3xx-nand f10d0000.flash: This platform can't do DMA on this device
[    1.408024] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xdc
[    1.414418] nand: Hynix H27U4G8F2DTR-BC
[    1.418270] nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    1.425881] pxa3xx-nand f10d0000.flash: ECC strength 16, ECC step size 2048
[    1.433072] Bad block table found at page 262080, version 0x01
[    1.439262] Bad block table found at page 262016, version 0x01
[    1.445292] nand_read_bbt: bad block at 0x00000dcc0000
[    1.450462] nand_read_bbt: bad block at 0x00000fb00000
[    1.455622] nand_read_bbt: bad block at 0x000012180000
[    1.460787] nand_read_bbt: bad block at 0x0000139a0000
[    1.465948] nand_read_bbt: bad block at 0x000017880000
[    1.471115] nand_read_bbt: bad block at 0x0000178a0000
[    1.476276] nand_read_bbt: bad block at 0x00001a640000
[    1.481442] nand_read_bbt: bad block at 0x00001e9c0000
[    1.486639] 8 ofpart partitions found on MTD device pxa3xx_nand-0
[    1.492767] Creating 8 MTD partitions on "pxa3xx_nand-0":
[    1.498189] 0x000000000000-0x000000500000 : "U-Boot"
[    1.513855] 0x000000500000-0x000000f00000 : "uImage"
[    1.519475] 0x000000a00000-0x000001900000 : "uRamdisk"
[    1.535267] 0x000000f00000-0x00001d700000 : "image.cfs"
[    1.552756] 0x00001c800000-0x000039f00000 : "rescue_fw"
[    1.558004] mtd: partition "rescue_fw" extends beyond the end of device "pxa3xx_nand-0" -- size truncated to 0x3800000
[    1.579543] 0x00001d700000-0x00003c200000 : "config"
[    1.584530] mtd: partition "config" extends beyond the end of device "pxa3xx_nand-0" -- size truncated to 0x2900000
[    1.605758] 0x00001eb00000-0x00003e000000 : "reserve1"
[    1.610932] mtd: partition "reserve1" extends beyond the end of device "pxa3xx_nand-0" -- size truncated to 0x1500000
[    1.622262] 0x00001f500000-0x00003f400000 : "reserve2"
[    1.627423] mtd: partition "reserve2" extends beyond the end of device "pxa3xx_nand-0" -- size truncated to 0xb00000
[    1.639233] m25p80 spi0.0: unrecognized JEDEC id bytes: ff, ff, ff
[    1.645891] libphy: Fixed MDIO Bus: probed
[    1.650293] libphy: mdio_driver_register: mv88e6085
[    1.655323] libphy: orion_mdio_bus: probed
[    1.665040] mvneta_bm f10c8000.bm: Buffer Manager for network controller enabled
[    1.674074] mvneta f1070000.ethernet eth0: Using random mac address e2:72:92:83:d3:29
[    1.683481] mvneta f1030000.ethernet eth1: Using random mac address f6:b2:55:63:6d:07
[    1.689844] ata1: SATA link down (SStatus 0 SControl 300)
[    1.697061] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.699983] ata2: SATA link down (SStatus 0 SControl 300)
[    1.709067] ehci-pci: EHCI PCI platform driver
[    1.713571] ehci-orion: EHCI orion driver
[    1.717695] orion-ehci f1058000.usb: EHCI Host Controller
[    1.723142] orion-ehci f1058000.usb: new USB bus registered, assigned bus number 1
[    1.729849] ata3: SATA link down (SStatus 0 SControl 300)
[    1.736222] orion-ehci f1058000.usb: irq 38, io mem 0xf1058000
[    1.739904] ata4: SATA link down (SStatus 0 SControl 300)
[    1.768590] orion-ehci f1058000.usb: USB 2.0 started, EHCI 1.00
[    1.774640] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    1.781471] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.788731] usb usb1: Product: EHCI Host Controller
[    1.793629] usb usb1: Manufacturer: Linux 4.9.0-mvebu-tld-12 ehci_hcd
[    1.800103] usb usb1: SerialNumber: f1058000.usb
[    1.805073] hub 1-0:1.0: USB hub found
[    1.808865] hub 1-0:1.0: 1 port detected
[    1.813250] xhci-hcd f10f0000.usb3: xHCI Host Controller
[    1.818609] xhci-hcd f10f0000.usb3: new USB bus registered, assigned bus number 2
[    1.826196] xhci-hcd f10f0000.usb3: hcc params 0x0a000990 hci version 0x100 quirks 0x00010010
[    1.834787] xhci-hcd f10f0000.usb3: irq 46, io mem 0xf10f0000
[    1.840646] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[    1.847464] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.854739] usb usb2: Product: xHCI Host Controller
[    1.859646] usb usb2: Manufacturer: Linux 4.9.0-mvebu-tld-12 xhci-hcd
[    1.866114] usb usb2: SerialNumber: f10f0000.usb3
[    1.871139] hub 2-0:1.0: USB hub found
[    1.874919] hub 2-0:1.0: 1 port detected
[    1.879025] xhci-hcd f10f0000.usb3: xHCI Host Controller
[    1.884365] xhci-hcd f10f0000.usb3: new USB bus registered, assigned bus number 3
[    1.891938] usb usb3: We don't know the algorithms for LPM for this host, disabling LPM.
[    1.900135] usb usb3: New USB device found, idVendor=1d6b, idProduct=0003
[    1.906953] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.914213] usb usb3: Product: xHCI Host Controller
[    1.919175] usb usb3: Manufacturer: Linux 4.9.0-mvebu-tld-12 xhci-hcd
[    1.925643] usb usb3: SerialNumber: f10f0000.usb3
[    1.930649] hub 3-0:1.0: USB hub found
[    1.934430] hub 3-0:1.0: 1 port detected
[    1.938598] xhci-hcd f10f8000.usb3: xHCI Host Controller
[    1.943942] xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 4
[    1.951524] xhci-hcd f10f8000.usb3: hcc params 0x0a000990 hci version 0x100 quirks 0x00010010
[    1.960122] xhci-hcd f10f8000.usb3: irq 47, io mem 0xf10f8000
[    1.965969] usb usb4: New USB device found, idVendor=1d6b, idProduct=0002
[    1.972796] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.980056] usb usb4: Product: xHCI Host Controller
[    1.984953] usb usb4: Manufacturer: Linux 4.9.0-mvebu-tld-12 xhci-hcd
[    1.991464] usb usb4: SerialNumber: f10f8000.usb3
[    1.996465] hub 4-0:1.0: USB hub found
[    2.000257] hub 4-0:1.0: 1 port detected
[    2.004356] xhci-hcd f10f8000.usb3: xHCI Host Controller
[    2.009706] xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 5
[    2.017262] usb usb5: We don't know the algorithms for LPM for this host, disabling LPM.
[    2.025451] usb usb5: New USB device found, idVendor=1d6b, idProduct=0003
[    2.032279] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.039585] usb usb5: Product: xHCI Host Controller
[    2.044482] usb usb5: Manufacturer: Linux 4.9.0-mvebu-tld-12 xhci-hcd
[    2.050958] usb usb5: SerialNumber: f10f8000.usb3
[    2.055945] hub 5-0:1.0: USB hub found
[    2.059739] hub 5-0:1.0: 1 port detected
[    2.063926] usbcore: registered new interface driver usblp
[    2.069514] usbcore: registered new interface driver usb-storage
[    2.075714] mousedev: PS/2 mouse device common for all mice
[    2.081672] armada38x-rtc f10a3800.rtc: rtc core: registered f10a3800.rtc as rtc0
[    2.089396] i2c /dev entries driver
[    2.104196] orion_wdt: Initial timeout 171 sec
[    2.109883] marvell-cesa f1090000.crypto: CESA device successfully registered
[    2.117154] hidraw: raw HID events driver (C) Jiri Kosina
[    2.122781] usbcore: registered new interface driver usbhid
[    2.128377] usbhid: USB HID core driver
[    2.132357] drop_monitor: Initializing network drop monitor service
[    2.138692] Netfilter messages via NETLINK v0.30.
[    2.143426] ip_set: protocol 6
[    2.146660] NET: Registered protocol family 10
[    2.151843] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    2.158512] NET: Registered protocol family 17
[    2.163116] 8021q: 802.1Q VLAN Support v1.8
[    2.167337] Key type dns_resolver registered
[    2.171813] ThumbEE CPU extension supported.
[    2.176106] Registering SWP/SWPB emulation handler
[    2.181270] registered taskstats version 1
[    2.185385] Loading compiled-in X.509 certificates
[    2.190238] zswap: loaded using pool lzo/zbud
[    2.236593] Key type big_key registered
[    2.240480] usb 2-1: new high-speed USB device number 2 using xhci-hcd
[    2.250477] Key type encrypted registered
[    2.255439] armada38x-rtc f10a3800.rtc: setting system clock to 2017-06-16 09:00:59 UTC (1497603659)
[    2.265625] Freeing unused kernel memory: 1024K (c0c00000 - c0d00000)
Loading, please wait...
[    2.304034] systemd-udevd[1348]: starting version 215
[    2.310126] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    2.408931] usb 2-1: New USB device found, idVendor=045b, idProduct=0209
[    2.415676] usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.426174] hub 2-1:1.0: USB hub found
[    2.431933] hub 2-1:1.0: 4 ports detected
[    2.548854] usb 3-1: new SuperSpeed USB device number 2 using xhci-hcd
[    2.580175] usb 3-1: New USB device found, idVendor=045b, idProduct=0210
[    2.586907] usb 3-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.594659] hub 3-1:1.0: USB hub found
[    2.598673] hub 3-1:1.0: 4 ports detected
[    2.758594] usb 2-1.3: new high-speed USB device number 3 using xhci-hcd
[    2.889219] usb 2-1.3: New USB device found, idVendor=0781, idProduct=5571
[    2.896125] usb 2-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    2.903477] usb 2-1.3: Product: Cruzer Fit
[    2.907591] usb 2-1.3: Manufacturer: SanDisk
[    2.911885] usb 2-1.3: SerialNumber: 4C530302071223122304
[    2.918128] usb-storage 2-1.3:1.0: USB Mass Storage device detected
[    2.924575] scsi host4: usb-storage 2-1.3:1.0
[    2.930494] usbcore: registered new interface driver uas
[    4.009112] scsi 4:0:0:0: Direct-Access     SanDisk  Cruzer Fit       1.00 PQ: 0 ANSI: 6
[    4.019456] sd 4:0:0:0: Attached scsi generic sg0 type 0
[    4.025527] sd 4:0:0:0: [sda] 61489152 512-byte logical blocks: (31.5 GB/29.3 GiB)
[    4.034021] sd 4:0:0:0: [sda] Write Protect is off
[    4.039143] sd 4:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[    4.051358]  sda: sda1
[    4.055265] sd 4:0:0:0: [sda] Attached SCSI removable disk
[    4.069405] random: fast init done
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
modprobe: module ext3 not found in modules.dep
Begin: Will now check root file system ... fsck from util-linux 2.25.2
fsck: error 2 (No such file or directory) while executing fsck.ext3 for /dev/sda1
fsck exited with status code 8
done.
Warning: File system check failed but did not detect errors
[   17.713617] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
[   17.729582] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
INIT: version 2.88 booting
[info] Using makefile-style concurrent boot in runlevel S.
[....] Starting the hotplug events dispatcher: udevd[   18.499917] systemd-udevd[1555]: starting version 215
. ok
[ ok ] Synthesizing the initial hotplug events...done.
[ ok ] Waiting for /dev to be fully populated...done.
[ ok ] Activating swap...done.
[   19.136288] EXT4-fs (sda1): re-mounted. Opts: (null)
[....] Checking root file system...fsck from util-linux 2.25.2
rootfs: clean, 34187/1925120 files, 319002/7685888 blocks
done.
[   19.255810] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro
[ ok ] Activating lvm and md swap...done.
[....] Checking file systems...fsck from util-linux 2.25.2
done.
[ ok ] Cleaning up temporary files... /tmp.
[ ok ] Mounting local filesystems...done.
[ ok ] Activating swapfile swap...done.
[ ok ] Cleaning up temporary files....
[ ok ] Setting kernel variables ...done.
[   20.308982] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[....] Configuring network interfaces...Internet Systems Consortium DHCP Client 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/e2:72:92:83:d3:29
Sending on   LPF/eth0/e2:72:92:83:d3:29
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 17
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 13
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
done.
[ ok ] Starting rpcbind daemon....
[ ok ] Starting NFS common utilities: statd idmapd.
[ ok ] Cleaning up temporary files....
INIT: Entering runlevel: 2
[info] Using makefile-style concurrent boot in runl[   81.752872] random: crng init done
evel 2.
[warn] Not starting NFS kernel daemon: no exports. ... (warning).
[....] Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
2503 (syslogd)
. ok
[ ok ] Starting periodic command scheduler: cron.
[ ok ] Starting NTP server: ntpd.
[ ok ] Starting OpenBSD Secure Shell server: sshd.
[ ok ] Starting system message bus: dbus.
[ ok ] Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
[....] Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
2502 (klogd)
. ok

Debian GNU/Linux 8 debian ttyS0

debian login: root
Password:
Last login: Fri Jun 16 01:09:52 PDT 2017 on ttyS0
Linux debian 4.9.0-mvebu-tld-12 #2 SMP PREEMPT Wed Feb 1 02:31:29 PST 2017 armv7l

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

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
debian

WD My Cloud EX4100
Linux version 4.9.0-mvebu-tld-12 (root@tldDebianVM) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) ) #2 SMP PREEMPT Wed Feb 1 02:31:29 PST 2017
 02:02:46 up 1 min,  1 user,  load average: 0.00, 0.00, 0.00
root@debian:~#

-
happy hacking,

saschadd
Re: Debian on WD MyCloud EX 4100
June 16, 2017 02:59PM
saschadd,

> now cat /proc/mtd gives me correct
>
> dev:    size   erasesize  name
> mtd0: 00500000 00020000 "U-Boot"
> mtd1: 00a00000 00020000 "uImage"
> mtd2: 00f00000 00020000 "uRamdisk"
> mtd3: 1c800000 00020000 "image.cfs"
> mtd4: 03800000 00020000 "rescue_fw"
> mtd5: 02900000 00020000 "config"
> mtd6: 01500000 00020000 "reserve1"
> mtd7: 00b00000 00020000 "reserve2"
>

Cool!

> sudo ./kwboot -f -t -B 115200 /dev/ttyAMA0 -b u-bo
> ot-a38x-Ylowstone_2014T30p6_bodhi-tld-1-nand-uart.
> bin -s 0 -q 1
> Sending boot message. Please reboot the target...|

> U-Boot 2013.01_v1.06 (Jun 08 2017 - 21:25:53) Marv
> ell version: 2014_T3.0p6 - bodhi-tld-1

Looks like you can kwboot at will now? You guys inspired me to go back to the NAS326 and try this new kwboot again :)

> /dev/mtd0 0x100000 0x80000 0x20000 in /etc/fw_env.
> config gives me
> 
> Warning: Bad CRC, using default environment
> bootargs=
> bootcmd=bootp; setenv bootargs root=/dev/nfs nfsro
> ot=${serverip}:${rootpath} ip=${ipaddr}:${serverip
> }:${gatewayip}:${netmask}:${hostname}::off; bootm
> bootdelay=3
> baudrate=115200
> stdin=serial,cros-ec-keyb
> stdout=serial,lcd
> stderr=serial,lcd
> 
> /dev/mtd0 0x500000 0x80000 0x20000  in /etc/fw_env
> .config gives me
> Cannot read bad block mark: Invalid argument
>

I think perhaps it's time to try bobafethotmail's script. It'll be quicker than try to track down this location in GPL (it is no fun reading WD code):
http://forum.doozan.com/read.php?3,32225

I am guessing the envs are in in the 2nd 1MB. But you can run this script as is, first. If we can't find the envs location there in 1st 1MB, then: change this script to scan the entire 5M for mtd0 and mtd1 (it currently scans only the first 1MB).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on WD MyCloud EX 4100
June 16, 2017 09:30PM
saschadd,

I've modified the script to find the envs location in the first 2MB.

Boot the EX4100 into Debian. Download attached script. And run it at the shell prompt.

cd /tmp
wget http://forum.doozan.com/file.php?2,file=1374,filename=find_uboot_env_location.sh
chmod +x find_uboot_env_location.sh
./find_uboot_env_location.sh

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



Edited 1 time(s). Last edit at 06/16/2017 09:30PM by bodhi.
Attachments:
open | download - find_uboot_env_location.sh (1.4 KB)
Re: Debian on WD MyCloud EX 4100
June 18, 2017 12:34PM
bodhi,

just tried your script but seems not to find anything


/dev/mtd0 0xe0000 0x20000 0x20000
stuff found at mtd0 e0000
Warning: Bad CRC, using default environment
bootargs=
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=3
baudrate=115200
stdin=serial,cros-ec-keyb
stdout=serial,lcd
stderr=serial,lcd
-----------------------------
/dev/mtd0 0xc0000 0x20000 0x20000
stuff found at mtd0 c0000
Warning: Bad CRC, using default environment
bootargs=
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=3
baudrate=115200
stdin=serial,cros-ec-keyb
stdout=serial,lcd
stderr=serial,lcd
-----------------------------
/dev/mtd0 0xa0000 0x20000 0x20000
stuff found at mtd0 a0000
Warning: Bad CRC, using default environment
bootargs=
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=3
baudrate=115200
stdin=serial,cros-ec-keyb
stdout=serial,lcd
stderr=serial,lcd
-----------------------------
/dev/mtd0 0x80000 0x20000 0x20000
stuff found at mtd0 80000
Warning: Bad CRC, using default environment
bootargs=
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=3
baudrate=115200
stdin=serial,cros-ec-keyb
stdout=serial,lcd
stderr=serial,lcd
-----------------------------
/dev/mtd0 0x60000 0x20000 0x20000
stuff found at mtd0 60000
Warning: Bad CRC, using default environment
bootargs=
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=3
baudrate=115200
stdin=serial,cros-ec-keyb
stdout=serial,lcd
stderr=serial,lcd
-----------------------------
/dev/mtd0 0x40000 0x20000 0x20000
stuff found at mtd0 40000
Warning: Bad CRC, using default environment
bootargs=
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=3
baudrate=115200
stdin=serial,cros-ec-keyb
stdout=serial,lcd
stderr=serial,lcd
-----------------------------
/dev/mtd0 0x20000 0x20000 0x20000
stuff found at mtd0 20000
Warning: Bad CRC, using default environment
bootargs=
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=3
baudrate=115200
stdin=serial,cros-ec-keyb
stdout=serial,lcd
stderr=serial,lcd
-----------------------------
/dev/mtd0 0x0 0x20000 0x20000
stuff found at mtd0 0
Warning: Bad CRC, using default environment
bootargs=
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=3
baudrate=115200
stdin=serial,cros-ec-keyb
stdout=serial,lcd
stderr=serial,lcd
-----------------------------
stuff found at mtd1 1e0000
Warning: Bad CRC, using default environment
bootargs=
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=3
baudrate=115200
stdin=serial,cros-ec-keyb
stdout=serial,lcd
stderr=serial,lcd
-----------------------------
stuff found at mtd1 1c0000
Warning: Bad CRC, using default environment
bootargs=
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=3
baudrate=115200
stdin=serial,cros-ec-keyb
stdout=serial,lcd
stderr=serial,lcd
-----------------------------
stuff found at mtd1 1a0000
Warning: Bad CRC, using default environment
bootargs=
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=3
baudrate=115200
stdin=serial,cros-ec-keyb
stdout=serial,lcd
stderr=serial,lcd
-----------------------------
stuff found at mtd1 180000
Warning: Bad CRC, using default environment
bootargs=
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=3
baudrate=115200
stdin=serial,cros-ec-keyb
stdout=serial,lcd
stderr=serial,lcd
-----------------------------
stuff found at mtd1 160000
Warning: Bad CRC, using default environment
bootargs=
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=3
baudrate=115200
stdin=serial,cros-ec-keyb
stdout=serial,lcd
stderr=serial,lcd
-----------------------------
stuff found at mtd1 140000
Warning: Bad CRC, using default environment
bootargs=
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=3
baudrate=115200
stdin=serial,cros-ec-keyb
stdout=serial,lcd
stderr=serial,lcd
-----------------------------
stuff found at mtd1 120000
Warning: Bad CRC, using default environment
bootargs=
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=3
baudrate=115200
stdin=serial,cros-ec-keyb
stdout=serial,lcd
stderr=serial,lcd
-----------------------------
stuff found at mtd1 100000
Warning: Bad CRC, using default environment
bootargs=
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=3
baudrate=115200
stdin=serial,cros-ec-keyb
stdout=serial,lcd
stderr=serial,lcd
-----------------------------
stuff found at mtd1 e0000
Warning: Bad CRC, using default environment
bootargs=
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=3
baudrate=115200
stdin=serial,cros-ec-keyb
stdout=serial,lcd
stderr=serial,lcd
-----------------------------
stuff found at mtd1 c0000
Warning: Bad CRC, using default environment
bootargs=
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=3
baudrate=115200
stdin=serial,cros-ec-keyb
stdout=serial,lcd
stderr=serial,lcd
-----------------------------
stuff found at mtd1 a0000
Warning: Bad CRC, using default environment
bootargs=
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=3
baudrate=115200
stdin=serial,cros-ec-keyb
stdout=serial,lcd
stderr=serial,lcd
-----------------------------
stuff found at mtd1 80000
Warning: Bad CRC, using default environment
bootargs=
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=3
baudrate=115200
stdin=serial,cros-ec-keyb
stdout=serial,lcd
stderr=serial,lcd
-----------------------------
stuff found at mtd1 60000
Warning: Bad CRC, using default environment
bootargs=
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=3
baudrate=115200
stdin=serial,cros-ec-keyb
stdout=serial,lcd
stderr=serial,lcd
-----------------------------
stuff found at mtd1 40000
Warning: Bad CRC, using default environment
bootargs=
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=3
baudrate=115200
stdin=serial,cros-ec-keyb
stdout=serial,lcd
stderr=serial,lcd
-----------------------------
stuff found at mtd1 20000
Warning: Bad CRC, using default environment
bootargs=
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=3
baudrate=115200
stdin=serial,cros-ec-keyb
stdout=serial,lcd
stderr=serial,lcd
-----------------------------
stuff found at mtd1 0
Warning: Bad CRC, using default environment
bootargs=
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=3
baudrate=115200
stdin=serial,cros-ec-keyb
stdout=serial,lcd
stderr=serial,lcd
-----------------------------



Edited 1 time(s). Last edit at 06/18/2017 01:41PM by saschadd.
Re: Debian on WD MyCloud EX 4100
June 18, 2017 03:26PM
@bodhi: Perhaps a stupid question, but couldn't we have saschadd dump mtd0 and then we grep through it to find a known u-boot variable?

It seems this would at least allow us to narrow down where the appropriate region is.
Re: Debian on WD MyCloud EX 4100
June 18, 2017 04:21PM
@hmartin,

> have saschadd dump mtd0 and then we grep through i
> t to find a known u-boot variable?
>
> It seems this would at least allow us to narrow do
> wn where the appropriate region is.

Yes, the script does that to. But better than just grepping. If the envs are there, it will print a listing so we dont have to decipher.

But agreed, grepping is good enough to recongnize where it is.

@saschadd,

It means there is nothing in the first 2MB. I would modify the script to scan the entire 5MB of mtd0. But following hmartin suggestion, you could also dump mtd0, and mtd1 and grep a known u-boot env. You did dump these mtds before. Let's grep them.

In your mtd dumps folder wd_ext4100/no_oob_ecc

grep -i bootcmd  mtd0
grep -i bootcmd  mtd1

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on WD MyCloud EX 4100
June 18, 2017 04:45PM
bodhi,

just tried it

grep -i bootcmd mtd0 gives me

matches in binary file mtd0.

grep -i bootcmd mtd1 gives nothing.
Re: Debian on WD MyCloud EX 4100
June 18, 2017 04:57PM
saschadd Wrote:
-------------------------------------------------------
> bodhi,
>
> just tried it
>
> grep -i bootcmd mtd0 gives me
>
> matches in binary file mtd0.
>
> grep -i bootcmd mtd1 gives nothing.

OK so mtd0. But it also can be the code that gave positive result.

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



Edited 3 time(s). Last edit at 06/18/2017 05:08PM by bodhi.
Re: Debian on WD MyCloud EX 4100
June 19, 2017 02:02PM
Quote
saschadd
grep -i bootcmd mtd0 gives me

matches in binary file mtd0.

Could you please try the following:
hexdump -C mtd0 | grep -A 5 -i bootcmd

Because hexdump might cut the lines, could you also try:
hexdump -C mtd0 | grep -A 5 -i 115200
Re: Debian on WD MyCloud EX 4100
June 19, 2017 02:13PM
bodhi,

hexdump -C mtd0 | grep -A 5 -i bootcmd gives

000b82f0 65 6e 74 20 62 6f 6f 74 63 6d 64 3a 20 25 73 0a |ent bootcmd: %s.|
000b8300 00 0a 50 65 72 6d 61 6e 65 6e 74 20 63 6f 6e 73 |..Permanent cons|
000b8310 6f 6c 65 3a 20 25 73 0a 00 69 70 61 64 64 72 00 |ole: %s..ipaddr.|
000b8320 73 65 72 76 65 72 69 70 00 62 6f 6f 74 61 72 67 |serverip.bootarg|
000b8330 73 5f 65 6e 64 00 65 74 68 31 61 64 64 72 00 73 |s_end.eth1addr.s|
000b8340 65 74 65 6e 76 20 62 6f 6f 74 61 72 67 73 20 24 |etenv bootargs $|
--
000b9900 20 62 6f 6f 74 63 6d 64 20 24 62 6f 6f 74 63 6d | bootcmd $bootcm|
000b9910 64 5f 66 64 74 5f 62 6f 6f 74 00 62 6f 6f 74 63 |d_fdt_boot.bootc|
000b9920 6d 64 5f 66 64 74 00 74 66 74 70 62 6f 6f 74 20 |md_fdt.tftpboot |
000b9930 30 78 32 30 30 30 30 30 30 20 24 69 6d 61 67 65 |0x2000000 $image|
000b9940 5f 6e 61 6d 65 3b 74 66 74 70 62 6f 6f 74 20 24 |_name;tftpboot $|
000b9950 66 64 74 61 64 64 72 20 24 66 64 74 66 69 6c 65 |fdtaddr $fdtfile|
--
000bdaa0 2c 20 72 75 6e 20 27 62 6f 6f 74 63 6d 64 27 00 |, run 'bootcmd'.|
000bdab0 62 6f 6f 74 6d 00 62 6f 6f 74 20 61 70 70 6c 69 |bootm.boot appli|
000bdac0 63 61 74 69 6f 6e 20 69 6d 61 67 65 20 66 72 6f |cation image fro|
000bdad0 6d 20 6d 65 6d 6f 72 79 00 6c 6f 61 64 6f 73 00 |m memory.loados.|
000bdae0 72 61 6d 64 69 73 6b 00 63 6d 64 6c 69 6e 65 00 |ramdisk.cmdline.|
000bdaf0 62 64 74 00 70 72 65 70 00 4c 69 73 74 20 6f 66 |bdt.prep.List of|
--
000cd190 62 6f 6f 74 63 6d 64 5f 6c 67 63 79 00 74 66 74 |bootcmd_lgcy.tft|
000cd1a0 70 62 6f 6f 74 20 30 78 32 30 30 30 30 30 30 20 |pboot 0x2000000 |
000cd1b0 24 69 6d 61 67 65 5f 6e 61 6d 65 3b 20 73 65 74 |$image_name; set|
000cd1c0 65 6e 76 20 62 6f 6f 74 61 72 67 73 20 24 62 6f |env bootargs $bo|
000cd1d0 6f 74 61 72 67 73 5f 64 66 6c 74 3b 20 62 6f 6f |otargs_dflt; boo|
000cd1e0 74 6d 20 30 78 32 30 30 30 30 30 30 3b 20 00 3a |tm 0x2000000; .:|
--
000cd450 5f 62 6f 6f 74 63 6d 64 00 72 75 6e 20 6e 65 74 |_bootcmd.run net|
000cd460 62 73 64 5f 67 65 74 20 3b 20 72 75 6e 20 6e 65 |bsd_get ; run ne|
000cd470 74 62 73 64 5f 73 65 74 5f 61 72 67 73 20 3b 20 |tbsd_set_args ; |
000cd480 72 75 6e 20 6e 65 74 62 73 64 5f 62 6f 6f 74 00 |run netbsd_boot.|
000cd490 76 78 77 6f 72 6b 73 5f 65 6e 00 6d 67 69 28 30 |vxworks_en.mgi(0|
000cd4a0 2c 30 29 20 68 6f 73 74 3a 76 78 57 6f 72 6b 73 |,0) host:vxWorks|

hexdump -C mtd0 | grep -A 5 -i 115200 gives

000b0570 74 79 53 30 2c 31 31 35 32 30 30 00 62 6f 6f 74 |tyS0,115200.boot|
000b0580 64 65 6c 61 79 3d 31 00 62 61 75 64 72 61 74 65 |delay=1.baudrate|
000b0590 3d 31 31 35 32 30 30 00 6c 6f 61 64 73 5f 65 63 |=115200.loads_ec|
000b05a0 68 6f 3d 30 00 69 70 61 64 64 72 3d 32 2e 36 36 |ho=0.ipaddr=2.66|
000b05b0 2e 36 36 2e 32 30 33 00 73 65 72 76 65 72 69 70 |.66.203.serverip|
000b05c0 3d 32 2e 36 36 2e 36 36 2e 33 32 00 72 6f 6f 74 |=2.66.66.32.root|
000b05d0 70 61 74 68 3d 2f 73 72 76 2f 6e 66 73 2f 00 6e |path=/srv/nfs/.n|
000b05e0 65 74 6d 61 73 6b 3d 32 35 35 2e 32 35 35 2e 32 |etmask=255.255.2|
--
000b0630 61 75 64 72 61 74 65 3d 31 31 35 32 30 30 00 6c |audrate=115200.l|
000b0640 6f 61 64 73 5f 65 63 68 6f 3d 30 00 69 70 61 64 |oads_echo=0.ipad|
000b0650 64 72 3d 32 2e 36 36 2e 36 36 2e 32 30 33 00 73 |dr=2.66.66.203.s|
000b0660 65 72 76 65 72 69 70 3d 32 2e 36 36 2e 36 36 2e |erverip=2.66.66.|
000b0670 33 32 00 72 6f 6f 74 70 61 74 68 3d 2f 73 72 76 |32.rootpath=/srv|
000b0680 2f 6e 66 73 2f 00 6e 65 74 6d 61 73 6b 3d 32 35 |/nfs/.netmask=25|
--
000b82e0 30 2c 31 31 35 32 30 30 00 0a 50 65 72 6d 61 6e |0,115200..Perman|
000b82f0 65 6e 74 20 62 6f 6f 74 63 6d 64 3a 20 25 73 0a |ent bootcmd: %s.|
000b8300 00 0a 50 65 72 6d 61 6e 65 6e 74 20 63 6f 6e 73 |..Permanent cons|
000b8310 6f 6c 65 3a 20 25 73 0a 00 69 70 61 64 64 72 00 |ole: %s..ipaddr.|
000b8320 73 65 72 76 65 72 69 70 00 62 6f 6f 74 61 72 67 |serverip.bootarg|
000b8330 73 5f 65 6e 64 00 65 74 68 31 61 64 64 72 00 73 |s_end.eth1addr.s|
--
000cdd30 65 3d 74 74 79 53 30 2c 31 31 35 32 30 30 20 65 |e=ttyS0,115200 e|
000cdd40 61 72 6c 79 70 72 69 6e 74 6b 3d 74 74 79 53 30 |arlyprintk=ttyS0|
000cdd50 20 72 6f 6f 74 3d 2f 64 65 76 2f 73 64 61 32 20 | root=/dev/sda2 |
000cdd60 72 6f 20 70 6d 5f 64 69 73 61 62 6c 65 00 73 65 |ro pm_disable.se|
000cdd70 74 65 6e 76 20 62 6f 6f 74 61 72 67 73 20 00 62 |tenv bootargs .b|
000cdd80 6f 6f 74 5f 73 6f 75 72 63 65 5f 64 65 76 69 63 |oot_source_devic|
Re: Debian on WD MyCloud EX 4100
June 19, 2017 02:16PM
So unless I am totally misreading this, the ubootenv should start around 0xb0000.



Edited 1 time(s). Last edit at 06/19/2017 02:17PM by hmartin.
Re: Debian on WD MyCloud EX 4100
June 19, 2017 06:39PM
saschadd,

Ccould you do also the same for mtd1. There should be 2 regions that show the same output.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on WD MyCloud EX 4100
June 20, 2017 12:50AM
hexdump -C mtd1 | grep -A 5 -i bootcmd gives nothing


hexdump -C mtd1 | grep -A 5 -i 115200 gives

00115200 1a ac ff a6 b4 61 ae 91 fe 5d 85 7e ff f5 a7 b9 |.....a...].~....|
00115210 6c 6f b2 d3 5b 17 ed f4 ea 8d f9 69 8e d3 51 7e |lo..[......i..Q~|
00115220 79 71 55 5e 49 22 19 62 99 a7 e9 3e 7f e8 df 7b |yqU^I".b...>...{|
00115230 25 3f 43 be 9e 66 95 c6 58 ef c5 de b3 2e da e6 |%?C..f..X.......|
00115240 65 45 0f 7e b9 f8 04 93 9e 17 9b 2d 26 fa 67 24 |eE.~.......-&.g$|
00115250 fb 33 1c 6f c2 78 5e ec 82 9e 2e a3 5f 1a d7 cc |.3.o.x^....._...|
--
003e42e0 30 2c 31 31 35 32 30 30 20 65 61 72 6c 79 70 72 |0,115200 earlypr|
003e42f0 69 6e 74 6b 00 00 00 00 00 00 00 02 00 00 00 01 |intk............|
003e4300 61 6c 69 61 73 65 73 00 00 00 00 03 00 00 00 1e |aliases.........|
003e4310 00 00 00 35 2f 73 6f 63 2f 69 6e 74 65 72 6e 61 |...5/soc/interna|
003e4320 6c 2d 72 65 67 73 2f 67 70 69 6f 40 31 38 31 30 |l-regs/gpio@1810|
003e4330 30 00 00 00 00 00 00 03 00 00 00 1e 00 00 00 3b |0..............;|
Re: Debian on WD MyCloud EX 4100
June 20, 2017 03:20AM
saschadd,

003e42e0 30 2c 31 31 35 32 30 30 20 65 61 72 6c 79 70 72 |0,115200 earlypr| 
003e42f0 69 6e 74 6b 00 00 00 00 00 00 00 02 00 00 00 01 |intk............| 
003e4300 61 6c 69 61 73 65 73 00 00 00 00 03 00 00 00 1e |aliases.........| 
003e4310 00 00 00 35 2f 73 6f 63 2f 69 6e 74 65 72 6e 61 |...5/soc/interna| 
003e4320 6c 2d 72 65 67 73 2f 67 70 69 6f 40 31 38 31 30 |l-regs/gpio@1810| 
003e4330 30 00 00 00 00 00 00 03 00 00 00 1e 00 00 00 3b |0..............;|

The above indicates that mtd1 is the uImage with DTB embbedded.

Based on your grep for mtd0, it should be either at

/dev/mtd0 0xa0000  
/dev/mtd0 0xc0000

Could you boot into Dedian using USB or HDD rootfs, and double check the content of fw_env.config

cat /etc/fw_env.config

See if it is

# MTD device name	Device offset	Env. size	Flash sector size	Number of sectors
/dev/mtd0 0xc0000 0x20000 0x20000
or
# MTD device name	Device offset	Env. size	Flash sector size	Number of sectors
/dev/mtd0 0xa0000 0x20000 0x20000

Also noted is the spaces vs tabs in this file is important. All my Kirkwood boxes are with spaces as separator.

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



Edited 1 time(s). Last edit at 06/20/2017 03:20AM by bodhi.
Re: Debian on WD MyCloud EX 4100
June 20, 2017 03:41AM
bodhi Wrote:
-------------------------------------------------------
> Could you boot into Dedian using USB or HDD rootfs, and double check the content of fw_env.config

Booted the usb via kwboot and did

one space as separator

nano /etc/fw_env.config

# MTD device name Device offset Env. size Flash sector size $
/dev/mtd0 0xc0000 0x20000 0x20000

fw_printenv

Warning: Bad CRC, using default environment
bootargs=
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=3
baudrate=115200
stdin=serial,cros-ec-keyb
stdout=serial,lcd
stderr=serial,lcd

nano /etc/fw_env.config

# MTD device name Device offset Env. size Flash sector size $
/dev/mtd0 0xa0000 0x20000 0x20000

fw_printenv

Warning: Bad CRC, using default environment
bootargs=
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=3
baudrate=115200
stdin=serial,cros-ec-keyb
stdout=serial,lcd
stderr=serial,lcd

one tab as separator

nano /etc/fw_env.config

# MTD device name Device offset Env. size Flash sector size $
/dev/mtd0 0xa0000 0x20000 0x20000

fw_printenv

Warning: Bad CRC, using default environment
bootargs=
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=3
baudrate=115200
stdin=serial,cros-ec-keyb
stdout=serial,lcd
stderr=serial,lcd

nano /etc/fw_env.config

# MTD device name Device offset Env. size Flash sector size $
/dev/mtd0 0xc0000 0x20000 0x20000

fw_printenv

Warning: Bad CRC, using default environment
bootargs=
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=3
baudrate=115200
stdin=serial,cros-ec-keyb
stdout=serial,lcd
stderr=serial,lcd
Re: Debian on WD MyCloud EX 4100
June 20, 2017 03:57AM
saschadd,

Hold on. I've just double checked the stock u-boot build. It is close to 1MB :) so what we saw in the mtd0 grep at location less than 1MB were the internal envs in the code itself. Not the envs block that resides in NAND.

I guess you could grep all mtds and see where the envs will turn up.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on WD MyCloud EX 4100
June 20, 2017 04:19AM
bodhi,

i just dumped the mtd's again from within the usb booted debian.
what confuses me a bit is that the nanddump dumps mtd6 and mt7 as well while it gave an error "No such file or directory" at first try when we booted stock os.

another side note: see the "OOB size 64" part? i remember that i have read somewhere that wd stock firmware has somewhere something set to 64 instead of 4. Cant remember what it exactly was but maybe this is important?!

root@debian:/media/ex4100nandbackup# cd no_oob_ecc
root@debian:/media/ex4100nandbackup/no_oob_ecc# nanddump --noecc --omitoob -f mtd0 /dev/mtd0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x00500000...
root@debian:/media/ex4100nandbackup/no_oob_ecc# nanddump --noecc --omitoob -f mtd1 /dev/mtd1
 /dev/mtd7Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x00a00000...
root@debian:/media/ex4100nandbackup/no_oob_ecc# nanddump --noecc --omitoob -f mtd2 /dev/mtd2
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x00f00000...
root@debian:/media/ex4100nandbackup/no_oob_ecc# nanddump --noecc --omitoob -f mtd3 /dev/mtd3
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x1c800000...
root@debian:/media/ex4100nandbackup/no_oob_ecc# nanddump --noecc --omitoob -f mtd4 /dev/mtd4
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x03800000...
root@debian:/media/ex4100nandbackup/no_oob_ecc# nanddump --noecc --omitoob -f mtd5 /dev/mtd5
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x02900000...
root@debian:/media/ex4100nandbackup/no_oob_ecc# nanddump --noecc --omitoob -f mtd6 /dev/mtd6
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x01500000...
root@debian:/media/ex4100nandbackup/no_oob_ecc# nanddump --noecc --omitoob -f mtd7 /dev/mtd7
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x00b00000...
root@debian:/media/ex4100nandbackup/no_oob_ecc# dir
mtd0  mtd1  mtd2  mtd3  mtd4  mtd5  mtd6  mtd7
root@debian:/media/ex4100nandbackup/no_oob_ecc# cd ..
root@debian:/media/ex4100nandbackup# dir
no_oob_ecc  oob_ecc
root@debian:/media/ex4100nandbackup# cd oob_ecc
root@debian:/media/ex4100nandbackup/oob_ecc# nanddump -f mtd0 /dev/mtd0
ECC failed: 0
ECC corrected: 0
Number of bad blocks: 0
Number of bbt blocks: 0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x00500000...
root@debian:/media/ex4100nandbackup/oob_ecc# nanddump -f mtd1 /dev/mtd1
ECC failed: 0
ECC corrected: 0
Number of bad blocks: 0
Number of bbt blocks: 0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x00a00000...
root@debian:/media/ex4100nandbackup/oob_ecc# nanddump -f mtd2 /dev/mtd2
ECC failed: 0
ECC corrected: 0
Number of bad blocks: 0
Number of bbt blocks: 0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x00f00000...
root@debian:/media/ex4100nandbackup/oob_ecc# nanddump -f mtd3 /dev/mtd3
ECC failed: 0
ECC corrected: 0
Number of bad blocks: 7
Number of bbt blocks: 0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x1c800000...
root@debian:/media/ex4100nandbackup/oob_ecc# nanddump -f mtd4 /dev/mtd4
ECC failed: 0
ECC corrected: 0
Number of bad blocks: 1
Number of bbt blocks: 8
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x03800000...
root@debian:/media/ex4100nandbackup/oob_ecc# nanddump -f mtd5 /dev/mtd5
ECC failed: 0
ECC corrected: 0
Number of bad blocks: 1
Number of bbt blocks: 8
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x02900000...
root@debian:/media/ex4100nandbackup/oob_ecc# nanddump -f mtd6 /dev/mtd6
ECC failed: 0
ECC corrected: 0
Number of bad blocks: 0
Number of bbt blocks: 8
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x01500000...
root@debian:/media/ex4100nandbackup/oob_ecc# nanddump -f mtd7 /dev/mtd7
ECC failed: 0
ECC corrected: 0
Number of bad blocks: 0
Number of bbt blocks: 8
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x00b00000...
root@debian:/media/ex4100nandbackup/oob_ecc#



Edited 1 time(s). Last edit at 06/20/2017 04:21AM by saschadd.
Re: Debian on WD MyCloud EX 4100
June 20, 2017 04:38AM
saschadd,

> i just dumped the mtd's again from within the usb
> booted debian.
> what confuses me a bit is that the nanddump dumps
> mtd6 and mt7 as well while it gave an error "No su
> ch file or directory" at first try when we booted
> stock os.

I am not sure why stock OS did not recognize them. It should dump the mtds that are defined, and there is a NAND memory region corresponding to the definition.

>
> another side note: see the "OOB size 64" part? i r
> emember that i have read somewhere that wd stock f
> irmware has somewhere something set to 64 instead
> of 4. Cant remember what it exactly was but maybe
> this is important?!
>

The ECC and OOB keep track of extra info that are important only for your NAND. When you dump without ECC and OOB, it strips out those info, and just copying what is in NAND. So you see the even 128k-block size of the dumps, while dumps with ECC and OOB always have odd size that is not a multiple of 128K.

It is perfectly OK to look at the non-ECC non-OOB dumps, and ignore the dumps with ECC, OOB (which are only for backup purpose).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on WD MyCloud EX 4100
June 20, 2017 05:19AM
bodhi,

thanks for the info.
Well i will try to grep through all mtds this evening in round about 5 to 6 hours and post the output.
Re: Debian on WD MyCloud EX 4100
June 20, 2017 12:54PM
Hey bodhi, if the desire is just to change env variables to boot into Debian, then I found a way.

Add #define CONFIG_CMD_SAVEENV to include/configs/armada_38x.h in the WD u-boot source. Build, kwboot. You will have a working saveenv command.

I just tested it on my EX2100 to change serverip=192.168.11.114 to serverip=192.168.11.110

$ kwboot -f -t -B 115200 /dev/ttyUSB0 -b /tmp/u-boot-a38x-Yosemite_2014T3_PQ-nand-uart.bin -s 0 -q 1

(waiting)

Marvell>> printenv
...
serverip=192.168.11.114
...

Environment size: 3209/524284 bytes
Marvell>> setenv serverip 192.168.11.110
Marvell>> saveenv
Saving Environment to NAND...
Erasing Nand...
Writing to Nand... done
Marvell>> reset
resetting ...
Marvell>> printenv
...
serverip=192.168.11.110
...

Environment size: 3209/524284 bytes
Marvell>>

So even if we cannot figure it out in Linux yet, u-boot will be able to modify them so saschadd can boot Debian. Although the EX4100 has an issue with USB power, so maybe he needs to write your usb power modified u-boot to NAND.



Edited 1 time(s). Last edit at 06/20/2017 12:55PM by hmartin.
Re: Debian on WD MyCloud EX 4100
June 20, 2017 01:08PM
bodhi,

just grepped all the mtds.
following the outputs

Linux version 4.9.0-mvebu-tld-12 (root@tldDebianVM) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) ) #2 SMP PREEMPT Wed Feb 1 02:31:29 PST 2017
 10:11:24 up 18 min,  1 user,  load average: 0.00, 0.00, 0.00
root@debian:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00500000 00020000 "U-Boot"
mtd1: 00a00000 00020000 "uImage"
mtd2: 00f00000 00020000 "uRamdisk"
mtd3: 1c800000 00020000 "image.cfs"
mtd4: 03800000 00020000 "rescue_fw"
mtd5: 02900000 00020000 "config"
mtd6: 01500000 00020000 "reserve1"
mtd7: 00b00000 00020000 "reserve2"
root@debian:~# cd /media/ex4100nandbackup/no_oob_ecc
root@debian:/media/ex4100nandbackup/no_oob_ecc# hexdump -C mtd0 | grep -A 5 -i bootcmd
000b82f0  65 6e 74 20 62 6f 6f 74  63 6d 64 3a 20 25 73 0a  |ent bootcmd: %s.|
000b8300  00 0a 50 65 72 6d 61 6e  65 6e 74 20 63 6f 6e 73  |..Permanent cons|
000b8310  6f 6c 65 3a 20 25 73 0a  00 69 70 61 64 64 72 00  |ole: %s..ipaddr.|
000b8320  73 65 72 76 65 72 69 70  00 62 6f 6f 74 61 72 67  |serverip.bootarg|
000b8330  73 5f 65 6e 64 00 65 74  68 31 61 64 64 72 00 73  |s_end.eth1addr.s|
000b8340  65 74 65 6e 76 20 62 6f  6f 74 61 72 67 73 20 24  |etenv bootargs $|
--
000b9900  20 62 6f 6f 74 63 6d 64  20 24 62 6f 6f 74 63 6d  | bootcmd $bootcm|
000b9910  64 5f 66 64 74 5f 62 6f  6f 74 00 62 6f 6f 74 63  |d_fdt_boot.bootc|
000b9920  6d 64 5f 66 64 74 00 74  66 74 70 62 6f 6f 74 20  |md_fdt.tftpboot |
000b9930  30 78 32 30 30 30 30 30  30 20 24 69 6d 61 67 65  |0x2000000 $image|
000b9940  5f 6e 61 6d 65 3b 74 66  74 70 62 6f 6f 74 20 24  |_name;tftpboot $|
000b9950  66 64 74 61 64 64 72 20  24 66 64 74 66 69 6c 65  |fdtaddr $fdtfile|
--
000bdaa0  2c 20 72 75 6e 20 27 62  6f 6f 74 63 6d 64 27 00  |, run 'bootcmd'.|
000bdab0  62 6f 6f 74 6d 00 62 6f  6f 74 20 61 70 70 6c 69  |bootm.boot appli|
000bdac0  63 61 74 69 6f 6e 20 69  6d 61 67 65 20 66 72 6f  |cation image fro|
000bdad0  6d 20 6d 65 6d 6f 72 79  00 6c 6f 61 64 6f 73 00  |m memory.loados.|
000bdae0  72 61 6d 64 69 73 6b 00  63 6d 64 6c 69 6e 65 00  |ramdisk.cmdline.|
000bdaf0  62 64 74 00 70 72 65 70  00 4c 69 73 74 20 6f 66  |bdt.prep.List of|
--
000cd190  62 6f 6f 74 63 6d 64 5f  6c 67 63 79 00 74 66 74  |bootcmd_lgcy.tft|
000cd1a0  70 62 6f 6f 74 20 30 78  32 30 30 30 30 30 30 20  |pboot 0x2000000 |
000cd1b0  24 69 6d 61 67 65 5f 6e  61 6d 65 3b 20 73 65 74  |$image_name; set|
000cd1c0  65 6e 76 20 62 6f 6f 74  61 72 67 73 20 24 62 6f  |env bootargs $bo|
000cd1d0  6f 74 61 72 67 73 5f 64  66 6c 74 3b 20 62 6f 6f  |otargs_dflt; boo|
000cd1e0  74 6d 20 30 78 32 30 30  30 30 30 30 3b 20 00 3a  |tm 0x2000000; .:|
--
000cd450  5f 62 6f 6f 74 63 6d 64  00 72 75 6e 20 6e 65 74  |_bootcmd.run net|
000cd460  62 73 64 5f 67 65 74 20  3b 20 72 75 6e 20 6e 65  |bsd_get ; run ne|
000cd470  74 62 73 64 5f 73 65 74  5f 61 72 67 73 20 3b 20  |tbsd_set_args ; |
000cd480  72 75 6e 20 6e 65 74 62  73 64 5f 62 6f 6f 74 00  |run netbsd_boot.|
000cd490  76 78 77 6f 72 6b 73 5f  65 6e 00 6d 67 69 28 30  |vxworks_en.mgi(0|
000cd4a0  2c 30 29 20 68 6f 73 74  3a 76 78 57 6f 72 6b 73  |,0) host:vxWorks|
root@debian:/media/ex4100nandbackup/no_oob_ecc# hexdump -C mtd1 | grep -A 5 -i bootcmd
root@debian:/media/ex4100nandbackup/no_oob_ecc# hexdump -C mtd2 | grep -A 5 -i bootcmd
root@debian:/media/ex4100nandbackup/no_oob_ecc# hexdump -C mtd3 | grep -A 5 -i bootcmd
root@debian:/media/ex4100nandbackup/no_oob_ecc# hexdump -C mtd4 | grep -A 5 -i bootcmd
root@debian:/media/ex4100nandbackup/no_oob_ecc# hexdump -C mtd5 | grep -A 5 -i bootcmd
root@debian:/media/ex4100nandbackup/no_oob_ecc# hexdump -C mtd6 | grep -A 5 -i bootcmd
root@debian:/media/ex4100nandbackup/no_oob_ecc# hexdump -C mtd7 | grep -A 5 -i bootcmd
root@debian:/media/ex4100nandbackup/no_oob_ecc# hexdump -C mtd0 | grep -A 5 -i 115200
000b0570  74 79 53 30 2c 31 31 35  32 30 30 00 62 6f 6f 74  |tyS0,115200.boot|
000b0580  64 65 6c 61 79 3d 31 00  62 61 75 64 72 61 74 65  |delay=1.baudrate|
000b0590  3d 31 31 35 32 30 30 00  6c 6f 61 64 73 5f 65 63  |=115200.loads_ec|
000b05a0  68 6f 3d 30 00 69 70 61  64 64 72 3d 32 2e 36 36  |ho=0.ipaddr=2.66|
000b05b0  2e 36 36 2e 32 30 33 00  73 65 72 76 65 72 69 70  |.66.203.serverip|
000b05c0  3d 32 2e 36 36 2e 36 36  2e 33 32 00 72 6f 6f 74  |=2.66.66.32.root|
000b05d0  70 61 74 68 3d 2f 73 72  76 2f 6e 66 73 2f 00 6e  |path=/srv/nfs/.n|
000b05e0  65 74 6d 61 73 6b 3d 32  35 35 2e 32 35 35 2e 32  |etmask=255.255.2|
--
000b0630  61 75 64 72 61 74 65 3d  31 31 35 32 30 30 00 6c  |audrate=115200.l|
000b0640  6f 61 64 73 5f 65 63 68  6f 3d 30 00 69 70 61 64  |oads_echo=0.ipad|
000b0650  64 72 3d 32 2e 36 36 2e  36 36 2e 32 30 33 00 73  |dr=2.66.66.203.s|
000b0660  65 72 76 65 72 69 70 3d  32 2e 36 36 2e 36 36 2e  |erverip=2.66.66.|
000b0670  33 32 00 72 6f 6f 74 70  61 74 68 3d 2f 73 72 76  |32.rootpath=/srv|
000b0680  2f 6e 66 73 2f 00 6e 65  74 6d 61 73 6b 3d 32 35  |/nfs/.netmask=25|
--
000b82e0  30 2c 31 31 35 32 30 30  00 0a 50 65 72 6d 61 6e  |0,115200..Perman|
000b82f0  65 6e 74 20 62 6f 6f 74  63 6d 64 3a 20 25 73 0a  |ent bootcmd: %s.|
000b8300  00 0a 50 65 72 6d 61 6e  65 6e 74 20 63 6f 6e 73  |..Permanent cons|
000b8310  6f 6c 65 3a 20 25 73 0a  00 69 70 61 64 64 72 00  |ole: %s..ipaddr.|
000b8320  73 65 72 76 65 72 69 70  00 62 6f 6f 74 61 72 67  |serverip.bootarg|
000b8330  73 5f 65 6e 64 00 65 74  68 31 61 64 64 72 00 73  |s_end.eth1addr.s|
--
000cdd30  65 3d 74 74 79 53 30 2c  31 31 35 32 30 30 20 65  |e=ttyS0,115200 e|
000cdd40  61 72 6c 79 70 72 69 6e  74 6b 3d 74 74 79 53 30  |arlyprintk=ttyS0|
000cdd50  20 72 6f 6f 74 3d 2f 64  65 76 2f 73 64 61 32 20  | root=/dev/sda2 |
000cdd60  72 6f 20 70 6d 5f 64 69  73 61 62 6c 65 00 73 65  |ro pm_disable.se|
000cdd70  74 65 6e 76 20 62 6f 6f  74 61 72 67 73 20 00 62  |tenv bootargs .b|
000cdd80  6f 6f 74 5f 73 6f 75 72  63 65 5f 64 65 76 69 63  |oot_source_devic|
root@debian:/media/ex4100nandbackup/no_oob_ecc# hexdump -C mtd1 | grep -A 5 -i 115200
00115200  1a ac ff a6 b4 61 ae 91  fe 5d 85 7e ff f5 a7 b9  |.....a...].~....|
00115210  6c 6f b2 d3 5b 17 ed f4  ea 8d f9 69 8e d3 51 7e  |lo..[......i..Q~|
00115220  79 71 55 5e 49 22 19 62  99 a7 e9 3e 7f e8 df 7b  |yqU^I".b...>...{|
00115230  25 3f 43 be 9e 66 95 c6  58 ef c5 de b3 2e da e6  |%?C..f..X.......|
00115240  65 45 0f 7e b9 f8 04 93  9e 17 9b 2d 26 fa 67 24  |eE.~.......-&.g$|
00115250  fb 33 1c 6f c2 78 5e ec  82 9e 2e a3 5f 1a d7 cc  |.3.o.x^....._...|
--
003e42e0  30 2c 31 31 35 32 30 30  20 65 61 72 6c 79 70 72  |0,115200 earlypr|
003e42f0  69 6e 74 6b 00 00 00 00  00 00 00 02 00 00 00 01  |intk............|
003e4300  61 6c 69 61 73 65 73 00  00 00 00 03 00 00 00 1e  |aliases.........|
003e4310  00 00 00 35 2f 73 6f 63  2f 69 6e 74 65 72 6e 61  |...5/soc/interna|
003e4320  6c 2d 72 65 67 73 2f 67  70 69 6f 40 31 38 31 30  |l-regs/gpio@1810|
003e4330  30 00 00 00 00 00 00 03  00 00 00 1e 00 00 00 3b  |0..............;|
root@debian:/media/ex4100nandbackup/no_oob_ecc# hexdump -C mtd2 | grep -A 5 -i 115200
00115200  ff ee d4 ad f6 9a 58 fa  af ec bf 4b f5 32 47 41  |......X....K.2GA|
00115210  ff 77 fe 6c ef bf 4b 32  6b 62 a9 bf b0 26 96 6c  |.w.l..K2kb...&.l|
00115220  ca b1 26 66 4d 2c 67 6b  f3 fb ef f6 6d b1 d7 c4  |..&fM,gk....m...|
00115230  56 67 db 36 d1 ce d1 68  31 ee 5d 5c fe 68 bb 1e  |Vg.6...h1.]\.h..|
00115240  b2 e0 32 ee fb 71 eb 46  d9 63 ae 37 c7 b6 61 3a  |..2..q.F.c.7..a:|
00115250  9a 7a 11 5d b3 f7 85 dd  79 50 bd ec 8d 29 77 2b  |.z.]....yP...)w+|
root@debian:/media/ex4100nandbackup/no_oob_ecc# hexdump -C mtd3 | grep -A 5 -i 115200
00115200  d0 a2 87 96 a4 4f a9 bc  b8 fd 2c 75 dc 10 d5 ea  |.....O....,u....|
00115210  1c 46 58 37 59 85 f5 d9  d7 cb b6 0a 90 ae 84 22  |.FX7Y.........."|
00115220  5f 36 e5 12 38 91 c0 dd  9c bf 77 4d c6 23 3c 37  |_6..8.....wM.#<7|
00115230  2a f7 d4 44 24 52 ab 16  dd 3b 26 ff 01 41 6b 13  |*..D$R...;&..Ak.|
00115240  93 65 89 5f 87 c4 b5 dd  07 71 23 75 b9 b1 27 e5  |.e._.....q#u..'.|
00115250  2a 0b 2a 7b 4d 7f 9d 9d  1a 4d 79 97 f5 9a ef f0  |*.*{M....My.....|
--
01115200  f7 62 80 58 bc 2b 6d c8  ba 9c 56 00 62 75 ed 96  |.b.X.+m...V.bu..|
01115210  1d f9 3a 5a 13 e3 ef 19  fa 86 39 66 9b aa 69 c3  |..:Z......9f..i.|
01115220  4f 11 65 b5 51 5a 46 aa  d2 84 77 71 17 e3 62 e1  |O.e.QZF...wq..b.|
01115230  d0 7e 3c 4f 2b eb c5 47  ad cf e8 33 51 21 11 35  |.~<O+..G...3Q!.5|
01115240  da a0 66 71 1a 19 68 1f  be ff e4 c8 07 96 f2 44  |..fq..h........D|
01115250  93 b2 c9 eb 02 3e 38 52  88 b0 1d 05 57 e4 55 de  |.....>8R....W.U.|
--
01152000  06 03 f7 b7 c3 5e bd d9  40 23 f7 77 da 94 d0 c3  |.....^..@#.w....|
01152010  15 7c ac d6 a4 e2 a0 99  80 41 8d a2 27 47 f9 67  |.|.......A..'G.g|
01152020  d8 e6 77 51 57 88 a2 f1  33 92 5f fc 31 60 03 1f  |..wQW...3._.1`..|
01152030  d2 57 78 e2 d9 be 2b 8c  72 40 09 9f 21 0f 2d d1  |.Wx...+.r@..!.-.|
01152040  c2 cc 35 7e 87 52 d9 46  d9 83 09 9e ab 53 f8 2e  |..5~.R.F.....S..|
01152050  c8 46 69 c9 5c ee 7f 22  6f 89 a9 12 cf a1 ca e5  |.Fi.\.."o.......|
--
02115200  6c be 28 73 29 d9 bc ad  e8 9f 42 8a 08 d1 f7 e0  |l.(s).....B.....|
02115210  9c 49 26 75 af 80 f4 8d  bd 2b 0b 55 47 90 36 dd  |.I&u.....+.UG.6.|
02115220  e2 91 87 a4 a4 d3 f1 d3  bc f4 df 55 7f 6a 24 a5  |...........U.j$.|
02115230  49 c7 d7 28 f4 38 6b 8e  c9 50 a3 df c1 39 7e 4b  |I..(.8k..P...9~K|
02115240  42 fd 25 ae d5 ba ab 12  ac 74 c0 f2 79 55 f5 81  |B.%......t..yU..|
02115250  4b ba 10 56 a6 22 e8 06  c8 83 a8 05 5d a2 4a af  |K..V."......].J.|
--
03115200  43 aa 22 29 92 95 2a bd  04 ea 2c 13 d0 e0 8d 40  |C.")..*...,....@|
03115210  8c c9 d8 bb c8 98 93 84  15 ff 9f 28 a3 7d 1e 1e  |...........(.}..|
03115220  05 1d b3 d7 5f a0 fd c0  c8 af 4d 0d bf 78 77 0e  |...._.....M..xw.|
03115230  bf 07 c4 f1 81 73 56 d7  0d 5b be ee c8 3c 09 d8  |.....sV..[...<..|
03115240  fe 62 12 80 2e 36 65 0d  25 7e e0 10 89 4d 89 83  |.b...6e.%~...M..|
03115250  76 67 34 d7 f3 5d cc ab  97 84 bf 68 8c 94 b9 58  |vg4..].....h...X|
--
04115200  9c 0a 2d a9 4d e1 22 00  3d e9 82 a7 9d 61 e2 b4  |..-.M.".=....a..|
04115210  9d 91 8a 86 fb e0 cb 8d  ce ca 0e 4d 44 cd 1d 8e  |...........MD...|
04115220  1a f2 ac ec 68 68 0f 3b  1b e4 46 2c c8 bb 4b c2  |....hh.;..F,..K.|
04115230  85 e6 1e d9 84 88 0c 59  b1 0e 50 af ce b3 f6 6d  |.......Y..P....m|
04115240  2d 27 ba 28 10 d6 13 b6  7b 50 5f 01 39 0f 81 5a  |-'.(....{P_.9..Z|
04115250  87 13 86 b0 eb 76 68 c1  f2 77 d3 a4 2b 57 c1 ad  |.....vh..w..+W..|
--
05115200  50 e1 bc bc ea 37 3c 18  f9 f0 92 99 e0 a3 49 5d  |P....7<.......I]|
05115210  dd c5 23 ab ca 0a 95 d5  c2 50 9a 0f 7c ff 46 3d  |..#......P..|.F=|
05115220  a6 fa ca fa 69 d8 05 26  00 62 93 22 15 05 26 3f  |....i..&.b."..&?|
05115230  33 65 9f a6 26 71 6f 7f  ec c9 7d 7b 93 71 fc ce  |3e..&qo...}{.q..|
05115240  f1 26 a6 8d 02 14 ad 5f  b3 c8 2f fa db 29 a3 9b  |.&....._../..)..|
05115250  ff 7b 61 dc a4 21 3f 74  d1 2c da 16 0f 92 11 0f  |.{a..!?t.,......|
--
1bbde200  30 2c 31 31 35 32 30 30  20 65 61 72 6c 79 70 72  |0,115200 earlypr|
1bbde210  69 6e 74 6b 00 00 00 00  00 00 00 02 00 00 00 01  |intk............|
1bbde220  61 6c 69 61 73 65 73 00  00 00 00 03 00 00 00 1e  |aliases.........|
1bbde230  00 00 00 35 2f 73 6f 63  2f 69 6e 74 65 72 6e 61  |...5/soc/interna|
1bbde240  6c 2d 72 65 67 73 2f 67  70 69 6f 40 31 38 31 30  |l-regs/gpio@1810|
1bbde250  30 00 00 00 00 00 00 03  00 00 00 1e 00 00 00 3b  |0..............;|
--
1c115200  97 5e d1 6a 31 f2 f6 d1  9c 7b 6c ef 1e fc e1 87  |.^.j1....{l.....|
1c115210  8d c4 2a ac 45 7f cc fb  57 3d e4 77 aa 82 81 d5  |..*.E...W=.w....|
1c115220  58 92 19 72 f8 01 97 ef  d9 86 6c 7e 06 4b 58 be  |X..r......l~.KX.|
1c115230  e4 04 2e 18 19 df 0d 7e  c3 cb 8a 81 9b 46 8b 70  |.......~.....F.p|
1c115240  53 0d 70 c8 e1 ff a7 a4  a8 64 69 f7 f6 9c 2b 44  |S.p......di...+D|
1c115250  92 13 c1 ad 8a ba 20 99  24 b0 15 82 00 7e 90 a6  |...... .$....~..|
root@debian:/media/ex4100nandbackup/no_oob_ecc# hexdump -C mtd4 | grep -A 5 -i 115200
00115200  8d 66 d4 17 7f 8d 7d ac  12 18 d3 2e 2b 32 a4 d1  |.f....}.....+2..|
00115210  d9 a9 73 6b 6c b0 38 16  f5 ee 0e 1d ff 86 3a 04  |..skl.8.......:.|
00115220  d2 ec 7f dc a6 f4 b4 b7  62 6f 5e f0 70 95 1d 0c  |........bo^.p...|
00115230  60 ff 04 cc 85 56 87 ad  94 81 7a 78 c6 91 0a 1f  |`....V....zx....|
00115240  96 d8 10 c4 f7 d5 39 55  ce 4c e0 fa 25 d7 1d 4e  |......9U.L..%..N|
00115250  b3 ed d9 68 7b 5e 8e aa  7f 1c da fe 04 f2 e7 d4  |...h{^..........|
--
003be200  30 2c 31 31 35 32 30 30  20 65 61 72 6c 79 70 72  |0,115200 earlypr|
003be210  69 6e 74 6b 00 00 00 00  00 00 00 02 00 00 00 01  |intk............|
003be220  61 6c 69 61 73 65 73 00  00 00 00 03 00 00 00 1e  |aliases.........|
003be230  00 00 00 35 2f 73 6f 63  2f 69 6e 74 65 72 6e 61  |...5/soc/interna|
003be240  6c 2d 72 65 67 73 2f 67  70 69 6f 40 31 38 31 30  |l-regs/gpio@1810|
003be250  30 00 00 00 00 00 00 03  00 00 00 1e 00 00 00 3b  |0..............;|
root@debian:/media/ex4100nandbackup/no_oob_ecc# hexdump -C mtd5 | grep -A 5 -i 115200
root@debian:/media/ex4100nandbackup/no_oob_ecc# hexdump -C mtd6 | grep -A 5 -i 115200
root@debian:/media/ex4100nandbackup/no_oob_ecc# hexdump -C mtd7 | grep -A 5 -i 115200
root@debian:/media/ex4100nandbackup/no_oob_ecc#
Re: Debian on WD MyCloud EX 4100
June 20, 2017 04:21PM
saschadd,


That did not come out as I expected. There must be some weird stuff going on in stock u-boot that we don't know about yet.

Because you did check 0xa0000 and 0xc0000 (0xb0000 is not on 128K boundary).

# MTD device name Device offset Env. size Flash sector size $ 
/dev/mtd0 0xa0000 0x20000 0x20000 

fw_printenv 

Warning: Bad CRC, using default environment 
bootargs= 
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm 
bootdelay=3 
baudrate=115200 
stdin=serial,cros-ec-keyb 
stdout=serial,lcd 
stderr=serial,lcd 

nano /etc/fw_env.config 

# MTD device name Device offset Env. size Flash sector size $ 
/dev/mtd0 0xc0000 0x20000 0x20000 

fw_printenv 

Warning: Bad CRC, using default environment 
bootargs= 
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm 
bootdelay=3 
baudrate=115200 
stdin=serial,cros-ec-keyb 
stdout=serial,lcd 
stderr=serial,lcd

So we need to verify:

1. the last 2 numbers are correct in "/dev/mtd0 0xc0000 0x20000 0x20000"
2. Does stock u-boot use only internal envs? the GPL code should say so if it is true.

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

Your Email:


Subject:


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