Products > Embedded Computing

[solved] Linux: maximum bootable kernel size in PPC/32bit

(1/8) > >>

DiTBho:
This seems like a pretty straightforward question, but extensive experiments from kernel 4.11 to kernel 5.7.19 haven't shown a really clear, up-to-date answer.

k4.11 .. k5.7.19: when the kernel size is bigger than 8 MB, the final kernel doesn't boot but rather it freezes.

Why?  :-//

I'm having one hell of a time compiling monolithic kernels and keeping then under 8M without leaving out some core networking and file-system features I need; for several reasons I cannot use modules.

Anyway, it's not clear to me why a 32 bit processor would not be able to boot a kernel larger than 8 MB  :o

PKTKS:

--- Quote from: DiTBho on September 18, 2021, 12:27:20 am ---(.))
Anyway, it's not clear to me why a 32 bit processor would not be able to boot a kernel larger than 8 MB  :o

--- End quote ---

This is far from a correct postulation.
I can boot a raw 486 or 586 legacy board with 32 MEGA FPM/EDO memory.

You need as well to post a whole lot more details about what you have done on kernel to have issues.  Generally a minimal kernel excludes everything besides bare bones memory manager and basic kernel threads.

Everything else goes via INITRD and RAMDISK_SIZE like:

--- Code: ---append="initrd=isoroot.gz  ramdisk_size=xxxxxxx  root=/dev/ram0"

--- End code ---

Of course the base bare bones devices are also required in your isoroot image.
and grub is a PIG with such options.. 

The whole modern thing (udev/systemd/grub) will likely NOT WORK in minimal setups
a lot of tinkering and squashfs is usually done  unlike  bare isorootfs

This is not trivial and can not be based on these stock "modern" shit kernels.

Paul

thinkfat:
This is typically a problem of relocations not being resolved properly during linking the kernel. Relative jumps end up in nirvana instead of the right target address. Watch out for linker warnings during the final stage of the kernel build

DiTBho:

--- Quote from: PKTKS on September 18, 2021, 11:41:22 am ---Everything else goes via INITRD and RAMDISK_SIZE like:

--- End quote ---

There is no initrd or similars, the kernel mounts an hard-drive.

If the kernel size is > 8MB, it doesn't boot, it doesn't show anything, it simply freezes without any clue.
If the kernel size is <= 8Mbyte, it boots correctly.

 

DiTBho:

--- Quote from: thinkfat on September 18, 2021, 12:23:55 pm ---This is typically a problem of relocations not being resolved properly during linking the kernel. Relative jumps end up in nirvana instead of the right target address. Watch out for linker warnings during the final stage of the kernel build

--- End quote ---

Yup, this was/is a problem with ARM-classic, and it's also a problem with HPPA2 due to relative jumps. But this is something it shouldn't happen with PowerPC.

Anyway, there is also a second problem: the boot-wrapper (bZimage) cannot copy the kernel to - say 0x00010000 - it must copy the kernel to 0x00000000, otherwise it won't boot.

This way I cannot easily attach a serial debugger, unfortunately I don't have a jtag debugger and KGDB simply dies

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version