This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: ROMFS help needed
- From: "Gary Thomas" <gary at mlbassoc dot com>
- To: atonizzo at lycos dot com
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Sun, 7 Mar 2004 07:31:27 -0700 (MST)
- Subject: Re: [ECOS] ROMFS help needed
- References: <MPBPFEJFGOOAMCAA@mailcity.com>
Anthony Tonizzo said:
> Hi:
>
> I am trying to add ROMFS support to my ecos "bag of
> tricks". I have added the ROM file system to my
> configuration file, and checked the "Build ROMFS
> tests" option. Then I begun to copy portions of the
> fileio1.c program. In particular I copied the mount table
> entry:
>
> MTAB_ENTRY( romfs_mte1,
> "/",
> "romfs",
> "",
> (CYG_ADDRWORD) &filedata[0] );
>
> and then, right on top of my cyg_user_start() I placed
> the following code:
>
> DIR *dirp;
> unsigned char *dir_name = "/";
> ...
> dirp = opendir( dir_name );
>
> Unfortunately the call fails and after a few days of
> this I am out of ideas. I tried single stepping into
> the thing and it appears that the mount table is empty:
> That is odd, because I have defined its only entry. Or
> perhaps I just do not know what I am doing :)
>
> The fileio1.c program does not seem to mount the ROMFS
> drive prior to using it. I wonder if this is appropriate.
>
> Any wisdom to share?
Look at the MicroWindows demo programs I wrote - they can use ROMFS.
The main thing I remember is that your "ROM" data needs to be 32 byte
aligned (the ROMFS wants it that way for some reason)
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss