[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#809476: Linux 4.4-rc6 fails to boot on QNAP TS-109



On Wed, Jan 6, 2016 at 9:41 PM, Roger Shimizu <rogershimizu@gmail.com> wrote:
> [Resend previous email to keep ARM experts in CC]
>
> On Thu, Dec 31, 2015 at 9:09 AM, Martin Michlmayr <tbm@cyrius.com> wrote:
>> I tried to boot Debian's 4.4-rc6 kernel on my QNAP TS-109 and it failed
>> to boot with:
>> [   19.380002] Unpacking initramfs...
>> [   19.380044] Initramfs unpacking failed: junk in compressed archive
>
> I see this error message on my Linkstation boxes for long time, but
> most of time they just boot fine.
> After seeing your report, now I understand the root cause why failing
> sometimes. :-)
>
>> -U-Boot-Kernel-Address: 0x00008000
>> +U-Boot-Kernel-Address: 0x00c08000
>
> I tried this on local db (/etc/flash-kernel/db) of my Linkstation, but
> it failed to boot.
> Except above change, did you also changed the address in uboot
> command? (like a few lines below)
>
>>> cp.b 0xff200000 0x800000 0x3fffff
>>> setenv bootargs console=ttyS0,115200n8 root=/dev/ram rw initrd=0x800000,0x3fffff
>>> bootm 0xff000000
>
>> u-boot loads it like this:
>>
>> ## Booting image at 00400000 ...
>>    Load Address: 00008000
>>    Entry Point:  00008000
>
> I also don't understand where the address "00400000" comes from. It's
> neither in flash-kernel's db nor in uboot setting.
> From my understanding, the kernel image stores in flash, which address
> is 0xff000000, and it will be copied to "00008000" by uboot on boot
> time, then kernel will uncompress the image and then boot. Am I missed
> something?

I asked Paul (in CC) who has been working on arm platform for years.
He told me that, as my case, "ext2load" will load the uImage to
0x100000 as instructed, then "bootm" will extract the "uImage" to
"zImage" format to 0x8000 as mkimage configured, and kernel will boot
from 0x8000 with initrd in 0x800000.

And these two addresses are also fixed in the kernel, which usually
specified in "arch/arm/mach-<ARCH>/Makefile.boot".
e.g. $ cat arch/arm/mach-orion5x/Makefile.boot
   zreladdr-y   += 0x00008000
params_phys-y   := 0x00000100
initrd_phys-y   := 0x00800000

The patch for this bug changed kernel start address from 0x8000 to 0xc08000.
But kernel's zreladdr-y is still 0x8000, without changing. If kernel
really uses this “zreladdr-y”, it may be trouble.
If it only for "make uImage" to pass to mkimage when compiling, it
will not be any problem.

>From the result of "grep" in kernel tree, the latter one seems to be true.

Cheers,
Roger


Reply to: