Sorry for not being clear. Is there a way to set the fs_rom service to provide files from a directory within a filesystem (e.g. /bin) as ROM modules? (Sorry if I'm using the wrong terminology.) Since writing the previous email, I have experimented with acpi, ahci, and part_blk. I modified a previously working config file to use acpi instead of directly calling pci_drv, and that made it stop booting properly. I copied the acpi code from the config file resulting from ahci.run (which fails), and put acpi_drv in menu.lst. It seems that Genode's ACPI driver doesn't work, at least in qemu. As for part_blk, I have made an HD image with 2 partitions and included it as a ROM module. I used some of the part_blk sample config in the README file. part_blk detects the two partitions correctly. I then routed the Block service to rump_fs. When I booted the system in qemu, it didn't get past rump_fs. rump_fs never made its filesystem service available. Unless my configuration is wrong, which I don't think it is, there is a bug in part_blk. Have any successful tests been done with part_blk? Sorry for not attaching any config files—I'm not at my computer right now and won't be for several hours. I have successfully gotten Genode to load executables from an iso image and have based my part_blk test on that. On Oct 30, 2014 4:04 AM, "Norman Feske" <norman.feske@...1...> wrote:
Hi Ben,
- How do I load executables and libraries from a filesystem?
you cannot load executables or libraries directly a file system. On Genode, executables and libraries are always requested as so-called ROM sessions. Let me clarify the difference between ROM sessions and file-system sessions:
A ROM session provides a single ROM module as dataspace, which can be mapped in a virtual address space. When creating a new process, the parent of the new process obtains a ROM dataspace with the ELF binary by opening a ROM session. When requesting a ROM session, the ROM module name is given as argument. There is no directory hierarchy and no way to scan for the available ROM modules. The ROM client has to know what to ask for. It then maps the different portions of the dataspace (such as the text segment) to the address space of the new process. In short: A ROM module is a piece of data that can be memory mapped. When multiple processes use the same ROM module (i.e., when the ROM module is a shared library) there exists only a single copy of the ROM-module data in the system.
A file-system session provides access to a hierarchical file system where files can be read/written, directories can be scanned, etc. Compared to the ROM session, it is far more complex. The data contained in files is copied over the session interface. A file of a file system can never be memory mapped.
The Genode base system (including the dynamic linker and the init process) does not rely on the file-system interface at all but only requires the simple ROM session interface. This way, low-complexity system scenarios can be realized without any notion of "files". To facilitate more sophisticated scenarios where executables and libraries should come from disk, a two-staged approach can be used:
The first stage (the first instance of the init process) contains all the drivers and services needed to accommodate the second stage. This static part of the system contains the ACPI driver, the disk driver, the file system server for accessing the second-stage files and an instance of the fs_rom component (that I mentioned in one of my previous emails).
The fs_rom component provides a ROM-session interface by reading files from a file system. In your setup, you would configure cli_monitor such that "ROM" session requests from the CLI monitor are routed to the fs_rom server instead of to the parent. The fs_rom server will request a file-system session. So you have to route the file system session to a file-system service (such as rump_fs).
- How do I access a specific filesystem on a hard drive?
Are you referring to individual partitions? If yes, please have a look at the part_blk component (os/src/server/part_blk).
- Can Genode automatically detect a filesystem's type?
There is no out-of-the box solution for this.
Cheers Norman
-- Dr.-Ing. Norman Feske Genode Labs
http://www.genode-labs.com · http://genode.org
Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main