[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
File system from list of files?
- Date: Wed, 22 Sep 2004 15:01:32 +1000
- From: chrisj at rtems.org (Chris Johns)
- Subject: File system from list of files?
Peter Dufault wrote:
> Is there a utility that I can run on Unix (or whatever development host
> I'm using) where I can specify a list of files, and the utility will
> generate C code that will implement a read-only POSIX filename file
> system under RTEMS?
Yes but not directly from ROM and not using C code. The files are placed
into the IMFS (or what ever filesystem you have).
1) Create a tar file of the files you wish to access:
$ tar cf files.tar config.c
2) Turn the tar file into an object file (m68k target):
$ m68k-rtems-ld -r -o files.o -b binary files.tar
3) Link the object file into your application.
4) In you application untar the files using:
* These are created by the linker when linking a binary file.
extern int _binary_files_tar_start;
extern int _binary_files_tar_size;
Untar_FromMemory ((unsigned char *) (&_binary_files_tar_start),