Welcome! Log In Create A New Profile

Advanced

Debian on WD My Cloud EX4

Debian on WD My Cloud EX4
April 08, 2023 12:46AM
bodhi's note: The working thread activities begin at a couple posts below, started by @ConcentratedCancer on March 30.

=========

Hello all, I have been gifted a WD My Cloud EX4 16 TB NAS. I have permanently installed a db9 serial connector using this RS-232 to TTL Converter:

https://www.mouser.com/ProductDetail/713-103990363

and a volt meter, and hints from

https://github.com/gisab/WDMC-Ex2

I then connected a db9 serial to usb converter to my main manjaro linux box and got access to uboot using PuTTY, But that's as far as I've been able to figure out.

I think my next step is to use the existing uboot to try out another non-crippled uboot (loaded over the serial port? or from a tftp server?) until I find one that works and allows USB booting but I'm not sure how to do that, then I would want to install that fully functional uboot on the flash memory and attach a usb storage device with a kernel from these instructions:

https://github.com/gisab/WDMC-Ex2

and a root filesystem from ??? on the usb storage device and make it default to boot Debian stable off of USB.
I'm working under the assumption that the EX4 is the same as an EX2 non ultra just with 2 more drives
I can see from the boot information that it is a MARVELL BOARD: RD-88F6282A LE
running
U-Boot 1.1.4 (Aug 14 2013 - 09:24:12) Marvell version: 3.5.9.LIGHTNING-4A.01

it also says:
U-Boot code: 00600000 -> 0067FFF9 BSS: -> 006CFB00
Soc: 88F6282 A1CPU running @ 2000Mhz L2 running @500Mhz
SysClock = 500Mhz , TClock = 200Mhz

DRAM (DDR3) CAS Latency = 7 tRP = & tRAS = 19 tRCD=7
DRAM CS[0] base 0x00000000 size 256MB
DRAM CS[1] base 0x10000000 size 256MB
DRAM total size 512MB 16bit width
addresses 8M - 0M are saved for the U-Boot usage.

NAND: 256 MB
CPU : Marvell Feroceon (rev 1)

printenv bootargs returns:
bootargs=root=/dev/ram console=ttyS0,115200 max_loop=32 :::DB88FXX81:egiga0:none
printenv bootcmd returns:
bootcmd=nand read.e 0xa00000 0x100000 0x500000;nand read.e 0xf00000 0x600000 0x5
00000;bootm 0xa00000 0xf00000

I'm not an idiot, but I am brand new to this level of jiggery-pokery and any help will be appreciated, even an RTFM would be great if you tell me which manuals.

May you be free from anger, ill will, and jealousy. - Jerry.

==========
moderator: please use code tags (formatted code button) to post log.



Edited 2 time(s). Last edit at 04/02/2025 06:08PM by bodhi.
Re: WD My Cloud EX4 help request
April 08, 2023 01:14AM
jerry,

This is a Kirkwood box (88F6282 SoC). But we don't have a device tree DTS for this.

And this does not apply (It is for Armada 37x and 38x SoC):
https://github.com/gisab/WDMC-Ex2


The Kirkwood boxes we support are

Quote
https://forum.doozan.com/read.php?2,12096

Linux Kernel 6.2.x Kirkwood package and rootfs for GoFlex Home/Net, Pogoplug E02/Mobile/V4, iConnect, Dockstar, Sheevaplug, NSA320, NSA320S, NSA325, NSA310S, NSA310, Topkick, Netgear Stora, ASUS-M25, Iomega ix4-200d, QiZhiTong 501mv2, HP Thin Client T5325, LG N1T1, Linksys EA4500, Lenovo/Iomega ix2-ng, Toshiba Canvio Home NAS, Lenovo Iomega EZ, Dell KACE M300, Freecom Silverstore HNCN2, DNS-320-B1, Medion P89634, Netgear Ready NAS Duo v2, Lenovo/Iomega ix2-dl, CTera C200 V1, Synology DS413j (work in progress), and all other Kirkwood plugs that are already in the mainline.

The Zyxel NSA325 and Dell KACE M300 have the same SoC as your WD Ex4. So that might boot. Also there is a reference board DTS for 88F6282. But other hardware aspects needed to be in the DTS for it to function fully.

Usually you don't need new u-boot to run Debian. If there is no USB suuport, you could load the kernel files over tftp (it's a way of testing the kernel). It's inconvenient to boot the system this way permanently, though.

So quite a bit of works to get there.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: WD My Cloud EX4 help request
March 30, 2025 06:15PM
Hello, I also have a WD EX4, I have been working the past two weeks on getting a newer kernel running on it (the stock WD OS3 ships with Linux 3.2.40). This forum was extremely helpful in getting me further in this process.

The U-Boot that is on the EX4 does not support USB booting or booting from a SATA drive. However TFTP booting does work. I was able to use the linux-6.13.8-kirkwood-tld-1-bodhi kernel, rootfs and initrd to boot the machine using the kirkwood-db-88f6281 device tree. However a few important things do not function that I can see so far. Firstly, no network interfaces are recognized by the kernel, there are errors in dmesg relating to networking which may be a good place to start. Secondly, the USB ports do not function on the device at all, nothing shows up in dmesg when a USB device is connected. During boot up, Linux does detect a USB hub but that's it. Of course because the device tree isn't specific for the device, the LED's and screen on the front do not function but that is less of a concern to make a usable Linux system for the device. I will attach the dmesg log to this post so it can be inspected and someone may be able to assist on getting USB and networking to function.

I am not new to Linux or tinkering with embedded devices, however this is my first time trying to replace the kernel on a embedded device. Device tree's are something entirely new to me which I learned a lot about during this project. So I am not sure where I should go from here.

Thanks!
Attachments:
open | download - dmesg.log (18.7 KB)
Re: WD My Cloud EX4 help request
March 30, 2025 08:58PM
@ConcentratedCancer,

> The U-Boot that is on the EX4 does not support USB
> booting or booting from a SATA drive. However TFTP
> booting does work. I was able to use the
> linux-6.13.8-kirkwood-tld-1-bodhi kernel, rootfs
> and initrd to boot the machine using the
> kirkwood-db-88f6281 device tree.

This box used the 88f6282 SoC. So try booting with kirkwood-db-88f6282.dtb. There is not much different from the 88f6281, though, so that's why it booted.

> because the device tree isn't specific for the
> device, the LED's and screen on the front do not
> function but that is less of a concern to make a
> usable Linux system for the device. I will attach
> the dmesg log to this post so it can be inspected

> and someone may be able to assist on getting USB
> and networking to function.
>

> I am not new to Linux or tinkering with embedded
> devices, however this is my first time trying to
> replace the kernel on a embedded device. Device
> tree's are something entirely new to me which I
> learned a lot about during this project.

1. I'll write a new DTS for this box. You can start using it and we'll test the networking. USB and LEDs might need more digging, or might not.

Boot again, interrupt serial console and,
help
printenv
bdinfo
mii info
mdio list
md.l 0xF1010000 8
md.l 0xF1010100 1
md.l 0xF1010140 1
Note that some commands above might fail (not available in this stock u-boot build).

And then boot into Debian like you did with tftp. Post the entire serial console log here.

2. If you can still boot into stock OS, then get the log and ethtool info (you can make a new post or separate boot log text file, so it's easier to read only stock OS booting).
dmesg
ethtool eth0

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



Edited 1 time(s). Last edit at 03/30/2025 10:09PM by bodhi.
Re: WD My Cloud EX4 help request
March 31, 2025 07:22PM
Hey bodhi,

Thank you for taking the time to reply, I have gathered the requested log files and will attach them to the post, they are all named accordingly to make it easier to differentiate between the logs.

The logs I got from within Debian were made with the kirkwood-db-88f6282 dtb this time, however as you said, I don't think it makes a big difference.

Some of the Linux bootargs I used for Debian were taken from the stock OS3 bootargs, notably:
console=ttyS0,115200 max_loop=32 :::DB88FXX81:egiga0:none
which I thought the last bit may help with the ethernet but it did not, as the bootlogs indicate it was not recognized by the kernel and it would be passed to userspace.

As shown by the logs, the machine can still boot the stock OS3 no problem so let me know if you need any information from the machine in either OS and I can get it for you right away, I have the machine right on my desk :).

Thanks!
Attachments:
open | download - ubootoutput.txt (4.6 KB)
open | download - debianbootlog.txt (29.7 KB)
open | download - stockWDOS3bootlogwithdmesgandethtooloutput.txt (64.6 KB)
Re: WD My Cloud EX4 help request
March 31, 2025 10:00PM
ConcentratedCancer,

Very helpful logs. All ineeded info about ethernet can be found there.

> Some of the Linux bootargs I used for Debian were
> taken from the stock OS3 bootargs, notably:
>
> console=ttyS0,115200 max_loop=32
> :::DB88FXX81:egiga0:none
>
> which I thought the last bit may help with the
> ethernet but it did not, as the bootlogs indicate
> it was not recognized by the kernel and it would
> be passed to userspace.

Those stock bootargs usually only meaningful to stock kernel.

>
> As shown by the logs, the machine can still boot
> the stock OS3 no problem so let me know if you
> need any information from the machine in either OS
> and I can get it for you right away, I have the
> machine right on my desk :).

Nice!

I'll post the DTS & DTB shortly.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: WD My Cloud EX4 help request
March 31, 2025 10:49PM
ConcentratedCancer,

The attached tarball contains

kirkwood-wd-ex4.dtb
kirkwood-wd-ex4.dts

Please recreate your uImage with new DTB. And boot again.

Also use a more "modern" load addresses for uImage and uInitrd

Replace your load addresses in bootcmd
setenv bootcmd 'setenv ipaddr 192.168.0.154; setenv serverip 192.168.0.110;tftp 0x00a00000 uImage;tftp 02000000 uInitrd; bootm 0x00a00000 0x02000000"
with
0x800000 for uImage
0x2100000 for uInitrd

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Attachments:
open | download - kirkwood-wd-ex4_250331.tar (20 KB)
Re: WD My Cloud EX4 help request
March 31, 2025 11:54PM
Bodhi,

Thank you for making that DTS for this machine.

It's past midnight where I live but I wanted to provide a update/some feedback on using the DTB before I call it a night.

Regenerating the uImage using the new .dtb caused it to hang at "starting kernel". I am not sure how to get any more debugging information out of it as I am pretty sure that message is technically before the kernel has started.

Just in case I also tested it using the the load addresses I was using originally but that had the same effect.

I've attached the log if it's of any use but I am not sure it will be.

Thanks again.
Attachments:
open | download - bootwithupdateddtb.txt (3.5 KB)
Re: WD My Cloud EX4 help request
April 01, 2025 12:56AM
ConcentratedCancer,

> Regenerating the uImage using the new .dtb caused
> it to hang at "starting kernel". I am not sure how
> to get any more debugging information out of it as
> I am pretty sure that message is technically
> before the kernel has started.

Boot with earlyprintk to see if any error logging show up.
setenv bootargs 'root=/dev/sda1 console=ttyS0,115200 earlyprintk=serial'
setenv bootcmd 'setenv ipaddr 192.168.0.154; setenv serverip 192.168.0.110;tftp 0x800000 uImage;tftp 0x2100000 uInitrd; bootm 0x800000 0x2100000'
boot

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: WD My Cloud EX4 help request
April 01, 2025 11:59AM
Hello once again,

With using the early printk argument I now get some useful information. I have attached the bootlog to the post.

It appears to get to the part in the initramfs where it mounts the real rootfs, but then kernel panics.
I am not sure how a device tree could cause that to happen but you know more than me.

Thanks again!
Attachments:
open | download - updateddtbwithearlyprintk.txt (26.7 KB)
Re: WD My Cloud EX4 help request
April 01, 2025 02:09PM
> It appears to get to the part in the initramfs
> where it mounts the real rootfs, but then kernel
> panics.

Strange error.

[   13.602158][  T178] EXT4-fs (sda1): mounted filesystem 65b0aaad-8deb-4da3-96d8-67262cb74c1a ro with ordered data mode. Quota mode: none.
[   13.889997][    T1] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100
[   13.898326][    T1] CPU: 0 UID: 0 PID: 1 Comm: init Not tainted 6.13.8-kirkwood-tld-1 #1 d786cb445a55a57f0ba1beeb464768952359b8d7
[   13.909926][    T1] Hardware name: Marvell Kirkwood (Flattened Device Tree)
[   13.916855][    T1] Call trace: 
[   13.916866][    T1]  unwind_backtrace from show_stack+0x10/0x14
[   13.925989][    T1]  show_stack from panic+0xf0/0x340
[   13.931026][    T1]  panic from do_exit+0x25c/0x9ec
[   13.935899][    T1]  do_exit from sys_exit_group+0x0/0x14
[   13.941290][    T1]  sys_exit_group from sys_exit_group+0x10/0x14
[   13.947364][    T1]  sys_exit_group from ret_fast_syscall+0x0/0x44
[   13.953524][    T1] Exception stack(0xa0819fa8 to 0xa0819ff0)
[   13.959247][    T1] 9fa0:                   011115a0 00000004 00000001 00000000 00000001 01111190
[   13.968077][    T1] 9fc0: 011115a0 00000004 00000001 000000f8 00000000 76f9bd80 00000000 004ec4a8
[   13.976905][    T1] 9fe0: 004edacc 7efa69e8 004668c4 76e9e544
[   13.982631][    T1] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100 ]---

Probably not related, but I noticed your kernel files are not matching. The initramfs is 6.6.3.

Bytes transferred = 5776275 (582393 hex)
## Booting image at 00800000 ...
   Image Name:   Linux-6.13.8-kirkwood-tld-1
   Created:      2025-04-01   4:27:48 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    6010125 Bytes =  5.7 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 02100000 ...
   Image Name:   initramfs-6.6.3-kirkwood-tld-1
   Created:      2025-03-30  20:45:40 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    5776211 Bytes =  5.5 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Did you install full kernel 6.13.8-kirkwood-tld-1?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: WD My Cloud EX4 help request
April 01, 2025 04:27PM
Here is the updated DTB. Please try.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Attachments:
open | download - kirkwood-wd-ex4_250401.tar (20 KB)
Re: WD My Cloud EX4 help request
April 01, 2025 06:36PM
Alright so we are getting closer, it now boots up and also shows eth0 and eth1. However there are some oddities.


When the ethernet cable is attached, the console gets spammed with messages of the link going up and going down.

I've attached the bootlog however to make it more clear on what is going on I have edited the log and added comments which I will preface and end using "###" to make it more clear what's a comment.

As for the older initramfs I was using, that was a mistake on my end when I used mkimage to create it.
It actually is the 6.13.8 initramfs however the uboot image name is 6.6.3. I fixed it now though for the future.

Just for fun I tested the USB as well, and I am not sure what you did but both USB ports now work perfectly!

So we are about two steps closer to a functioning debian on this machine!

Thank you for your help thus far, I couldn't of done this on my own, though I am eager to learn :)



Edited 2 time(s). Last edit at 04/01/2025 06:41PM by ConcentratedCancer.
Attachments:
open | download - ethernetissues.txt (56.3 KB)
Re: WD My Cloud EX4 help request
April 01, 2025 07:17PM
ConcentratedCancer,

Looks very good!

> When the ethernet cable is attached, the console
> gets spammed with messages of the link going up
> and going down.

This might be HW related. But we can do this to tell the driver stop sending out auto negotiation. That hopefully will quiet the sys log.

ethtool -s eth0 autoneg off

For eth1 to work automatically, you also need to modify the /etc/network/interfaces to add eth1.

The basic rootfs defines only eth0.
rename /end0=eth0
auto lo eth0
iface lo inet loopback
iface eth0 inet dhcp

There are a few more items to figure out and also we need to fix some minor problems.

=====

For now, try the ethernet eth0 and eth1 fixes as mentioned above. And log into Debian, get some info

ethtool eth0
ethtool eth1
lspci
lspci -v
lsusb
lsusb -v
lsblk

You need to install pciutils and usbutils if not already installed.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: WD My Cloud EX4 help request
April 01, 2025 11:37PM
Hello once again,

Running that ethtool command did quiet the log whilst keeping the connection stable, amazing!

It's been awhile since I have used systemd with more than one interface so I completely forgot it won't bring up the interface or DHCP it unless it's configured in the interfaces file. Either way doing that it works as expected.

I have attached a log with the requested command output.

Thanks!
Attachments:
open | download - runningethcommands.txt (11.3 KB)
Re: WD My Cloud EX4 help request
April 02, 2025 01:54AM
> Running that ethtool command did quiet the log
> whilst keeping the connection stable, amazing!

Cool!

Is that a dumb switch this box is connected to? or the router (i.e managed switch)? something peculiar about this switch.

>
> It's been awhile since I have used systemd with
> more than one interface so I completely forgot it
> won't bring up the interface or DHCP it unless
> it's configured in the interfaces file. Either way
> doing that it works as expected.

Yes, ethtool output looks good for both ports.

> I have attached a log with the requested command
> output.

So look like most important features work. Awesome!

Except we have not tested the SATA ports. I have high hope that all 4 ports will work. I saw one HDD was spun up.
[    4.839159][   T55] ata1.00: ATA-8: WDC WD2500AAKX-083CA1, 19.01H19, max UDMA/100
[    4.846623][   T55] ata1.00: 488397168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    4.859035][   T55] ata1.00: configured for UDMA/100
[    4.874516][   T12] scsi 0:0:0:0: Direct-Access     ATA      WDC WD2500AAKX-0 1H19 PQ: 0 ANSI: 5
[    4.884609][   T63] sd 0:0:0:0: [sda] 488397168 512-byte logical blocks: (250 GB/233 GiB)
[    4.894106][   T63] sd 0:0:0:0: [sda] Write Protect is off
[    4.899752][   T63] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    4.909764][   T63] sd 0:0:0:0: [sda] Preferred minimum I/O size 512 bytes
[    4.980402][   T63]  sda: sda1
[    4.983855][   T63] sd 0:0:0:0: [sda] Attached SCSI disk

And
root@debian:~# lspci
00:01.0 PCI bridge: Marvell Technology Group Ltd. Device 6282 (rev 01)
00:02.0 PCI bridge: Marvell Technology Group Ltd. Device 6282 (rev 01)
01:00.0 SCSI storage controller: Marvell Technology Group Ltd. 88SX7042 PCI-e 4-port SATA-II (rev 02)
02:00.0 USB controller: Etron Technology, Inc. EJ168 USB 3.0 Host Controller (rev 01)
And to answer your question before, the USB 3.0 controller is on the PCIe bus. Using the right definition in the DTS activated the controller.

Also activated is the PCIe-based SATA controller 88SX7042. So you could test the HDD on each of the slots to see if it spins up.

======

Remaining minor issues:

1. MTDs

[    4.365853][    T1] Scanning device for bad blocks
[    4.526094][    T1] 3 fixed-partitions partitions found on MTD device orion_nand
[    4.533551][    T1] Creating 3 MTD partitions on "orion_nand":
[    4.539417][    T1] 0x000000000000-0x000000100000 : "uboot"
[    4.545677][    T1] 0x000000100000-0x000000500000 : "uImage"
[    4.551925][    T1] 0x000000500000-0x000020000000 : "root"
[    4.557508][    T1] mtd: partition "root" extends beyond the end of device "orion_nand" -- size truncated to 0xfb00000


I need to look at the stock u-boot envs to see what it should be.

2. Bootargs

The root device should be root=LABEL=rootfs so that it does not matter where the rootfs partition is, the kernel will find it. This is the most robust way to boot Debian on multi-drive configuration.
setenv bootargs 'root=LABEL=rootfs console=ttyS0,115200 earlyprintk=serial'

3. RTC

[    5.858994][    T1] rtc-mv f1010300.rtc: internal RTC not ticking
This box probably use a different RTC chip. Stock bootlog might have this info.

On the board, the RTC chip should be labeled as such.

4. LEDs

Stock OS might have some clues. There might be scripts that set the LEDs. Or if we can find the GPL source for stock kernel.

Otherwise, a brute force method is needed to find the LED GPIOs.

5. Fan

Stock bootlog might have this info.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: WD My Cloud EX4 help request
April 02, 2025 12:34PM
Hey,

So I am not home at the moment so I can't tinker with the machine, however before I left I did test four drives in the machine at once and indeed all the sata ports do work!

As for the kernel command line not using a label instead of a UUID, that was me messing about before I was able to get the machine to boot at all, to keep it as consistent as possible I will use a roots label instead.

The machine is connected to a 24 port TP-Link managed switch. I'll try plugging it into a dumb switch as well as the router directly to see if I get a different result.

This is the WD EX4 GPL Package which has the kernel and rootfs, when I am back home I will do some looking around myself in the rootfs to see if there is anything to do with the LED's and I will also physically look at the board to see if I can't find you the part/model number for the real time clock.

Thanks!



Edited 1 time(s). Last edit at 04/02/2025 03:59PM by ConcentratedCancer.
Re: WD My Cloud EX4 help request
April 02, 2025 02:38PM
> So I am not home at the moment so I can't tinker
> with the machine, however before I left I did test
> four drives in the machine at once and indeed all
> the sata ports do work!

Cool!

> The machine is connected to a 24 port TP-Link
> managed switch. I'll try plugging it into a dumb
> switch as well as the router directly to see if I
> get a different result.

That would be great. Most of the time people use umanaged switch. I know this problem does not appear on other 88e6282 SoC boxes with Marvell network chip. I've only seen this behavior reported a couple times before.

If it also occurs on a dumb switch, then we can blame the driver. In either cases, we can live with the ethtool command work around, since it is stable.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: WD My Cloud EX4 help request
April 02, 2025 04:09PM
Hello,

I just realized I linked the firmware binary and not the GPL, my mistake. I edited my previous post with the correct link.

I tried again with a dumb switch connected directly to the router and directly to the router it's self and got the exact same messages repeating in the log

[  260.744801][    C0] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[  261.778001][    C0] mv643xx_eth_port mv643xx_eth_port.0 eth0: link down
[  261.785400][    C0] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[  262.818045][    C0] mv643xx_eth_port mv643xx_eth_port.0 eth0: link down

I am back home now and am going to go digging in the stock firmware to see if I can find anything about the LED's and or fan. I will also have a look at the board to see if I can find which RTC this board uses.

Thanks again!
Re: Debian on WD My Cloud EX4
April 02, 2025 06:10PM
Quote

I tried again with a dumb switch connected directly to the router and directly to the router it's self and got the exact same messages repeating in the log

Good to know!

BTW, I've changed the subject of this thread to "Debian on WD My Cloud EX4"

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: WD My Cloud EX4 help request
April 03, 2025 12:51AM
ConcentratedCancer,


Quote

Remaining minor issues:

1. MTDs

[ 4.365853][ T1] Scanning device for bad blocks
[ 4.526094][ T1] 3 fixed-partitions partitions found on MTD device orion_nand
[ 4.533551][ T1] Creating 3 MTD partitions on "orion_nand":
[ 4.539417][ T1] 0x000000000000-0x000000100000 : "uboot"
[ 4.545677][ T1] 0x000000100000-0x000000500000 : "uImage"
[ 4.551925][ T1] 0x000000500000-0x000020000000 : "root"
[ 4.557508][ T1] mtd: partition "root" extends beyond the end of device "orion_nand" -- size truncated to 0xfb00000


I need to look at the stock u-boot envs to see what it should be.

Please get the listing of envs at serial console u-boot prompt.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on WD My Cloud EX4
April 04, 2025 07:51AM
Hello,

I've been away the last couple days but I'll be back home this evening and will be able to get those for you.

Thanks!
Re: Debian on WD My Cloud EX4
April 07, 2025 09:03PM
Hello,

I was sick the last few days, is this what you are needing?

Marvell>> printenv
baudrate=115200
loads_echo=0
ipaddr=2.66.66.200
serverip=2.66.66.32
rootpath=/srv/ubuntu
netmask=255.255.255.0
run_diag=yes
stdin=serial
stdout=serial
stderr=serial
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0xff00000@0x100000(root)
mainlineLinux=no
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
MALLOC_len=1
ethprime=egiga0
netbsd_en=no
vxworks_en=no
bootargs_root=root=/dev/nfs rw
bootargs_end=:::RD88FXX81:eth0:none
image_name=uImage
bootcmd=nand read.e 0xa00000 0x100000 0x500000;nand read.e 0xf00000 0x600000 0x500000;bootm 0xa00000 0xf00000
bootargs=root=/dev/ram console=ttyS0,115200 max_loop=32 :::DB88FXX81:egiga0:none
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvNetConfig) $(mvPhoneConfig); bootm 0x2000000;
lcd0_enable=0
lcd0_params=640x480-16@60
bootdelay=1
disaMvPnp=no
ethaddr=00:50:43:00:02:02
ethmtu=1500
eth1addr=00:50:43:00:02:02
eth1mtu=1500
mvPhoneConfig=mv_phone_config=dev[0]:fxs,dev[1]:fxo
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
nandEcc=1bit
pcieTune=no
pcieTune1=no
ethact=egiga0

Environment size: 1289/131068 bytes
Marvell>> 

Re: Debian on WD My Cloud EX4
April 07, 2025 09:26PM
@ConcentratedCancer,

> is this what you are
> needing?

Yes, specifically this is the stock FW layout:

> mtdparts=nand_mtd:0xc0000@0(uboot)ro,0xff00000@0x100000(root)

Thanks!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on WD My Cloud EX4
April 08, 2025 12:31AM
Here is the updated kirkwood-wd-ex4.dtb.

This should have the correct MTDs layout (1MB uboot and 255 MB root).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Attachments:
open | download - kirkwood-wd-ex4_250407.tar (20 KB)
Re: Debian on WD My Cloud EX4
April 10, 2025 02:41PM
Hello,

I have been away the last few days but I have gotten the chance now to test the new DTS you provided.
Upon loading the kernel and initrd, but instantly crashes with "data abort" and resets the CPU. I have attached the log.


Thanks!
Attachments:
open | download - newmtddtsbooterr.txt (2.8 KB)
Re: Debian on WD My Cloud EX4
April 10, 2025 03:50PM
> Upon loading the kernel and initrd, but instantly
> crashes with "data abort" and resets the CPU. I
> have attached the log.

Ok. Let me take a look at the DTB.

In the mean time, please go back to the previous version of the DTB: kirkwood-wd-ex4_250401.tar

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on WD My Cloud EX4
April 10, 2025 05:47PM
@ConcentratedCancer,

Bytes transferred = 5776275 (582393 hex)
## Booting image at 00800000 ...
   Image Name:   Linux-6.13.8-kirkwood-tld-1
   Created:      2025-04-10  19:34:15 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    706 Bytes =  0.7 kB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Looks like your uImage is bad. Probably you've mistyped the mkimage command.

Recreate it and boot again.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on WD My Cloud EX4
April 10, 2025 07:38PM
Hey,

Yep, my mistake, actually there was more than one mistake, I forgot to copy the kernel before appending the device tree onto it so the "kernel" I was trying to load was just the device tree, as well as I extracted the dts instead of the dtb. I am still sick so my brain isn't working quite right haha, regardless that new device tree does show the correct size/layout and has no "extends beyond the end of device" message like it had before, Awesome! Due to having a cold I haven't had the chance to dig into the stock firmware yet to look for clues to the remaining missing pieces (namely front led's and fan) but once I am no longer sick I will have a look and report my findings here!

Thanks again!!
Re: Debian on WD My Cloud EX4
April 10, 2025 09:30PM
> Yep, my mistake, actually there was more than one
> mistake, I forgot to copy the kernel before
> appending the device tree onto it so the "kernel"
> I was trying to load was just the device tree, as
> well as I extracted the dts instead of the dtb. I
> am still sick so my brain isn't working quite
> right haha,

:)

> regardless that new device tree does
> show the correct size/layout and has no "extends
> beyond the end of device" message like it had
> before, Awesome! Due to having a cold I haven't
> had the chance to dig into the stock firmware yet
> to look for clues to the remaining missing pieces
> (namely front led's and fan) but once I am no
> longer sick I will have a look and report my
> findings here!
>

No rush, and have a speedy recovery!

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