This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: romfs on linux synthetic
- From: Andrew Lunn <andrew dot lunn at ascom dot ch>
- To: Morten Laursen <MLA at rtx dot dk>
- Cc: "'ecos-discuss at sources dot redhat dot com'" <ecos-discuss at sources dot redhat dot com>
- Date: Wed, 29 May 2002 14:19:26 +0200
- Subject: Re: [ECOS] romfs on linux synthetic
- References: <AB439ADBB821D41181CC00D0B7458AEB0155503B@SRV-EXCHANGE>
On Wed, May 29, 2002 at 01:41:00PM +0200, Morten Laursen wrote:
> Hi
>
> I can see from the archives that some of you use romfs on linux synthetic,
> but not how.
>
> I particular, how do you link the rom image into the synthetic target?
Two ways
1) Don't! malloc a block of memory, read the image in from the file
using the host OS backdoor access functions and then mount it.
2) Jifl wrote a script that takes a binary image and turns it into an
initialized C array. This is compiled into object form and linked
in like any other C file. You pass the array to mount. See
file2c.tcl and the test case in the sources.
Andrew
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss