Welcome! Log In Create A New Profile

Advanced

WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV

Posted by gisab 
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
November 02, 2022 01:37PM
i5Js,

> I also get another uart interface, but it don't
> know why it doesn't work. I don't have anything
> the screen. I'm trying to use my Mac, or a windows
> machine with puttt, but nothing works. Just two
> questions before giving up:
>
> ** should I need a raspberry to connect to the box
> using the uart?

You can run Linux VM on your Mac, too. Usually putty on Windows or screen on Mac should work fine. But for recovery purpose (i.e. running kwboot to boot over UART, you will need Linux). So getting a low cost rPi is handy, it already provides the serial converter.

> ** the cables, do I need to cross it? Rx-Tx and
> viceversa?

Yes, for most of the serial module converters RX-TX need to be crossed. A few (old) converters with CP2xxx chip alrady crossed.

But as always, if you don't see anything on serial, then try crossing RX-TX.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
November 02, 2022 01:59PM
I have some Rasp, and I'm doing some tests.... but nothing works :( sometimes moving the pins in the board I get som characters, but it's strange because with a multi tester the connection between both works... honestly I don't know that else I can do.

Do I need to connect any hardrive?



Edited 1 time(s). Last edit at 11/02/2022 02:45PM by i5Js.
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
November 02, 2022 03:31PM
> I have some Rasp, and I'm doing some tests.... but
> nothing works :( sometimes moving the pins in the
> board I get som characters, but it's strange
> because with a multi tester the connection between
> both works... honestly I don't know that else I
> can do.

Check GND wire. You should connect only 3 wires GND, TXD, and RXD.

> Do I need to connect any hardrive?

Not need.

====

You probably can find serial console info in the WD Ex2 Ultra working thread, and confirm the correct pinouts.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
November 02, 2022 03:37PM
https://community.wd.com/t/bricked-my-ex2-also-how-i-unbricked-it/98660/9

Quote

The connector has the following pin map:

5 o <-- RX Data
4 (No pin)
3 o — N/C (3.3V)
2 o — GND
1 o --> TX Data

Also


Quote

On the PCB inside the EX2, there is an (un)populated 5pin header on the back (side opposite the CPU). You can see the header I am talking about in the bottom image on this review: http://www.eteknix.com/western-digital-ex2-2-bay-8tb-my-cloud-nas-review/2/ 59

In my earlier post I mentioned the connection order for the pins.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
November 02, 2022 04:19PM
Quote

The connector has the following pin map:

5 o <-- RX Data
4 (No pin)
3 o — N/C (3.3V)
2 o — GND
1 o --> TX Data

Indeed this the pin map I’m following. It was really hard to solder the pins.

I’ve tried with the cross connections and direct, but it did not work. Sometimes, as I mentioned before, I can see some characters when I move the wires, but I don’t know how to double check if everything is well solder

Thanks for your help
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
November 02, 2022 04:39PM
i5Js,

> I’ve tried with the cross connections and
> direct, but it did not work. Sometimes, as I
> mentioned before, I can see some characters when I
> move the wires,

That would be the noise on the wires when you move them.

> but I don’t know how to double
> check if everything is well solder
>

You can check one end to make sure it is OK (on the server end, i.e. the rPI). Loop back to RX to TX on this end, and type something, it should echo back the character. If you don't see any thing, then you'd know something wrong with the console settings (baud rate, data bit,....).

On the NAS end, I don't know anyway to check the soldering. Perhaps others might have some idea.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
November 02, 2022 04:44PM
Thanks for your advice, I’ll do it tomorrow… time to sleep in Ams :)
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
November 03, 2022 03:08AM
bodhi Wrote:
-------------------------------------------------------
>
> You can check one end to make sure it is OK (on
> the server end, i.e. the rPI). Loop back to RX to
> TX on this end, and type something, it should echo
> back the character. If you don't see any thing,
> then you'd know something wrong with the console
> settings (baud rate, data bit,....).

Done, and works fine I can type and see what I am writing

> On the NAS end, I don't know anyway to check the
> soldering. Perhaps others might have some idea.

Open for any idea here :)
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
November 03, 2022 05:31AM
I'm done.

I have rechecked the solders, all has continuity in both sides, but it's clear that something is broken in my board, and I don't have enough skills to figure it out and/or fix it.

Now it would be nice if I could boot from usb, or an internal drive to try to unbrick it.

I followed the steps below and after that, the box is not booting anymore:

## Usage 
# Update Kernel if you have access to shell
wget https://raw.githubusercontent.com/vzhilov/WDMC-Ex2-Ultra/master/uImage (--no-check-certificate in case of error?)
dd if=/dev/zero of=/dev/mtdblock1
dd if=uImage of=/dev/mtdblock1

# Update ramdisk if you have access to shell
wget https://raw.githubusercontent.com/vzhilov/WDMC-Ex2-Ultra/master/uInitrd
dd if=/dev/zero of=/dev/mtdblock2
dd if=uInitrd of=/dev/mtdblock2

I don't know what is trying to look for in the hard drive to boot, any help will be appreciate it.

Thanks for your time to read my nightmare :)
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
November 03, 2022 07:22AM
New chapter, I have had lucky and the box has booted up from a USB key.

So I guess I would be able to flash an modified uImage and uRamdisk to work with the uBoot from the command line, right? But which one could I use?

Thanks,
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
November 03, 2022 12:44PM
> New chapter, I have had lucky and the box has
> booted up from a USB key.

Do you have a serial bootlog? if serial console still not working then

dmesg
mount
cat /proc/mtd


>
> So I guess I would be able to flash an modified
> uImage and uRamdisk to work with the uBoot from
> the command line, right? But which one could I
> use?
>

Why not using the latest Debian rootfs nad kernel on USB?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
November 03, 2022 12:48PM
Hello,

Here you are:

dmesg

Booting Linux on physical CPU 0x0
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Initializing cgroup subsys cpuacct
Linux version 3.10.70 (root@build64) (gcc version 4.9.3 20150311 (prerelease) (crosstool-NG 1.20.0) ) #5 SMP Tue Dec 27 22:04:20 +05 2016
CPU: ARMv7 Processor [414fc091] revision 1 (ARMv7), cr=10c53c7d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: Marvell Armada 380/381/382/383/384/385/388 (Device Tree), model: Marvell Armada 385 Development Board
bootconsole [earlycon0] enabled
Memory policy: ECC disabled, Data cache writealloc
On node 0 totalpages: 262144
free_area_init_node: node 0, pgdat c07cc600, node_mem_map c118f000
  Normal zone: 1520 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 194560 pages, LIFO batch:31
  HighMem zone: 528 pages used for memmap
  HighMem zone: 67584 pages, LIFO batch:15
PERCPU: Embedded 7 pages/cpu @c199d000 s7360 r8192 d13120 u32768
pcpu-alloc: s7360 r8192 d13120 u32768 alloc=8*4096
pcpu-alloc: [0] 0 [0] 1 
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 260624
Kernel command line: console=ttyS0,115200 earlyprintk root=/dev/ram console=ttyS0,115200
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
allocated 2097152 bytes of page_cgroup
please try 'cgroup_disable=memory' option if you don't want memory cgroups
Memory: 1024MB = 1024MB total
Memory: 1026024k/1026024k available, 22552k reserved, 270336K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xf0000000 - 0xff000000   ( 240 MB)
    lowmem  : 0xc0000000 - 0xef800000   ( 760 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .text : 0xc0008000 - 0xc0743f38   (7408 kB)
      .init : 0xc0744000 - 0xc0781cc0   ( 248 kB)
      .data : 0xc0782000 - 0xc07cdb60   ( 303 kB)
       .bss : 0xc07cdb60 - 0xc0889210   ( 750 kB)
Hierarchical RCU implementation.
        RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
NR_IRQS:16 nr_irqs:16 16

  LSP version: linux-3.10.70-2015_T1.1p7

sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 171798ms
L310 cache controller enabled
l2x0: 16 ways, CACHE_ID 0x410054c9, AUX_CTRL 0x16070000, Cache size: 1048576 B
Console: colour dummy device 80x30
Calibrating delay loop... 2655.84 BogoMIPS (lpj=13279232)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
Initializing cgroup subsys memory
Initializing cgroup subsys devices
Initializing cgroup subsys freezer
Initializing cgroup subsys blkio
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0xc05946d8 - 0xc0594730
mvebu-pmsu: Initializing Power Management Service Unit
Initializing CPU Reset module
CPU1: Booted secondary processor
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
Brought up 2 CPUs
SMP: Total of 2 processors activated (5311.69 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
mvebu-soc-id: MVEBU SoC ID=0x6820, Rev=0x4
xor: measuring software checksum speed
   arm4regs  :  2365.600 MB/sec
   8regs     :  1630.000 MB/sec
   32regs    :  1658.400 MB/sec
xor: using function: arm4regs (2365.600 MB/sec)
pinctrl core: initialized pinctrl subsystem
regulator-dummy: no parameters
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
irq: Cannot allocate irq_descs @ IRQ194, assuming pre-allocated
irq: Cannot allocate irq_descs @ IRQ226, assuming pre-allocated
bio: create slab <bio-0> at 0
raid6: int32x1    199 MB/s
raid6: int32x2    274 MB/s
raid6: int32x4    274 MB/s
raid6: int32x8    303 MB/s
raid6: using algorithm int32x8 (303 MB/s)
raid6: using intx1 recovery algorithm
mvebu-pcie pcie-controller.5: PCIe0.0: link down
mvebu-pcie pcie-controller.5: PCIe1.0: link down
mvebu-pcie pcie-controller.5: PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
pci_bus 0000:00: root bus resource [mem 0xe0000000-0xe7ffffff]
pci_bus 0000:00: root bus resource [bus 00-ff]
pci 0000:00:01.0: [11ab:7846] type 01 class 0x060400
pci 0000:00:02.0: [11ab:7846] type 01 class 0x060400
PCI: bus0: Fast back to back transfers disabled
pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
pci 0000:00:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
PCI: bus1: Fast back to back transfers enabled
pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
PCI: bus2: Fast back to back transfers enabled
pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 02
pci 0000:00:01.0: PCI bridge to [bus 01]
pci 0000:00:02.0: PCI bridge to [bus 02]
PCI: enabling device 0000:00:01.0 (0140 -> 0143)
PCI: enabling device 0000:00:02.0 (0140 -> 0143)
mv-vbus-regulator usb3-vbus-gpio.9: could not find pctldev for node /soc/internal-regs/pinctrl/xhci0-vbus-pins, deferring probe
platform usb3-vbus-gpio.9: Driver mv-vbus-regulator requests probe deferral
SCSI subsystem initialized
libata version 3.00 loaded.
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
Switching to clocksource armada_370_xp_clocksource
NET: Registered protocol family 2
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP: reno registered
UDP hash table entries: 512 (order: 2, 16384 bytes)
UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
PCI: CLS 64 bytes, default 64
Trying to unpack rootfs image as initramfs...
Freeing initrd memory: 2612K (c0f01000 - c118e000)
bounce pool size: 64 pages
VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
fuse init (API version 7.22)
SGI XFS with security attributes, large block/inode numbers, no debug enabled
msgmni has been set to 1481
async_tx: api initialized (async)
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
armada-38x-pinctrl f1018000.pinctrl: registered pinctrl driver
mv_xor f1060800.xor: Marvell shared XOR driver
mv_xor f1060800.xor: Marvell XOR (Descriptor Mode): ( xor cpy intr pq )
mv_xor f1060800.xor: freeing 1 in use descriptors!
mv_xor f1060800.xor: Marvell XOR (Descriptor Mode): ( intr crc32c )
mv_xor f1060900.xor: Marvell shared XOR driver
mv_xor f1060900.xor: Marvell XOR (Descriptor Mode): ( xor cpy intr pq )
mv_xor f1060900.xor: freeing 1 in use descriptors!
mv_xor f1060900.xor: Marvell XOR (Descriptor Mode): ( intr crc32c )
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 44) is a 16550A
console [ttyS0] enabled, bootconsole disabled
f1012100.serial: ttyS1 at MMIO 0xf1012100 (irq = 45) is a 16550A
brd: module loaded
loop: module loaded
ahci_mv f10a8000.sata: AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl platform mode
ahci_mv f10a8000.sata: flags: 64bit ncq sntf led only pmp fbs pio slum part sxs 
scsi0 : ahci_mv_platform
scsi1 : ahci_mv_platform
ata1: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x100 irq 58
ata2: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x180 irq 58
armada-nand f10d0000.nand: Initialize HAL based NFC in 8bit mode with DMA Disabled using BCH 4bit ECC
NAND device: Manufacturer ID: 0xad, Chip ID: 0xda (Hynix NAND 256MiB 3,3V 8-bit), 256MiB, page size: 2048, OOB size: 64
Bad block table found at page 131008, version 0x01
Bad block table found at page 130944, version 0x01
8 ofpart partitions found on MTD device armada-nand
Creating 8 MTD partitions on "armada-nand":
0x000000000000-0x000000500000 : "U-Boot"
0x000000500000-0x000000a00000 : "uImage"
0x000000a00000-0x000000f00000 : "uRamdisk"
0x000000f00000-0x00000c800000 : "image.cfs"
0x00000c800000-0x00000d700000 : "rescue fw"
0x00000d700000-0x00000eb00000 : "config"
0x00000eb00000-0x00000f500000 : "reserve1"
0x00000f500000-0x00000ff00000 : "reserve2"
SoC: model = 0x6820, revision = 0x4
mvPncVirtBase = 0xf1400000, pncTcamSize = 1024
  o 3 Giga ports supported
  o SKB recycle supported for SWF (Disabled)
  o NETA acceleration mode 4
  o BM supported for CPU: 4 BM pools
  o PnC supported (Enabled)
  o RX Queue support: 8 Queues * 256 Descriptors
  o TX Queue support: 8 Queues * 532 Descriptors
  o GSO supported
  o GRO supported
  o Receive checksum offload supported
  o Transmit checksum offload supported
  o Driver ERROR statistics enabled
  o Driver INFO statistics enabled
  o Driver DEBUG statistics enabled

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

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

libphy: orion_mdio_bus: probed
mdio_bus f1072004.mdio-mi: cannot get PHY at address 1
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
ehci-orion: EHCI orion driver
orion-ehci f1058000.usb: EHCI Host Controller
orion-ehci f1058000.usb: new USB bus registered, assigned bus number 1
orion-ehci f1058000.usb: irq 50, io mem 0xf1058000
orion-ehci f1058000.usb: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
xhci-hcd f10f0000.usb3: xHCI Host Controller
xhci-hcd f10f0000.usb3: new USB bus registered, assigned bus number 2
xhci-hcd f10f0000.usb3: irq 48, io mem 0xf10f0000
xHCI xhci_add_endpoint called for root hub
xHCI xhci_check_bandwidth called for root hub
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
xhci-hcd f10f0000.usb3: xHCI Host Controller
xhci-hcd f10f0000.usb3: new USB bus registered, assigned bus number 3
xHCI xhci_add_endpoint called for root hub
xHCI xhci_check_bandwidth called for root hub
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 1 port detected
xhci-hcd f10f8000.usb3: xHCI Host Controller
xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 4
xhci-hcd f10f8000.usb3: irq 49, io mem 0xf10f8000
xHCI xhci_add_endpoint called for root hub
xHCI xhci_check_bandwidth called for root hub
hub 4-0:1.0: USB hub found
hub 4-0:1.0: 1 port detected
xhci-hcd f10f8000.usb3: xHCI Host Controller
xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 5
xHCI xhci_add_endpoint called for root hub
xHCI xhci_check_bandwidth called for root hub
hub 5-0:1.0: USB hub found
hub 5-0:1.0: 1 port detected
usbcore: registered new interface driver usb-storage
mvebu-rtc f10a3800.rtc: rtc core: registered f10a3800.rtc as rtc0
ata2: SATA link down (SStatus 0 SControl 300)
ata1: SATA link down (SStatus 0 SControl 300)
i2c /dev entries driver
armada_thermal f10e4078.thermal: Overheat threshold between 92..107
md: linear personality registered for level -1
md: raid0 personality registered for level 0
md: raid1 personality registered for level 1
md: raid10 personality registered for level 10
md: raid6 personality registered for level 6
md: raid5 personality registered for level 5
md: raid4 personality registered for level 4
device-mapper: ioctl: 4.24.0-ioctl (2013-01-15) initialised: dm-devel@redhat.com
dm_crypt using the OCF package.
ledtrig-cpu: registered to indicate activity on CPUs
armada-cesa-ocf f109d000.crypto: mv_get_cesa_resources: Total CESA HW channels supported 2
armada-cesa-ocf f109d000.crypto: mv_get_cesa_resources: CESA feature: int_coalescing(1)
armada-cesa-ocf f109d000.crypto: mv_get_cesa_resources threshold 0x2, threshold_time 0xfffff
mvCesaInit: channels=2, session=640, queue=256
armada-cesa-ocf f109d000.crypto: cesa_ocf_probe: CESA driver operate in ocf(0) mode
cesadev_init(c0763ebc)
TCP: cubic registered
NET: Registered protocol family 17
8021q: 802.1Q VLAN Support v1.8
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
registered taskstats version 1
regulator-dummy: disabling
xhci0-vbus: 5000 mV 
input: buttons.4 as /devices/soc.0/internal-regs.1/buttons.4/input/input0
### dt-test ### No testcase data in device tree; not running tests
Freeing unused kernel memory: 244K (c0744000 - c0781000)
usb 2-1: new high-speed USB device number 2 using xhci-hcd
usb 2-1: ep 0x81 - rounding interval to 128 microframes, ep desc says 255 microframes
usb 2-1: ep 0x2 - rounding interval to 128 microframes, ep desc says 255 microframes
usb-storage 2-1:1.0: USB Mass Storage device detected
scsi2 : usb-storage 2-1:1.0
scsi 2:0:0:0: Direct-Access     Kingston DataTraveler 2.0 1.00 PQ: 0 ANSI: 4
sd 2:0:0:0: [sda] 15131636 512-byte logical blocks: (7.74 GB/7.21 GiB)
sd 2:0:0:0: Attached scsi generic sg0 type 0
sd 2:0:0:0: [sda] Write Protect is off
sd 2:0:0:0: [sda] Mode Sense: 45 00 00 00
sd 2:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
 sda: sda1 sda2
sd 2:0:0:0: [sda] Attached SCSI removable disk
pool #2: pkt_size=1536, buf_size=1600 - 2048 of 2048 buffers added
eth0: link up
eth0: started

mount
/ # mount
rootfs on / type rootfs (rw)
udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=128253,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run type tmpfs (rw,nosuid,relatime,size=205776k,mode=755)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
/dev/sda1 on /mnt type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=850,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)

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

Quote

Why not using the latest Debian rootfs nad kernel on USB?

That would be great!! It's the idea, but I don't know how :)



Edited 1 time(s). Last edit at 11/03/2022 12:50PM by i5Js.
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
November 03, 2022 01:03PM
Quote

Linux version 3.10.70 (root@build64) (gcc version 4.9.3 20150311 (prerelease) (crosstool-NG 1.20.0) ) #5 SMP Tue Dec 27 22:04:20 +05 2016

....
Kernel command line: console=ttyS0,115200 earlyprintk root=/dev/ram console=ttyS0,115200

You are booting with stock kernel and rootfs on NAND. And the envs cannot be listed without serial console. So we cannot adjust the envs to boot USB rootfs. It's a catch-22 :)


Now connect serial console and see if it works. Hit return a few times to see the prompt appear.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
November 03, 2022 01:05PM
It's the first thing I did, to connect the serial cable. But same, nothing is coming :(

So, just to understand, no matter I can compile the kernel, an uImage and a uRamDisk, it won't work, right?
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
November 03, 2022 01:32PM
> So, just to understand, no matter I can compile
> the kernel, an uImage and a uRamDisk, it won't
> work, right?

Right, it is quite risky to flash the kernel files to NAND without serial console. You would need to have some way to boot it from RAM or USB first.

However, you mentioned that

> New chapter, I have had lucky and the box has
> booted up from a USB key.

How did you do this? are the kernel files on this USB drive? If that how you boot the kernel, then there is a chance that could work.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
November 03, 2022 01:54PM
Yes, the files are in the USB, there are no drives. I've created a folder named boot, and just copy uImage and uRamdisk as follow


/ # ls /mnt/boot
uImage    uRamdisk
/ # ls -l /mnt/boot
-rwxr-xr-x    1 root     0          4177681 Nov  3  2022 uImage
-rwxr-xr-x    1 root     0          2679866 Nov  3  2022 uRamdisk

There files come from here: https://hackers.cx/wdnas/WDMyCloud-Mirror-Gen2/Debian/Dev/

And the way to boot from USB is:

** Put the USB 2.0 in the slot 2
** Press and hold the reset botton, then power it up.
** Release it after 40 seconds.



Edited 1 time(s). Last edit at 11/03/2022 02:09PM by i5Js.
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
November 03, 2022 03:37PM
i5Js ,

Follow the instruction and create the released rootfs Debian-5.13.8-mvebu-tld-1-rootfs-bodhi.tar.bz2 on a different USB drive.

You need to do Step 3 and use armada-385-wd-ex2-ultra.dtb

Quote

3. Create uImage with DTB appended. I am using the Zyxel NAS326 as an example here. Please replace armada-380-zyxel-nas326.dtb below with the appropriate DTB name for your box.

cd /media/sdb1/boot
cp -a zImage-5.13.8-mvebu-tld-1 zImage.fdt
cat dts/armada-380-zyxel-nas326.dtb >> zImage.fdt
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-5.13.8-mvebu-tld-1 -d zImage.fdt uImage

Save your current stock kernel uImage on the VFAT USB that you was booting with.

Quote

/ # ls /mnt/boot
uImage uRamdisk
/ # ls -l /mnt/boot
-rwxr-xr-x 1 root 0 4177681 Nov 3 2022 uImage
-rwxr-xr-x 1 root 0 2679866 Nov 3 2022 uRamdisk

And copy the uImage from the new rootfs over to/mnt/boot, and keep the uRamdisk as is.

With both USB drives in the port, reboot. See if it can boot into Debian.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
November 03, 2022 03:39PM
Ok! many thanks, !'ll do,

Question: can I do it from a Linux VM using crosscompile?

PS: Fingers cross!



Edited 1 time(s). Last edit at 11/03/2022 03:46PM by i5Js.
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
November 03, 2022 04:05PM
i5Js,

> Question: can I do it from a Linux VM using
> crosscompile?

No need to cross compile anything. The rootfs creation steps are universal.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
November 03, 2022 04:12PM
Ok!! Thanks
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
November 03, 2022 04:24PM
You can also do it in stock OS.

which tar
which mkimage

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
November 03, 2022 04:26PM
I shlould restore all the box first, because it’s completely empty, just an usb with two files :)

I’ll try with the VM

Should I rename the uInitrd to uRamDrive ?
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
November 03, 2022 05:21PM
> Should I rename the uInitrd to uRamDrive ?

No, the Ramdisk for booting is stock initrd on the FAT USB.

The new rootfs initrd is quite larger than stock, so pretty good chance is that it wont boot.

But if the new kernel+old RamDisk combo does not boot, then try the uInitrd anyway (in this case, yes, copy it to uRamdisk).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
November 04, 2022 01:14AM
Ok, understood: first try new kernel + oldramdisk second try all new

Let’s see
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
November 04, 2022 03:30AM
First try: new kernel + old RamDisk -> doesn't boot. I guess the kernel is ok, because it is the same behaviour: try to boot, with the red led and blue blinking, but the it's off.



Edited 1 time(s). Last edit at 11/04/2022 11:25AM by i5Js.
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
November 04, 2022 03:40AM
We are close:

Bonus: new kernel+new Ramdisk, but remain the name as uInitrd -> The box boot it up in safe mode, I can access to the web interface to flash whatever.
Bonus2: new kernel+old Ramdisk, but remain the name as uInitrd -> The box boot it up in safe mode, I can access to the web interface to flash whatever.
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
November 04, 2022 06:36AM
bodhi Wrote:
-------------------------------------------------------
> i5Js ,
>
> Follow the instruction and create the released
> rootfs
> Debian-5.13.8-mvebu-tld-1-rootfs-bodhi.tar.bz2
> on a different USB drive.
>
> You need to do Step 3 and use
> armada-385-wd-ex2-ultra.dtb
>
>
Quote

3. Create uImage with DTB appended. I am
> using the Zyxel NAS326 as an example here. Please
> replace armada-380-zyxel-nas326.dtb below with the
> appropriate DTB name for your box.
>
> cd /media/sdb1/boot
> cp -a zImage-5.13.8-mvebu-tld-1 zImage.fdt
> cat dts/armada-380-zyxel-nas326.dtb >> zImage.fdt
> mkimage -A arm -O linux -T kernel -C none -a
> 0x00008000 -e 0x00008000 -n
> Linux-5.13.8-mvebu-tld-1 -d zImage.fdt
> uImage
>
> Save your current stock kernel uImage on the VFAT
> USB that you was booting with.
>
>
Quote

/ # ls /mnt/boot
> uImage uRamdisk
> / # ls -l /mnt/boot
> -rwxr-xr-x 1 root 0 4177681 Nov 3
> 2022 uImage
> -rwxr-xr-x 1 root 0 2679866 Nov 3
> 2022 uRamdisk
>
> And copy the uImage from the new rootfs over
> to/mnt/boot, and keep the uRamdisk as is.
>
> With both USB drives in the port, reboot. See if
> it can boot into Debian.


I did it, there are two usb drives, USB1 with the old boot, and USB2 with the rootfs created. Unless I didn't understand your step, I've overwritten the USB1 uImage over USB2, letting the uInitrd untouched.

Here you can find the dmesg

/ # dmesg
Booting Linux on physical CPU 0x0
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Initializing cgroup subsys cpuacct
Linux version 3.10.70 (root@build64) (gcc version 4.9.3 20150311 (prerelease) (crosstool-NG 1.20.0) ) #5 SMP Tue Dec 27 22:04:20 +05 2016
CPU: ARMv7 Processor [414fc091] revision 1 (ARMv7), cr=10c53c7d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: Marvell Armada 380/381/382/383/384/385/388 (Device Tree), model: Marvell Armada 385 Development Board
bootconsole [earlycon0] enabled
Memory policy: ECC disabled, Data cache writealloc
On node 0 totalpages: 262144
free_area_init_node: node 0, pgdat c07cc600, node_mem_map c118f000
  Normal zone: 1520 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 194560 pages, LIFO batch:31
  HighMem zone: 528 pages used for memmap
  HighMem zone: 67584 pages, LIFO batch:15
PERCPU: Embedded 7 pages/cpu @c199d000 s7360 r8192 d13120 u32768
pcpu-alloc: s7360 r8192 d13120 u32768 alloc=8*4096
pcpu-alloc: [0] 0 [0] 1 
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 260624
Kernel command line: console=ttyS0,115200 earlyprintk root=/dev/ram console=ttyS0,115200
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
allocated 2097152 bytes of page_cgroup
please try 'cgroup_disable=memory' option if you don't want memory cgroups
Memory: 1024MB = 1024MB total
Memory: 1026024k/1026024k available, 22552k reserved, 270336K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xf0000000 - 0xff000000   ( 240 MB)
    lowmem  : 0xc0000000 - 0xef800000   ( 760 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .text : 0xc0008000 - 0xc0743f38   (7408 kB)
      .init : 0xc0744000 - 0xc0781cc0   ( 248 kB)
      .data : 0xc0782000 - 0xc07cdb60   ( 303 kB)
       .bss : 0xc07cdb60 - 0xc0889210   ( 750 kB)
Hierarchical RCU implementation.
        RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
NR_IRQS:16 nr_irqs:16 16

  LSP version: linux-3.10.70-2015_T1.1p7

sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 171798ms
L310 cache controller enabled
l2x0: 16 ways, CACHE_ID 0x410054c9, AUX_CTRL 0x16070000, Cache size: 1048576 B
Console: colour dummy device 80x30
Calibrating delay loop... 2655.84 BogoMIPS (lpj=13279232)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
Initializing cgroup subsys memory
Initializing cgroup subsys devices
Initializing cgroup subsys freezer
Initializing cgroup subsys blkio
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0xc05946d8 - 0xc0594730
mvebu-pmsu: Initializing Power Management Service Unit
Initializing CPU Reset module
CPU1: Booted secondary processor
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
Brought up 2 CPUs
SMP: Total of 2 processors activated (5311.69 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
mvebu-soc-id: MVEBU SoC ID=0x6820, Rev=0x4
xor: measuring software checksum speed
   arm4regs  :  2365.600 MB/sec
   8regs     :  1630.000 MB/sec
   32regs    :  1658.800 MB/sec
xor: using function: arm4regs (2365.600 MB/sec)
pinctrl core: initialized pinctrl subsystem
regulator-dummy: no parameters
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
irq: Cannot allocate irq_descs @ IRQ194, assuming pre-allocated
irq: Cannot allocate irq_descs @ IRQ226, assuming pre-allocated
bio: create slab <bio-0> at 0
raid6: int32x1    199 MB/s
raid6: int32x2    274 MB/s
raid6: int32x4    274 MB/s
raid6: int32x8    303 MB/s
raid6: using algorithm int32x8 (303 MB/s)
raid6: using intx1 recovery algorithm
mvebu-pcie pcie-controller.5: PCIe0.0: link down
mvebu-pcie pcie-controller.5: PCIe1.0: link down
mvebu-pcie pcie-controller.5: PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
pci_bus 0000:00: root bus resource [mem 0xe0000000-0xe7ffffff]
pci_bus 0000:00: root bus resource [bus 00-ff]
pci 0000:00:01.0: [11ab:7846] type 01 class 0x060400
pci 0000:00:02.0: [11ab:7846] type 01 class 0x060400
PCI: bus0: Fast back to back transfers disabled
pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
pci 0000:00:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
PCI: bus1: Fast back to back transfers enabled
pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
PCI: bus2: Fast back to back transfers enabled
pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 02
pci 0000:00:01.0: PCI bridge to [bus 01]
pci 0000:00:02.0: PCI bridge to [bus 02]
PCI: enabling device 0000:00:01.0 (0140 -> 0143)
PCI: enabling device 0000:00:02.0 (0140 -> 0143)
mv-vbus-regulator usb3-vbus-gpio.9: could not find pctldev for node /soc/internal-regs/pinctrl/xhci0-vbus-pins, deferring probe
platform usb3-vbus-gpio.9: Driver mv-vbus-regulator requests probe deferral
SCSI subsystem initialized
libata version 3.00 loaded.
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
Switching to clocksource armada_370_xp_clocksource
NET: Registered protocol family 2
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP: reno registered
UDP hash table entries: 512 (order: 2, 16384 bytes)
UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
PCI: CLS 64 bytes, default 64
Trying to unpack rootfs image as initramfs...
Freeing initrd memory: 2612K (c0f01000 - c118e000)
bounce pool size: 64 pages
VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
fuse init (API version 7.22)
SGI XFS with security attributes, large block/inode numbers, no debug enabled
msgmni has been set to 1481
async_tx: api initialized (async)
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
armada-38x-pinctrl f1018000.pinctrl: registered pinctrl driver
mv_xor f1060800.xor: Marvell shared XOR driver
mv_xor f1060800.xor: Marvell XOR (Descriptor Mode): ( xor cpy intr pq )
mv_xor f1060800.xor: freeing 1 in use descriptors!
mv_xor f1060800.xor: Marvell XOR (Descriptor Mode): ( intr crc32c )
mv_xor f1060900.xor: Marvell shared XOR driver
mv_xor f1060900.xor: Marvell XOR (Descriptor Mode): ( xor cpy intr pq )
mv_xor f1060900.xor: freeing 1 in use descriptors!
mv_xor f1060900.xor: Marvell XOR (Descriptor Mode): ( intr crc32c )
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 44) is a 16550A
console [ttyS0] enabled, bootconsole disabled
f1012100.serial: ttyS1 at MMIO 0xf1012100 (irq = 45) is a 16550A
brd: module loaded
loop: module loaded
ahci_mv f10a8000.sata: AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl platform mode
ahci_mv f10a8000.sata: flags: 64bit ncq sntf led only pmp fbs pio slum part sxs 
scsi0 : ahci_mv_platform
scsi1 : ahci_mv_platform
ata1: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x100 irq 58
ata2: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x180 irq 58
armada-nand f10d0000.nand: Initialize HAL based NFC in 8bit mode with DMA Disabled using BCH 4bit ECC
NAND device: Manufacturer ID: 0xad, Chip ID: 0xda (Hynix NAND 256MiB 3,3V 8-bit), 256MiB, page size: 2048, OOB size: 64
Bad block table found at page 131008, version 0x01
Bad block table found at page 130944, version 0x01
8 ofpart partitions found on MTD device armada-nand
Creating 8 MTD partitions on "armada-nand":
0x000000000000-0x000000500000 : "U-Boot"
0x000000500000-0x000000a00000 : "uImage"
0x000000a00000-0x000000f00000 : "uRamdisk"
0x000000f00000-0x00000c800000 : "image.cfs"
0x00000c800000-0x00000d700000 : "rescue fw"
0x00000d700000-0x00000eb00000 : "config"
0x00000eb00000-0x00000f500000 : "reserve1"
0x00000f500000-0x00000ff00000 : "reserve2"
SoC: model = 0x6820, revision = 0x4
mvPncVirtBase = 0xf1400000, pncTcamSize = 1024
  o 3 Giga ports supported
  o SKB recycle supported for SWF (Disabled)
  o NETA acceleration mode 4
  o BM supported for CPU: 4 BM pools
  o PnC supported (Enabled)
  o RX Queue support: 8 Queues * 256 Descriptors
  o TX Queue support: 8 Queues * 532 Descriptors
  o GSO supported
  o GRO supported
  o Receive checksum offload supported
  o Transmit checksum offload supported
  o Driver ERROR statistics enabled
  o Driver INFO statistics enabled
  o Driver DEBUG statistics enabled

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

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

libphy: orion_mdio_bus: probed
mdio_bus f1072004.mdio-mi: cannot get PHY at address 1
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
ehci-orion: EHCI orion driver
orion-ehci f1058000.usb: EHCI Host Controller
orion-ehci f1058000.usb: new USB bus registered, assigned bus number 1
orion-ehci f1058000.usb: irq 50, io mem 0xf1058000
orion-ehci f1058000.usb: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
xhci-hcd f10f0000.usb3: xHCI Host Controller
xhci-hcd f10f0000.usb3: new USB bus registered, assigned bus number 2
xhci-hcd f10f0000.usb3: irq 48, io mem 0xf10f0000
xHCI xhci_add_endpoint called for root hub
xHCI xhci_check_bandwidth called for root hub
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
xhci-hcd f10f0000.usb3: xHCI Host Controller
xhci-hcd f10f0000.usb3: new USB bus registered, assigned bus number 3
xHCI xhci_add_endpoint called for root hub
xHCI xhci_check_bandwidth called for root hub
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 1 port detected
xhci-hcd f10f8000.usb3: xHCI Host Controller
xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 4
xhci-hcd f10f8000.usb3: irq 49, io mem 0xf10f8000
xHCI xhci_add_endpoint called for root hub
xHCI xhci_check_bandwidth called for root hub
hub 4-0:1.0: USB hub found
hub 4-0:1.0: 1 port detected
xhci-hcd f10f8000.usb3: xHCI Host Controller
xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 5
xHCI xhci_add_endpoint called for root hub
xHCI xhci_check_bandwidth called for root hub
hub 5-0:1.0: USB hub found
hub 5-0:1.0: 1 port detected
usbcore: registered new interface driver usb-storage
mvebu-rtc f10a3800.rtc: rtc core: registered f10a3800.rtc as rtc0
ata1: SATA link down (SStatus 0 SControl 300)
ata2: SATA link down (SStatus 0 SControl 300)
i2c /dev entries driver
armada_thermal f10e4078.thermal: Overheat threshold between 92..107
md: linear personality registered for level -1
md: raid0 personality registered for level 0
md: raid1 personality registered for level 1
md: raid10 personality registered for level 10
md: raid6 personality registered for level 6
md: raid5 personality registered for level 5
md: raid4 personality registered for level 4
device-mapper: ioctl: 4.24.0-ioctl (2013-01-15) initialised: dm-devel@redhat.com
dm_crypt using the OCF package.
ledtrig-cpu: registered to indicate activity on CPUs
armada-cesa-ocf f109d000.crypto: mv_get_cesa_resources: Total CESA HW channels supported 2
armada-cesa-ocf f109d000.crypto: mv_get_cesa_resources: CESA feature: int_coalescing(1)
armada-cesa-ocf f109d000.crypto: mv_get_cesa_resources threshold 0x2, threshold_time 0xfffff
mvCesaInit: channels=2, session=640, queue=256
armada-cesa-ocf f109d000.crypto: cesa_ocf_probe: CESA driver operate in ocf(0) mode
cesadev_init(c0763ebc)
TCP: cubic registered
NET: Registered protocol family 17
8021q: 802.1Q VLAN Support v1.8
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
registered taskstats version 1
regulator-dummy: disabling
xhci0-vbus: 5000 mV 
input: buttons.4 as /devices/soc.0/internal-regs.1/buttons.4/input/input0
### dt-test ### No testcase data in device tree; not running tests
Freeing unused kernel memory: 244K (c0744000 - c0781000)
usb 2-1: new high-speed USB device number 2 using xhci-hcd
usb 2-1: ep 0x81 - rounding interval to 128 microframes, ep desc says 255 microframes
usb 2-1: ep 0x2 - rounding interval to 128 microframes, ep desc says 255 microframes
usb-storage 2-1:1.0: USB Mass Storage device detected
scsi2 : usb-storage 2-1:1.0
usb 4-1: new high-speed USB device number 2 using xhci-hcd
usb 4-1: ep 0x81 - rounding interval to 128 microframes, ep desc says 255 microframes
usb 4-1: ep 0x2 - rounding interval to 128 microframes, ep desc says 255 microframes
usb-storage 4-1:1.0: USB Mass Storage device detected
scsi3 : usb-storage 4-1:1.0
scsi 2:0:0:0: Direct-Access     Kingston DataTraveler 2.0 1.00 PQ: 0 ANSI: 4
sd 2:0:0:0: [sda] 15131636 512-byte logical blocks: (7.74 GB/7.21 GiB)
sd 2:0:0:0: Attached scsi generic sg0 type 0
sd 2:0:0:0: [sda] Write Protect is off
sd 2:0:0:0: [sda] Mode Sense: 45 00 00 00
sd 2:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
 sda: sda1 sda2
sd 2:0:0:0: [sda] Attached SCSI removable disk
scsi 3:0:0:0: Direct-Access     PNY      USB 2.0 FD       1100 PQ: 0 ANSI: 4
sd 3:0:0:0: [sdb] 7975296 512-byte logical blocks: (4.08 GB/3.80 GiB)
sd 3:0:0:0: Attached scsi generic sg1 type 0
sd 3:0:0:0: [sdb] Write Protect is off
sd 3:0:0:0: [sdb] Mode Sense: 43 00 00 00
sd 3:0:0:0: [sdb] No Caching mode page found
sd 3:0:0:0: [sdb] Assuming drive cache: write through
sd 3:0:0:0: [sdb] No Caching mode page found
sd 3:0:0:0: [sdb] Assuming drive cache: write through
 sdb: sdb1
sd 3:0:0:0: [sdb] No Caching mode page found
sd 3:0:0:0: [sdb] Assuming drive cache: write through
sd 3:0:0:0: [sdb] Attached SCSI removable disk
pool #2: pkt_size=1536, buf_size=1600 - 2048 of 2048 buffers added
eth0: link up
eth0: started

It booted again with the old kernel, as expected. But I can't see a difference.

more info if it helps,

mount
/ # mount
rootfs on / type rootfs (rw)
udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=128253,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run type tmpfs (rw,nosuid,relatime,size=205776k,mode=755)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)

mtd

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



Edited 2 time(s). Last edit at 11/04/2022 07:06AM by i5Js.
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
November 04, 2022 07:36AM
last test:

new uImage, old RamDisk in USB1 + USB2 attached -> Doesn't boot
new uImage, new RamDisk in USB1 + USB2 attached -> Doesn't boot
new uImage, new RamDisk, renamed as uInitrd in USB1 + USB2 attached ->It boots but in WD recovery, no ssh access just web to upload a firmware

new uImage, old RamDisk in USB1+hardrive with rootfs -> Doesn't boot
new uImage, old RamDisk renamed as uInitrd in USB1+hardrive with rootfs ->It boots but in WD recovery, no ssh access just web to upload a firmware



Edited 1 time(s). Last edit at 11/04/2022 08:04AM by i5Js.
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
November 04, 2022 11:40AM
Reading and reading, I think the problem here, perhaps, is the u-boot:

1) Update u-boot. It is needed to adjust load addresess for new Kernel and Ramdisk. See UBoot folder for details.

Checking this:

https://github.com/vzhilov/WDMC-Ex2-Ultra/tree/master/1.UBoot

I have dumped the u-boot and the size is significantly different:

-rwxr-xr-x 1 root 0 5.0M Jan 1 00:03 u-boot.org

vs

-rw-r--r-- 1 root root 933K Nov 4 17:51 u-boot-a38x-GrandTeton_2014T3_PQ-nand-uart.bin
-rw-r--r-- 1 root root 936K Nov 4 17:51 u-boot-a38x-GrandTeton_2014T3_PORQUE-nand.bin

I don't know if I could write it into the nand.



Edited 1 time(s). Last edit at 11/04/2022 12:10PM by i5Js.
Re: WD My Cloud Ex2: Kernel v5.10 with Debian Bullseye and OMV
November 04, 2022 12:59PM
i5Js,

Quote

new uImage, old RamDisk in USB1 + USB2 attached -> Doesn't boot
new uImage, new RamDisk in USB1 + USB2 attached -> Doesn't boot
new uImage, new RamDisk, renamed as uInitrd in USB1 + USB2 attached ->It boots but in WD recovery, no ssh access just web to upload a firmware

new uImage, old RamDisk in USB1+hardrive with rootfs -> Doesn't boot
new uImage, old RamDisk renamed as uInitrd in USB1+hardrive with rootfs ->It boots but in WD recovery, no ssh access just web to upload a firmware

The 2 cases when it boot into WD recovery: because uRamdisk is missing. So the kernel did not start. The recovery web page is from this u-boot.

So basically the same as it was with USB recovery.

Quote

Checking this:

https://github.com/vzhilov/WDMC-Ex2-Ultra/tree/master/1.UBoot

I have dumped the u-boot and the size is significantly different:

-rwxr-xr-x 1 root 0 5.0M Jan 1 00:03 u-boot.org

vs

-rw-r--r-- 1 root root 933K Nov 4 17:51 u-boot-a38x-GrandTeton_2014T3_PQ-nand-uart.bin
-rw-r--r-- 1 root root 936K Nov 4 17:51 u-boot-a38x-GrandTeton_2014T3_PORQUE-nand.bin

I don't know if I could write it into the nand.

The reason it's 5MB vs less than 5MB is: the entire mtd0 is 5MB, actual u-boot is less than 1MB. Just so happens that this rebuilt u-boot is 936K.

It is risky without serial console. Usually we run kwboot to load another u-boot over UART and run it. If it can run then it is a recovery path, even if the new u-boot is bad, or the flashing is bad, we can still recover.

Since serial console works for others, I would spend more time to investigate your serial console problem first.

And then if you decide to flash that u-boot without serial console, you must get vzhilov or CyperPK or others to dump the envs image. And then flash both u-boot image and the envs image in the same session.

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