Re: File Manager
Thanks. That makes things a lot nicer. On Oct 30, 2014 9:20 AM, "Norman Feske" wrote: > Hello, > > > 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.) > > this is possible by instructing the file-system server (like ram_fs or > rump_fs) to hand out a specific directory as the root for a session. The > policy can be defined depending on the label of the session. In > 'noux_bash.run', you can find an example for such a file-system server > configuration: > > > > > > > If the client with the session label "noux -> tmp" connects to the > server, ram_fs will hand out "/tmp" as the root for this session. > > In your case where you want fs_rom to obtain ROM files from "/lib", you > would likely define a policy like 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 > -- ___ genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Re: File Manager
Hello, > 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.) this is possible by instructing the file-system server (like ram_fs or rump_fs) to hand out a specific directory as the root for a session. The policy can be defined depending on the label of the session. In 'noux_bash.run', you can find an example for such a file-system server configuration: If the client with the session label "noux -> tmp" connects to the server, ram_fs will hand out "/tmp" as the root for this session. In your case where you want fs_rom to obtain ROM files from "/lib", you would likely define a policy like 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
Re: File Manager
Thanks. I'll try that and maybe find out what's going wrong. On Oct 30, 2014 8:36 AM, "Christian Helmuth" < christian.helm...@genode-labs.com> wrote: > Hello Ben, > > On Thu, Oct 30, 2014 at 02:29:48PM +, Nobody III wrote: > > Have any successful tests been done with part_blk? > > our regular yet simple test case for part_blk is located in > > repos/os/run/part_blk.run > > Greets > -- > Christian Helmuth > Genode Labs > > http://www.genode-labs.com/ · http://genode.org/ > https://twitter.com/GenodeLabs · /ˈdʒiː.nəʊd/ > > 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 > -- ___ genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Re: File Manager
Hello Ben, On Thu, Oct 30, 2014 at 02:29:48PM +, Nobody III wrote: > Have any successful tests been done with part_blk? our regular yet simple test case for part_blk is located in repos/os/run/part_blk.run Greets -- Christian Helmuth Genode Labs http://www.genode-labs.com/ · http://genode.org/ https://twitter.com/GenodeLabs · /ˈdʒiː.nəʊd/ 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
Re: File Manager
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" wrote: > Hi Ben, > > > 1. 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). > > > 2. 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). > > > 3. 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 > -- ___ genode-main mailing list genode-main@lists.sourceforge.net https:
Re: File Manager
Hi Ben, > 1. 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). > 2. 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). > 3. 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
Re: File Manager
Thanks. I'm almost ready to get working on making Genode run on my hard drive, but I still have a few questions: 1. How do I load executables and libraries from a filesystem? 2. How do I access a specific filesystem on a hard drive? 3. Can Genode automatically detect a filesystem's type? On Oct 29, 2014 11:38 AM, "Norman Feske" wrote: > Hello Ben, > > > Thanks. I still have one question: Does the vfs plugin support > > sub-mounts like the Linux kernel does? (E.g. can you mount a root > > filesystem and then mount other filesystems under it? If so, how do you > > do it?) > > it does. It also supports stacked file systems, which allows you to > overlay any number of file system over another (a bit like union fs on > Linux). > > If you want a certain file system appear within a specific directory, > you can use nested '' nodes to construct the directory structure > and place other nodes (such as '') in there. By looking through the > run scripts, you will find plenty of examples how virtual file systems > get assembled. Just grep for "vfs" and "fstab". > > E.g., in ports/run/noux_bash.run, you can see how the VFS of a noux > instance is constructed out of the content of several tar archives > (which happen to have intersecting directory structures) and a few > custom directories: > > 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 > -- ___ genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Re: File Manager
Hello Ben, > Thanks. I still have one question: Does the vfs plugin support > sub-mounts like the Linux kernel does? (E.g. can you mount a root > filesystem and then mount other filesystems under it? If so, how do you > do it?) it does. It also supports stacked file systems, which allows you to overlay any number of file system over another (a bit like union fs on Linux). If you want a certain file system appear within a specific directory, you can use nested '' nodes to construct the directory structure and place other nodes (such as '') in there. By looking through the run scripts, you will find plenty of examples how virtual file systems get assembled. Just grep for "vfs" and "fstab". E.g., in ports/run/noux_bash.run, you can see how the VFS of a noux instance is constructed out of the content of several tar archives (which happen to have intersecting directory structures) and a few custom directories: 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
Re: File Manager
Thanks. I still have one question: Does the vfs plugin support sub-mounts like the Linux kernel does? (E.g. can you mount a root filesystem and then mount other filesystems under it? If so, how do you do it?) On Oct 29, 2014 5:45 AM, "Norman Feske" wrote: > Hello Ben, > > > What level of file management does Genode have? Is there a graphical > > file manager available? Does noux support file management? > > there exists no graphical file manager for Genode. You can use coreutils > in a noux instance to operate on files, though. > > When attempting to port existing GUI applications, please keep in mind > that Genode does not support GTK. So you may be better off with > Qt5-based software. If you are genuinely interested in porting software > to Genode, you may find our porting guide useful: > > http://genode.org/documentation/developer-resources/porting > > > Also, since I am considering implementing a file manager if one doesn't > > already exist, how would I do it? I'm thinking of porting PCManFM to > > Genode, so how does the filesystem work? (Does it have a single root > > directory like Linux, or does it just give you access to each filesystem > > like in Windows?) > > Genode does not have global file system. Each process has a separate > instance of a virtual file system (VFS) that encompasses only those > files that the process needs to see. Such a process-local VFS is > configured by the respective parent process. To learn more about this > approach, let me point you to the following documentation snippet: > > > > http://genode.org/documentation/release-notes/14.05#Per-process_virtual_file_systems > > To actually access files on a disk, you will need to start an instance > of a file-system server (e.g., rump_fs) and a disk driver. The > file-system server will have a "Block" session to the disk driver and, > in turn, provide a "File_system" service. This service can then be used > by a program that has a '' node configured in its VFS. > > 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 > -- ___ genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Re: File Manager
Hello Ben, > What level of file management does Genode have? Is there a graphical > file manager available? Does noux support file management? there exists no graphical file manager for Genode. You can use coreutils in a noux instance to operate on files, though. When attempting to port existing GUI applications, please keep in mind that Genode does not support GTK. So you may be better off with Qt5-based software. If you are genuinely interested in porting software to Genode, you may find our porting guide useful: http://genode.org/documentation/developer-resources/porting > Also, since I am considering implementing a file manager if one doesn't > already exist, how would I do it? I'm thinking of porting PCManFM to > Genode, so how does the filesystem work? (Does it have a single root > directory like Linux, or does it just give you access to each filesystem > like in Windows?) Genode does not have global file system. Each process has a separate instance of a virtual file system (VFS) that encompasses only those files that the process needs to see. Such a process-local VFS is configured by the respective parent process. To learn more about this approach, let me point you to the following documentation snippet: http://genode.org/documentation/release-notes/14.05#Per-process_virtual_file_systems To actually access files on a disk, you will need to start an instance of a file-system server (e.g., rump_fs) and a disk driver. The file-system server will have a "Block" session to the disk driver and, in turn, provide a "File_system" service. This service can then be used by a program that has a '' node configured in its VFS. 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