Debian on WD MyCloud EX2 Ultra April 05, 2020 03:43AM |
Registered: 4 years ago Posts: 43 |
DTS_FILE = armada-385-wdmc-Ex2-Ultra make -j 4 $DTS_FILE.dtb
Re: Debian on WD MyCloud EX2 Ultra April 05, 2020 11:56AM |
Registered: 4 years ago Posts: 43 |
Quote
Kernel panic VFS: Unable to mount root fs on unknown-block(1,0)
Re: Debian on WD MyCloud EX2 Ultra April 05, 2020 05:40PM |
Admin Registered: 13 years ago Posts: 18,821 |
Quote
Kernel panic VFS: Unable to mount root fs
> on unknown-block(1,0)
>
>
printenv boot
Re: Debian on WD MyCloud EX2 Ultra April 06, 2020 05:21AM |
Registered: 4 years ago Posts: 43 |
#!/bin/busybox ash # init-script for WD Mycloud Mirror gen2 & Ex2 ultra # Boots from partition labeled "rootfs" # (c) Carl Schiller; schreibcarl@gmail.com #-----------functions-------------- # Start decryption filesystem decrypt_shell() { # Check which device encrypted export cryptdev=$(blkid -l -o device -t TYPE=crypto_LUKS) echo device=$(blkid -l -o device -t TYPE=crypto_LUKS) >>/etc/profile # add location of crytodevice to environment echo export device >>/etc/profile # Look for key on usb / hdd #mount -o rw $(findfs LABEL=key) /mnt/key #wait # fttpServerIp=$(ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}') tftp -r license.key -l /mnt/key/license.key -g tftp.local wait if [ -e /mnt/key/license.key ]; then cryptsetup luksOpen $cryptdev cryptroot --key-file /mnt/key/license.key dd if=/dev/urandom of=/mnt/key/license.key bs=1024 count=$RANDOM tftp -r license.key -l /mnt/key/license.key -p tftp.local rm /mnt/key/license.key check_unlock else dropbear -B -p 2222 -b /etc/dropbear/banner.crypto -P /run/dropbear.pid 2>&1 >/dev/null fi } # Check if key-decrypt was sucessfull check_unlock(){ wait if ! [ -e /dev/mapper/cryptroot ]; then echo -e "Unlock check failed,..." rescue_shell fi } # rescue_shell rescue_shell() { # start ssh dropbear -B -p 2222 -b /etc/dropbear/banner.rescue -P /run/dropbear.pid 2>&1 >/dev/null echo -e "\n Something went wrong. Dropping to a shell.\n" ## Wait for manual decryption # while ! [ -e /dev/mapper/cryptroot ]; do # sleep 2 # done # boot ## Or # Run UART shell exec 0</dev/console exec 1>/dev/console exec 2>/dev/console exec setsid cttyhack /bin/ash } #LVM init sequence initlvm() { lvm vgscan --mknodes # creates /dev/mapper/control lvm vgchange -a ly lvm vgscan --mknodes # creates /dev/mapper/VG-root and /dev/VG/root wait } #Switchroot seqence boot() { echo -e "\n Unmounting and Switch to OS\n" wait # kill running daemons [ -r "/run/dropbear.pid" ] && kill -9 $(cat /run/dropbear.pid) [ -r "/run/udhcpc.pid" ] && kill -9 $(cat /run/udhcpc.pid) umount /mnt/config 2> /dev/null umount /sys 2> /dev/null umount /proc 2> /dev/null umount /dev/pts 2> /dev/null umount /dev 2> /dev/null exec switch_root -c /dev/console /mnt/root /sbin/init } #Reset button resetbutton_init() { echo 50 > /sys/class/gpio/export echo 1 > /sys/class/gpio/gpio50/active_low } #-----------init script-------------- # Creat folders and install Busybox /bin/busybox mkdir -p /dev /mnt/root /mnt/key /mnt/config /mnt/config/initrd /proc /root /usr/sbin /usr/bin /sbin /bin /sys /run /bin/busybox --install -s export PATH=/bin:/sbin:/usr/bin:/usr/sbin # Mount the /proc and /sys filesystems. mount -t proc none /proc mount -t sysfs none /sys mount -t devtmpfs none /dev # Adding mdev support echo /sbin/mdev >/proc/sys/kernel/hotplug mdev -s # Adding reset button beheavor resetbutton_init # Initial Raid echo 'DEVICE /dev/sd?*' >/etc/mdadm.conf mdadm -Eb /dev/sd?* >>/etc/mdadm.conf mdadm -As --force wait # disk not ready? mdadm --assemble --scan # If case a disk was replaced (TODO: make an IF here) mdadm --manage /dev/md0 --add /dev/sdb # Mount the config files #ubiattach /dev/ubi_ctrl -m 5 #wait #mount -t ubifs ubi0:config /mnt/config - todo, we can't mount ubifs device as a module is missing # setting up network #/sbin/getmac ifconfig eth0 hw ether c2:0d:88:00:80:08 #ifconfig eth0 up udhcpc -t 5 -q -s /bin/simple.script -p /run/udhcpc.pid #check for LUKS-devices decrypt_shell initlvm mount -o rw /dev/MyVolGroup/root /mnt/root 2>&1 >/dev/null if [ -h /mnt/root/sbin/init -o -e /mnt/root/sbin/init ]; then ifconfig eth0 down boot else rescue_shell fi
Device UUID: 34375840-037F—B8C1-2285-24A3009F87FF Service UUID: FFEO RX UUID: FFE1 TX UUID: FFE1 Connecting Successfully connected to BLE device. 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=d ovefb:lcd0:$lcdO_params cicd.lcd0_enable=$lcd0_enable cicd.lcd_panel=$lcd_panel ovefb:lcd0:$lcdO_params cicd.lcd0_enable=$lcd0_enable cicd.lcd_panel=$lcd_panel bootargs_end=:10.4.50.254:255.255.255.0:Armada38x:ethO:none bootargs_root=root=/dev/nfs rw bootcmd=nand read.e Oxa00000 0x500000 0x500000;nand read.e Oxf00000 Oxa00000 0x500000;bootm Oxa00000 Oxf00000 bootcmd_auto=stage_boot $boot_order bootcmd_fdt=tftpboot 0x2000000 $image_name;tftpboot $fdtaddr $fdtfile;setenv bootargs $console $nandEcc $mtdparts $bootargs_root nfsroot=$s erverip:$rootpath ip=$ipaddr:$serverip$bootargs_end $mvNetConfig video=dovefb:lcd0:$1cdO_params cicd.lcd0_enable=$lcd0_enable cicd.lcd_pane l=$lcd_panel; bootz 0x2000000 — $fdtaddr; erverip:$rootpath ip=$ipaddr:$serverip$bootargs_end $mvNetConfig video=dovefb:lcd0:$1cdO_params cicd.lcd0_enable=$lcd0_enable cicd.lcd_pane l=$lcd_panel; bootz 0x2000000 — $fdtaddr; l=$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:$lcdO_params cicd.lcd0_enable=$1cd0_enable cicd.lcd_panel=$lcd_panel; bootz 0 x2000000 — $fdtaddr; $ipaddr:$serverip$bootargs_end $mvNetConfig video=dovefb:lcd0:$lcdO_params cicd.lcd0_enable=$1cd0_enable cicd.lcd_panel=$lcd_panel; bootz 0 x2000000 — $fdtaddr; x2000000 — $fdtaddr; bootcmd_fdt_edit=tftpboot $fdtaddr $fdtfile; fdt addr $fdtaddr; setenv bootcmd $bootcmd_fdt_boot bootcmd_lgcy=tftpboot 0x2000000 $image_name; setenv bootargs $bootargs_dflt; bootm 0x2000000; bootdelay=1 cacheShare=no console=console=ttyS0,115200 device_partition=0:1 disaMvPnp=no eeeEnable=no enaClockGating=no enaCpuStream=no enaFPU=yes enaMonExt=no enaWrAllo=no eth1addr=00:50:43:24:0a:29 ethlmtu=1500 eth2addr=00:50:43:24:8c:29 eth2mtu=1500 eth3addr=00:50:43:0a:8c:24 eth3mtu=1500 ethact=egiga2 ethaddr=00:50:43:8c:0a:29 ethmtu=1500 ethprime=egiga2 fdt_addr=2040000 fdt_skip_update=no fdtaddr=0x1000000 fdtfile=armada-38x—modular.dtb filesize=12 ide_path=/ image_name=uImage initrd_name=uInitrd ipaddr=192.168.11.110 resc,0_addr_r=2080000 erverip=192.168.11.114 standalone=fsload 0x2000000 $image_name;setenv bootargs $console $nandEcc $mtdparts root=/dev/mtdblock0 rw ip=$ipaddr:$serverip$bootargs_en d; bootm 0x2000000; d; bootm 0x2000000; stderr=serial stdin=serial stdout=serial usbOMode=host usbActive=0 usbType=3 vxworks_en=no yuk_ethaddr=00:00:00:EE:51:81 Environment size: 3209/524284 bytes Marvell»
Marvell» boot AND read: device 0 offset 0x500000, size 0x500000 5242880 bytes read: OK AND read: device 0 offset Oxa00000, size 0x500000 5242880 bytes read: OK •# Booting image at 00a00000 •# Booting kernel from Legacy Image at 00a00000 Image Name: Kernel-5.5.3 Created: 2020-04-05 18:18:50 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 5098687 Bytes = 4.9 MiB Load Address: 00008000 Entry Point: 00008000 Verifying Checksum OK •# Loading init Ramdisk from Legacy Image at 00f00000 Image Name: Initrd Created: 2020-04-04 18:10:00 UTC Image Type: ARM Linux RAMDisk Image (lzma compressed) Data Size: 4916280 Bytes = 4.7 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][ TO] Booting Linux on physical CPU Ox0 [ 0.000000][ TO] Linux version 5.6.0-mvebu-tld-1-g5364abc57 (root@wdmc) (gcc version 8.3.0 (Debian 8.3.0-6)) #3 SMP PREEMPT Sun Apr 5 21:09:30 MSK 2020 [ 0.000000][ TO] CPU: ARMv7 Processor [414fc091] revision 1 (ARMv7), cr=10c5387d [ 0.000000][ TO] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000][ TO] OF: fdt: Machine model: WD MyCloud Ex2 Ultra: Marvell Armada 385 [ 0.000000][ TO] Memory policy: Data cache writealloc [ 0.000000][ TO] INITRD: 0x00f00000+0x004b1000 overlaps in-use memory region - disabling initrd [ 0.000000][ TO] percpu: Embedded 20 pages/cpu s52172 r8192 d21556 u81920 [ 0.000000][ TO] Built 1 zonelists, mobility grouping on. Total pages: 260608 [ 0.000000][ TO] Kernel command line: root=/dev/ram console=ttyS0,115200 [ 0.000000][ TO] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear) [ 0.000000][ TO] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear) [ 0.000000][ TO] mem auto-init: stack:off, heap alloc:on, heap free:off [ 0.000000][ TO] Memory: 1022700K/1048576K available (10240K kernel code, 947K rwdata, 2864K rodata, 1024K init, 327K bss, 25876K res erved, OK cma- reserved, 262144K highmem) [ 0.000000] [ TO] random: get_random_u32 called from cache_alloc+0x438/0x7a4 with crng_init=0 [ 0.000000] [ TO] rcu: Preemptible hierarchical RCU implementation. [ 0.000000] [ TO] rcu: RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2. [ 0.000000] [ TO] Tasks RCU enabled. [ 0.000000] [ TO] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies. [ 0.000000] [ TO] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2 [ 0.000000] [ TO] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 [ 0.000000] [ TO] L2C-310 enabling early BRESP for Cortex-A9 [ 0.000000] [ TO] L2C-310 full line of zeros enabled for Cortex-A9 [ 0.000000] [ TO] L2C-310 D prefetch enabled, offset 1 lines [ 0.000000] [ TO] L2C-310 dynamic clock gating enabled, standby mode enabled [ 0.000000] [ TO] L2C-310 Coherent cache controller enabled, 16 ways, 1024 kB [ 0.000000] [ TO] L2C-310 Coherent: CACHE_ID 0x410054c9, AUX_CTRL Ox56070001 [ 0.000008] [ TO] sched_clock: 64 bits at 666MHz, resolution 1ns, wraps every 4398046511103ns [ 0.000022] [ TO] clocksource: arm_global_timer: mask: Oxffffffffffffffff max_cycles: 0x999999d70a, max_idle_ns: 440795225152 ns [ 0.000040] [ TO] Switching to timer-based delay loop, resolution 1ns [ 0.000273] [ TO] Ignoring duplicate/late registration of read_current_timer delay [ 0.000284] [ TO] clocksource: armada_370_xp_clocksource: mask: Oxffffffff max_cycles: Oxffffffff, max_idle_ns: 76450417870 ns [ 0.000842] [ TO] Console: colour dummy device 80x30 [ 0.000864] [ TO]timer frequency.. 1332.00 BogoMIPS (lpj=6660000) [ 0.000874][ TO] pid_max: default: 32768 minimum: 301 [ 0.001036][ TO] LSM: Security Framework initializing [ 00.001704][ TO] CPUO: Spectre v2: using BPIALL workaround [ 0.001840][ T1] CPUO: thread -1, cpu 0, socket 0, mpidr 80000000 [ 0.002198][ T1] Setting up static identity map for 0x100000 - 0x100060 [ 0.002300][ T1] mvebu-soc-id: MVEBU SoC ID=0x6820, Rev=0x4 [ 0.002407][ T1] mvebu-pmsu: Initializing Power Management Service Unit [ 0.002511][ T1] rcu: Hierarchical SRCU implementation. [ 0.004322][ T1] smp: Bringing up secondary CPUs ... [ 0.004709][ T1] Booting CPU 1 [ 0.004901][ TO] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001 [ 0.004906][ TO] CPU1: Spectre v2: using BPIALL workaround [ 0.005000][ T1] smp: Brought up 1 node, 2 CPUs [ 0.005007][ T1] SMP: Total of 2 processors activatecksource: jiffies: mask: Oxffffffff max_cycles: Oxffffffff, max_idle_ns: 19112604 462750000 ns [ 0.008364][ T1] futex hash table entries: 512 (order: 3, 32768 bytes, linear) [ 0.008497][ T1] xor: measuring software checksum speed [ 0.100106][ om: seed boundary self test passed [ 0.301685][ T1] prandom: 100 self tests passed [ 0.301690][ T1] pinctrl core: initialized pinctrl subsystem [ 0.302441][ T1] thermal_sys: Registered thermal governor 'stepwise' [ 0.302836][ T1] Ne=initialized audit_enabled=0 res=1 [ 0.305128][ T1] cpuidte: using governor ladder [ 0.305155][ T1] cpuidte: using governor menu [ 0.305259][ T1] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers. [ 0.305266][ T1] hw-breakpoint: maximum watchpoint size is 4 bytes. [ 0.305412][ T1] mvebu-pmsu: CPU hotplug support is currently broken on Armada 38x: disabling [ 0.305422][ T1] mvebu-pmsu: CPU idle is currently broken on Armada 38x: disabling [ 0.500153][ T1] raid6: int32x8 gen() 243 MB/s [ 0.670119][ T1] raid6: int32x8 xor() 168 MB/s [ 0.840210][ T1] raid6: int32x4 gen() 280 MB/s [ 1.010171][ T1] raid6: int32x4 xor() 180 MB/s [ 1.180180][ T1] raid6: int32x2 gen() 447 MB/s [ 1.350121][ T1] raid6: int32x2 xor() 257 MB/s [ 1.520145][ T1] raid6: int32x1 gen() 513 MB/s [ 1.690151][ T1] raid6: int32x1 xor() 208 MB/s [ 1.690158][ T1] raid6: using algorithm int32x1 gen() 5ore:6][ FS: , 61uredfamiv4.1nters available [ 2.391439][ T1] Initialise system trusted keyrings [ 2.391473][ T1] Key type blacklist registered [ 2.391769][ T1] workingset: timestamp_bits=30 max_order=18 bucket_order=0 [ 2.391860][ T1] zbud: loaded [ 2.392722][ T1] NFS: Registering the id_resolver key type [ 2.392740][ T1] Key type id_resolver registered [ 2.392746][ T1] Key type id_legacy registered [ 2.392758][ T1] nfs4filetayout_init: NFSv4 File Layout Driver Registering... [ 2.393 T1] bounce: pool size: 64 pages [ 2.415822][ T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 244) [ 2.417295][ T1] armada-38x-pinctrl f1018000.pinctrl: registered pinctrl driver [ 2.419364][ T1] mv_xor f1060800.xor: Marvell shared XOR driver [ 2.473770][ T1] mv_xor f1060800.xor: Marvell XOR (Descriptor Mode): ( xor cpy intr ) [ 2.475256][ T1] mv_xor f1060900.xor: Marvell shared XOR driver [ 2.533765][ T1] mv_xor f1060900.xor: Marvell XOR (Descriptor Mode): ( xor cpy intr ) [ 2.572380][ T1] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled [ 2.574201][ T1] printk: console [ttyS0] disabled [ 2.574251][ T1] f1012000.serial: ttySO at MMIO Oxf1012000 (irq = 23, base_baud = 12500000) is a 16550A [ 3.486234][ T1] printk: console [ttyS0] enabled not [ 3.547841][ T1] scsi host®: ahci-mvebu [ 3.599089][ T1] mvneta f1034000.ethernet eth0: Using random mac address 26:c4:ed:b9:33:99 [ 3.608013][ T1] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 3.615320][ T1] ehci-pci: EHCI PCI platform driver [ 3.620529][ T1] ehci-orion: EHCI orion driver [ 3.625429][ T1] orion-ehci f1058000.usb: EHCI Host Controller [ 3.631576][ T1] orion-ehci f1058000.usb: new USB bus registered, assigned bus number 1 [ 3.639983][ T1] orion-ehci f1058000.usb: irq 40, io mem Oxf1058000 [ 3.673234][ T1] orion-ehci f1058000.usb: USB 2.0 started, EHCI 1.00 [ 3.680054][ T1] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.06 [ 3.689100][ T1] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 3.697073][ T1] usb usb1: Product: EHCI Host Controller [ 3.702675][ T1] usb usb1: Manufacturer: Linux 5.6.0-mvebu-tld-1-g5364abc57 ehci_hcd [ 3.710745][ T1] usb usb1: SerialNumber: f1058000.usb [ 3.716481][ T1] hub 1-0:1.0: USB hub found [ 3.720974][ T1] hub 1-0:1.0: 1 port detected [ 3.726525][ T1] usbcore: registered new interface driver usblp [ 3.732790][ T1] usbcore: registered new interface driver usb-storage [ 3.739762][ T1] mousedev: PS/2 mouse device common for alt mice [ 3.747029][ T1] armada38x-rtc f10a3800.rtc: registered as rtc0 [ 3.753485][ T1] i2c /dev entries driver [ 3.760306][ T1] watchdog: f1020300.watchdog: driver supplied timeout (4294967295) out of range [ 3.769347][ T1] watchdog: f1020300.watchdog: falling back to default timeout (171) [ 3.777567][ T1] orion_wdt: Initial timeout 171 sec [ 3.783047][ T1] device-mapper: uevent: version 1.0.3 [ 3.788548][ T1] device-mapper: ioctt: 4.42.0-ioctl (2020-02-27) initialised: dm-devet@redhat.com [ 3.797967][ T1] device-mapper: muttipath round-robin: version 1.2.0 loaded [ 3.805267][ T1] device-mapper: muttipath queue-length: version 0.2.0 loaded [ 3.812615][ T1] device-mapper: muttipath service-time: version 0.3.0 loaded [ 3.820004][ T1] device-mapper: dm-log-userspace: version 1.3.0 loaded [ 3.826857][ usbh[ 3.875797][ T1] Segment Routing with IPv6 [ 3.880227][ T1] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver [ 3.887723][ T1] NET: Registered protocol family 17 [ 3.892991][ T1] 8021q: 802.1Q VLAN Support v1.8 [ 3.897987][ T1] Key type dns_resotver registered [ 3.903034][ T1] ThumbEE CPU extension supported. [ 3.908044][ T1] Registering SWP/SWPB emulation handler [ 3.911500][ T1194] ata2: SATA link down (SStatus 0 SControt 300) [ 3.913756][ T1] registered taskstats version 1 [ 3.924555][ T1] Loading compiled-in X.509 certificates [ 3.930136][ T1] zswap: loaded using pool lzo/zbud [ 3.935437][ T1] Key type ._fscrypt registered [ 3.940168][ T1] Key type .fscrypt registered [ 3.911500][ 11194] ata2: SATA link down (SStatus 0 SControl 300) [ 3.913756][ T1] registered taskstats version 1 [ 3.924555][ T1] Loading compiled-in X.509 certificates [ 3.930136][ T1] zswap: loaded using pool lzo/zbud [ 3.935437][ T1] Key type ._fscrypt registered [ 3.940168][ T1] Key type .fscrypt registered [ 3.944845][ T1] Key type fscrypt-provisioning registered [ 3.952584][ T1] Key type big_key registered [ 3.957639][ T1] Key type encrypted registered [ 3.965053][ T52] xhci-hcd f10f0000.usb3: xHCI Host Controller [ 3.971118][ T52] xhci-hcd f10f0000.usb3: new USB bus registered, assigned bus number 2 [ 3.979466][ T52] xhci-hcd f10f0000.usb3: hcc params 0x0a000990 hci version 0x100 quirks 0x0000000000010010 [ 3.989509][ T52] xhci-hcd f10f0000.usb3: irq 45, io mem 0xf10f0000 [ 3.996271][ T52] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.06 [ 4.005294][ T52] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 4.013281][ T52] usb usb2: Product: xHCI Host Controller bus number 3 [ 4.056465][ T52] xhci-hcd f10f0000.usb3: Host supports USB 3.0 SuperSpeed [ 4.063607][ T52] usb usb3: We don't know the algorithms for LPM for this host, disabling LPM. [ 4.072522][ T52] usb usb3: New USB device found, idVendorus 133 SControl 300) [ 4.095134][ T52] usb usb3: Manufacturer: Linux 5.6.0-mvebu-tld-1-g5364abc57 xhci-hcd [ 4.110100][ T52] usb usb3: SerialNumber: f10f0000.usb3 [ 4.115552][ T1190] ata1.00: ATA-9: WDC WD80EFAX-68KNBN0, 81.00A81, max UDMA/133 [ 4.115881][ T52] hub 3-0:1.0: USB hub found [ 4.123076][ T1190] ata1.00: 15628053168 sectors, multi 0: LBA48 NCQ (depth 32) [ 4.127559][ T52] hub 3-0:1.0: 1 port detected [ 4.139968][ T52] xhci-hcd f10f8000.usb3: xHCI Host Controller [ 4.146061][ T52] xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 4 [ 4.154382][ T52] xhci-hcd f10f8000.usb3: hcc params 0x0a000990 hci version 0x100 quirks 0x0000000000010010 [ 4.164385][ T1190] ata1.00: configured for UDMA/133 [ 4.164406][ T52] xhci-hcd f10f8000.usb3: irq 46, io mem 0xf10f8000 [ 4.176087][ T52] usb usb4: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.06 [ 4.179723][ T36] scsi 0:0:0:0: Direct-Access ATA WDC WD80EFAX-68K 0A81 PQ: 0 ANSI: 5 [ 4.185115][ T52] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 4.185120][ T52] usb usb4: Product: xHCI Host Controller [ 4.194685][ T20] sd 0:0:0:0: [sda] 15628053168 512-byte logical blocks: (8.00 TB/7.28 TiB) [ 4.201916][ T52] usb usb4: Manufacturer: Linux 5.6.0-mvebu-tld-1-g5364abc57 xhci-hcd [ 4.207816][ T20] sd 0:0:0:0: [sda] 4096-byte physical blocks [ 4.216248][ T52] usb usb4: SerialNumber: f10f8000.usb3 [ 4.224314][ T20] sd 0:0:0:0: [sda] Write Protect is off [ 4.230501][ T52] hub 4-0:1.0: USB hub found [ 4.241131][ T52] hub 4-0:1.0: 1 port detected [ 4.245670][ T20] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [ 4.250434][ T52] xhci-hcd f10f8000.usb3: xHCI Host Controller [ 4.266099][ T52] xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 5 [ 4.[ 4.333173][ T52] hub 5-0:1.0: USB hub found [ 4.337698][ T52] hub 5-0:1.0: 1 port detected [ 4.343133][ T1] input: gpio-keys as /devices/platform/gpio-keys/input/inputO [ 4.351149][ T1] armada38x-rtc f10a3800.rtc: setting system clock to 2020-04-06T09:44:38 UTC (1586166278) [ 4.376051][ T1] md: Autodetecting RAID arrays. [ 4.380869][ T1] md: autorun [ 4.384396][ T1] md: autorun DONE. [ 4.388666][ T1] VFS: Cannot open root device "ram" or unknown-block(1,0): error -6 [ 4.396705][ T1] Please append a correct "root," boot option; here are the available partitions: [ 4.405822][ T1] 0800 7814026584 sda [ 4.405824] T1] driver: sd [ 4.413370][ Ti] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0) [ 4.422380][ T1] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.6.0-mvebu-tld-1-g5364abc57 #3 [ 4.430948][ T1] Hardware name: Marvell Armada 380/385 (Device Tree) [ 4.437617][ T1] [<c01159d8>] (unwind_backtrace) from [<c01103arom [<c0f0150c>] (mount_block_root+Ox1b4/0x238) [ 4.469999][ T1] [<c0f0150c>] (mount_block_root) from [<c0f01680>] (mount_root+0xf0/0x12c) [ 4.478572][ T1] [<c0f01680>] (mount_root) from [<c0f01800>] (prepare_namespace+0x144/0x180) [ 4.487320][ T1] [<c0f01800>] (prepare_namespace) from [<c0f01064>] (kernel_init_freeable+Ox1f8/0x264) [ 4.496942][ T1] [<c0f01064>] (kernel_init_freeable) from [<c0a17a9c>] (kernel_init+0x8/0x10c) [ 4.505865][ T1] [<c0a17a9c>] (kernel_init) from [<c0100148>] (ret_from_fork+0x14/0x2c) [ 4.514172][ T1] Exception stack(Oxef0b3fb0 to OxefOb3ff8) [ 4.519949][ T1] 3fa0: 00000000 00000000 00000000 00000000 [ 4.528870][ T1] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 4.537790][ T1] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 4.545142][ C1] CPU1: stopping [ 4.548566][ C1] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.6.0-mvebu-tld-1-g5364abc57 #3 [ 4.557135][ C1] Hardware name: Marvell Armada 380/385 (Device Tree) [ 4.563792][ C1] [<c01159d8>] (unwind_backtrace) from [<c01103ac>] (show_stack+0x10/0x14) [ 4.572279][ C1] kc01103ac>1 (show_stack) from [<c0a0204c>]c_handle_irq) from kc010124c>1 ( irq_svc+0x6c/Oxa8) [ 4.604913][ C1] Exception stack(Oxef0d1f58 to Oxef0d1fa0) [ 4.610690][ C1] 1f40: 00000000 ef7e2870 [ 4.619612][ C1] 1f60: 00000000 c011e660 00000000 00000000 c1004fc8 c1004fe8 ffffe000 c1005030 [ 4.628534][ C1] 1f80: c0d296c4 00000000 c1003d00 ef0d1fa8 c010dOec c010d0dc 60000113 ffffffff [ 4.637458][ C1] kc010124c>1 ( irq_svc) from kc010d0dc>1 (arch_cpu_idle+Ox1c/0x38) [ 4.645596][ C1] kc010d0dc>1 (arch_cpu_idle) from [<c0151444>] (do_idle+0x134/0x2bc) [ 4.653733][ C1] [<c0151444>] (do_idle) from [<c0151884>] (cpu_startup_entry+Ox18/0x1c) [ 4.662044][ C1] [<c0151884>] (cpu_startup_entry) from [<00101dcc>] (0x101dcc) [ 4.669573][ T1] [ end Kernel panic not syncing: VFS: Unable to mount root fs on unknown block(1,0) ]
Re: Debian on WD MyCloud EX2 Ultra April 06, 2020 06:01AM |
Admin Registered: 13 years ago Posts: 18,821 |
Re: Debian on WD MyCloud EX2 Ultra April 06, 2020 07:39AM |
Registered: 4 years ago Posts: 43 |
cryptsetup luksOpen /dev/md0 cryptroot --key-file luks.key lvm vgscan --mknodes lvm vgchange -a ly lvm vgscan
mount -o rw /dev/MyVolGroup/root /mnt/root
exec switch_root -c /dev/console /mnt/root /sbin/init
Re: Debian on WD MyCloud EX2 Ultra April 06, 2020 09:51AM |
Registered: 5 years ago Posts: 50 |
Quote
In order to offload disk encryption on the CESA unit, you will need to specify to cryptsetup the following cipher: aes-cbc-essiv:sha256. Therefore the command to create your encrypted disk should looked as follow:
sudo cryptsetup -v -y -c aes-cbc-essiv:sha256 luksFormat /dev/sda1
cryptsetup benchmark
Re: Debian on WD MyCloud EX2 Ultra April 06, 2020 11:49AM |
Registered: 4 years ago Posts: 43 |
Quote
I point you that our devices have an hw crypto engine (CESA) that can be used to improve disk encryption
Quote
Also, note that this device has the same hardware of WD My Cloud Mirror Gen 2
Quote
Like me, you can build an usb drive to contain debian rootfs, kernel and initrd to bypass the size limits of the nand partitions
Quote
Also, I'm exploring btrfs instead of lvm+ext4
Re: Debian on WD MyCloud EX2 Ultra April 06, 2020 01:28PM |
Registered: 5 years ago Posts: 50 |
Re: Debian on WD MyCloud EX2 Ultra April 06, 2020 06:38PM |
Admin Registered: 13 years ago Posts: 18,821 |
Re: Debian on WD MyCloud EX2 Ultra April 07, 2020 03:43AM |
Registered: 4 years ago Posts: 43 |
Re: Debian on WD MyCloud EX2 Ultra April 07, 2020 05:23AM |
Admin Registered: 13 years ago Posts: 18,821 |
Re: Debian on WD MyCloud EX2 Ultra April 07, 2020 05:38AM |
Registered: 4 years ago Posts: 43 |
Re: Debian on WD MyCloud EX2 Ultra April 07, 2020 05:43PM |
Registered: 4 years ago Posts: 8 |
#: name size offset mask_flags 0: u-boot 0x000000500000 0x000000000000 1 1: uImage 0x000000600000 0x000000500000 0 2: uRamdisk 0x000000500000 0x000000b00000 0 3: image.cfs 0x00000b900000 0x000001000000 0 4: rescue_fw 0x000000f00000 0x00000c900000 0 5: config 0x000001400000 0x00000d800000 0 6: reserve1 0x000000a00000 0x00000ec00000 0 7: reserve2 0x000000900000 0x00000f600000 0
setenv mtdparts mtdparts=armada-nand:5m(u-boot)ro,6m@5m(uImage),5m@11m(uRamdisk),185m@16m(image.cfs),15m@201m(rescue_fw),20m@216m(config),10m@236m(reserve1),9m@246m(reserve2) saveenv
[ 0.000000][ TO] INITRD: 0x00f00000+0x004b1000 overlaps in-use memory region - disabling initrdYou can try to assign another memory location for the uRamdisk, please try at 0x2000000
usb start fatload usb 0:1 0xa00000 uImage fatload usb 0:1 0x2000000 uRamdisk bootm 0xa00000 0x2000000If it works, you need to overwrite your bootcmd to make it persistent.
setenv bootargs root=/dev/ram console=ttyS0,115200 setenv bootcmd 'nand read.e 0x0a00000 0x0500000 0x0500000;nand read.e 0x2000000 0x0a00000 0x0500000;bootm 0x0a00000 0x2000000' saveenv
Re: Debian on WD MyCloud EX2 Ultra April 07, 2020 06:49PM |
Admin Registered: 13 years ago Posts: 18,821 |
Re: Debian on WD MyCloud EX2 Ultra April 08, 2020 08:40AM |
Registered: 4 years ago Posts: 43 |
/* * Device Tree file for Marvell Armada 375 evaluation board * (DB-88F6720) * * Copyright (C) 2014 Marvell * * Gregory CLEMENT <gregory.clement@free-electrons.com> * Thomas Petazzoni <thomas.petazzoni@free-electrons.com> * * This file is dual-licensed: you can use it either under the terms * of the GPL or the X11 license, at your option. Note that this dual * licensing only applies to this file, and not this project as a * whole. * * a) This file is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * Or, alternatively, * * b) Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or * sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ /dts-v1/; #include <dt-bindings/gpio/gpio.h> #include "armada-385.dtsi" / { model = "WD MyCloud Ex2 Ultra: Marvell Armada 385"; compatible = "marvell,a385-db-ap", "marvell,armada385", "marvell,armada380"; chosen { stdout-path = "serial0:115200n8"; }; memory@0 { device_type = "memory"; reg = <0x00000000 0x40000000>; /* 512 MB */ }; soc { ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000 MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000 MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000 MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000 MBUS_ID(0x0c, 0x04) 0 0xf1200000 0x100000>; internal-regs { i2c@11000 { status = "okay"; clock-frequency = <100000>; /* eeprom@54 { compatible = "atmel,24c64"; reg = <0x54>; }; */ }; i2c@11100 { status = "okay"; clock-frequency = <100000>; }; sdhci@d8000 { broken-cd; wp-inverted; bus-width = <8>; status = "disabled"; no-1-8-v; }; serial@12000 { status = "okay"; }; serial@12100 { status = "okay"; }; pinctrl@18000 { /* sata_sd_pins: sata-sd-pins { marvell,pins = "mpp63", "mpp66"; marvell,function = "gpio"; }; */ /* use only one pin for UART1, as mpp20 is used by sata0 */ uart1_pins: uart-pins-1 { marvell,pins = "mpp19"; marvell,function = "ua1"; }; xhci0_vbus_pins: xhci0-vbus-pins { marvell,pins = "mpp26"; marvell,function = "gpio"; }; xhci1_vbus_pins: xhci1-vbus-pins { marvell,pins = "mpp27"; marvell,function = "gpio"; }; sata0_pins: sata-pins-0 { marvell,pins = "mpp55"; marvell,function = "sata0"; }; sata1_pins: sata-pins-1 { marvell,pins = "mpp56"; marvell,function = "sata1"; }; led_pins: led-pins { marvell,pins = "mpp43", "mpp52", "mpp53", "mpp54", "mpp48", "mpp58"; marvell,function = "gpio"; }; btn_pins: btn-pins { marvell,pins = "mpp50"; marvell,function = "gpio"; }; }; mdio@72004 { phy0: ethernet-phy@0 { marvell,reg-init = <3 16 0 0x101e>; // Init eth leds reg = <0>; }; }; ethernet@34000 { phy = <&phy0>; phy-mode = "sgmii"; buffer-manager = <&bm>; bm,pool-long = <0>; bm,pool-short = <1>; status = "okay"; }; rtc@a3800 { status = "okay"; }; usb0: usb@58000 { status = "okay"; }; sata@a8000 { pinctrl-names = "default"; //pinctrl-0 = <&sata0_pins &sata1_pins>; #address-cells = <1>; #size-cells = <0>; status = "okay"; /* sata0: sata-port@0 { reg = <0>; target-supply = <®_5v_sata0>; }; sata1: sata-port@1 { reg = <0>; target-supply = <®_5v_sata1>; }; */ }; nfc: flash@d0000 { status = "okay"; num-cs = <1>; nand-ecc-strength = <4>; nand-ecc-step-size = <512>; marvell,nand-keep-config; marvell,nand-enable-arbiter; nand-on-flash-bbt; partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; partition@0 { label = "u-boot"; reg = <0x0000000 0x00500000>; read-only; }; partition@500000 { label = "uImage"; reg = <0x00500000 0x00500000>; }; partition@a00000 { label = "uRamdisk"; reg = <0x00a00000 0x00500000>; }; partition@f00000 { label = "image.cfs"; reg = <0x00f00000 0x0b900000>; }; partition@c800000 { label = "Recovery"; reg = <0x0c800000 0x00f00000>; }; partition@d70000 { label = "config"; reg = <0x0d700000 0x01400000>; }; partition@eb00000 { label = "reserve1"; reg = <0x0eb00000 0x00a00000>; }; partition@f500000 { label = "reserve2"; reg = <0x0f500000 0x00a00000>; }; }; }; crypto@9D000 { status = "okay"; }; usb3@f0000 { usb-phy = <&usb3_0_phy>; status = "okay"; }; usb3@f8000 { usb-phy = <&usb3_1_phy>; status = "okay"; }; }; /*pcie { status = "okay"; pcie@1,0 { status = "okay"; }; pcie@2,0 { status = "okay"; }; pcie@3,0 { status = "okay"; }; }; */ }; gpio-leds { compatible = "gpio-leds"; pinctrl-names = "default"; pinctrl-0 = <&led_pins>; // Triggers for kernel v4.14: // [none] timer oneshot disk-activity ide-disk mtd nand-disk heartbeat backlight gpio cpu cpu0 cpu1 default-on panic hdd1-red { label = "Disk1:red"; gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>; linux,default-trigger = "disk-activity"; }; hdd2-red { label = "Disk2:red"; gpios = <&gpio1 20 GPIO_ACTIVE_HIGH>; linux,default-trigger = "panic"; }; hdd1-blue { label = "Disk1:blue"; gpios = <&gpio1 21 GPIO_ACTIVE_LOW>; default-state = "keep"; //linux,default-trigger = "gpio"; }; hdd2-blue { label = "Disk2:blue"; gpios = <&gpio1 22 GPIO_ACTIVE_LOW>; default-state = "keep"; //linux,default-trigger = "gpio"; }; }; gpio-keys { compatible = "gpio-keys"; pinctrl-names = "default"; pinctrl-0 = <&btn_pins>; #address-cells = <1>; #size-cells = <0>; btn-reset { label = "Reset"; linux,code = <0x198>; // Restart=0x198, Power=0x116 gpios = <&gpio1 18 GPIO_ACTIVE_LOW>; gpio-key,wakeup; }; }; usb3_0_phy: usb3_0_phy { compatible = "usb-nop-xceiv"; vcc-supply = <®_usb3_0_vbus>; }; usb3_1_phy: usb3_1_phy { compatible = "usb-nop-xceiv"; vcc-supply = <®_usb3_1_vbus>; }; reg_usb3_0_vbus: usb3-vbus0 { compatible = "regulator-fixed"; regulator-name = "usb3-vbus0"; pinctrl-names = "default"; pinctrl-0 = <&xhci0_vbus_pins>; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; enable-active-high; regulator-always-on; gpio = <&gpio0 26 GPIO_ACTIVE_HIGH>; }; reg_usb3_1_vbus: usb3-vbus1 { compatible = "regulator-fixed"; regulator-name = "usb3-vbus1"; pinctrl-names = "default"; pinctrl-0 = <&xhci1_vbus_pins>; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; enable-active-high; regulator-always-on; gpio = <&gpio0 27 GPIO_ACTIVE_HIGH>; }; /* reg_sata0: pwr-sata0 { compatible = "regulator-fixed"; regulator-name = "pwr_en_sata0"; regulator-min-microvolt = <12000000>; regulator-max-microvolt = <12000000>; enable-active-high; regulator-boot-on; gpio = <&gpio1 23 GPIO_ACTIVE_HIGH>; }; reg_5v_sata0: v5-sata0 { compatible = "regulator-fixed"; regulator-name = "v5.0-sata0"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; vin-supply = <®_sata0>; }; reg_12v_sata0: v12-sata0 { compatible = "regulator-fixed"; regulator-name = "v12.0-sata0"; regulator-min-microvolt = <12000000>; regulator-max-microvolt = <12000000>; vin-supply = <®_sata0>; }; reg_sata1: pwr-sata1 { compatible = "regulator-fixed"; regulator-name = "pwr_en_sata1"; regulator-min-microvolt = <12000000>; regulator-max-microvolt = <12000000>; enable-active-high; regulator-boot-on; gpio = <&gpio1 24 GPIO_ACTIVE_HIGH>; }; reg_5v_sata1: v5-sata1 { compatible = "regulator-fixed"; regulator-name = "v5.0-sata1"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; vin-supply = <®_sata1>; }; reg_12v_sata1: v12-sata1 { compatible = "regulator-fixed"; regulator-name = "v12.0-sata1"; regulator-min-microvolt = <12000000>; regulator-max-microvolt = <12000000>; vin-supply = <®_sata1>; }; */ }; /* &ahci0 { status = "okay"; }; &ahci1 { status = "okay"; }; */ &cesa { status = "okay"; }; &bm { status = "okay"; }; &bm_bppi { status = "okay"; };
Re: Debian on WD MyCloud EX2 Ultra April 08, 2020 08:42AM |
Registered: 4 years ago Posts: 8 |
Re: Debian on WD MyCloud EX2 Ultra April 08, 2020 09:01AM |
Registered: 4 years ago Posts: 43 |
Quote
You can try to assign another memory location for the uRamdisk, please try at 0x2000000
Quote
overlaps in-use memory region - disabling initrd
Re: Debian on WD MyCloud EX2 Ultra April 08, 2020 10:02AM |
Registered: 4 years ago Posts: 8 |
Quote
Does it mean that Kernel is still too big? Or I need to make uRamdisk smaller? Or the only solution is to patch the U-Boot?
Re: Debian on WD MyCloud EX2 Ultra April 08, 2020 01:43PM |
Registered: 4 years ago Posts: 43 |
VFS: Cannot open root device "ram" on unknown-block(1,0)
usb start fatload usb 0:1 0xa00000 boot\uImage fatload usb 0:1 0x2000000 boot\uRamdisk bootm 0xa00000 0x2000000
Re: Debian on WD MyCloud EX2 Ultra April 08, 2020 03:25PM |
Registered: 5 years ago Posts: 50 |
Quote
vzhilov
Does it mean that Kernel is still too big? Or I need to make uRamdisk smaller? Or the only solution is to patch the U-Boot?
// SPDX-License-Identifier: (GPL-2.0+ OR MIT) /* * Device Tree file for Western Digital My Cloud Expert Series EX2 Ultra * (BVBZ/Ranger Peak) * * Copyright (C) 2020 * * Based on the code from: * * Copyright (C) 2019 Evgeny Kolesnikov <evgenyz@gmail.com> * Copyright (C) 2016 Martin Mueller <mm@sig21.net> * Copyright (C) 2013 Gregory CLEMENT <gregory.clement@free-electrons.com> * Copyright (C) 2014 Thomas Petazzoni <thomas.petazzoni@free-electrons.com> * */ /dts-v1/; #include <dt-bindings/input/input.h> #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/leds/common.h> #include "armada-385.dtsi" / { model = "My Cloud Expert Series EX2 Ultra (BVBZ/Ranger Peak)"; compatible = "wd,mcex2u", "marvell,armada385", "marvell,armada380"; chosen { stdout-path = "console=ttyS0,115200 root=LABEL=rootfs earlyprintk"; }; memory { device_type = "memory"; reg = <0x00000000 0x40000000>; /* 1024 MB */ }; soc { ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000 MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000 MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000 /* CESA0: PHYS=0xf1100000 size 64K */ MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000 /* CESA1: PHYS=0xf1110000 */ MBUS_ID(0x0c, 0x04) 0 0xf1200000 0x100000 /* BM: PHYS=0xf1200000 size 1M */ MBUS_ID(0x0b, 0x04) 0 0xf1300000 0x100000>; /* PNC: PHYS=0xf1300000 size 1M */ internal-regs { timer@c200 { status = "okay"; }; i2c@11000 { status = "disabled"; }; i2c@11100 { status = "disabled"; }; uart0: serial@12000 { status = "okay"; }; /* Connected to Welltrend 6703F-OG240WT MCU * which controls power, fan and other things */ uart1: serial@12100 { status = "okay"; }; poweroff@12100 { compatible = "uart-poweroff"; reg = <0x12100 0x100>; clocks = <&coreclk 0>; baud = <19200>; cmd = [fa 03 03 01 00 00 fb]; status = "okay"; }; restart@12100 { compatible = "uart-restart"; reg = <0x12100 0x100>; clocks = <&coreclk 0>; baud = <19200>; cmd = [fa 03 03 02 00 00 fb]; override; status = "okay"; }; pinctrl: pinctrl@18000 { xhci0_vbus_pins: xhci0-vbus-pins { marvell,pins = "mpp26"; marvell,function = "gpio"; }; xhci1_vbus_pins: xhci1-vbus-pins { marvell,pins = "mpp27"; marvell,function = "gpio"; }; sata0_pins: sata-pins-0 { marvell,pins = "mpp55"; marvell,function = "gpio"; }; sata1_pins: sata-pins-1 { marvell,pins = "mpp56"; marvell,function = "gpio"; }; sata_leds: sata-leds { marvell,pins = "mpp43", "mpp52", "mpp53", "mpp54", "mpp48", "mpp58"; marvell,function = "gpio"; }; btn_pins: btn-pins { marvell,pins = "mpp50"; marvell,function = "gpio"; }; }; usb0: usb@58000 { status = "okay"; }; eth2: ethernet@34000 { status = "okay"; phy = <&phy0>; phy-mode = "sgmii"; buffer-manager = <&bm>; bm,pool-long = <0>; bm,pool-short = <1>; }; mdio: mdio@72004 { phy0: ethernet-phy@0 { /* Init ETH LEDs */ marvell,reg-init = <3 16 0 0x101e>; reg = <0>; }; }; cesa: crypto@90000 { status = "okay"; }; rtc: rtc@a3800 { status = "okay"; }; ahci0: sata@a8000 { pinctrl-names = "default"; pinctrl-0 = <&sata0_pins>, <&sata1_pins>; status = "okay"; #address-cells = <1>; #size-cells = <0>; sata0: sata-port@0 { reg = <0>; target-supply = <®_sata0>; }; sata1: sata-port@1 { reg = <1>; target-supply = <®_sata1>; }; }; bm: bm@c8000 { status = "okay"; }; nand_controller: nand-controller@d0000 { status = "okay"; nand: nand@0 { reg = <0>; label = "pxa3xx_nand-0"; nand-rb = <0>; marvell,nand-keep-config; #marvell,nand-enable-arbiter; //optional nand-on-flash-bbt; nand-ecc-strength = <4>; nand-ecc-step-size = <512>; partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; partition@00000000 { label = "U-Boot"; reg = <0x00000000 0x00500000>; /* 5 MB */ read-only; }; partition@00500000 { label = "uImage"; reg = <0x00500000 0x00500000>; /* 5 MB */ }; partition@00a00000 { label = "uRamdisk"; reg = <0x00a00000 0x00500000>; /* 5 MB */ }; partition@00f00000 { label = "image.cfs"; reg = <0x00f00000 0x0b900000>; /* 185 MB */ }; partition@c800000 { label = "rescue fw"; reg = <0x0c800000 0x00f00000>; /* 15 MB */ }; partition@d70000 { label = "config"; reg = <0x0d700000 0x01400000>; /* 20 MB */ }; partition@eb00000 { label = "reserve1"; reg = <0x0eb00000 0x00a00000>; /* 10 MB */ }; partition@f500000 { label = "reserve2"; reg = <0x0f500000 0x00a00000>; /* 10 MB */ }; }; }; }; usb3_0: usb3@f0000 { usb-phy = <&usb3_0_phy>; status = "okay"; }; usb3_1: usb3@f8000 { usb-phy = <&usb3_1_phy>; status = "okay"; }; }; bm_bppi: bm-bppi { status = "okay"; }; }; gpio-leds { compatible = "gpio-leds"; pinctrl-names = "default"; pinctrl-0 = <&sata_leds>; sata1-red-led { label = "wdmcex2u:red:hdd1"; gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>; default-state = keep; panic-indicator; }; sata2-red-led { label = "wdmcex2u:red:hdd2"; gpios = <&gpio1 20 GPIO_ACTIVE_HIGH>; default-state = keep; panic-indicator; }; sata1-blue-led { label = "wdmcex2u:blue:hdd1"; gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>; default-state = keep; }; sata2-blue-led { label = "wdmcex2u:blue:hdd2"; gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>; default-state = keep; }; }; gpio-keys { compatible = "gpio-keys"; pinctrl-names = "default"; pinctrl-0 = <&btn_pins>; #address-cells = <1>; #size-cells = <0>; reset { label = "reset"; linux,code = <KEY_RESTART>; // Restart=0x198, Power=0x116 gpios = <&gpio1 18 GPIO_ACTIVE_LOW>; debounce-interval = <60>; wakeup-source; }; }; usb3_0_phy: usb3_0_phy { compatible = "usb-nop-xceiv"; vcc-supply = <®_usb3_0_vbus>; }; usb3_1_phy: usb3_1_phy { compatible = "usb-nop-xceiv"; vcc-supply = <®_usb3_1_vbus>; }; reg_usb3_0_vbus: usb3-vbus0 { compatible = "regulator-fixed"; regulator-name = "usb3-vbus0"; pinctrl-names = "default"; pinctrl-0 = <&xhci0_vbus_pins>; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; enable-active-high; regulator-always-on; gpio = <&gpio0 26 GPIO_ACTIVE_HIGH>; }; reg_usb3_1_vbus: usb3-vbus1 { compatible = "regulator-fixed"; regulator-name = "usb3-vbus1"; pinctrl-names = "default"; pinctrl-0 = <&xhci1_vbus_pins>; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; enable-active-high; regulator-always-on; gpio = <&gpio0 27 GPIO_ACTIVE_HIGH>; }; reg_sata0: pwr-sata0 { compatible = "regulator-fixed"; regulator-name = "pwr_en_sata0"; regulator-min-microvolt = <12000000>; regulator-max-microvolt = <12000000>; enable-active-high; regulator-boot-on; gpio = <&gpio1 23 GPIO_ACTIVE_HIGH>; }; reg_sata1: pwr-sata1 { compatible = "regulator-fixed"; regulator-name = "pwr_en_sata1"; regulator-min-microvolt = <12000000>; regulator-max-microvolt = <12000000>; enable-active-high; regulator-boot-on; gpio = <&gpio1 24 GPIO_ACTIVE_HIGH>; }; };
// SPDX-License-Identifier: (GPL-2.0+ OR MIT) /* * Device Tree file for Western Digital My Cloud Mirror Gen 2 * (BWVZ/Grand Teton) * * Copyright (C) 2020 * * Based on the code from: * * Copyright (C) 2019 Evgeny Kolesnikov <evgenyz@gmail.com> * Copyright (C) 2016 Martin Mueller <mm@sig21.net> * Copyright (C) 2013 Gregory CLEMENT <gregory.clement@free-electrons.com> * Copyright (C) 2014 Thomas Petazzoni <thomas.petazzoni@free-electrons.com> * */ /dts-v1/; #include <dt-bindings/input/input.h> #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/leds/common.h> #include "armada-385.dtsi" / { model = "WD MyCloud Mirror Gen 2 (BWVZ/Grand Teton)"; compatible = "wd,mcmg2", "marvell,armada385", "marvell,armada380"; chosen { stdout-path = "console=ttyS0,115200"; }; memory { device_type = "memory"; reg = <0x00000000 0x20000000>; /* 512 MB */ }; soc { ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000 MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000 MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000 /* CESA0: PHYS=0xf1100000 size 64K */ MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000 /* CESA1: PHYS=0xf1110000 */ MBUS_ID(0x0c, 0x04) 0 0xf1200000 0x100000 /* BM: PHYS=0xf1200000 size 1M */ MBUS_ID(0x0b, 0x04) 0 0xf1300000 0x100000>; /* PNC: PHYS=0xf1300000 size 1M */ internal-regs { timer@c200 { status = "okay"; }; i2c@11000 { status = "disabled"; }; i2c@11100 { status = "disabled"; }; uart0: serial@12000 { status = "okay"; }; /* Connected to Welltrend 6703F-OG240WT MCU * which controls power, fan and other things */ uart1: serial@12100 { status = "okay"; }; poweroff@12100 { compatible = "uart-poweroff"; reg = <0x12100 0x100>; clocks = <&coreclk 0>; baud = <19200>; cmd = [fa 03 03 01 00 00 fb]; status = "okay"; }; restart@12100 { compatible = "uart-restart"; reg = <0x12100 0x100>; clocks = <&coreclk 0>; baud = <19200>; cmd = [fa 03 03 02 00 00 fb]; override; status = "okay"; }; pinctrl: pinctrl@18000 { xhci0_vbus_pins: xhci0-vbus-pins { marvell,pins = "mpp26"; marvell,function = "gpio"; }; xhci1_vbus_pins: xhci1-vbus-pins { marvell,pins = "mpp27"; marvell,function = "gpio"; }; sata0_pins: sata-pins-0 { marvell,pins = "mpp55"; marvell,function = "gpio"; }; sata1_pins: sata-pins-1 { marvell,pins = "mpp56"; marvell,function = "gpio"; }; sata_leds: sata-leds { marvell,pins = "mpp43", "mpp52", "mpp53", "mpp54", "mpp48", "mpp58"; marvell,function = "gpio"; }; btn_pins: btn-pins { marvell,pins = "mpp50"; marvell,function = "gpio"; }; }; usb0: usb@58000 { status = "okay"; }; eth2: ethernet@34000 { status = "okay"; phy = <&phy0>; phy-mode = "sgmii"; buffer-manager = <&bm>; bm,pool-long = <0>; bm,pool-short = <1>; }; mdio: mdio@72004 { phy0: ethernet-phy@0 { /* Init ETH LEDs */ marvell,reg-init = <3 16 0 0x101e>; reg = <0>; }; }; cesa: crypto@90000 { status = "okay"; }; rtc: rtc@a3800 { status = "okay"; }; ahci0: sata@a8000 { pinctrl-names = "default"; pinctrl-0 = <&sata0_pins>, <&sata1_pins>; status = "okay"; #address-cells = <1>; #size-cells = <0>; sata0: sata-port@0 { reg = <0>; target-supply = <®_sata0>; }; sata1: sata-port@1 { reg = <1>; target-supply = <®_sata1>; }; }; bm: bm@c8000 { status = "okay"; }; nand_controller: nand-controller@d0000 { status = "okay"; nand: nand@0 { reg = <0>; label = "pxa3xx_nand-0"; nand-rb = <0>; marvell,nand-keep-config; #marvell,nand-enable-arbiter; //optional nand-on-flash-bbt; nand-ecc-strength = <4>; nand-ecc-step-size = <512>; partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; partition@00000000 { label = "U-Boot"; reg = <0x00000000 0x00500000>; /* 5 MB */ read-only; }; partition@00500000 { label = "uImage"; reg = <0x00500000 0x00500000>; /* 5 MB */ }; partition@00a00000 { label = "uRamdisk"; reg = <0x00a00000 0x00500000>; /* 5 MB */ }; partition@00f00000 { label = "image.cfs"; reg = <0x00f00000 0x0b900000>; /* 185 MB */ }; partition@c800000 { label = "rescue fw"; reg = <0x0c800000 0x00f00000>; /* 15 MB */ }; partition@d70000 { label = "config"; reg = <0x0d700000 0x01400000>; /* 20 MB */ }; partition@eb00000 { label = "reserve1"; reg = <0x0eb00000 0x00a00000>; /* 10 MB */ }; partition@f500000 { label = "reserve2"; reg = <0x0f500000 0x00a00000>; /* 10 MB */ }; }; }; }; usb3_0: usb3@f0000 { usb-phy = <&usb3_0_phy>; status = "okay"; }; usb3_1: usb3@f8000 { usb-phy = <&usb3_1_phy>; status = "okay"; }; }; bm_bppi: bm-bppi { status = "okay"; }; }; gpio-leds { compatible = "gpio-leds"; pinctrl-names = "default"; pinctrl-0 = <&sata_leds>; sata1-red-led { label = "wdmcmg2:red:hdd1"; gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>; default-state = keep; panic-indicator; }; sata2-red-led { label = "wdmcmg2:red:hdd2"; gpios = <&gpio1 20 GPIO_ACTIVE_HIGH>; default-state = keep; panic-indicator; }; sata1-blue-led { label = "wdmcmg2:blue:hdd1"; gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>; default-state = keep; }; sata2-blue-led { label = "wdmcmg2:blue:hdd2"; gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>; default-state = keep; }; }; gpio-keys { compatible = "gpio-keys"; pinctrl-names = "default"; pinctrl-0 = <&btn_pins>; #address-cells = <1>; #size-cells = <0>; reset { label = "reset"; linux,code = <KEY_RESTART>; // Restart=0x198, Power=0x116 gpios = <&gpio1 18 GPIO_ACTIVE_LOW>; debounce-interval = <60>; wakeup-source; }; }; usb3_0_phy: usb3_0_phy { compatible = "usb-nop-xceiv"; vcc-supply = <®_usb3_0_vbus>; }; usb3_1_phy: usb3_1_phy { compatible = "usb-nop-xceiv"; vcc-supply = <®_usb3_1_vbus>; }; reg_usb3_0_vbus: usb3-vbus0 { compatible = "regulator-fixed"; regulator-name = "usb3-vbus0"; pinctrl-names = "default"; pinctrl-0 = <&xhci0_vbus_pins>; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; enable-active-high; regulator-always-on; gpio = <&gpio0 26 GPIO_ACTIVE_HIGH>; }; reg_usb3_1_vbus: usb3-vbus1 { compatible = "regulator-fixed"; regulator-name = "usb3-vbus1"; pinctrl-names = "default"; pinctrl-0 = <&xhci1_vbus_pins>; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; enable-active-high; regulator-always-on; gpio = <&gpio0 27 GPIO_ACTIVE_HIGH>; }; reg_sata0: pwr-sata0 { compatible = "regulator-fixed"; regulator-name = "pwr_en_sata0"; regulator-min-microvolt = <12000000>; regulator-max-microvolt = <12000000>; enable-active-high; regulator-boot-on; gpio = <&gpio1 23 GPIO_ACTIVE_HIGH>; }; reg_sata1: pwr-sata1 { compatible = "regulator-fixed"; regulator-name = "pwr_en_sata1"; regulator-min-microvolt = <12000000>; regulator-max-microvolt = <12000000>; enable-active-high; regulator-boot-on; gpio = <&gpio1 24 GPIO_ACTIVE_HIGH>; }; };
Re: Debian on WD MyCloud EX2 Ultra April 08, 2020 04:05PM |
Registered: 4 years ago Posts: 43 |
patch -p1 -d linux-stable < GrandTeton-20170708.patch
Re: Debian on WD MyCloud EX2 Ultra April 08, 2020 05:10PM |
Registered: 4 years ago Posts: 8 |
setenv bootcmd 'nand read.e 0x02000020 0x0500000 0x0500000; nand read.e 0x2900000 0x0a00000 0x0500000; bootm 0x02000020 0x2900000' saveenv
If you plan to boot from USB, you also need to change the boot environment. An example is from the post of CyberPK as following:Quote
When I boot from USB with reset button pressed I get kernel panic with ...
setenv set_bootargs_stock 'setenv bootargs root=/dev/ram console=ttyS0,115200' setenv bootcmd_stock 'echo Booting from stock ... ; run set_bootargs_stock; printenv bootargs; nand read.e 0xa00000 0x500000 0x500000;nand read.e 0xf00000 0xa00000 0x500000;bootm 0xa00000 0xf00000' setenv bootdev 'usb' setenv device '0:1' setenv load_image_addr '0x02000020' setenv load_initrd_addr '0x2900000' setenv load_image 'echo loading Image ...; ext2load $bootdev $device $load_image_addr /boot/uImage' setenv load_initrd 'echo loading uInitrd ...; ext2load $bootdev $device $load_initrd_addr /boot/uInitrd' setenv usb_set_bootargs 'setenv bootargs "console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts earlyprintk=serial init=/bin/systemd"' setenv bootcmd_usb 'echo Booting from USB ...; usb start; run usb_set_bootargs; if run load_image; then if run load_initrd; then bootm $load_image_addr $load_initrd_addr; else bootm $load_image_addr; fi; fi; usb stop' setenv bootcmd 'setenv fdt_skip_update yes; setenv usbActive 0; run bootcmd_usb; setenv usbActive 1; run bootcmd_usb; setenv fdt_skip_update no; run bootcmd_stock; reset' saveenv resetThis will first try to boot from the USB if there is one, otherwise from NAND.
cp GrandTeton-20170708.patch u-boot/u-boot-2013.01-2014_T3.0p2 cd u-boot/u-boot-2013.01-2014_T3.0p2 patch -p1 < GrandTeton-20170708.patch sudo ./xbuid.sh buildOr use my patched u-boot for my EX2 Ultra at the attachment.
Re: Debian on WD MyCloud EX2 Ultra April 08, 2020 05:31PM |
Admin Registered: 13 years ago Posts: 18,821 |
Quote
overlaps in-use memory region - disabling initrd
Quote
VFS: Cannot open root device "ram" on unknown-block(1,0)
root=LABEL=rootfsAnd then label your rootfs partition rootfs. This way the kernel always knows where the system rootfs is and mount it successfully. I believe CyberPK and dtd already using that.
Re: Debian on WD MyCloud EX2 Ultra April 09, 2020 07:16AM |
Registered: 4 years ago Posts: 43 |
Quote
Have a look at the new DTS from me or from CyberPK, the DTS from Fox seems too old.
// SPDX-License-Identifier: (GPL-2.0+ OR MIT) /* * Device Tree file for Western Digital My Cloud Expert Series EX2 Ultra * (BVBZ/Ranger Peak) * * Copyright (C) 2020 * * Based on the code from: * * Copyright (C) 2019 Evgeny Kolesnikov <evgenyz@gmail.com> * Copyright (C) 2016 Martin Mueller <mm@sig21.net> * Copyright (C) 2013 Gregory CLEMENT <gregory.clement@free-electrons.com> * Copyright (C) 2014 Thomas Petazzoni <thomas.petazzoni@free-electrons.com> * */ /dts-v1/; #include <dt-bindings/input/input.h> #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/leds/common.h> #include "armada-385.dtsi" / { model = "My Cloud Expert Series EX2 Ultra (BVBZ/Ranger Peak)"; compatible = "wd,mcex2u", "marvell,armada385", "marvell,armada380"; chosen { stdout-path = "console=ttyS0,115200 root=LABEL=rootfs earlyprintk"; }; memory { device_type = "memory"; reg = <0x00000000 0x40000000>; /* 1024 MB */ }; soc { ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000 MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000 MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000 /* CESA0: PHYS=0xf1100000 size 64K */ MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000 /* CESA1: PHYS=0xf1110000 */ MBUS_ID(0x0c, 0x04) 0 0xf1200000 0x100000 /* BM: PHYS=0xf1200000 size 1M */ MBUS_ID(0x0b, 0x04) 0 0xf1300000 0x100000>; /* PNC: PHYS=0xf1300000 size 1M */ internal-regs { timer@c200 { status = "okay"; }; i2c@11000 { status = "disabled"; }; i2c@11100 { status = "disabled"; }; uart0: serial@12000 { status = "okay"; }; /* Connected to Welltrend 6703F-OG240WT MCU * which controls power, fan and other things */ uart1: serial@12100 { status = "okay"; }; poweroff@12100 { compatible = "uart-poweroff"; reg = <0x12100 0x100>; clocks = <&coreclk 0>; baud = <19200>; cmd = [fa 03 03 01 00 00 fb]; status = "okay"; }; restart@12100 { compatible = "uart-restart"; reg = <0x12100 0x100>; clocks = <&coreclk 0>; baud = <19200>; cmd = [fa 03 03 02 00 00 fb]; override; status = "okay"; }; pinctrl: pinctrl@18000 { xhci0_vbus_pins: xhci0-vbus-pins { marvell,pins = "mpp26"; marvell,function = "gpio"; }; xhci1_vbus_pins: xhci1-vbus-pins { marvell,pins = "mpp27"; marvell,function = "gpio"; }; sata0_pins: sata-pins-0 { marvell,pins = "mpp55"; marvell,function = "gpio"; }; sata1_pins: sata-pins-1 { marvell,pins = "mpp56"; marvell,function = "gpio"; }; sata_leds: sata-leds { marvell,pins = "mpp43", "mpp52", "mpp53", "mpp54", "mpp48", "mpp58"; marvell,function = "gpio"; }; btn_pins: btn-pins { marvell,pins = "mpp50"; marvell,function = "gpio"; }; }; usb0: usb@58000 { status = "okay"; }; eth2: ethernet@34000 { status = "okay"; phy = <&phy0>; phy-mode = "sgmii"; buffer-manager = <&bm>; bm,pool-long = <0>; bm,pool-short = <1>; }; mdio: mdio@72004 { phy0: ethernet-phy@0 { /* Init ETH LEDs */ marvell,reg-init = <3 16 0 0x101e>; reg = <0>; }; }; cesa: crypto@90000 { status = "okay"; }; rtc: rtc@a3800 { status = "okay"; }; ahci0: sata@a8000 { pinctrl-names = "default"; pinctrl-0 = <&sata0_pins>, <&sata1_pins>; status = "okay"; #address-cells = <1>; #size-cells = <0>; sata0: sata-port@0 { reg = <0>; target-supply = <®_sata0>; }; sata1: sata-port@1 { reg = <1>; target-supply = <®_sata1>; }; }; bm: bm@c8000 { status = "okay"; }; nand_controller: nand-controller@d0000 { status = "okay"; nand: nand@0 { reg = <0>; label = "pxa3xx_nand-0"; nand-rb = <0>; marvell,nand-keep-config; #marvell,nand-enable-arbiter; //optional nand-on-flash-bbt; nand-ecc-strength = <4>; nand-ecc-step-size = <512>; partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; partition@00000000 { label = "U-Boot"; reg = <0x00000000 0x00500000>; /* 5 MB */ read-only; }; partition@00500000 { label = "uImage"; reg = <0x00500000 0x00500000>; /* 5 MB */ }; partition@00a00000 { label = "uRamdisk"; reg = <0x00a00000 0x00500000>; /* 5 MB */ }; partition@00f00000 { label = "image.cfs"; reg = <0x00f00000 0x0b900000>; /* 185 MB */ }; partition@c800000 { label = "rescue fw"; reg = <0x0c800000 0x00f00000>; /* 15 MB */ }; partition@d70000 { label = "config"; reg = <0x0d700000 0x01400000>; /* 20 MB */ }; partition@eb00000 { label = "reserve1"; reg = <0x0eb00000 0x00a00000>; /* 10 MB */ }; partition@f500000 { label = "reserve2"; reg = <0x0f500000 0x00a00000>; /* 10 MB */ }; }; }; }; usb3_0: usb3@f0000 { usb-phy = <&usb3_0_phy>; status = "okay"; }; usb3_1: usb3@f8000 { usb-phy = <&usb3_1_phy>; status = "okay"; }; }; bm_bppi: bm-bppi { status = "okay"; }; }; gpio-leds { compatible = "gpio-leds"; pinctrl-names = "default"; pinctrl-0 = <&sata_leds>; sata1-red-led { label = "wdmcex2u:red:hdd1"; gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>; default-state = keep; panic-indicator; }; sata2-red-led { label = "wdmcex2u:red:hdd2"; gpios = <&gpio1 20 GPIO_ACTIVE_HIGH>; default-state = keep; panic-indicator; }; sata1-blue-led { label = "wdmcex2u:blue:hdd1"; gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>; default-state = keep; }; sata2-blue-led { label = "wdmcex2u:blue:hdd2"; gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>; default-state = keep; }; }; gpio-keys { compatible = "gpio-keys"; pinctrl-names = "default"; pinctrl-0 = <&btn_pins>; #address-cells = <1>; #size-cells = <0>; reset { label = "reset"; linux,code = <KEY_RESTART>; // Restart=0x198, Power=0x116 gpios = <&gpio1 18 GPIO_ACTIVE_LOW>; debounce-interval = <60>; wakeup-source; }; }; usb3_0_phy: usb3_0_phy { compatible = "usb-nop-xceiv"; vcc-supply = <®_usb3_0_vbus>; }; usb3_1_phy: usb3_1_phy { compatible = "usb-nop-xceiv"; vcc-supply = <®_usb3_1_vbus>; }; reg_usb3_0_vbus: usb3-vbus0 { compatible = "regulator-fixed"; regulator-name = "usb3-vbus0"; pinctrl-names = "default"; pinctrl-0 = <&xhci0_vbus_pins>; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; enable-active-high; regulator-always-on; gpio = <&gpio0 26 GPIO_ACTIVE_HIGH>; }; reg_usb3_1_vbus: usb3-vbus1 { compatible = "regulator-fixed"; regulator-name = "usb3-vbus1"; pinctrl-names = "default"; pinctrl-0 = <&xhci1_vbus_pins>; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; enable-active-high; regulator-always-on; gpio = <&gpio0 27 GPIO_ACTIVE_HIGH>; }; reg_sata0: pwr-sata0 { compatible = "regulator-fixed"; regulator-name = "pwr_en_sata0"; regulator-min-microvolt = <12000000>; regulator-max-microvolt = <12000000>; enable-active-high; regulator-boot-on; gpio = <&gpio1 23 GPIO_ACTIVE_HIGH>; }; reg_sata1: pwr-sata1 { compatible = "regulator-fixed"; regulator-name = "pwr_en_sata1"; regulator-min-microvolt = <12000000>; regulator-max-microvolt = <12000000>; enable-active-high; regulator-boot-on; gpio = <&gpio1 24 GPIO_ACTIVE_HIGH>; }; };
user@rdshost:~/linux-stable$ make armada-385-wdmc-Ex2-Ultra.dtb DTC arch/arm/boot/dts/armada-385-wdmc-Ex2-Ultra.dtb Error: arch/arm/boot/dts/armada-385-wdmc-Ex2-Ultra.dts:257.20-21 syntax error FATAL ERROR: Unable to parse input tree scripts/Makefile.lib:285: recipe for target 'arch/arm/boot/dts/armada-385-wdmc-Ex2-Ultra.dtb' failed make[1]: *** [arch/arm/boot/dts/armada-385-wdmc-Ex2-Ultra.dtb] Error 1 Makefile:1240: recipe for target 'armada-385-wdmc-Ex2-Ultra.dtb' failed make: *** [armada-385-wdmc-Ex2-Ultra.dtb] Error 2
sata1-red-led { label = "wdmcex2u:red:hdd1"; gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>; 257 default-state = keep; panic-indicator; };
Re: Debian on WD MyCloud EX2 Ultra April 09, 2020 09:03AM |
Registered: 4 years ago Posts: 43 |
Re: Debian on WD MyCloud EX2 Ultra April 09, 2020 10:02AM |
Registered: 4 years ago Posts: 43 |
setenv bootcmd 'nand read.e 0x02000020 0x0500000 0x0500000; nand read.e 0x2900000 0x0a00000 0x0500000; bootm 0x02000020 0x2900000' boot
NAND read: device 0 offset 0x500000, size 0xfb00000 Attempt to read outside the flash area 0 bytes read: ERROR NAND read: device 0 offset 0xa00000, size 0x500000 5242880 bytes read: OK
Re: Debian on WD MyCloud EX2 Ultra April 09, 2020 12:19PM |
Registered: 5 years ago Posts: 50 |
Re: Debian on WD MyCloud EX2 Ultra April 09, 2020 01:15PM |
Registered: 4 years ago Posts: 43 |
usb start fatload usb 0:1 0xa00000 uImage fatload usb 0:1 0x2000020 uInitrd bootm 0xa00000 0x2000020
bootm 0xa00000 0x2000020
setenv bootcmd 'nand read.e 0x02000020 0x0500000 0x0500000; nand read.e 0x2900000 0x0a00000 0x0500000; bootm 0x02000020 0x2900000'
dd if=/dev/zero of=/dev/mtdblock1 dd if=uImage of=/dev/mtdblock1 dd if=/dev/zero of=/dev/mtdblock2 dd if=uInitrd of=/dev/mtdblock2
Re: Debian on WD MyCloud EX2 Ultra April 09, 2020 07:35PM |
Registered: 4 years ago Posts: 8 |
usb start fatload usb 0:1 0xa00000 uImage fatload usb 0:1 0x2000020 uInitrd bootm 0xa00000 0x2000020This will load uImage from USB into memory at address 0xa00000 and uInitrd at address 0x2000020. Then it will start to boot (bootm = boot from memory)
Did you mean: the image and ramdisk are already in NAND? If yes then they must be first loaded into memory, because after reboot, memory is clear.Quote
vzhilov
But if I reboot and put just:
bootm 0xa00000 0x2000020
assuming the images are already in memory, I get nothing.
setenv bootcmd 'nand read.e 0x02000020 0x0500000 0x0500000; nand read.e 0x2900000 0x0a00000 0x0500000; bootm 0x02000020 0x2900000'
nand read.e 0x2900000 0x0a00000 0x0500000means: read from NAND at address 0x0a00000 into memory at address 0x2900000 (size=0x0500000=5MB)
nand read.e 0x02000020 0x0500000 0x0500000;Analogously, load uImage from NAND into memory.
bootm 0x02000020 0x2900000Start booting after loaded.
setenv bootcmd 'nand read.e 0x02000020 0x0500000 0x0500000; nand read.e 0x2900000 0x0a00000 0x0500000; bootm 0x02000020 0x2900000' saveenv reset