On Sun, Jan 24, 2016 at 1:28 AM, Roger Shimizu <rogershim...@gmail.com> wrote: > On Sat, Jan 23, 2016 at 7:17 AM, Martin Michlmayr <t...@cyrius.com> wrote: >> Your patch sets the kernel load address to 0x00c08000. So u-boot will >> still load the kernel to 0x00100000 but then (I guess) it's >> uncompressed at 0x00c08000. The problem is that 0x00c08000 is only 4 >> MB after the start of the ramdisk (0x00800000), which doesn't leave a >> lot of space for the ramdisk. >> >> You can change initramfs-tools from MODULES=dep to MODULES=most, >> generate and I suspect it wouldn't boot. >> >> Can you try if something like 0x01a08000 works? >> >> BTW, I assume we need to change this for all Linkstation devices. > > I only pathced LS-WTGL because it's the only device I can boot with > the change to 0x00c08000. > I don't have other orion5x device, so I tested on a few kirkwood based > Linkstation but all failed with this kinda of trick. > > Now it's cleared, as you said, 0x00c08000 is too low that big initrd > may over-write to its address. > I tried 0x01a08000, yes, my kirkwood devices boot okay, but still have > the following error in dmesg: > > [ 0.361974] Unpacking initramfs... > [ 0.884688] Initramfs unpacking failed: junk in compressed archive > > the initrd I used to test is 3.4M initramfs initrd. > And it's 7.9M after gunzip. > > Indeed, I have no clue why initramfs complain there's junk, since > kernel already set to higher address as 0x01a08000.
Now I know (or partly know) why initramfs complain there's junk, it's because there's in a kernel param "initrd=0x00800040,12M". After removing that kernel param, the kernel stops complaining, which proves change kernel address to 0x01a00000 is fine. Since the kernel param "initrd=0x00800040,12M" is from stock firmware, and actually does no harm except the "there's junk" kmsg, I decide to leave it alone. So here's the patch to all Linkstation devices. I've confirmed it's working well on various orion5x and kirkwood based Linkstation devices, including LS-GL (device tree based), LS-WTGL, LS-VL and LS-WXL. I'll push this commit to git repo later. Thank you! Cheers, -- Roger Shimizu, GMT +9 Tokyo PGP/GPG: 17B3ACB1
From 172a0aec5ab9809945a27c1fc17832cfaa6fd1e7 Mon Sep 17 00:00:00 2001 From: Roger Shimizu <rogershim...@gmail.com> Date: Wed, 13 Jan 2016 01:45:44 +0900 Subject: [PATCH] Update kernel address for Buffalo Linkstation devices machine db For Linkstation LS-WTGL boots fine with linux-image-4.3, but fails with linux-image-4.4. Deep research reveals that the initrd/initramfs space, starts from 0x00800000, may be overwritten by kernel extraction by default configuration. So the fix is to move the target address of kernel image extraction address from 0x00008000 to 0x01a00000. Since initrd/initramfs is firstly placed from 0x00800000 by u-boot, in this way, 18M space, from 0x00800000 to 0x01a00000, can be used by initrd/initramfs, which is enough for case like MODULES=most for initramfs-tools. This fix has been confirmed working well on various orion5x and kirkwood based Linkstation devices, including LS-GL (device tree based), LS-WTGL, LS-VL and LS-WXL. Therefore, I applied to all Linkstation devices. Signed-off-by: Roger Shimizu <rogershim...@gmail.com> --- db/all.db | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/db/all.db b/db/all.db index 3f1dfcd..6c76653 100644 --- a/db/all.db +++ b/db/all.db @@ -49,7 +49,7 @@ Required-Packages: u-boot-tools Machine: Buffalo Linkstation LiveV3 (LS-CHL) Kernel-Flavors: orion5x marvell Machine-Id: 2913 -U-Boot-Kernel-Address: 0x00008000 +U-Boot-Kernel-Address: 0x01a00000 U-Boot-Initrd-Address: 0x0 Boot-Kernel-Path: /boot/uImage.buffalo Boot-Initrd-Path: /boot/initrd.buffalo @@ -60,7 +60,7 @@ Machine: Buffalo Linkstation LS-CHLv2 Kernel-Flavors: kirkwood marvell DTB-Id: kirkwood-lschlv2.dtb DTB-Append: yes -U-Boot-Kernel-Address: 0x00008000 +U-Boot-Kernel-Address: 0x01a00000 U-Boot-Initrd-Address: 0x0 Boot-Kernel-Path: /boot/uImage.buffalo Boot-Initrd-Path: /boot/initrd.buffalo @@ -72,7 +72,7 @@ Machine: Buffalo Linkstation LS-WTGL Kernel-Flavors: orion5x marvell DTB-Id: orion5x-linkstation-lswtgl.dtb DTB-Append: yes -U-Boot-Kernel-Address: 0x00008000 +U-Boot-Kernel-Address: 0x01a00000 U-Boot-Initrd-Address: 0x0 Boot-Kernel-Path: /boot/uImage.buffalo Boot-Initrd-Path: /boot/initrd.buffalo @@ -83,7 +83,7 @@ Machine: Buffalo Linkstation LS-WVL/VL Kernel-Flavors: kirkwood marvell DTB-Id: kirkwood-lswvl.dtb DTB-Append: yes -U-Boot-Kernel-Address: 0x00008000 +U-Boot-Kernel-Address: 0x01a00000 U-Boot-Initrd-Address: 0x0 Boot-Kernel-Path: /boot/uImage.buffalo Boot-Initrd-Path: /boot/initrd.buffalo @@ -94,7 +94,7 @@ Machine: Buffalo Linkstation LS-WXL/WSXL Kernel-Flavors: kirkwood marvell DTB-Id: kirkwood-lswxl.dtb DTB-Append: yes -U-Boot-Kernel-Address: 0x00008000 +U-Boot-Kernel-Address: 0x01a00000 U-Boot-Initrd-Address: 0x0 Boot-Kernel-Path: /boot/uImage.buffalo Boot-Initrd-Path: /boot/initrd.buffalo @@ -105,7 +105,7 @@ Machine: Buffalo Linkstation LS-XHL Kernel-Flavors: kirkwood marvell DTB-Id: kirkwood-lsxhl.dtb DTB-Append: yes -U-Boot-Kernel-Address: 0x00008000 +U-Boot-Kernel-Address: 0x01a00000 U-Boot-Initrd-Address: 0x0 Boot-Kernel-Path: /boot/uImage.buffalo Boot-Initrd-Path: /boot/initrd.buffalo @@ -119,7 +119,7 @@ Kernel-Flavors: orion5x marvell DTB-Append-From: 4.3 DTB-Id: orion5x-lswsgl.dtb Machine-Id: 1858 -U-Boot-Kernel-Address: 0x00008000 +U-Boot-Kernel-Address: 0x01a00000 U-Boot-Initrd-Address: 0x0 Boot-Kernel-Path: /boot/uImage.buffalo Boot-Initrd-Path: /boot/initrd.buffalo @@ -129,7 +129,7 @@ Bootloader-Sets-Incorrect-Root: yes Machine: Buffalo Linkstation Pro/Live Kernel-Flavors: orion5x marvell Machine-Id: 1585 -U-Boot-Kernel-Address: 0x00008000 +U-Boot-Kernel-Address: 0x01a00000 U-Boot-Initrd-Address: 0x0 Boot-Kernel-Path: /boot/uImage.buffalo Boot-Initrd-Path: /boot/initrd.buffalo @@ -139,7 +139,7 @@ Bootloader-Sets-Incorrect-Root: yes Machine: Buffalo/Revogear Kurobox Pro Kernel-Flavors: orion5x marvell Machine-Id: 1509 -U-Boot-Kernel-Address: 0x00008000 +U-Boot-Kernel-Address: 0x01a00000 U-Boot-Initrd-Address: 0x0 Boot-Kernel-Path: /boot/uImage.buffalo Boot-Initrd-Path: /boot/initrd.buffalo -- 2.1.4