mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-26 13:59:57 +00:00
This patch changes the way of how the client-selected sub directory is communicated to the server. The former opaque session argument is now passed as last label element, which allows for the flexible tweaking of this argument by init's session-routing and label-rewriting mechansims. In particular, it alleviates the need for creating chroot component instances. This change requires the following four adaptations at the configuration level: - Each file-system session request must now carry a path starting with / as last session arguments. Hence, <vfs> <fs> nodes that feature a 'label' attributes must extend the attribute value with " -> /". For <fs> nodes with no label attribute, "/" is used as last label argument by default. - For matching session-routing rules at init's configuration, the matching of full labels should be replaced by 'label_prefix' matches, excluding the last (path) argument. - Wherever a label of a file-system session is rewritten by using init's 'label' attribute of a <parent> or <child> target node, the new attribute 'identity' should be used instead. This replaces the identity part of the label while preserving the client's directory argument. - Analogously to the matching of session-routing rules, server-side policy-selection rules that formerly matched a concrete 'label' must be changed to match a 'label_prefix' instead. As a good practice, 'label_prefix' values should end with " ->" if possible, which clearly delimits the identity part of the label used by the matching. Issue #5445
171 lines
5.8 KiB
Plaintext
171 lines
5.8 KiB
Plaintext
if { ![have_board pbxa9] } {
|
|
puts "Platform is unsupported."
|
|
exit 0
|
|
}
|
|
|
|
create_boot_directory
|
|
|
|
import_from_depot [depot_user]/src/[base_src] \
|
|
[depot_user]/src/init \
|
|
[depot_user]/src/fs_report \
|
|
[depot_user]/src/fs_rom \
|
|
[depot_user]/src/platform \
|
|
[depot_user]/src/report_rom \
|
|
[depot_user]/src/vfs_import \
|
|
[depot_user]/src/vfs
|
|
|
|
build { test/platform }
|
|
|
|
install_config {
|
|
<config>
|
|
<parent-provides>
|
|
<service name="ROM"/>
|
|
<service name="IRQ"/>
|
|
<service name="IO_MEM"/>
|
|
<service name="PD"/>
|
|
<service name="RM"/>
|
|
<service name="CPU"/>
|
|
<service name="LOG"/>
|
|
</parent-provides>
|
|
<default-route>
|
|
<any-service> <parent/> </any-service>
|
|
</default-route>
|
|
<default caps="100" ram="1M"/>
|
|
|
|
<start name="timer" ram="10M">
|
|
<provides><service name="Timer"/></provides>
|
|
</start>
|
|
|
|
<start name="report_fs" ram="2M">
|
|
<binary name="vfs"/>
|
|
<provides> <service name="File_system"/> </provides>
|
|
<config>
|
|
<vfs>
|
|
<ram/>
|
|
<import>
|
|
<inline name="config"><config><default-policy/></config>
|
|
</inline>
|
|
<inline name="devices"><devices/>
|
|
</inline>
|
|
</import>
|
|
</vfs>
|
|
<policy label_prefix="fs_report ->" root="/" writeable="yes"/>
|
|
<policy label_prefix="report_fs_rom ->" root="/"/>
|
|
</config>
|
|
</start>
|
|
|
|
<start name="fs_report">
|
|
<provides> <service name="Report"/> </provides>
|
|
<config> <vfs> <fs/> </vfs> </config>
|
|
<route>
|
|
<service name="File_system"> <child name="report_fs"/> </service>
|
|
<any-service> <parent/> </any-service>
|
|
</route>
|
|
</start>
|
|
|
|
<start name="report_fs_rom" ram="3M">
|
|
<binary name="fs_rom"/>
|
|
<provides> <service name="ROM"/> </provides>
|
|
<route>
|
|
<service name="File_system"> <child name="report_fs"/> </service>
|
|
<any-service> <parent/> </any-service>
|
|
</route>
|
|
</start>
|
|
|
|
<start name="report_rom" ram="3M">
|
|
<provides>
|
|
<service name="ROM"/>
|
|
<service name="Report"/>
|
|
</provides>
|
|
<route>
|
|
<any-service> <parent/> </any-service>
|
|
</route>
|
|
<config verbose="no"/>
|
|
</start>
|
|
|
|
<start name="platform" managing_system="yes">
|
|
<provides> <service name="Platform"/> </provides>
|
|
<route>
|
|
<service name="ROM" label="config"> <child name="report_fs_rom"/> </service>
|
|
<service name="ROM" label="devices"><child name="report_fs_rom"/> </service>
|
|
<service name="Report"> <child name="report_rom"/> </service>
|
|
<any-service> <parent/> </any-service>
|
|
</route>
|
|
</start>
|
|
|
|
<start name="test-platform">
|
|
<route>
|
|
<service name="Report" label="config">
|
|
<child name="fs_report" label="config"/> </service>
|
|
<service name="Report" label="devices">
|
|
<child name="fs_report" label="devices"/> </service>
|
|
<service name="Platform"> <child name="platform"/> </service>
|
|
<any-service> <parent/> </any-service>
|
|
</route>
|
|
</start>
|
|
</config>}
|
|
|
|
|
|
build_boot_image [build_artifacts]
|
|
|
|
append qemu_args "-nographic "
|
|
|
|
set good_string {
|
|
[init -> test-platform] <devices version="1">
|
|
[init -> test-platform] <device name="0" type="dummy-device" used="false">
|
|
[init -> test-platform] <io_mem phys_addr="0x40000000" size="0x1000"/>
|
|
[init -> test-platform] <irq number="32"/>
|
|
[init -> test-platform] </device>
|
|
[init -> test-platform] <device name="1" type="dummy-device" used="false">
|
|
[init -> test-platform] <io_mem phys_addr="0x40001000" size="0x1000"/>
|
|
[init -> test-platform] <irq number="33"/>
|
|
[init -> test-platform] </device>
|
|
[init -> test-platform] <device name="2" type="dummy-device" used="false">
|
|
[init -> test-platform] <io_mem phys_addr="0x40002000" size="0x1000"/>
|
|
[init -> test-platform] <irq number="34"/>
|
|
[init -> test-platform] </device>
|
|
[init -> test-platform] </devices>
|
|
[init -> test-platform] <devices version="2">
|
|
[init -> test-platform] <device name="0" type="dummy-device" used="true">
|
|
[init -> test-platform] <io_mem phys_addr="0x40000000" size="0x1000"/>
|
|
[init -> test-platform] <irq number="32"/>
|
|
[init -> test-platform] </device>
|
|
[init -> test-platform] <device name="1" type="dummy-device" used="true">
|
|
[init -> test-platform] <io_mem phys_addr="0x40001000" size="0x1000"/>
|
|
[init -> test-platform] <irq number="33"/>
|
|
[init -> test-platform] </device>
|
|
[init -> test-platform] </devices>
|
|
[init -> test-platform] <devices version="3"/>
|
|
[init -> test-platform] <devices version="4">
|
|
[init -> test-platform] <device name="0" type="dummy-device" used="false">
|
|
[init -> test-platform] <io_mem phys_addr="0x40000000" size="0x1000"/>
|
|
[init -> test-platform] <irq number="32"/>
|
|
[init -> test-platform] </device>
|
|
[init -> test-platform] <device name="1" type="dummy-device" used="false">
|
|
[init -> test-platform] <io_mem phys_addr="0x40001000" size="0x1000"/>
|
|
[init -> test-platform] <irq number="33"/>
|
|
[init -> test-platform] </device>
|
|
[init -> test-platform] <device name="2" type="dummy-device" used="false">
|
|
[init -> test-platform] <io_mem phys_addr="0x40002000" size="0x1000"/>
|
|
[init -> test-platform] <irq number="34"/>
|
|
[init -> test-platform] </device>
|
|
[init -> test-platform] <device name="3" type="dummy-device" used="false">
|
|
[init -> test-platform] <io_mem phys_addr="0x40003000" size="0x1000"/>
|
|
[init -> test-platform] <irq number="35"/>
|
|
[init -> test-platform] </device>
|
|
[init -> test-platform] </devices>
|
|
[init -> test-platform] <devices version="5"/>
|
|
[init -> test-platform] <devices version="6">
|
|
[init -> test-platform] <device name="0" type="dummy-device" used="false">
|
|
[init -> test-platform] <io_mem phys_addr="0x40000100" size="0x1000"/>
|
|
[init -> test-platform] <irq number="32"/>
|
|
[init -> test-platform] </device>
|
|
[init -> test-platform] </devices>
|
|
[init -> test-platform] Found next valid device of dummy type
|
|
[init -> test-platform] Test has ended!
|
|
}
|
|
|
|
run_genode_until "Test has ended!.*\n" 100
|
|
grep_output "init -> test-platform"
|
|
compare_output_to $good_string
|