Using libports

Christian Helmuth christian.helmuth at ...1...
Mon Dec 26 16:18:16 CET 2011


Hello,

welcome to the list, I'll try to give you a good point to start off.

On Mon, Dec 26, 2011 at 07:08:38PM +0700, Adi Lima wrote:
> Is there some example for using block_session for a simple client, maybe
> just to get partition info from a SATA disk? I need a starting point to use
> these stuffs :-)

Reading your requirements, I propose you have a look at
os/run/part_blk.run, which runs a simple test with a block-device
driver (ATA on x86), the partition manager, and two instances of the
'test-part' application. Each instance of the test app accesses its
own partition of the disk, which is configured in the run script's
config file:

  ...
  <start name="part_blk">
    ...
    <config>
      <policy label="test-part1" partition="6"/>
      <policy label="test-part2" partition="1"/>
    </config>
  </start>
  <start name="test-part1">
    <binary name="test-part"/>
    ...
    <route>
      <any-service> <child name="part_blk" /> <parent/> <any-child/> </any-service>
    </route>
  </start>
  ...

The sources are in os/src/test/part_blk/main.cc.

Christmas greetings
-- 
Christian Helmuth
Genode Labs

http://www.genode-labs.com/ · http://genode.org/ · /ˈdʒiː.nəʊd/

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth




More information about the users mailing list