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)
September 15, 2021 05:42PM
Hi

It looks that your 5.12 and 5.13 configs have CONFIG_MVPP2_PTP enabled.

Kernel 5.13.17 boots fine when CONFIG_MVPP2_PTP is disabled.

Need to investigate later if latest changes to drivers/net/ethernet/marvell/mvpp2 will allow to boot with CONFIG_MVPP2_PTP enabled.
Re: WD MyCloud Gen2 (Glacier, Armada 375)
September 15, 2021 07:33PM
osa,

> It looks that your 5.12 and 5.13 configs have
> CONFIG_MVPP2_PTP enabled.
>
> Kernel 5.13.17 boots fine when CONFIG_MVPP2_PTP is
> disabled.
>
> Need to investigate later if latest changes to
> drivers/net/ethernet/marvell/mvpp2 will allow to
> boot with CONFIG_MVPP2_PTP enabled.

Right on! that's what I saw yesterday. A problem with Kconfig, probably.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
osa
Re: WD MyCloud Gen2 (Glacier, Armada 375)
September 16, 2021 08:43AM
Hi,

Kernel 5.13.17 segfaults with CONFIG_MVPP2_PTP enabled, so for now disabling it would be necessary.
I'm not sure if next kernel will fit into 5MB size limit, so this might be the last working kernel for this box
Re: WD MyCloud Gen2 (Glacier, Armada 375)
October 05, 2021 04:11PM
osa,

> I'm not sure if next kernel will fit into 5MB size
> limit, so this might be the last working kernel
> for this box

I'm reconfiguring this kernel and moving some drivers out to initrd. Looks like we'll keep it smaller than 5MB easily.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
osa
Re: WD MyCloud Gen2 (Glacier, Armada 375)
October 07, 2021 07:15AM
> like we'll keep it smaller than 5MB easily.

Sounds great.
Please, make sure all marvel sata + ext3/4 drivers are built into kernel.
I found, that initrd is loaded into memory, but is not used - looks like kernel is overwriting some memory regions (on decompression?) and uses drivers from root partition. For that reason default debian 11 kernel/initrd cannot be used to boot on wd



Edited 2 time(s). Last edit at 10/07/2021 07:27AM by osa.
Re: WD MyCloud Gen2 (Glacier, Armada 375)
October 07, 2021 03:57PM
osa,

> Please, make sure all marvel sata + ext3/4 drivers
> are built into kernel.

These are important drivers so I always make sure they are built into the kernel.

> I found, that initrd is loaded into memory, but is
> not used - looks like kernel is overwriting some
> memory regions (on decompression?)

I don't think it is a kernel decompression problem. Sounds like u-boot problem that we have not solved. Using stock u-boot and cannot change the load adresses will cause the initrd to be corrupted if it is too big. And the standard Debian 10/11 always produce a large initrd, my kernel build also result in a large initrd.

Perhaps we shoud look at the GPL source for this u-boot and try to pach it to solve this once and for all.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
osa
Re: WD MyCloud Gen2 (Glacier, Armada 375)
October 09, 2021 08:50AM
Bodhi,
it looks this problem was for a longer time, but i didn't paid attention.
I'll dig deeper to find out if first supported kernels (5.2/5.3?) had this issue or it is related with changing compression to xz.

There's no u-boot source code in wd's gpl sources.


BootROM - 1.51
Booting from SPI flash


General initialization - Version: 1.0.0
High speed PHY - Version: 0.1.1 (COM-PHY-V20) 
USB2 UTMI PHY initialized succesfully
USB2 UTMI PHY initialized succesfully
High speed PHY - Ended Successfully

DDR3 Training Sequence - Ver 5.7.1
DDR3 Training Sequence - Run with PBS.
DDR3 Training Sequence - Ended Successfully 
BootROM: Image checksum verification PASSED

 ** LOADER **


U-Boot 2013.01_v1.03 (Nov 20 2014 - 16:39:45) Marvell version: 2014_T2.0p3

Board: WD_Glacier_DB-88F6720-V2
SoC:   MV88F6720 Rev A0
       running 2 CPUs
CPU:   ARM Cortex A9 MPCore (Rev 1) LE
       CPU 0
       CPU    @ 800 [MHz]
       L2     @ 400 [MHz]
       TClock @ 200 [MHz]
       DDR    @ 534 [MHz]
       DDR 16Bit Width, FastPath Memory Access, DLB Enabled
DRAM:  512 MiB

Map:   Code:		0x1fed6000:0x1ff92c90
       BSS:		0x1ffefa20
       Stack:		0x1f9c5f20
       Heap:		0x1f9c6000:0x1fed6000

SF: Detected MX25L8006E with page size 64 KiB, total 1 MiB
PCI-e 0: Detected No Link.
PCI-e 1: Detected No Link.
SF: Detected MX25L8006E with page size 64 KiB, total 1 MiB
MAC addr: 00:90:A9:ED:7B:9A
### Loading Firmware from USB 3.0 Disk ###
USB2.0 0: Host Mode
USB2.0 1: Device Mode
USB3.0 0: Host Mode
Board configuration detected:
	GE-PHY-0 on MAC0
SERDES configuration:
	Lane #0: PCIe0
	Lane #1: PCIe1
	Lane #2: SATA0
	Lane #3: USB3
Net:   egiga0 [PRIME]
*** ERROR: ping address not given
Hit any key to stop autoboot:  0 
(Re)start USB...
USB0:   Port (usbActive) : 0	Interface (usbType = 3) : USB XHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
** Bad device usb 0 **
** Bad device usb 0 **
## Booting image at 00a00000 ...
### Loading Firmware from USB 2.0 Disk ###
(Re)start USB...
USB0:   Port (usbActive) : 1	Interface (usbType = 2) : USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
** Bad device usb 0 **
** Bad device usb 0 **
## Booting image at 00a00000 ...
### Loading Firmware from Disk ###

Reset IDE: 
Marvell Serial ATA Adapter
Integrated Sata device found
  Device 0 @ 0 0:
Model: WDC WD800JD-75MSA3                       Firm: 10.01E04 Ser#:      WD-WMAM9CT05924
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 76293.9 MB = 74.5 GB (156250000 x 512)

5181396 bytes read in 169 ms (29.2 MiB/s)
9659113 bytes read in 276 ms (33.4 MiB/s)
## Booting image at 00a00000 ...
## Booting kernel from Legacy Image at 00a00000 ...
   Image Name:   Linux-5.10.3-mvebu-tld-1
   Created:      2020-12-28  22:09:37 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5181332 Bytes = 4.9 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 00f00000 ...
   Image Name:   initramfs-5.10.3-mvebu-tld-1
   Created:      2020-12-28  22:10:01 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9659049 Bytes = 9.2 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

DTB:0x004F5BB8 (0x000033DC)
C:0x000080C0-0x004F9020->0x01171700-0x01662660
DTB:0x0165F1F8 (0x00003459)
Uncompressing Linux... done, booting the kernel.
[    0.000000][    T0] Booting Linux on physical CPU 0x0
[    0.000000][    T0] Linux version 5.10.3-mvebu-tld-1 (root@debian) (gcc (Debian 8.3.0-6) 8.3.0, GNU ld (GNU Binutils for Debian) 2.31.1) 
#1 SMP PREEMPT Mon Dec 28 04:19:55 PST 2020
[    0.000000][    T0] CPU: ARMv7 Processor [414fc091] revision 1 (ARMv7), cr=10c5387d
[    0.000000][    T0] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000][    T0] OF: fdt: Machine model: WD MyCloud Gen2
[    0.000000][    T0] Memory policy: Data cache writealloc
[    0.000000][    T0] INITRD: 0x00f00000+0x00937000 overlaps in-use memory region - disabling initrd
[    0.000000][    T0] Zone ranges:
[    0.000000][    T0]   Normal   [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000][    T0]   HighMem  empty
[    0.000000][    T0] Movable zone start for each node
[    0.000000][    T0] Early memory node ranges
[    0.000000][    T0]   node   0: [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000][    T0] Initmem setup node 0 [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000][    T0] percpu: Embedded 20 pages/cpu s52812 r8192 d20916 u81920
[    0.000000][    T0] Built 1 zonelists, mobility grouping on.  Total pages: 130048
[    0.000000][    T0] Kernel command line: root=/dev/sda2 console=ttyS0,115200
[    0.000000][    T0] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000][    T0] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000][    T0] mem auto-init: stack:off, heap alloc:on, heap free:off
[    0.000000][    T0] Memory: 502352K/524288K available (10240K kernel code, 1474K rwdata, 3080K rodata, 1024K init, 357K bss, 21936K reser
ved, 0K cma-reserved, 0K highmem)
[    0.000000][    T0] random: get_random_u32 called from ____cache_alloc+0x404/0x78c with crng_init=0
[    0.000000][    T0] rcu: Preemptible hierarchical RCU implementation.

Re: WD MyCloud Gen2 (Glacier, Armada 375)
October 09, 2021 03:46PM
osa,

Quote

> it looks this problem was for a longer time, but i
> didn't paid attention.
> I'll dig deeper to find out if first supported
> kernels (5.2/5.3?) had this issue or it is related
> with changing compression to xz.

I think it has been there for quite a long time, probably from day one that you and others tried to boot the new Debian kernel. I recalled seeing it, but since you and other can boot and not raising the question so I forgot to revisit this issue.

Quote

> [ 0.000000][ T0] INITRD: 0x00f00000+0x00937000 overlaps in-use memory region - disabling initrd

This means the load address for initrd is not good, its size is too big. Note that stock kernel has a much smaller initrd.

Since there is no u-boot GPL source, you would have find a workaround to load uInitrd at higher memory address.

Let's think about this a bit. If I remembered this issue incorrectly ( then there was a kernel version that work in the past).

Here are my oldest installed kernel initrd. if the uInitrd.4.19.1-mvebu-tld-1 works then it is easy to fix this problem. If not then we can try to figure out a way.

-rw-r--r-- 1 root root 8.3M Nov  9  2018 uInitrd.4.19.1-mvebu-tld-1

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: WD MyCloud Gen2 (Glacier, Armada 375)
October 09, 2021 04:05PM
osa,

Try this to see if it works

In serial console, before booting:
setenv initrd_high 0xffffffff
and then
boot

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: WD MyCloud Gen2 (Glacier, Armada 375)
October 14, 2021 11:00PM
megal0maniac,

I thought about your kernel panic problem some more. It might be the rootfs.

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

I'd like to see what your rootfs looks like.

Mount it on another Linux box and assuming it is mounted at /media/sdb1.

cd /media/sdb1
ls -latr
ls -latr /media/sdb1/boot/
mount
cat /media/sdb1/etc/fstab

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



Edited 3 time(s). Last edit at 10/15/2021 02:23AM by bodhi.
Re: WD MyCloud Gen2 (Glacier, Armada 375)
December 27, 2021 01:33AM
Good afternoon, I bought a glacier gen2 375 without a disk, purple lights up when turned on is this normal? there is no USB flash drive loading or the local network is not loaded whether the loader is damaged, it can flash it, I tried all the instructions, I mark up the disk in linux ubuntu 20.4 installed on wmware, I fill 5 images into their places, I connect the disk and there is no download
osa
Re: WD MyCloud Gen2 (Glacier, Armada 375)
January 06, 2022 04:34PM
osa
Re: WD MyCloud Gen2 (Glacier, Armada 375)
July 04, 2023 02:38PM
Hi

I'm probably the only user of bodhi's kernel on this box, but i just want to let you know

I just tested linux-6.3.8 kernel and it fits into 5MB limit and boots just fine.
I looked at sizes of all 6.x kernels and they should fit too



Edited 1 time(s). Last edit at 07/04/2023 02:39PM by osa.
Re: WD MyCloud Gen2 (Glacier, Armada 375)
July 05, 2023 04:09PM
thanks for the feedback @osa

you will find there are more people using and referencing the work on this peaceful corner of the intertubes than post... its always good to hear when people feedback on good work done by the maestro

============================
Breaking stuff since 1994 :-)
============================
Re: WD MyCloud Gen2 (Glacier, Armada 375)
July 06, 2023 11:08AM
Indeed much appreciated, thanks osa!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: WD MyCloud Gen2 (Glacier, Armada 375)
July 08, 2023 06:45AM
EDIT:

eroneous post - deleted

============================
Breaking stuff since 1994 :-)
============================



Edited 1 time(s). Last edit at 07/08/2023 02:52PM by Gravelrash.
Author:

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: