[Devel] Gen1 possible kernel bump to 3.19

I’ve been working on bringing a newer kernel to my WDMyCloud Gen1 (sequoia) device for some time and got to v3.2.101 mostly working, w/o 64K pages and netatop causing kernel panic, but it is still 3.2. I was not able to move past 3.2 with all attempts thwarted by changes in ARM GIC handling between those versions, that I could not figure how to work around.

WD does not appear to have any incentive/capabilities to upgrade the device past officially-supported Mindsped/NXP SDK versions based on kernel 3.2.

However, I was able to launch kernel 3.19.3 using mainline + patches from https://github.com/bitdefender/boxv2-firmware for comcerto2000 target (which is also known under FreeScale/NXP QorIQ LS1024A name, and the SOC is still being sold by NXP). I updated the load address to match sequoia, patched includes in board-c2kevm.c and got to rootfs initialization:

Barebox-C2K >/env/bin bootm /dev/mem.uImage
   Verifying Checksum ... OK
   Image Name:   Linux-3.19.3test1
   Created:      2019-08-28   4:40:45 UTC
   Image Type:   <NULL> <NULL> <NULL> (<NULL>)
   Data Size:    1549632 Bytes =  1.5 MB
   Load Address: 0f008000
   Entry Point:  0f008000

Starting kernel ...

commandline: console=ttyS0,115200n8, init=/sbin/init rootfstype=ext4 rw noinitrd mac_addr=00:11:22:33:44:55 model= serial= board_test= btn_status=0
arch_number: 1094
Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x900
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 3.19.3test1 (rye@bling) (gcc version 4.8.5 (Linaro GCC 4.8-2015.06) ) #3 SMP Wed Aug 28 04:35:38 UTC 2019
[    0.000000] CPU: ARMv7 Processor [412fc091] revision 1 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine: Comcerto 2000 EVM
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] PERCPU: Embedded 10 pages/cpu @cfdee000 s9792 r8192 d22976 u40960
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 59904
[    0.000000] Kernel command line: console=ttyS0,115200n8, init=/sbin/init rootfstype=ext4 rw noinitrd mac_addr=00:11:22:33:44:55 model= serial= board_test= btn_status=0
[    0.104076] Brought up 1 CPUs
[    0.104105] SMP: Total of 1 processors activated (1292.69 BogoMIPS).
[    0.104116] CPU: All CPU(s) started in SVC mode.
[    4.977713] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -19
[    4.985328] Please append a correct "root=" boot option; here are the available partitions:
[    4.993803] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    5.002121] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G        W      3.19.3test1 #3
[    5.009640] Hardware name: Comcerto 2000 EVM
[    5.013932] Backtrace:
[    5.129690]  r4:00000000 r3:cf832000
[    5.133317] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

Just want this information out for somebody with enough cycles to tackle the board bringup and tailoring the patched kernel for sequoia.

1 Like

If you want - i can upload it to my website and ask for tests Russian community (4pda.ru).
And, please, share compiled kernel and config for test.

Well, at this point it is too early for anything to share, I’ve switched to gcc-7, got initramfs working with busybox and got SMP back in board-c2kevm which sequoia appears to be based on:

/ # uname -a
Linux (none) 3.19.3-00009-g17f729b4cbb2-dirty #23 SMP Tue Sep 3 02:57:00 UTC 2019 armv7l GNU/Linux
/ # dmesg | grep gcc
[    0.000000] Linux version 3.19.3-00009-g17f729b4cbb2-dirty (rye@bling) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11) ) #23 SMP Tue Sep 3 02:57:00 UTC 2019
/ # cat /proc/cpuinfo
processor       : 0
model name      : ARMv7 Processor rev 1 (v7l)
BogoMIPS        : 1292.69
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpd32
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x2
CPU part        : 0xc09
CPU revision    : 1

processor       : 1
model name      : ARMv7 Processor rev 1 (v7l)
BogoMIPS        : 1292.69
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpd32
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x2
CPU part        : 0xc09
CPU revision    : 1

Hardware        : Comcerto 2000 EVM
Revision        : 0001
Serial          : 0000000000000000

However, the current config is quite unusable - I am pulling the kernel over tftp, accessing the console over serial connection without networking or SATA support, and still in process of discovering what else is broken.

My understanding is that the gen2 uses busybox not gen1.

Initial ramdisk present in both generations. But not used in gen1.

@gen1, you can use my initrd for gen2 devices. Just add network module and edit init script.

I decided to proceed with bringing up the board, and currently is not very usable.
I’ve pushed my patched kernel based on vanilla 3.19.3 to GitHub.

I’ve booted the board into unmodified armhf Debian Jessie with sequoia_defconfig, and notable things that do not work are:

  • PFE (so no built-in Ethernet)
  • LEDs

Things that surprisingly work are:

  • SATA
  • USB (including USB Ethernet based on RTL8152 which I’m using while PFE is broken)
  • BCM PHY (we can now get the link, but it is useless without PFE)

Next update will be if and when I get PFE working.

You should also find that usfd and jnl don’t work either.

Yup, netatop started crashing kernel on 3.2.101, so I did not even look at any modules that are not absolutely essential to get it running, such as ufsd. Granted, this lowers the appeal of any work on updating the kernel, but hey, I’ve haven’t bricked it yet, so that’s something.

I mentioned these two modules because when I tried to rebuilt the kernel with btrace enabled on the gen2 device. I got errors with ufsd and jnl. Turns out the source to rebuild them is available. Was able to rebuild them but the link would fail missing a file. You need a .bin file to link them. I was never able to find the .bin file.

I’ve got PFE working, and it turned out I’ve been using incomplete modprobe implementation from busybox which would not apply kernel module parameters, so pfe.ko was always running with defaults.

Just use my Initrd (ramdisk). Its have almost all, what need for start system and test basic functional.

I know this is a very old thread. Recently I also have devoted some brain cycles to getting a more recent kernel running on WD MyCloud Gen1 (comcerto) devices.

The lid on the CPU in at least one of my WD MyCloud Gen1 devices says " M86261G-12, which falls under Mindspeed Comcerto 2000 - ARMv7 (ARM Cortex-A9 MultiCore) on this wiki. The same site also specifically mentions WD MyCloud using the M86261G-12.

Someone is working on a Comcerto 2000 (also marketed as LS1024A after Mindspring was acquired?) documentation project (with some updates in 2021). They appear to have documentation for the PFE (packet forwarding engine?) module.

This document is an effort to document the Comcerto 2000 SoC from Mindspeed
technologies (rebranded as Freescale/NXP QorIQ LS1024A after acquisition by
Freescale, then by NXP).

That same person is working on LS1024A support in 5.x kernels (also with updates in 2021)

I also performed a quick text search within a Debian 4.9.210-1 kernel tree (one that was convenient on one of my computer (not MyCloud) systems - I believe it is the latest 4.x kernel officially supported in Debian Jessie). There are numerous mentions of “Freescale” as a linux contributor, and many mentions of the LS1021A (though not the LS1024A).

According the the marketing description provided by NXP on DigiKey (renowned component supplier), the LS1020A, LS1021A, and LS1024A comprise a family of similar microprocessors.

Based on Arm Cortex-A7 and Cortex-A9 processors, NXP’s Layerscape LS1020A, LS1021A, and LS1024A provide extensive integration and power efficiency for fanless, small form factor enterprise and consumer networking applications.

It seems these chips are still in production. It looks like there is support for at least the LS1021A in the 4.x kernel. Perhaps someone even makes a product with one that uses a modern linux kernel.

It has been a very long time since I’ve even recompiled my own kernel (back in the Fedora Core 3 days), so a lot of this is taking awhile to come back to me.

Still, I wanted to share the info I’ve recently discovered.

Hopefully a 5.15.x kernel is available soon due to WD abandoning MyCloud Gen1 devices. I plan on switching to Gentoo on all three of mine soon (unless a recent version of Debian or OpenWrt is available for them).

Hi I am interested in this 3.19.3 kernel for wd mycloud.
This because kernel 3.2 has no support for smb2 and 3.
We are working on adding wd mycloud gen 1 support in our custom fvdw-sl firmware (plugout.net)
I got the kernel compiled from the source you mentioned. It runs ok except I can not get pfe module working correctly. It loads but finds the wrong phy_id on phy=0. As result the bcm54612 driver is not loaded.
You mentioned you uploaded your kernel to git but that link is not working. Would it be possible to upload your kernel and patches again? Thx in advance