Test to read files from the elf image and a USB. Configure file system.

Humberto López León humberto at ...210...
Thu Feb 11 20:03:52 CET 2016


Hello Genode community,

I'm working on porting an application on Genode where I need to upload 
files from the elf image and from a storage device , such as a USB . 
Currently I can read the file of the USB using the libffat library and 
the server/ffat_fs, but in this case I can not load the file from elf 
image. I think the problem lies in the configuration of < vfs > .
  Any ideas to solve my problem ?

Thank you

This is my run script

set build_components {
     core init
     drivers/timer
     server/ffat_fs
     test/libc_ffat_usb
}
source ${genode_dir}/repos/base/run/platform_drv.inc
append_platform_drv_build_components

build $build_components

create_boot_directory

#
# Generate config
#

set config {
<config verbose="yes">
     <parent-provides>
         <service name="ROM"/>
         <service name="RAM"/>
         <service name="IRQ"/>
         <service name="IO_MEM"/>
         <service name="IO_PORT"/>
         <service name="CAP"/>
         <service name="PD"/>
         <service name="RM"/>
         <service name="CPU"/>
         <service name="LOG"/>
         <service name="SIGNAL"/>
     </parent-provides>
     <default-route>
         <any-service> <parent/> <any-child/> </any-service>
     </default-route>
}

append_platform_drv_config

append config {
     <start name="timer">
         <resource name="RAM" quantum="1M"/>
         <provides><service name="Timer"/></provides>
     </start>
}

append_if [have_spec gpio] config {
     <start name="gpio_drv">
         <resource name="RAM" quantum="4M"/>
         <provides><service name="Gpio"/></provides>
         <config/>
     </start>}

append config {
    <start name="usb_drv">
         <resource name="RAM" quantum="12M"/>
         <provides> <service name="Block"/> </provides>
         <config uhci="yes" ehci="yes" xhci="yes"> <storage /></config>
     </start>    <start name="ffat_fs">
         <resource name="RAM" quantum="4M"/>
         <provides> <service name="File_system"/> </provides>
         <config> <policy label="" root="/" writeable="yes" /> </config>
     </start>
     <start name="test-libc_ffat_usb">
         <resource name="RAM" quantum="10M"/>
         <config>
             <libc stdout="/dev/log" stderr="/dev/log">
                 <vfs>
                     <rom name="test.txt" />
                     <dir name="dev"> <log/> </dir>
                     <fs/>
                 </vfs>
             </libc>
         </config>
     </start>
</config>
}

install_config $config

set boot_modules {
     core init timer
     ld.lib.so
     libc.lib.so
     ffat_fs
     test-libc_ffat_usb
     test2.txt
}

lappend_if [have_spec usb]   boot_modules usb_drv
lappend_if [have_spec gpio]  boot_modules gpio_drv

append_platform_drv_boot_modules

build_boot_image $boot_modules

run_genode_until forever




More information about the users mailing list