12-10-2009 11:09 AM
I was wondering what the max size of the kernel can be on the ml507 board? I am using a cpio'd initramfs as my rootfs (~2MB). I can load/run kernels that are <3MB or so, but I have one that is 3.4/3.5MB and it says that I have insufficient memory.
zImage starting: loaded at 0x00400000 (sp: 0x00735fb0)
Allocating 0x4a7349 bytes for kernel ...
Insufficient memory for kernel at address 0! (_start=00400000, uncompressed size=0049202c)
I thought the ml507 had like 32MB of flash mem, is it a setting that I have somewhere that is killing me?
Thanks and sorry for the dumb question!
12-11-2009 01:38 PM
Just out of curiousity then, if i am using my own device tree, is it going to be added to the arch/powerpc/boot/wrapper? Will that specify where the kernel puts the bootstrapping code (how high in memory)?
-- i am not making the device tree, just counseling on it.
I guess more generally I was wondering how the kernel figures out where to put the bootstrapping code? Is it dynamic or hardcoded by system (in the device tree?)?
12-14-2009 07:46 AM
That link that he put in the previous message has more details as the address is hardcoded in the wrapper in arch/powerpc/boot/wrapper.
The whole thing with the bootstrap loader and the wrapper can get kind of complicated and convoluted IMHO.
The device tree determines where memory is in general, but powerpc Linux expects memory at 0.
Hope that helps.
12-17-2009 12:53 PM
I agree that the bootstrapping process is really compicated...convuluted is an understatement.
The system is going to have a few layers to it, and I just wanted to be sure that I undestand the memory layout information. Thanks for your help!
We are going to have program that will write the kernel to the PPC's memory space starting at 0 that runs on the FPGA. The kernel is going to consist of the kernel information and a 2/3MB initramfs. The whole kernel will get to be about 5MB uncompressed (i think).
This means that the kernel will initially occupy 0-5MB of the ram (right?). Then when the PPC is taken out of reset, and started going, it will unpack itself and start the bootstrapping process right (grub tables and such).
If this is the case, then where does the wrapper value need to be set such that I don't get that 'too big' error? Over 5MB? or just larger than the initramfs (uncompressed)?
12-21-2009 08:00 AM
Sorry for the delay as I was out of the office.
I don't have that much experience with initramfs on powerpc and haven't paid a lot of attention to the kernel size with it on MicroBlaze.
I would probably just move it up a reasonable amount like to 0x800000 or even higher. I haven't done any testing with this but I know others have had to do that.
It's not hard to try some experiments with it.
12-21-2009 08:12 AM
I think it just needs to be larger than the uncompressed kernel + initramfs.. I don't see any reason it can't be as high as you need it to be as long as there is enough memory.. So like John said put it somewhere higher and give your self some room to grow before having to change wrapper again..