[uClinux-dev] RAM only filesystem

Greg Ungerer gerg at snapgear.com
Wed Mar 5 19:17:29 EST 2003


Hi Ryan,

Ryan Hulsker wrote:
> 	I have a board that successfully boots a uclinux kernel (2.4.19).  This
> board has only 8M ram, and now I am trying to figure out how to get
> ROMFS to work with it in RAM.
> 
> 	Where does the system look for the ROMFS?

This is done different ways on different architectures/boards.
Look at the mess of code in drivers/block/blkmem.c that deal
with this. It ain't pretty :-(


>  I am cat-ing it onto the end
> of my kernel image, but this puts it in RAM right where my BSS section
> is and therefore it gets overwitten by my crt.S.

This is a pretty common setup. With this setup normally you
have code in your crt startup code that moves the ROMfs before
setting the bss to 0. Look at any of the ColdFire crt0_ram.S
files, they all do this. For example:

   ~/linux-2.4.x/arch/m68knommu/platform/5272/Motorola/crt0_ram.S


> 	In a rom based system, where the romfs is cat-ed onto the end of the
> kernel image, the file system image would end up starting at the end of
> the DATA section.  Is this where it looks for the image?

It can be.

Typically for the all RAM setup your crt0 startup code moves
the ROMfs to after the bss. Blkmem looks here for it then.

Regards
Greg


------------------------------------------------------------------------
Greg Ungerer  --  Chief Software Wizard        EMAIL:  gerg at snapgear.com
SnapGear Pty Ltd                               PHONE:    +61 7 3435 2888
825 Stanley St,                                  FAX:    +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia              WEB:   www.SnapGear.com




More information about the uClinux-dev mailing list