ARM – DreamPlug to Kernel 4.0-rc1..
Now that the DreamPlug has a stable power supply (see previous post..) I decided to live dangerously and update the u-boot version and install a modern ‘device tree’ plus kernel..
It has been mentioned many times before that the u-boot update for a DreamPlug is fraught, and can result in a ‘brick’.. There should be a way of recovering from this by use of openocd and the JTAG connection, but I tested this many times, and it simply did not work… This failure has been documented by several others, and when I see the instruction to ‘keep trying until it works’ I know that something is badly wrong – with the method, or hardware, or both….
There is documentation for DreamPlug u-boot updates, if you look for it.. Most of the info I found was rather ‘old’, and somewhat contradictory! Remember to take a copy of the old DreamPlug u-boot parameters, as these will get overwritten by the update, and you will need some of the info (including the ethernet mac addresses) to add back..
It is worth mentioning here that you do not need to do this, if you don’t want to! The latest kernels can be compiled successfully to produce a kernel-with-appended-device-tree image, which will still work with the ‘older’ version of u-boot on the DreamPlug..
However, I finally plucked up the courage, and went from:
U-Boot 2011.06-02334-g8f495d9-dirty (Mar 28 2011 - 05:21:06) Marvell-DreamPlug
to
U-Boot 2013.07 (Mar 03 2015 - 21:24:17) Marvell-DreamPlug
There are more recent versions of u-boot, but this version was the only one I found documented for the DreamPlug update that worked, and it does provide support for device-tree (and ext2 boot..) as well..
The kernel source was standard 4.0-rc1 from kernel.org and I cross-compiled the kernel from source in its own directory, including ~/boot and ~/lib sub-directories to receive the kernel image and modules, etc…. As usual, there are other ways of doing this, but this works, for me..
My workflow was:
export ARCH=arm export CROSS_COMPILE=armv7hl-mandriva-linux-gnueabi- (insert your own cross-compiler reference here, and don't forget the dash at the end..) export INSTALL_PATH=../ export INSTALL_MOD_PATH=../
– then run
make multi_v5_defconfig (if necessary..)
make xconfig (make any necessary changes, for selinux support, etc...)
make
make LOADADDR=000008000 uImage << Changed March 29, 2015 - Now gives correct amount of total memory after boot >> **
make modules_install
make firmware_install
cp System.map ../boot
cp arch/arm/boot/dts/kirkwood-dreamplug.dtb ../boot
cp arch/arm/boot/uImage ../boot
Then copy the boot files and lib/modules and lib/firmware contents to the DreamPlug SDCard..
For booting with device tree support, the changed u-boot parameters were:
setenv x_bootcmd_fdt fatload usb 1:1 0xd000000 kirkwood-dreamplug.dtb setenv x_bootcmd_kernel fatload usb 1:1 0x6400000 uImage setenv bootcmd '${x_bootcmd_usb}; ${x_bootcmd_kernel}; ${x_bootcmd_fdt}; setenv bootargs ${x_bootargs} ${x_bootargs_root}; bootm 0x6400000 - 0xd000000;'
I was still using fatload, but I may change to boot partition from fat to ext2 in the future and use ext2load..
You may find that the SDCard usb device/address is different – several examples I found showed it as usb 0:1…
After all this, the DreamPlug booted with Kernel 4.0-rc1:
Fedora release 18 (Spherical Cow) Kernel 4.0.0-rc1 on an armv5tel (ttyS0) ........................ [root@rgdreamplug ~]# uname -a Linux rgdreamplug 4.0.0-rc1 #1 PREEMPT Mon Mar 2 23:20:37 PST 2015 armv5tel armv5tel armv5tel GNU/Linux
In case you were wondering, the last Fedora version that supports armv5 was F18..
Robert Gadsdon. March 3, 2015.
** Thanks to Marcus Roeder for this information..
Hi Robert,
I’m desperatley trying to update the kernel of my Dreamplug, I’m currently stuck at 3.11.1. The best try I had was
after repeating the steps you described here. But it wasn’t fully successful. The kernel started, detected all usb media,
obviously mounted the root filesystem but stopped then. It didn’t start ‘init’.
My differences were: Kernel source 4.0.0-rc4 and u-boot Version 14.10 or 12.04; didn’t try 13.10 yet.
Would you be so kind and provide me your working .config-File in case I missed some needed settings?
Kind regards,
Marcus
Hi Marcus,
I’ve put a copy on pastebin – see latest article..
RG.
just a me too. I did not update u-boot and kept the 2011-Version that was originally installed. I built a kernel, appended the fdt and I am seeing two symptoms:
a) sometimes the kernel will start showing debug output (kernel 4.1.1 stable from kernel.org)
b) sometimes it boots I can see output from printk but then it stops without executing init.
looking to up update u-boot now to get more stability into (a)
I changed one command to
make LOADADDR=0x00008000 uImage
because the kernel reported: “Ignoring memory range 0x0 – 0x8000000”
which resulted in 128 MB RAM missing. Now ‘free’ reports 499 MB total memory.
Thanks for that info.. I changed to #make LOADADDR=000008000 uImage and now # free reports total memory as 512648.
I will issue a correction!
RG.
Hi, thank you for this blogpost. May I ask which steps exactly did you follow when upgrading u-boot?
I used the information from here as a guide http://blog.langfinger.org/?p=266 , but was _very_ wary of doing this, as I had never managed to get the jtag/usb/recovery process to work, so had no fallback if I created a ‘brick’!
At that time, I deliberately used the same version of U-Boot as mentioned in the article, but have seen reports that suggest the ‘latest’ stable version should work as well..
RG.
I found that indeed a new u-boot is necessary to run kernels newer than somewhere between 3.8.8 and 4.0. Even with appended device tree, u-boot 2011.10 which was preinstalled on my dreamplug behaves inconsistently and sometimes boots these kernels and sometimes it does not. I thought this was due to my kernel configuration but the issue was resolved by flashing 2013.7. The instructions on http://blog.langfinger.org/?p=266 worked for me and I now have a 4.1 kernel running on the box.
It took me a week to muster the courage to do it because I could not reproduce the recovery-steps with my jtag-unit either but everything went well.
Thank you for these hints!