Welcome! Log In Create A New Profile

Advanced

WD MyCloud Gen2 (Glacier, Armada 375)

Posted by Miraculix666 
osa
Re: WD MyCloud Gen2 (Glacier, Armada 375)
January 05, 2021 03:33PM
Hi

With every little f*** up i learn something new

I found new version of u-boot in gpl source code (binary only) and... got simple flash programmer to fix broken flash ;-)
I don't know if they differ somehow, but there's no setenv but bootargs trick works.

Is it possible to convert u-boot bin to kwb file?
Is it possible to change some internal string values and recalculate (if needed) checksums?

This is the latest released gpl code i could find https://downloads.wdc.com/gpl/WD_MyCloud_GPL_v2.31.204_20191206.tar.gz
Re: WD MyCloud Gen2 (Glacier, Armada 375)
January 05, 2021 04:56PM
> With every little f*** up i learn something new

:)

>
> I found new version of u-boot in gpl source code
> (binary only) and... got simple flash programmer
> to fix broken flash ;-)
> I don't know if they differ somehow, but there's
> no setenv but bootargs trick works.

You meant there is no saveenv?

> Is it possible to convert u-boot bin to kwb file?

Yes. mkimage is used for that purpose in the u-boot make scripts.

> Is it possible to change some internal string
> values and recalculate (if needed) checksums?

Yes, find the checksum location in the header (iirc it is at the end).

> This is the latest released gpl code i could find
> https://downloads.wdc.com/gpl/WD_MyCloud_GPL_v2.31.204_20191206.tar.gz

Cool. I'll take a look some time in the next few days.

BTW, I've built the MVEBU kernel with xz compression and it was shrunk to 4.9M. And it seems to have a side benefit of dealing with a kernel "regression" in uncompression debug (still investigate this issue so not sure what I am seeing is correct yet, but I am very certain that this bug affect the Kirkwood kernel).

So thanks for the suggestion, xz will be used in the next release after I've tested other Armada and Kirkwood boxes.

-bodhi
===========================
Forum Wiki
bodhi's corner
faktorqm
Re: WD MyCloud Gen2 (Glacier, Armada 375)
January 21, 2021 06:06AM
Hi guys, I have a WD MyCloud Gen2 (Glacier, Armada 375) board and I was looking to install a fresh Debian image to it. I have attached a 1TB Sata 3 notebook HDD.

I received this board for a kind of gift, and I'm totally playing with it. My goal is to have a fully working and updated Debian to run samba and qbittorrent (or any arm optimized torrent client).

Following the steps from fox_exe, I was not able to recover WD original firmware. I was reading a lot and finally I got it working sourcing some img files from the original partitions. So I managed to get it working and updated to the latest firmware.

Then I followed the steps to install a debian jessie from fox_exe, and again, it did not worked (I always get yellow led). I have tried to apply the kernel 4.10.plus, I got blue led, nothing. I restored the /boot folder to start with 3.10 again and magically worked out. Green led for me :)
So now I have Jessie working.

I started reading all this thread, which also lead me to https://forum.doozan.com/read.php?2,32146 and my understanding it that currently does not work (I'm wrong?). So, I'm offer my device to make all tests and finally add this device to the list.

I did not soldered pins yet to the board to access UART. Would you need me to do that for testing? I would prefer to not mess with the SPI flash if possible :)

Thanks in advance!
Re: WD MyCloud Gen2 (Glacier, Armada 375)
January 21, 2021 04:34PM
faktorqm,

It should work following what osa did to set up and use this DTS. I have not added this to the kernel, but will do so.

https://forum.doozan.com/read.php?2,94839,95014#msg-95014

I'll compile it for you if you've not sure how.

Note that currently you have to install it using USB.


> I started reading all this thread, which also lead
> me to https://forum.doozan.com/read.php?2,32146
> and my understanding it that currently does not
> work (I'm wrong?).

The older rootfs (Debian stretch) Debian-4.12.4-mvebu-tld-1-rootfs-bodhi.tar.bz2 will work.

Quote
https://forum.doozan.com/read.php?2,32146
Updated 23 Aug 2017:

This Debian-4.12.4-mvebu-tld-1-rootfs-bodhi.tar.bz2 has been uploaded

But you need a new DTB compiled from osa's DTS as mentioned above.


> I did not soldered pins yet to the board to access
> UART. Would you need me to do that for testing? I
> would prefer to not mess with the SPI flash if
> possible :)

Right. You need UART to install. And you cannot avoid messing with flash, because the set up will involve adding a new u-boot env to get it boot from USB.

So with UART connected, you will need to run kwboot to test the loading of u-boot image (mtd0) over serial. This is the rescue mechanism in case things go wrong.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: WD MyCloud Gen2 (Glacier, Armada 375)
January 22, 2021 04:08PM
Thanks a lot for your answer!

I would love if you can explain the steps to make this (or pointing me a guide to read) as this will be my first time flashing uboot through UART. As far as I understand this is a kind of standard mechanism across this kind of devices (routers for example)

Besides to this case in particular, I'm interested to learn how uboot works and what is the purpose of that, what uImage file does and so on. So far I got (or at least I think I got which is not the same xD) zImage as the kernel image (same as pc), and root fs as usual file structure.

I will start soldering pins and prepare a trusty serial-usb bridge to start seeing something. Thank you! Regards!
Re: WD MyCloud Gen2 (Glacier, Armada 375)
January 22, 2021 07:18PM
OK so summarizing

- Solder pins to USB and test the serial console (8N1 115200 right?)
- Change uboot -> kwboot (this thread is correct? I don't see this device listed but I assume that one of them could be compatible https://forum.doozan.com/read.php?3,12381 )
- Grab a USB and use 5.3.5-mvebu-tld-1 but with a kernel including the OSA device tree. (however you mentioned Debian-4.12.4-mvebu-tld-1-rootfs-bodhi.tar.bz2 with a new DTB from the DTS provided by OSA, so what should I use? 5.3.5 or 4.12.4?)

Thanks again! Bye bye!
Re: WD MyCloud Gen2 (Glacier, Armada 375)
January 22, 2021 09:33PM
faktorqm,

> - Solder pins to USB and test the serial console
> (8N1 115200 right?)

Right.

> - Change uboot -> kwboot (this thread is correct?
> I don't see this device listed but I assume that
> one of them could be compatible
> https://forum.doozan.com/read.php?3,12381
> )

No, that won't work. Those are Kirkwood SoC u-boots. This box is Armada 375.

There is no u-boot binary for this box available at the moment. So the mtd0 is the binary to use. First you will need to log into stock OS and dump mtd0 to a file. And then that file is used in running kwboot.

> - Grab a USB and use 5.3.5-mvebu-tld-1 but with a
> kernel including the OSA device tree. (however you
> mentioned
> Debian-4.12.4-mvebu-tld-1-rootfs-bodhi.tar.bz2
> with a new DTB from the DTS provided by OSA, so
> what should I use? 5.3.5 or 4.12.4?)

This box has a limitation of 5MB for uImage (that's how stock u-boot boot handle the kernel uImage, as osa found out). Kernel 5.3.5-mvebu-tld-1 uImage is too big. So use Debian-4.12.4-mvebu-tld-1-rootfs-bodhi.tar.bz2.

Later, after you got it working, then upgrade to 5.10.7-mvebu-tld-1 kernel.

> my first time flashing uboot through UART.

No, we will not do that. u-boot image (i.e. mtd0 dump) will be loaded over UART using kwboot to RAM memory, and then will be executed by the box BootROM (automatically). The u-boot image on flash (mtd0) is untouched by this process.

-bodhi
===========================
Forum Wiki
bodhi's corner
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: