mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-21 06:33:31 +00:00
parent
8b590e2330
commit
6fc7ed55cf
@ -13,7 +13,7 @@ set mkisofs [installed_command mkisofs]
|
||||
set build_components {
|
||||
core init timer
|
||||
server/fs_rom
|
||||
server/rom_block
|
||||
server/vfs_block
|
||||
server/vfs
|
||||
lib/vfs/rump
|
||||
test/iso
|
||||
@ -45,10 +45,16 @@ append config {
|
||||
<resource name="RAM" quantum="1M"/>
|
||||
<provides><service name="Timer"/></provides>
|
||||
</start>
|
||||
<start name="rom_block">
|
||||
<start name="vfs_block">
|
||||
<resource name="RAM" quantum="2M"/>
|
||||
<provides><service name="Block"/></provides>
|
||||
<config file="fs.iso" block_size="2048"/>
|
||||
<config>
|
||||
<vfs>
|
||||
<rom name="fs.iso"/>
|
||||
</vfs>
|
||||
<default-policy file="/fs.iso" block_size="2048"
|
||||
writeable="no"/>
|
||||
</config>
|
||||
</start>
|
||||
<start name="vfs" caps="200">
|
||||
<resource name="RAM" quantum="12M" />
|
||||
@ -91,7 +97,7 @@ install_config $config
|
||||
# Boot modules
|
||||
#
|
||||
set boot_modules {
|
||||
core ld.lib.so init timer test-iso rom_block
|
||||
core ld.lib.so init timer test-iso vfs_block
|
||||
rump.lib.so rump_fs.lib.so vfs_rump.lib.so vfs vfs.lib.so
|
||||
fs.iso fs_rom
|
||||
}
|
||||
|
@ -706,7 +706,6 @@ set default_test_pkgs {
|
||||
test-rm_fault_no_nox
|
||||
test-rm_nested
|
||||
test-rm_stress
|
||||
test-rom_block
|
||||
test-rom_filter
|
||||
test-sanitizer
|
||||
test-sequence
|
||||
|
@ -1,6 +1,7 @@
|
||||
_/src/init
|
||||
_/src/report_rom
|
||||
_/src/part_block
|
||||
_/src/rom_block
|
||||
_/src/vfs
|
||||
_/src/vfs_block
|
||||
_/src/test-block
|
||||
_/raw/test-part_block_gpt
|
||||
|
@ -1 +1 @@
|
||||
2020-05-26 c6b4d35bd403a7857edf61cc8b8c68e60e8015f5
|
||||
2020-06-19-a 7136f025de1367cbe6bbf865df8e7e8d62d5f64e
|
||||
|
@ -13,7 +13,8 @@
|
||||
|
||||
<content>
|
||||
<rom label="ld.lib.so"/>
|
||||
<rom label="rom_block"/>
|
||||
<rom label="vfs_block"/>
|
||||
<rom label="vfs.lib.so"/>
|
||||
<rom label="part_block"/>
|
||||
<rom label="test-block-client"/>
|
||||
<rom label="report_rom"/>
|
||||
@ -36,16 +37,21 @@
|
||||
<any-service> <parent/> <any-child/> </any-service>
|
||||
</default-route>
|
||||
<default caps="100"/>
|
||||
<start name="rom_block">
|
||||
<start name="vfs_block">
|
||||
<resource name="RAM" quantum="32M"/>
|
||||
<provides><service name="Block"/></provides>
|
||||
<config file="ata.gpt.raw" block_size="512"/>
|
||||
<config>
|
||||
<vfs>
|
||||
<rom name="ata.gpt.raw"/>
|
||||
</vfs>
|
||||
<default-policy file="/ata.gpt.raw" block_size="512"/>
|
||||
</config>
|
||||
</start>
|
||||
<start name="part_block">
|
||||
<resource name="RAM" quantum="10M" />
|
||||
<provides><service name="Block" /></provides>
|
||||
<route>
|
||||
<any-service><child name="rom_block"/> <parent/><any-child/></any-service>
|
||||
<any-service><child name="vfs_block"/> <parent/><any-child/></any-service>
|
||||
</route>
|
||||
<config use_gpt="yes">
|
||||
<report partitions="yes"/>
|
||||
|
@ -1,6 +1,7 @@
|
||||
_/src/init
|
||||
_/src/report_rom
|
||||
_/src/part_block
|
||||
_/src/rom_block
|
||||
_/src/vfs
|
||||
_/src/vfs_block
|
||||
_/src/test-block
|
||||
_/raw/test-part_block_mbr
|
||||
|
@ -1 +1 @@
|
||||
2020-05-26 f2c0d24b7eb2dc3aa9f826bd022edeb2d7f93055
|
||||
2020-06-19 7a6099ca1d3592d6f58ac3d242eb1a53e21d49b4
|
||||
|
@ -14,7 +14,8 @@
|
||||
|
||||
<content>
|
||||
<rom label="ld.lib.so"/>
|
||||
<rom label="rom_block"/>
|
||||
<rom label="vfs_block"/>
|
||||
<rom label="vfs.lib.so"/>
|
||||
<rom label="part_block"/>
|
||||
<rom label="test-block-client"/>
|
||||
<rom label="report_rom"/>
|
||||
@ -37,16 +38,21 @@
|
||||
<any-service> <parent/> <any-child/> </any-service>
|
||||
</default-route>
|
||||
<default caps="100"/>
|
||||
<start name="rom_block">
|
||||
<start name="vfs_block">
|
||||
<resource name="RAM" quantum="32M"/>
|
||||
<provides><service name="Block"/></provides>
|
||||
<config file="ata.mbr.raw" block_size="512"/>
|
||||
<config>
|
||||
<vfs>
|
||||
<rom name="ata.mbr.raw"/>
|
||||
</vfs>
|
||||
<default-policy file="/ata.mbr.raw" block_size="512"/>
|
||||
</config>
|
||||
</start>
|
||||
<start name="part_block">
|
||||
<resource name="RAM" quantum="10M" />
|
||||
<provides><service name="Block" /></provides>
|
||||
<route>
|
||||
<any-service><child name="rom_block"/> <parent/><any-child/></any-service>
|
||||
<any-service><child name="vfs_block"/> <parent/><any-child/></any-service>
|
||||
</route>
|
||||
<config>
|
||||
<report partitions="yes"/>
|
||||
|
@ -1 +0,0 @@
|
||||
Test ROM-file to block-session server.
|
@ -1,3 +0,0 @@
|
||||
_/src/init
|
||||
_/src/rom_block
|
||||
_/src/test-rom_block
|
@ -1 +0,0 @@
|
||||
2020-05-26 ca80a2534b0920f4bc4524afe95e9815e92efd21
|
@ -1,37 +0,0 @@
|
||||
<runtime ram="32M" caps="1000" binary="init">
|
||||
|
||||
<events>
|
||||
<timeout meaning="failed" sec="20" />
|
||||
<log meaning="succeeded">--- ROM Block test finished ---</log>
|
||||
<log meaning="failed">Error: </log>
|
||||
</events>
|
||||
|
||||
<content>
|
||||
<rom label="ld.lib.so"/>
|
||||
<rom label="test-rom_block"/>
|
||||
<rom label="rom_block"/>
|
||||
</content>
|
||||
|
||||
<config>
|
||||
<parent-provides>
|
||||
<service name="ROM"/>
|
||||
<service name="PD"/>
|
||||
<service name="RM"/>
|
||||
<service name="CPU"/>
|
||||
<service name="LOG"/>
|
||||
</parent-provides>
|
||||
<default-route>
|
||||
<any-service> <any-child/> <parent/></any-service>
|
||||
</default-route>
|
||||
<default caps="100"/>
|
||||
<start name="rom_block">
|
||||
<resource name="RAM" quantum="3M"/>
|
||||
<provides><service name="Block"/></provides>
|
||||
<config file="init" block_size="512"/>
|
||||
</start>
|
||||
<start name="test-rom_block">
|
||||
<resource name="RAM" quantum="3M"/>
|
||||
<config file="init"/>
|
||||
</start>
|
||||
</config>
|
||||
</runtime>
|
@ -1,2 +0,0 @@
|
||||
SRC_DIR = src/test/rom_block
|
||||
include $(GENODE_DIR)/repos/base/recipes/src/content.inc
|
@ -1 +0,0 @@
|
||||
2020-05-26 e785d7e4f5c4b2e8cd255cbe5335e42f422a99a1
|
@ -1,3 +0,0 @@
|
||||
base
|
||||
os
|
||||
block_session
|
@ -1,78 +0,0 @@
|
||||
/*
|
||||
* \brief ROM-file to block-session client test implementation
|
||||
* \author Stefan Kalkowski
|
||||
* \author Martin Stein
|
||||
* \date 2010-07-07
|
||||
*
|
||||
* The test program compares the values delivered by the block-service,
|
||||
* with the original rom-file.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2010-2017 Genode Labs GmbH
|
||||
*
|
||||
* This file is part of the Genode OS framework, which is distributed
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/allocator_avl.h>
|
||||
#include <base/heap.h>
|
||||
#include <base/component.h>
|
||||
#include <block_session/connection.h>
|
||||
#include <base/attached_rom_dataspace.h>
|
||||
|
||||
using namespace Genode;
|
||||
|
||||
struct Main
|
||||
{
|
||||
static constexpr Block::sector_t REQ_PARALLEL = 10;
|
||||
|
||||
using File_name = String<64>;
|
||||
using Packet_descriptor = Block::Packet_descriptor;
|
||||
struct Files_differ : Exception { };
|
||||
struct Device_not_readable : Exception { };
|
||||
struct Read_request_failed : Exception { };
|
||||
|
||||
Env &env;
|
||||
Attached_rom_dataspace config { env, "config" };
|
||||
File_name file_name { config.xml().attribute_value("file", File_name()) };
|
||||
Heap heap { env.ram(), env.rm() };
|
||||
Allocator_avl block_alloc { &heap };
|
||||
Block::Connection<> block { env, &block_alloc };
|
||||
Attached_rom_dataspace rom { env, file_name.string() };
|
||||
|
||||
Main(Env &env) : env(env)
|
||||
{
|
||||
log("--- ROM Block test ---");
|
||||
|
||||
Block::Session::Tx::Source &src = *block.tx();
|
||||
Block::Session::Info const info = block.info();
|
||||
|
||||
log("We have ", info.block_count, " blocks with a "
|
||||
"size of ", info.block_size, " bytes");
|
||||
for (size_t i = 0; i < info.block_count; i += REQ_PARALLEL) {
|
||||
|
||||
size_t const cnt = (info.block_count - i > REQ_PARALLEL)
|
||||
? REQ_PARALLEL : info.block_count - i;
|
||||
|
||||
Packet_descriptor pkt(block.alloc_packet(cnt * info.block_size),
|
||||
Packet_descriptor::READ, i, cnt);
|
||||
|
||||
log("Check blocks ", i, "..", i + cnt - 1);
|
||||
src.submit_packet(pkt);
|
||||
pkt = src.get_acked_packet();
|
||||
if (!pkt.succeeded()) {
|
||||
throw Read_request_failed(); }
|
||||
|
||||
char const *rom_src = rom.local_addr<char>() + i * info.block_size;
|
||||
if (strcmp(rom_src, src.packet_content(pkt), rom.size())) {
|
||||
throw Files_differ(); }
|
||||
|
||||
src.release_packet(pkt);
|
||||
}
|
||||
log("--- ROM Block test finished ---");
|
||||
}
|
||||
};
|
||||
|
||||
void Component::construct(Env &env) { static Main main(env); }
|
@ -1,3 +0,0 @@
|
||||
TARGET = test-rom_block
|
||||
SRC_CC = main.cc
|
||||
LIBS = base
|
@ -7,6 +7,7 @@
|
||||
|
||||
set use_fs_rump $use_block_vdi
|
||||
set use_drv_ahci [expr $use_block_vdi || $use_block_sata]
|
||||
set use_vfs_block [expr $use_block_ram || $use_genode_iso]
|
||||
|
||||
create_boot_directory
|
||||
|
||||
@ -69,7 +70,7 @@ if {$use_fancy_stuff} { set use_framebuffer 1 }
|
||||
|
||||
lappend_if $use_block_vdi build_components server/vdi_block
|
||||
lappend_if $use_usb build_components drivers/usb
|
||||
lappend_if $use_block_ram build_components server/vfs_block
|
||||
lappend_if $use_vfs_block build_components server/vfs_block
|
||||
lappend_if $use_drv_ahci build_components drivers/ahci
|
||||
lappend_if $use_nic_session build_components drivers/nic
|
||||
lappend_if $use_nic_bridge build_components server/nic_bridge
|
||||
@ -78,7 +79,6 @@ lappend_if $use_fancy_stuff build_components app/status_bar
|
||||
lappend_if $use_fancy_stuff build_components app/launchpad
|
||||
lappend_if $use_fancy_stuff build_components server/report_rom
|
||||
lappend_if $use_genode_iso build_components server/iso9660
|
||||
lappend_if $use_genode_iso build_components server/rom_block
|
||||
lappend_if $use_top build_components app/top
|
||||
|
||||
append_platform_drv_build_components
|
||||
@ -306,17 +306,22 @@ append_if $use_block_vdi config {
|
||||
</start>}
|
||||
|
||||
append_if $use_genode_iso config {
|
||||
<start name="rom_block" priority="-1">
|
||||
<start name="vfs_block" priority="-1">
|
||||
<resource name="RAM" quantum="16M" />
|
||||
<provides><service name="Block"/></provides>
|
||||
<config file="genode.iso" block_size="2048"/>
|
||||
<config>
|
||||
<vfs>
|
||||
<rom name="genode.iso"/>
|
||||
</vfs>
|
||||
<default-policy file="/genode.iso" block_size="2048"/>
|
||||
</config>
|
||||
</start>
|
||||
|
||||
<start name="iso9660" priority="-1">
|
||||
<resource name="RAM" quantum="16M"/>
|
||||
<provides><service name="ROM"/></provides>
|
||||
<route>
|
||||
<service name="Block"><child name="rom_block"/></service>
|
||||
<service name="Block"><child name="vfs_block"/></service>
|
||||
<any-service><parent/></any-service>
|
||||
</route>
|
||||
</start>}
|
||||
@ -533,8 +538,8 @@ set boot_modules {
|
||||
lappend_if $use_block_vdi boot_modules vdi_block
|
||||
lappend_if [expr !$use_usb] boot_modules ps2_drv
|
||||
lappend_if $use_usb boot_modules usb_drv
|
||||
lappend_if $use_block_ram boot_modules vfs_block
|
||||
lappend_if $use_block_ram boot_modules vfs.lib.so
|
||||
lappend_if $use_vfs_block boot_modules vfs_block
|
||||
lappend_if $use_vfs_block boot_modules vfs.lib.so
|
||||
lappend_if $use_drv_ahci boot_modules ahci_drv
|
||||
lappend_if $use_nic_session boot_modules ipxe_nic_drv
|
||||
lappend_if $use_nic_bridge boot_modules nic_bridge
|
||||
@ -545,7 +550,6 @@ lappend_if $use_fancy_stuff boot_modules launchpad
|
||||
lappend_if $use_fancy_stuff boot_modules launchpad-config
|
||||
lappend_if $use_fancy_stuff boot_modules report_rom
|
||||
|
||||
lappend_if $use_genode_iso boot_modules rom_block
|
||||
lappend_if $use_genode_iso boot_modules iso9660
|
||||
lappend_if $use_genode_iso boot_modules genode.iso
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user