Rom FS
Norman Feske
norman.feske at ...1...
Wed Apr 14 15:08:45 CEST 2010
Hi Peter,
> Just to make things clear, what I meant was that I was wondering whether I am
> actually to dump the contents of the Rom FS without having to know the names of
> each ROM file ahead of time (which is what happens in boot up). From what I can
> see, when I create a rom dataspace capability, I have to specify the file that I
> want to access, which is not exactly what I want to do every time just in case
> new components are added. More specifically, I want to obtain the names of the
> ROM files and their addresses as part of sample processing. I also don't
> understand how the nested configs will help me achieve this task as well.
I suppose, Christian came up with the idea of using Genode's config
mechanism because, in a way, the list of files to be used by the server
is a kind of configuration data. In your case, you would like to obtain
the names of the ROM files at runtime, which is not possible via the ROM
interface per se. However, you have two simple ways for telling the
server about the files to use:
* You might just place a file containing the list of ROM files as
another boot module and, by convention, call it 'ls'. So you can
first create a ROM session for the file 'ls', read the file names
and open the other files. Of course, you would need to keep the
'ls' consistent with the ROM files.
* Alternatively, you can just the server about the files to use
via the config file. For example:
<config>
...
<start>
<filename>your_server</filename>
<ram_quota>5M</ram_quota>
<config>
<filelist>
<file>a_file</file>
<file>another_file</file>
</filelist>
</config>
</start>
</config>
Your server can then access its own '<config>' section by opening
a ROM session with 'config' as filename and use Genode's XML
parser to interpret the file list. For a simple example, please
have a look at 'demo/src/app/backdrop'.
I think, the latter solution is far more elegant because it not only
enables you to edit the configuration of the file list and your
test setup in one place, but it also allows for arbitrary further
configuration tags defined by yourself.
Regards
Norman
More information about the users
mailing list