Welcome! Log In Create A New Profile

Advanced

Debian on WD MyCloud EX 4100

Posted by saschadd 
Debian on WD MyCloud EX 4100
May 15, 2017 08:36AM
Hi folks,

this thread is intended for upgrading the WD MyCloud EX 4100 with a debian system.

Because this box has an Marvell Armada 380/381/382/385/388 (Device Tree) processor we can use bodhis Kernel and rootfs from there http://forum.doozan.com/read.php?2,32146
and here in this thread we can discuss possibly needed modifications and how to do things with this box.

Here are some infos about the WD MyCloud EX 4100

cat /proc/version gives

Linux version 3.10.39 (kman@kmachine) (gcc version 4.6.4 (Linaro GCC branch-4.6.4. Marvell GCC Dev 201310-2126.3d181f66 64K MAXPAGESIZE ALIGN) ) #2 SMP Fri Aug 12 15:59:39 CST 2016 2014T30p5 Build-git9e099f3

and cat /proc/cpuinfo gives

processor       : 0
model name      : ARMv7 Processor rev 1 (v7l)
BogoMIPS        : 3188.32
Features        : swp half thumb fastmult vfp edsp neon vfpv3 tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x4
CPU part        : 0xc09
CPU revision    : 1

processor       : 1
model name      : ARMv7 Processor rev 1 (v7l)
BogoMIPS        : 3188.32
Features        : swp half thumb fastmult vfp edsp neon vfpv3 tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x4
CPU part        : 0xc09
CPU revision    : 1

Hardware        : Marvell Armada 380/381/382/385/388 (Device Tree)
Revision        : 0000
Serial          : 0000000000000000

There is already someone who attempted to create a debian port for this device on this thread https://community.wd.com/t/clean-os-debian-openmediavault-and-other-firmwares/93714/1290

From this guy there are already files available there https://drive.google.com/drive/folders/0B_6OlQ_H0PxVVGdTRGl0RmRabVU

but unfortunately there are instructions missing and i am not able to figure out how to use those files securely without problems.

I would like to have this device booting the rootfs from an usb pen drive without touching the original firmware if possible but i am not fit enough to figure out what information is needed and how to get them.

-
happy hacking,

saschadd
Re: Debian on WD MyCloud EX 4100
May 15, 2017 09:52AM
saschadd,

In mainline, we now have a newer DTS file for this Armada 385 SoC.

I will post installation instruction shortly today!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on WD MyCloud EX 4100
May 15, 2017 12:54PM
Instruction how to boot USB Debian rootfs on WD MyCloud EXT4100

1. Prepare new Debian rootfs by cloning the existing NAS326 rootfs (if you already have this box running Debian). Or

2 Create a new USB rootfs using Debian-4.9.0-mvebu-tld-12-rootfs-bodhi.tar.bz2 following instruction in this thread:
http://forum.doozan.com/read.php?2,32146,34102#msg-34102

3. (Optional) Install latest kernel linux-4.10.9-mvebu-tld-1

4. Boot into the EXT4100 stock OS. Mount the new USB Debian rootfs. Assuming it is mounted at /media/sdb1.

5. Dumpping NAND to back up the mtds:

As root user:

a. Dump 8 mtd partitions (0 to 7) with noecc and obmit oob:

mkdir -p /media/sdb1/boot/wd_ext4100/no_oob_ecc
cd /media/sdb1/boot/wd_ext4100/no_oob_ecc

/media/sdb1/usr/sbin/nanddump --noecc --omitoob -f mtd0 /dev/mtd0
….
/media/sdb1/usr/sbin/nanddump --noecc --omitoob -f mtd7 /dev/mtd7

b. Repeat the nanddump to dump with oob and ecc

mkdir -p /media/sdb1/boot/wd_ext4100/oob_ecc
cd /media/sdb1/boot/wd_ext4100/oob_ecc

/media/sdb1/usr/sbin/nanddump --ecc --oob -f mtd0 /dev/mtd0
….
/media/sdb1/usr/sbin/nanddump --ecc --oob -f mtd7 /dev/mtd7

c. Sync the USB drive

sync

6. Shutdown and power up, interrupt serial console, and enter the following uboot envs (copy/paste to the prompt):

setenv bootdev usb
setenv device '0:1'
setenv dtb_file '/boot/dts/armada-388-db.dtb'
setenv load_dtb_addr 0x1000000
setenv load_initrd_addr 0x2900000
setenv load_uimage_addr 0x02000000
setenv load_dtb 'echo loading DTB $dtb_file ...; ext2load $bootdev $device $load_dtb_addr $dtb_file'
setenv load_initrd 'echo loading uInitrd ...; ext2load $bootdev $device $load_initrd_addr /boot/uInitrd'
setenv load_uimage 'echo loading uImage ...; ext2load $bootdev $device $load_uimage_addr /boot/uImage'
setenv usb_set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts
setenv usb_bootcmd 'run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi'
setenv bootcmd_usb 'usb start; run usb_set_bootargs; run usb_bootcmd'

Andn then try booting to Debian:

run bootcmd_usb

Please post the entire serial console log here.


---
Note:

The armada-388-db.dtb has a basic support of the Armada 38x series SoC. However, further modification will be necessary to add specific hardware definition for the WD MyCloud EXT4100.


Update:

There was a typo in this variable
setenv load_uimage_addr 0x02000000

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



Edited 2 time(s). Last edit at 05/15/2017 02:33PM by bodhi.
Re: Debian on WD MyCloud EX 4100
May 16, 2017 04:13PM
bodhi,
much thanks for your work so far.

I tried your how-to and got stuck at the nand dump.

At first i had to change some paths as the EX4100 has no /media so i switched to /mnt and because i removed all disks the drive becomes sda1.

4. Boot into the EXT4100 stock OS. Mount the new USB Debian rootfs. Assuming it is mounted at /mnt/sda1.
mkdir /mnt/sda1
mount /dev/sda1 /mnt/sda1

5. Dumping NAND to back up the mtds:

As root user:

a. Dump 8 mtd partitions (0 to 7) with noecc and obmit oob:
mkdir -p /mnt/sda1/boot/wd_ext4100/no_oob_ecc
cd /mnt/sda1/boot/wd_ext4100/no_oob_ecc

/mnt/sda1/usr/sbin/nanddump --noecc --omitoob -f mtd0 /dev/mtd0
(gave me an error -sh: /mnt/sda1/usr/sbin/nanddump: not found)

so i copied it over
cp /mnt/sda1/usr/sbin/nanddump /mnt/sda1/boot/wd_ext4100/no_oob_ecc
and used

nanddump --noecc --omitoob -f mtd0 /dev/mtd0
nanddump --noecc --omitoob -f mtd1 /dev/mtd1
nanddump --noecc --omitoob -f mtd2 /dev/mtd2
nanddump --noecc --omitoob -f mtd3 /dev/mtd3
nanddump --noecc --omitoob -f mtd4 /dev/mtd4
nanddump --noecc --omitoob -f mtd5 /dev/mtd5
nanddump --noecc --omitoob -f mtd6 /dev/mtd6
nanddump --noecc --omitoob -f mtd7 /dev/mtd7

mtd6 and mtd7 seem not to be there as i get following error
nanddump --noecc --omitoob -f mtd6 /dev/mtd6
open flash: No such file or directory
nanddump --noecc --omitoob -f mtd7 /dev/mtd7
open flash: No such file or directory

b. Repeat the nanddump to dump with oob and ecc
mkdir -p /mnt/sda1/boot/wd_ext4100/oob_ecc
cd /mnt/sda1/boot/wd_ext4100/oob_ecc
cp /mnt/sda1/usr/sbin/nanddump /mnt/sda1/boot/wd_ext4100/oob_ecc

nanddump --ecc --oob -f mtd0 /dev/mtd0
gave me an error
nanddump: unrecognized option '--ecc'
nanddump: unrecognized option '--oob'
Usage: nanddump [OPTIONS] MTD-device
Dumps the contents of a nand mtd partition.

           --help               display this help and exit
           --version            output version information and exit
-f file    --file=file          dump to file
-i         --ignoreerrors       ignore errors
-l length  --length=length      length
-n         --noecc              read without error correction
-o         --omitoob            omit oob data
-b         --omitbad            omit bad blocks from the dump
-p         --prettyprint        print nice (hexdump)
-s addr    --startaddress=addr  start address

so i tried 
nanddump -f mtd0 /dev/mtd0
nanddump -f mtd1 /dev/mtd1
nanddump -f mtd2 /dev/mtd2
nanddump -f mtd3 /dev/mtd3
nanddump -f mtd4 /dev/mtd4
nanddump -f mtd5 /dev/mtd5
nanddump -f mtd6 /dev/mtd6
nanddump -f mtd7 /dev/mtd7

the same failure here for mtd6 and mtd7
nanddump -f mtd6 /dev/mtd6
open flash: No such file or directory
nanddump -f mtd7 /dev/mtd7
open flash: No such file or directory

I am not sure if that last part is sufficient for the backup of the nand.
If you confirm i will go on with the how-to.

-
happy hacking,

saschadd
Re: Debian on WD MyCloud EX 4100
May 16, 2017 11:12PM
saschadd,

Your dmesg showed 8 partitions
8 ofpart partitions found on MTD device armada-nand
Creating 8 MTD partitions on "armada-nand":
0x000000000000-0x000000500000 : "U-Boot"
0x000000500000-0x000000a00000 : "uImage"
0x000000a00000-0x000000f00000 : "uRamdisk"
0x000000f00000-0x00001c800000 : "image.cfs"
0x00001c800000-0x00001d700000 : "rescue fw"
0x00001d700000-0x00001eb00000 : "config"
0x00001eb00000-0x00001f500000 : "reserve1"
0x00001f500000-0x00001ff00000 : "reserve2"

Try to see if they are allocated
cat /proc/mtd

However, these 2 are reserved (propably have nothing on them), so you don't need to worry about backing up.

----

For both 5.1 and 5.b if they were dumped OK, then you can proceed. List the files and check:

ls -l /mnt/sda1/boot/wd_ext4100/oob_ecc
ls -l /mnt/sda1/boot/wd_ext4100/no_oob_ecc

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on WD MyCloud EX 4100
May 17, 2017 02:38AM
bodhi,

cat /proc/mtd gives me
dev:    size   erasesize  name
mtd0: 00500000 00020000 "U-Boot"
mtd1: 00500000 00020000 "uImage"
mtd2: 00500000 00020000 "uRamdisk"
mtd3: 1b900000 00020000 "image.cfs"
mtd4: 00f00000 00020000 "rescue fw"
mtd5: 01400000 00020000 "config"
mtd6: 00a00000 00020000 "reserve1"
mtd7: 00a00000 00020000 "reserve2"

so i assume they are correctly mounted.

just to be sure i redid the process of dumping the nand.
while trying to mount /dev/sda1 i noticed that my directory /mnt/sda1 was gone.
so the original firmware seems to revert everything which was not originally there.

the first nanddump worked without failures except the not found mtd6 and mtd7.
ls -l /mnt/sda1/boot/wd_ext4100/oob_ecc gives me
-rw-r--r--    1 root     root       5406720 May 17 08:49 mtd0
-rw-r--r--    1 root     root       5406720 May 17 08:49 mtd1
-rw-r--r--    1 root     root       5406720 May 17 08:49 mtd2
-rw-r--r--    1 root     root     476872704 May 17 08:53 mtd3
-rw-r--r--    1 root     root      16220160 May 17 08:53 mtd4
-rw-r--r--    1 root     root      21626880 May 17 08:53 mtd5
which looks fine i think.

here the output from the second nand dump
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@WDMyCloudEX4100 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 0x00500000...
root@WDMyCloudEX4100 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 0x00500000...
root@WDMyCloudEX4100 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 0x1b900000...
root@WDMyCloudEX4100 oob_ecc # nanddump -f mtd4 /dev/mtd4
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@WDMyCloudEX4100 oob_ecc # nanddump -f mtd5 /dev/mtd5
ECC failed: 0
ECC corrected: 0
Number of bad blocks: 1
Number of bbt blocks: 0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x01400000...
root@WDMyCloudEX4100 oob_ecc # nanddump -f mtd6 /dev/mtd6
open flash: No such file or directory
root@WDMyCloudEX4100 oob_ecc # nanddump -f mtd7 /dev/mtd7
open flash: No such file or directory

which looks fine as well.

ls -l /mnt/sda1/boot/wd_ext4100/no_oob_ecc gives
-rw-r--r--    1 root     root       5242880 May 17 08:33 mtd0
-rw-r--r--    1 root     root       5242880 May 17 08:33 mtd1
-rw-r--r--    1 root     root       5242880 May 17 08:33 mtd2
-rw-r--r--    1 root     root     462422016 May 17 08:37 mtd3
-rw-r--r--    1 root     root      15728640 May 17 08:37 mtd4
-rw-r--r--    1 root     root      20971520 May 17 08:38 mtd5

which seems to look fine as well.

I shutted down the box and made a copy of the nand backup on another drive before heading to booting the debian.

6. Shutdown and power up, interrupt serial console, and enter the following uboot envs (copy/paste to the prompt):

interrupt autoboot can be made by pressing 1 constantly this will bring you to the Marvel>> prompt.

Copy paste didnt work as the console didnt like the
setenv dtb_file '/boot/dts/armada-388-db.dtb'
because the first ' was gone when pasting.
I changed it then it was working until

setenv usb_set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts
## Error: illegal character '='in variable name "usb_set_bootargs=setenv"

I couldnt figure this out myself thats why i stopped here and shut down the box.

-
happy hacking,

saschadd
Re: Debian on WD MyCloud EX 4100
May 17, 2017 04:55AM
saschadd,

The nanddump looks good.

And I had a typo in previous post.

So now, try again

setenv bootdev usb
setenv device '0:1'
setenv dtb_file '/boot/dts/armada-388-db.dtb'
setenv load_dtb_addr 0x1000000
setenv load_initrd_addr 0x2900000
setenv load_uimage_addr 0x02000000
setenv load_dtb 'echo loading DTB $dtb_file ...; ext2load $bootdev $device $load_dtb_addr $dtb_file'
setenv load_initrd 'echo loading uInitrd ...; ext2load $bootdev $device $load_initrd_addr /boot/uInitrd'
setenv load_uimage 'echo loading uImage ...; ext2load $bootdev $device $load_uimage_addr /boot/uImage'
setenv usb_set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts'
setenv usb_bootcmd 'run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi'
setenv bootcmd_usb 'usb start; run usb_set_bootargs; run usb_bootcmd'

and then list the envs

printenv


Please post the entire serial console log here (after blanking out the MAC addresses and serial numbers).

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



Edited 1 time(s). Last edit at 05/17/2017 06:52AM by bodhi.
Re: Debian on WD MyCloud EX 4100
May 17, 2017 01:11PM
okay, after adding the envs printenv gives me the following ( hope i xx-ed everything ; ) if not please let me know)

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
bootdelay=1
bootdev=usb
cacheShare=no
console=console=ttyS0,115200
device=0:1
device_partition=0:1
disaMvPnp=no
dtb_file=/boot/dts/armada-388-db.dtb
eeeEnable=no
enaClockGating=no
enaCpuStream=no
enaFPU=yes
enaMonExt=no
enaWrAllo=no
eth1addr=00:50:xx:xx:xx:xx
eth1mtu=1500
eth2addr=00:50:xx:xx:xx:xx
eth2mtu=1500
eth3addr=00:50:xx:xx:xx:xx
eth3mtu=1500
ethact=egiga0
ethaddr=00:50:xx:xx:xx:xx
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_dtb=echo loading DTB $dtb_file ...; ext2load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1000000
load_initrd=echo loading uInitrd ...; ext2load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x2900000
load_uimage=echo loading uImage ...; ext2load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x02000000
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:xx:xx:xx:xx,0:1:2:3),mtu=1500
mv_pon_addr=00:50:xx:xx:xx:xx
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=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi
usb_set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts
vxworks_en=no
yuk_ethaddr=00:00:xx:xx:xx:xx

Environment size: 4095/524284 bytes
Re: Debian on WD MyCloud EX 4100
May 17, 2017 02:02PM
saschadd,

1. No private stuff remained in the envs

2. All envs look good except one (my omission):

This line should have double quotes:

setenv usb_set_bootargs 'setenv bootargs "console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts"'

After setting this, and other envs like before, you can try booting:

boot

See how far we will get. You can post the entire serial console log again (there will be some USB drive serial numbers shown which you want to blank out if we get that far into the kernel enumerating USB).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on WD MyCloud EX 4100
May 17, 2017 02:28PM
bodhi,

here comes the boot log from first try

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
loading uImage ...
3904464 bytes read in 372 ms (10 MiB/s)
loading uInitrd ...
6210503 bytes read in 429 ms (13.8 MiB/s)
loading DTB /boot/dts/armada-388-db.dtb ...
14881 bytes read in 254 ms (56.6 KiB/s)
## Booting image at 02000000 ...
## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   Linux-4.9.0-mvebu-tld-12
   Created:      2017-02-04   0:22:26 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3904400 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
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x01000000
   Loading Kernel Image ... OK
OK
   Loading Ramdisk to 7f3e0000, end 7f9cc387 ... OK
   Loading Device Tree to 00ff9000, end 00fffa20 ... OK

   Starting Device Tree update ('fdt_skip_update' = no)
Updating device tree failed
stopping USB..

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

Error: unrecognized/unsupported machine ID (r1 = 0x00000210).

Available machine support:

ID (hex)        NAME
ffffffff        Generic DT based system
ffffffff        Marvell Armada 39x (Device Tree)
ffffffff        Marvell Armada 380/385 (Device Tree)
ffffffff        Marvell Armada 375 (Device Tree)
ffffffff        Marvell Armada 370/XP (Device Tree)
ffffffff        Marvell Dove

Please check your kernel config and/or bootloader.
Re: Debian on WD MyCloud EX 4100
May 17, 2017 02:32PM
bodhi,

i double checked if all environments are set (they are) and while doing that i noticed that the variables

eth1addr=
eth2addr=
eth3addr=
ethaddr=
mv_pon_addr=

seem to change on every boot as they are different.
This doesnt seem to be an issue at the moment but thought you should know about that.

-
happy hacking,

saschadd
Re: Debian on WD MyCloud EX 4100
May 17, 2017 02:37PM
bodhi,

just remembered that WD has GPL Firmware packages for download at http://support.wdc.com/downloads.aspx?p=213&lang=en

Maybe this would be helpful?!

-
happy hacking,

saschadd
Re: Debian on WD MyCloud EX 4100
May 18, 2017 12:33AM
saschadd,

Good progress :)

Here is the revised envs

setenv bootdev usb
setenv device '0:1'
setenv dtb_file '/boot/dts/armada-388-db.dtb'
setenv load_dtb_addr 0x1000000
setenv load_initrd_addr 0x2900000
setenv load_uimage_addr 0x02000000
setenv load_dtb 'echo loading DTB $dtb_file ...; ext2load $bootdev $device $load_dtb_addr $dtb_file'
setenv load_initrd 'echo loading uInitrd ...; ext2load $bootdev $device $load_initrd_addr /boot/uInitrd'
setenv load_uimage 'echo loading uImage ...; ext2load $bootdev $device $load_uimage_addr /boot/uImage'
setenv usb_set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts'
setenv usb_bootcmd 'run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi'
setenv bootcmd_usb 'usb start; run usb_set_bootargs; run usb_bootcmd'
setenv fdt_skip_update yes

and then

printenv
run bootcmd_usb

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on WD MyCloud EX 4100
May 18, 2017 01:23AM
bodhi Wrote:
-------------------------------------------------------
> Good progress :)

Yes, i think we are very close. ; )

I tried the revised envs but same result

i am running
run bootcmd_usb
because only boot is booting the original firmware.

(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 uImage ...
3904464 bytes read in 371 ms (10 MiB/s)
loading uInitrd ...
6210503 bytes read in 429 ms (13.8 MiB/s)
loading DTB /boot/dts/armada-388-db.dtb ...
14881 bytes read in 253 ms (56.6 KiB/s)
## Booting image at 02000000 ...
## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   Linux-4.9.0-mvebu-tld-12
   Created:      2017-02-04   0:22:26 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3904400 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
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x01000000
   Loading Kernel Image ... OK
OK
   Loading Ramdisk to 7f3e0000, end 7f9cc387 ... OK
   Loading Device Tree to 00ff9000, end 00fffa20 ... OK

   Skipping Device Tree update ('fdt_skip_update' = yes)
stopping USB..

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

Error: unrecognized/unsupported machine ID (r1 = 0x00000210).

Available machine support:

ID (hex)        NAME
ffffffff        Generic DT based system
ffffffff        Marvell Armada 39x (Device Tree)
ffffffff        Marvell Armada 380/385 (Device Tree)
ffffffff        Marvell Armada 375 (Device Tree)
ffffffff        Marvell Armada 370/XP (Device Tree)
ffffffff        Marvell Dove

Please check your kernel config and/or bootloader.

printenv gives

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
bootdelay=1
bootdev=usb
cacheShare=no
console=console=ttyS0,115200
device=0:1
device_partition=0:1
disaMvPnp=no
dtb_file=/boot/dts/armada-388-db.dtb
eeeEnable=no
enaClockGating=no
enaCpuStream=no
enaFPU=yes
enaMonExt=no
enaWrAllo=no
eth1addr=00:50:xx:xx:xx:xx
eth1mtu=1500
eth2addr=00:50:xx:xx:xx:xx
eth2mtu=1500
eth3addr=00:50:xx:xx:xx:xx
eth3mtu=1500
ethact=egiga0
ethaddr=00:50:xx:xx:xx:xx
ethmtu=1500
ethprime=egiga0
fdt_addr=2040000
fdt_skip_update=yes
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_dtb=echo loading DTB $dtb_file ...; ext2load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1000000
load_initrd=echo loading uInitrd ...; ext2load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x2900000
load_uimage=echo loading uImage ...; ext2load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x02000000
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:xx:xx:xx:xx,0:1:2:3),mtu=1500
mv_pon_addr=00:50:xx:xx:xx:xx
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=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi
usb_set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts
vxworks_en=no
yuk_ethaddr=00:00:xx:xx:xx:xx

Environment size: 4096/524284 bytes
Re: Debian on WD MyCloud EX 4100
May 18, 2017 03:13AM
Yes:) I saw where the problem is, will post a revised envs set.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on WD MyCloud EX 4100
May 18, 2017 04:01AM
saschadd,

Interrupt serial console, get the syntax for env command:

env
env help
help env


Please post output.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on WD MyCloud EX 4100
May 18, 2017 11:50AM
bodhi,

env gives

env - environment handling commands

Usage:
env default [-f] -a - [forcibly] reset default environment
env default [-f] var [...] - [forcibly] reset variable(s) to their default values
env delete [-f] var [...] - [forcibly] delete variable(s)
env edit name - edit environment variable
env export [-t | -b | -c] [-s size] addr [var ...] - export environment
env import [-d] [-t | -b | -c] addr [size] - import environment
env print [-a | name ...] - print environment
env run var [...] - run commands in an environment variable
env set [-f] name [arg ...]

-
happy hacking,

saschadd
Re: Debian on WD MyCloud EX 4100
May 18, 2017 12:39PM
saschadd,

Here is the revised envs:

setenv bootdev usb
setenv device '0:1'
setenv dtb_file '/boot/dts/armada-388-db.dtb'
setenv load_dtb_addr 0x1000000
setenv load_initrd_addr 0x2900000
setenv load_image_addr 0x02000000
setenv load_dtb 'echo loading DTB $dtb_file ...; ext2load $bootdev $device $load_dtb_addr $dtb_file'
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/zImage'
setenv usb_set_bootargs 'setenv bootargs "console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts"'
setenv usb_bootcmd 'echo Booting from USB ...; setenv fdt_skip_update yes; usb start; run load_image; run load_dtb; run load_initrd; run usb_set_bootargs; bootz $load_image_addr $load_initrd_addr $load_dtb_addr'
setenv bootcmd_usb 'usb start; run usb_set_bootargs; run usb_bootcmd; reset'

And then
run bootcmd_usb

Please post entire serial console log.

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

this seems to work a bit more

after 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 ...
3904400 bytes read in 626 ms (5.9 MiB/s)
loading DTB /boot/dts/armada-388-db.dtb ...
14881 bytes read in 255 ms (56.6 KiB/s)
loading uInitrd ...
6210503 bytes read in 942 ms (6.3 MiB/s)
## 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
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x01000000
   Loading Ramdisk to 7f3e0000, end 7f9cc387 ... OK
   Loading Device Tree to 00ff9000, end 00fffa20 ... OK

   Skipping Device Tree update ('fdt_skip_update' = yes)
stopping USB..

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

then it seems to do nothing.
Re: Debian on WD MyCloud EX 4100
May 18, 2017 03:39PM
bodhi,

this device seems not to be able to boot from usb 3.0 sticks.
I prepared another stick which is 3.0 but the marvel console doesnt recognize it. :(

-
happy hacking,

saschadd
Re: Debian on WD MyCloud EX 4100
May 19, 2017 12:30AM
saschadd,

It's not possible to boot USB 3.0. We can only use USB 2.0 for booting.

For now, the next 2 things to try.

1. Logging into stock OS and copy the DTB file that the stock kernel uses for booting to the Debian rootfs /boot/dts/.

fdtfile=armada-38x-modular.dtb

And adjust the env to boot with this DTB.

2. I need to compile the DTS from the second link (armada-385-ex2u.dts) to get the DTB so you can try that too.


Also

> just remembered that WD has GPL Firmware packages
> for download at http://support.wdc.com/downloads.a
> spx?p=213&lang=en
>
> Maybe this would be helpful?!

Yes, you should download that. And find the file armada-38x-modular.dts so can see what the differences between that and mainline version.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on WD MyCloud EX 4100
May 19, 2017 12:43AM
saschadd,

Here is another revised envs set. The bold line is the modifcation:


setenv bootdev usb
setenv device '0:1'
setenv dtb_file '/boot/dts/armada-388-db.dtb'
setenv load_dtb_addr 0x1000000
setenv load_initrd_addr 0x2900000
setenv load_image_addr 0x02000000
setenv load_dtb 'echo loading DTB $dtb_file ...; ext2load $bootdev $device $load_dtb_addr $dtb_file'
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/zImage'
setenv usb_set_bootargs 'setenv bootargs "console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts earlyprintk=serial"'
setenv usb_bootcmd 'echo Booting from USB ...; setenv fdt_skip_update yes; usb start; run load_image; run load_dtb; run load_initrd; run usb_set_bootargs; bootz $load_image_addr $load_initrd_addr $load_dtb_addr'
setenv bootcmd_usb 'usb start; run usb_set_bootargs; run usb_bootcmd; reset'

Hopefully we will see more during booting.

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

> It's not possible to boot USB 3.0. We can only use
> USB 2.0 for booting.

Thanks for the info. I was thinking its the stick. ;)

> For now, the next 2 things to try.
>
> 1. Logging into stock OS and copy the DTB file tha
> t the stock kernel uses for booting to the Debian
> rootfs /boot/dts/.
>
>
> fdtfile=armada-38x-modular.dtb
>

i cant find that armada-38x-modular.dtb file :(

only armada containing files on the stock firmware are

/sys/bus/platform/drivers/armada-375-pinctrl
/sys/bus/platform/drivers/armada-cesa-test
/sys/bus/platform/drivers/armada-370-pinctrl
/sys/bus/platform/drivers/armada-nand
/sys/bus/platform/drivers/armada-xp-pinctrl
/sys/bus/platform/drivers/armada-38x-pinctrl
/sys/bus/platform/drivers/armada-cesa-ocf
/sys/bus/platform/drivers/armada_thermal

i dont know where this file is hidden.
Also the GPL firmware package has no dts or dtb file i could find.
I was thinking about looking into the firmware bin file but i am not able to open it.

-
happy hacking,

saschadd
Re: Debian on WD MyCloud EX 4100
May 19, 2017 08:09AM
saschadd,

Please try this revised envs with earlyprintk.

bodhi Wrote:
-------------------------------------------------------
> saschadd,
>
> Here is another revised envs set. The bold line is
> the modifcation:
>
>
>
> setenv bootdev usb
> setenv device '0:1'
> setenv dtb_file '/boot/dts/armada-388-db.dtb'
> setenv load_dtb_addr 0x1000000
> setenv load_initrd_addr 0x2900000
> setenv load_image_addr 0x02000000
> setenv load_dtb 'echo loading DTB $dtb_file ...; e
> xt2load $bootdev $device $load_dtb_addr $dtb_file'
> setenv load_initrd 'echo loading uInitrd ...; ext2
> load $bootdev $device $load_initrd_addr /boot/uIni
> trd'
> setenv load_image 'echo loading Image ...; ext2loa
> d $bootdev $device $load_image_addr /boot/zImage'
> setenv usb_set_bootargs 'setenv bootargs "conso
> le=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mt
> dparts earlyprintk=serial"'
> setenv usb_bootcmd 'echo Booting from USB ...; set
> env fdt_skip_update yes; usb start; run load_image
> ; run load_dtb; run load_initrd; run usb_set_boota
> rgs; bootz $load_image_addr $load_initrd_addr $loa
> d_dtb_addr'
> setenv bootcmd_usb 'usb start; run usb_set_bootarg
> s; run usb_bootcmd; reset'
>
>
> Hopefully we will see more during booting.

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

here the last envs test

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 ...
3904400 bytes read in 625 ms (6 MiB/s)
loading DTB /boot/dts/armada-388-db.dtb ...
14881 bytes read in 255 ms (56.6 KiB/s)
loading uInitrd ...
6210503 bytes read in 942 ms (6.3 MiB/s)
## 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
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x01000000
   Loading Ramdisk to 7f3e0000, end 7f9cc387 ... OK
   Loading Device Tree to 00ff9000, end 00fffa20 ... OK

   Skipping Device Tree update ('fdt_skip_update' = yes)
stopping USB..

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: Marvell Armada 385 Development Board
[    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=LABEL=rootfs 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: 2060308K/2097152K available (8192K kernel code, 690K rwdata, 2052K rodata, 1024K init, 386K bss, 36844K reserved, 0K cma-reserved, 1304652K 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.019058] Console: colour dummy device 80x30
[    0.023572] Calibrating delay loop (skipped), value calculated using timer frequency.. 50.00 BogoMIPS (lpj=250000)
[    0.033975] pid_max: default: 32768 minimum: 301
[    0.038729] Security Framework initialized
[    0.042923] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.049596] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.057096] CPU: Testing write buffer coherency: ok
[    0.062166] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.067904] Setting up static identity map for 0x100000 - 0x100058
[    0.074208] mvebu-soc-id: MVEBU SoC ID=0x6828, Rev=0x4
[    0.079467] mvebu-pmsu: Initializing Power Management Service Unit
[    0.283914] Booting CPU 1
[    0.286760] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.286808] Brought up 2 CPUs
[    0.295566] SMP: Total of 2 processors activated (100.00 BogoMIPS).
[    0.301885] CPU: All CPU(s) started in SVC mode.
[    0.307114] devtmpfs: initialized
[    0.312393] 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.330260] prandom: seed boundary self test passed
[    0.336884] prandom: 100 self tests passed
[    0.341044] pinctrl core: initialized pinctrl subsystem
[    0.346964] NET: Registered protocol family 16
[    0.352006] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.393869] cpuidle: using governor ladder
[    0.423867] cpuidle: using governor menu
[    0.427933] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[    0.436001] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.441980] mvebu-pmsu: CPU hotplug support is currently broken on Armada 38x: disabling
[    0.450134] mvebu-pmsu: CPU idle is currently broken on Armada 38x: disabling
[    0.504844] vgaarb: loaded
[    0.507852] SCSI subsystem initialized
[    0.512074] usbcore: registered new interface driver usbfs
[    0.517706] usbcore: registered new interface driver hub
[    0.523131] usbcore: registered new device driver usb
[    0.528451] media: Linux media interface: v0.10
[    0.533096] Linux video capture interface: v2.00
[    0.538588] clocksource: Switched to clocksource armada_370_xp_clocksource
[    0.570105] VFS: Disk quotas dquot_6.6.0
[    0.574132] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.587959] NET: Registered protocol family 2
[    0.592777] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.599927] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    0.606477] TCP: Hash tables configured (established 8192 bind 8192)
[    0.612946] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.618954] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.625460] NET: Registered protocol family 1
[    0.630142] RPC: Registered named UNIX socket transport module.
[    0.636118] RPC: Registered udp transport module.
[    0.640899] RPC: Registered tcp transport module.
[    0.645663] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.652288] Unpacking initramfs...
[    0.655762] Unable to handle kernel paging request at virtual address 3f3e0000
[    0.663045] pgd = c0004000
[    0.665822] [3f3e0000] *pgd=00000000
[    0.669497] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[    0.674867] Modules linked in:
[    0.678000] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.9.0-mvebu-tld-12 #2
[    0.685011] Hardware name: Marvell Armada 380/385 (Device Tree)
[    0.690985] task: ee899300 task.stack: ee89a000
[    0.695579] PC is at unpack_to_rootfs+0xc4/0x2bc
[    0.700259] LR is at kmem_cache_alloc_trace+0x3c/0x19c
[    0.705457] pc : [<c0c01e70>]    lr : [<c0232bec>]    psr: 20000013
[    0.705457] sp : ee89beb0  ip : c0dd0df8  fp : 00000000
[    0.717048] r10: c0daca84  r9 : c0d9f0c8  r8 : 00000000
[    0.722330] r7 : 00000000  r6 : 3f3e0000  r5 : 005ec387  r4 : c0c518b8
[    0.728908] r3 : 00000000  r2 : 00000000  r1 : eefd7330  r0 : 00000000
[    0.735488] Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
[    0.742671] Control: 10c5387d  Table: 0000404a  DAC: 00000051
[    0.748472] Process swapper/0 (pid: 1, stack limit = 0xee89a220)
[    0.754532] Stack: (0xee89beb0 to 0xee89c000)
[    0.758952] bea0:                                     c0c63bd4 c0c5183c 00000000 c0171888
[    0.767174] bec0: 00000000 00000000 00000000 c01ecfd4 c0a069d8 c0daca80 c0daca7c 00000000
[    0.775396] bee0: 00000101 c0daca40 c0c63bd4 c0c5183c 00000000 c0c021b0 ffffe000 c0c02160
[    0.783618] bf00: 00000000 c01019bc ee8fd680 c0903c60 c0dd3aa4 cccccccd c0daca00 c029cc94
[    0.791840] bf20: efffccd4 efffcce0 c0b0065c c013f774 00000003 00000001 c0aff25c 00000005
[    0.800062] bf40: 00000005 c0b00670 00000100 c0b00670 c0d0dbc0 00000006 c0daca40 00000006
[    0.808284] bf60: c0daca40 c0c51830 00000101 c0daca40 c0c63bd4 c0c00e04 00000005 00000005
[    0.816506] bf80: 00000000 c0c005b4 00000000 c0834b6c 00000000 00000000 00000000 00000000
[    0.824728] bfa0: 00000000 c0834b74 00000000 c010c338 00000000 00000000 00000000 00000000
[    0.832949] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    0.841170] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000 ffffffff ffffffff
[    0.849398] [<c0c01e70>] (unpack_to_rootfs) from [<c0c021b0>] (populate_rootfs+0x50/0xb4)
[    0.857622] [<c0c021b0>] (populate_rootfs) from [<c01019bc>] (do_one_initcall+0xa8/0x150)
[    0.865850] [<c01019bc>] (do_one_initcall) from [<c0c00e04>] (kernel_init_freeable+0x190/0x258)
[    0.874593] [<c0c00e04>] (kernel_init_freeable) from [<c0834b74>] (kernel_init+0x8/0x10c)
[    0.882818] [<c0834b74>] (kernel_init) from [<c010c338>] (ret_from_fork+0x14/0x3c)
[    0.890436] Code: e3530000 0a000053 e1c421d0 e1cd21f0 (e5d63000)
[    0.896625] ---[ end trace d9b4fcdf53dc8bd6 ]---
[    0.901328] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[    0.901328]
[    0.910591] CPU1: stopping
[    0.913371] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G      D         4.9.0-mvebu-tld-12 #2
[    0.921592] Hardware name: Marvell Armada 380/385 (Device Tree)
[    0.927573] [<c01160bc>] (unwind_backtrace) from [<c0110bb4>] (show_stack+0x10/0x14)
[    0.935366] [<c0110bb4>] (show_stack) from [<c04ba5a4>] (dump_stack+0x70/0x8c)
[    0.942640] [<c04ba5a4>] (dump_stack) from [<c0113f90>] (handle_IPI+0x16c/0x350)
[    0.950085] [<c0113f90>] (handle_IPI) from [<c0101520>] (gic_handle_irq+0x78/0x94)
[    0.957703] [<c0101520>] (gic_handle_irq) from [<c011160c>] (__irq_svc+0x6c/0xa8)
[    0.965231] Exception stack(0xee8c5f98 to 0xee8c5fe0)
[    0.970342] 5f80:                                                       00000001 00000000
[    0.978564] 5fa0: 00000000 c011e6c0 00000000 00000000 ee8c4000 c0d0412c 00000002 ee8c5ff0
[    0.986786] 5fc0: c0d04194 00000000 00000080 ee8c5fe8 c010d400 c010d404 60000013 ffffffff
[    0.995009] [<c011160c>] (__irq_svc) from [<c010d404>] (arch_cpu_idle+0x2c/0x38)
[    1.002455] [<c010d404>] (arch_cpu_idle) from [<c015ef04>] (cpu_startup_entry+0xf0/0x1d0)
[    1.010678] [<c015ef04>] (cpu_startup_entry) from [<0010166c>] (0x10166c)
[    1.017519] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[    1.017519]
Re: Debian on WD MyCloud EX 4100
May 19, 2017 12:17PM
saschadd,

> Uncompressing Linux... done, booting the kernel.
> [ 0.000000] Booting Linux on physical CPU 0x0
> [ 0.000000] Linux version 4.9.0-mvebu-tld-12 (r
> oot@tldDebianVM) (gcc version 5.4.0 20160609 (Ubun
> tu/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] rev
> ision 1 (ARMv7), cr=10c5387d

Very encouraging!

> [ 0.652288] Unpacking initramfs...

> [ 0.655762] Unable to handle kernel paging requ
> est at virtual address 3f3e0000
> [ 0.663045] pgd = c0004000
> [ 0.665822] [3f3e0000] *pgd=00000000
> [ 0.669497] Internal error: Oops: 5 [#1] PREEMP
> T SMP ARM
> [ 0.674867] Modules linked in:
> [ 0.678000] CPU: 0 PID: 1 Comm: swapper/0 Not t
> ainted 4.9.0-mvebu-tld-12 #2
> [ 0.685011] Hardware name: Marvell Armada 380/3
> 85 (Device Tree)
> [ 0.690985] task: ee899300 task.stack: ee89a000
> [ 0.695579] PC is at unpack_to_rootfs+0xc4/0x2b

This is very good info (the kernel has started and it tried to populate the initramfs). If I am right, it means we got far enough to start working on the DTS modification for this box specifics.

Let's pause for a bit and revisit this in a week or so when I got home.

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

okay, so if you are on holiday have fun.

-
happy hacking,

saschadd
Re: Debian on WD MyCloud EX 4100
May 19, 2017 12:21PM
saschadd Wrote:
-------------------------------------------------------
> bodhi,
>
> okay, so if you are on holiday have fun.

:) thanks!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on WD MyCloud EX 4100
May 20, 2017 09:15AM
Just a short question: can you save env's permanent in the uboot?
As on my ex2u it's not possible.

But to be honest, the main problem could be that the dtb file is the wrong one.
And without saving the env's you have to flash at least something on the nand.

-------------------------------------------------------------------------
GitHub https://github.com/cschil
Re: Debian on WD MyCloud EX 4100
May 20, 2017 10:44AM
Peacemaker,

> Just a short question: can you save env's permanen
> t in the uboot?
> As on my ex2u it's not possible.

ATM, not possible. I'd like to see the WD EX4100 boots Debian before thinking how to do this.

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