initramfs breakage with 64-bits kernels?
Hi all,
I have been trying to get a 2.6.29 64-bits kernel for Cavium Octeon to work with a 32-bits userland in an initramfs. While booting, the kernel does not find the initramfs due to the check against initrd_start in populate_rootfs (init/initramfs.c) failing.
Do you have any idea about what could be wrong here ? Is this a regression ?
Signature · 4 lines
Best regards, Florian Fainelli Email : [email protected] http://openwrt.org -------------------------------
Quoted 4 lines · Florian Fainelli
I have been trying to get a 2.6.29 64-bits kernel for Cavium Octeon to work with a 32-bits userland in an initramfs. While booting, the kernel does not find the initramfs due to the check against
initrd_startinpopulate_rootfs(init/initramfs.c) failing.
You mean the test for initrd_start being non-zero? Is your initramfs really at address zero?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 10 lines · Geert Uytterhoeven
Quoted 5 lines · Florian Fainelli
I have been trying to get a 2.6.29 64-bits kernel for Cavium Octeon to work with a 32-bits userland in an initramfs. While booting, the kernel does not find the initramfs due to the check against
initrd_startinpopulate_rootfs(init/initramfs.c) failing.You mean the test for
initrd_startbeing non-zero? Is your initramfs really at address zero?
I'm not set up to verify this, but I have a nagging suspicion that a big-endian 64-bit kernel build could store an initrd_start address with 32 or fewer significant bits (i.e. it starts in the first 4GB) as a 64-bit pointer, but that the code in initramfs.c is testing the value as a 32-bit scalar type. I don't know about lmo but in kernel.org 2.6.29, it's declared in include/linux/initrd.h as an extern unsigned long, not a void *. Little endian builds wouldn't see such a problem.
Regards,
Kevin K.
Quoted 10 lines · Kevin D. Kissell
Quoted 2 lines · Geert Uytterhoeven
You mean the test for
initrd_startbeing non-zero? Is your initramfs really at address zero?I'm not set up to verify this, but I have a nagging suspicion that a big-endian 64-bit kernel build could store an
initrd_startaddress with 32 or fewer significant bits (i.e. it starts in the first 4GB) as a 64-bit pointer, but that the code ininitramfs.cis testing the value as a 32-bit scalar type. I don't know about lmo but in kernel.org 2.6.29, it's declared ininclude/linux/initrd.has an extern unsigned long, not a void *.
And yes, I know that MIPS64 builds *should* have data type equivalence for longs and pointers, but this behavior just smells like a data typing mismatch problem, at some level.
Kevin K.