mirror of
https://github.com/genodelabs/genode.git
synced 2025-05-06 18:48:35 +00:00
This patch simplifies the way of how Genode's base libraries are organized. Originally, the base API was implemented in the form of many small libraries such as 'thread', 'env', 'server', etc. Most of them used to consist of only a small number of files. Because those libraries are incorporated in any build, the checking of their inter-dependencies made the build process more verbose than desired. Also, the number of libraries and their roles (core only, non-core only, shared by both core and non-core) were not easy to capture. Hereby, the base libraries have been reduced to the following few libraries: - startup.mk contains the startup code for normal Genode processes. On some platform, core is able to use the library as well. - base-common.mk contains the parts of the base library that are identical by core and non-core processes. - base.mk contains the complete base API implementation for non-core processes Consequently, the 'LIBS' declaration in 'target.mk' files becomes simpler as well. In the most simple case, only the 'base' library must be mentioned. Fixes #18
This directory contains an implementation of a block-device-partition server. Behavior -------- The server uses Genode's block-session interfaces as both front and back end, leading to the most common use case where this server will reside "between" a block-driver server and a higher level component like a file-system server. At startup, the partition server will try to parse the master boot record (MBR) of its back-end block session. If no partition table is found, the whole block device is exported as partition '0'. In the other case, the MBR and possible extended boot records (EBRs) are parsed and offered as separate block sessions to the front-end clients. The four primary partitions will receive partition numbers '1' to '4' whereas the first logical partition will be assigned to '5'. In order to route a client to the right partition, the server parses its configuration section looking for 'policy' tags. XML Syntax: ! <policy labal="<program name>" parition="<partition number>" /> Usage ----- Configuration snippet with two clients and an (hypothetical) IDE driver: !<start name="ata_driver"> ! <resource name="RAM" quantum="1M" /> ! <provides><service name="Block"/></provides> ! <config ata="yes" /> !</start> ! !<start name="part_blk"> ! <resource name="RAM" quantum="10M" /> ! <provides><service name="Block" /></provides> ! ! <!-- route part_blk to the ata_driver --> ! <route> ! <any-service><child name="ata_driver"/> <parent/><any-child/></any-service> ! </route> ! ! <!-- allow program 'test-part1' to access logical partition '6', while program ! 'test-part2' receives access to primary partition 1 --> ! <config> ! <policy label="test-part1" partition="6"/> ! <policy label="test-part2" partition="1"/> ! </config> !</start> ! !<!-- part_blk clients --> !<start name="test-part1"> ! <binary name="test-part"/> ! <resource name="RAM" quantum="10M" /> ! <route> ! <any-service> <child name="part_blk" /> <parent/> <any-child/> </any-service> ! </route> !</start> ! !<start name="test-part2"> ! <binary name="test-part"/> ! <resource name="RAM" quantum="10M" /> ! <route> ! <any-service> <child name="part_blk" /> <parent/> <any-child/> </any-service> ! </route> !</start>