UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
5,947 Views
Registered: ‎10-30-2009

Max Kernel Size

Hey,

 

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!

0 Kudos
6 Replies
Anonymous
Not applicable
5,938 Views

Re: Max Kernel Size

0 Kudos
5,913 Views
Registered: ‎10-30-2009

Re: Max Kernel Size

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?)?

0 Kudos
Xilinx Employee
Xilinx Employee
5,897 Views
Registered: ‎09-10-2008

Re: Max Kernel Size

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.

 

0 Kudos
5,877 Views
Registered: ‎10-30-2009

Re: Max Kernel Size

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)?

0 Kudos
Xilinx Employee
Xilinx Employee
5,856 Views
Registered: ‎09-10-2008

Re: Max Kernel Size

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.

 

Thanks.

 

 

0 Kudos
Anonymous
Not applicable
5,853 Views

Re: Max Kernel Size

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..

 

Terry

 

0 Kudos