[uClinux-dev] romfs placement question 68360

Tom Walsh tom at cyberiansoftware.com
Wed Nov 21 21:37:02 EST 2001


Bruce Paterson wrote:
> 
> Ok, the dumb questions coming thick and fast now :-)
> 
> Using the new source tar-ball and porting for an MC68360, kernel 2.4.x.
> 
> I'm a bit confused as to where the romfs binary ends up in
> images/image.bin.
> 
> According to my linux-2.4.x/System.map, my sections have ended up as
> follows:
> 00000 ramvec    (*not* included in image, linux.text) ok
> 28000 text      (in linux.text -> image.bin) ok  (NB: 28000 is for my
> own backwards compat requirements)
> be6c4 romvec    (in linux.text -> image.bin) ok  (fine, RO data gets
> copied to ramvec)
> beac0 data      (in linux.data -> image.bin) ok
> d8058 edata     ok
> d8060 bss       (doesn't end up in linux.data or linux.text) that is
> correct
> ea604 ebss      ok
> 
> Now what the vendor Makefile does (copied from Lineo) is
>  linux.text+linux.data+romfs.img -> image.bin
> 
> Doesn't this end up putting romfs over the top of bss ?  It'll get
> gromped
> on by the startup code that clears bss.
> 

That is correct, it is up to you to "unfold" the kernel by moving the
romfs upwards in memory and zero the bss section in your crt0.S code. 
If you read any of Greg's ColdFire code, or my EZ328LCD startup code,
you will see how this is being done (and you could even cut & paste
those lines into your crt0.S  ;-)

TomW


-- 
Tom Walsh - WN3L - Embedded Systems Consultant
http://openhardware.net, http://cyberiansoftware.com
"Windows? No thanks, I have work to do..."
----------------------------------------------------
This message resent by the uclinux-dev at uclinux.org list server http://www.uClinux.org/



More information about the uClinux-dev mailing list