Hi!
I would like to load a component configuration from a file on linux. So I've added a lx_fs and a fs_rom component that replaces my dynamic_rom component without changing any code in my component. So far is everything good (I hope!).
To my questions: 1. How do I state which file to read? 2. My understanding is that the root attribute in lx_fs defines which directory genode will see as root. But anything except "/" here results in the error message "Session root directory "..." does not exist". 3. Do I write the same thing in the config file as I did when having the dynamic_rom (<config attribute="value" .... />)?
My configuration: <start name="component"> <resource name="RAM" quantum="5M"/> <route> <service name="ROM"> <child name="fs_rom"/> </service> <any-service> <parent/> <any-child/> </any-service> </route> </start>
<start name="fs_rom"> <resource name="RAM" quantum="4M" /> <provides> <service name="ROM" /> </provides> <route> <service name="File_system"> <child name="lx_fs" /> </service> <any-service> <parent/> <any-child/> </any-service> </route> </start>
<start name="lx_fs"> <resource name="RAM" quantum="4M" /> <provides> <service name="File_system" /> </provides> <config> <policy label="fs_rom" root="/" writable="no" /> </config> </start>
Thanks!
Hello Mikael,
On Mon, Jan 25, 2016 at 03:37:37PM +0100, Mikael Sahlström wrote:
- How do I state which file to read?
lx_fs provides access to the path configured in the "root" attribute of the policy node. The path is interpreted *relative* to the directory lx_fs is executed from, e.g., <build dir>/var/run/lx_fs for "make run/lxf_fs". Please have a look at base-linux/run/lx_fs.run (as suggested in the lx_fs/README for further details.
- My understanding is that the root attribute in lx_fs defines which
directory genode will see as root. But anything except "/" here results in the error message "Session root directory "..." does not exist".
See above.
- Do I write the same thing in the config file as I did when having the
dynamic_rom (<config attribute="value" .... />)?
Sorry, I fear I don't understand this question.
Regards
I'd just like to point out that while lx_fs is handy, it doesn't always work as well as the other file system servers, so if you start running into problems, try the ram_fs or the vfs. If you are dynamically generating and writing the roms to a file system I would use one of those two because, for example, lx_fs does not support update notifications.
I myself use the vfs and fs_rom servers as a persistent shared state between components, but I'm not sure if this is the same as what you are doing.
Emery