Ok, I figured it out. I noticed that the 4.11 kernel has a more "generous" 
memory layout than the 4.9 one:

kernel 4.9:

[    0.000000] Memory: 504492K/524288K available (3777K kernel code, 371K 
rwdata, 1128K rodata, 296K init, 247K bss, 19796K reserved, 0K cma-reserved, 0K 
highmem)

kernel 4.11:

[    0.000000] Memory: 502648K/524288K available (4096K kernel code, 398K 
rwdata, 1132K rodata, 1024K init, 248K bss, 21640K reserved, 0K cma-reserved, 
0K highmem)

So I suspected that the 4.11 kernel might be overwriting/corrupting the 
initrd.img provided in memory before it gets to unpack it, and changed the 
memory location from 0xa00000 to 0xc00000:

Marvell>> tftpboot 0x800000 C0A80802.img-4.11-bpo
[...]
Marvell>> cp.l 0xf8400000 0xc00000 0x240000
Marvell>> setenv bootargs earlycon console=ttyS0,115200 root=/dev/ram 
initrd=0xc00000,0x900000 ramdisk=34816 coherent_pool=1M
Marvell>> bootm 0x800000
## Booting image at 00800000 ...
   Image Name:   kernel 4.11.0-0.bpo.1-marvell
   Created:      2017-07-30  23:17:11 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2076472 Bytes =  2 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.11.0-0.bpo.1-marvell 
(debian-ker...@lists.debian.org) (gcc version 6.3.0 20170516 (Debian 6.3.0-18) 
) #1 Debian 4.11.6-1~bpo9+1 (2017-07-09)
[...]
[    0.267272] Unpacking initramfs...
[    0.597766] Freeing initrd memory: 9216K
[...]
Welcome to Debian GNU/Linux 9 (stretch)!

Voila! It's finally booting!

So, was the 4.11 kernel compiled/linked with a wrong alignment padding setting? 
Or should the bootloader environment be changed to permanently use the higher 
address for passing initrd.img to the kernel?

Reply via email to