Adaptation to Genode 17.05
- Adjust use of exceptions to unified exception types: https://genode.org/documentation/release-notes/17.05#Streamlining_exception_types - Add posix.lib.so as boot module: http://genode.org/documentation/release-notes/17.05#POSIX_libc_profile_as_shared_library - Adaptation to API changes Ref #74
This commit is contained in:
@@ -128,6 +128,7 @@ set boot_modules {
|
||||
ld.lib.so
|
||||
libc.lib.so
|
||||
libm.lib.so
|
||||
posix.lib.so
|
||||
libpng.lib.so
|
||||
pthread.lib.so
|
||||
sdl_image.lib.so
|
||||
|
||||
@@ -188,7 +188,7 @@ set boot_modules {
|
||||
core init timer tar_fs
|
||||
chocolate-doom
|
||||
ld.lib.so
|
||||
libc.lib.so libm.lib.so sdl.lib.so sdl_net.lib.so
|
||||
libc.lib.so posix.lib.so libm.lib.so sdl.lib.so sdl_net.lib.so
|
||||
sdl_mixer.lib.so pthread.lib.so
|
||||
data.tar
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ install_config $config
|
||||
|
||||
build_boot_image {
|
||||
core init vfs chroot
|
||||
ld.lib.so libc.lib.so libm.lib.so
|
||||
ld.lib.so libc.lib.so libm.lib.so posix.lib.so
|
||||
test-libc
|
||||
}
|
||||
|
||||
|
||||
@@ -200,6 +200,7 @@ set boot_modules {
|
||||
init
|
||||
ld.lib.so
|
||||
libc.lib.so
|
||||
posix.lib.so
|
||||
libcrypto.lib.so
|
||||
libevent.lib.so
|
||||
libm.lib.so
|
||||
|
||||
@@ -75,10 +75,7 @@ install_config $config
|
||||
|
||||
build_boot_image {
|
||||
core init test-glucose timer
|
||||
ld.lib.so libc.lib.so
|
||||
libm.lib.so
|
||||
stdcxx.lib.so
|
||||
zlib.lib.so
|
||||
ld.lib.so libc.lib.so posix.lib.so libm.lib.so stdcxx.lib.so zlib.lib.so
|
||||
Test.cnf
|
||||
}
|
||||
|
||||
|
||||
@@ -119,6 +119,7 @@ set boot_modules {
|
||||
ld.lib.so
|
||||
libc.lib.so
|
||||
libm.lib.so
|
||||
posix.lib.so
|
||||
libpng.lib.so
|
||||
pthread.lib.so
|
||||
sdl_image.lib.so
|
||||
|
||||
@@ -31,9 +31,7 @@ install_config {
|
||||
|
||||
build_boot_image {
|
||||
core init test-lemon
|
||||
ld.lib.so libc.lib.so
|
||||
libm.lib.so
|
||||
stdcxx.lib.so
|
||||
ld.lib.so libc.lib.so posix.lib.so libm.lib.so stdcxx.lib.so
|
||||
}
|
||||
|
||||
append qemu_args " -nographic "
|
||||
|
||||
@@ -30,6 +30,7 @@ set boot_modules {
|
||||
ram_fs
|
||||
ltris
|
||||
libc.lib.so
|
||||
posix.lib.so
|
||||
libm.lib.so
|
||||
pthread.lib.so
|
||||
sdl_mixer.lib.so
|
||||
|
||||
@@ -29,6 +29,7 @@ set boot_modules {
|
||||
freetype.lib.so
|
||||
jpeg.lib.so
|
||||
libc.lib.so
|
||||
posix.lib.so
|
||||
libm.lib.so
|
||||
libpng.lib.so
|
||||
pthread.lib.so
|
||||
|
||||
@@ -76,8 +76,7 @@ install_config $config
|
||||
# generic modules
|
||||
set boot_modules {
|
||||
core init ld.lib.so
|
||||
libc.lib.so
|
||||
libm.lib.so
|
||||
libc.lib.so libm.lib.so posix.lib.so
|
||||
report_rom
|
||||
rom_fallback
|
||||
test-libc
|
||||
|
||||
@@ -34,7 +34,7 @@ install_config {
|
||||
|
||||
build_boot_image {
|
||||
core init test-scip
|
||||
ld.lib.so libc.lib.so libm.lib.so
|
||||
ld.lib.so libc.lib.so libm.lib.so posix.lib.so
|
||||
stdcxx.lib.so soplex.lib.so zlib.lib.so gmp.lib.so scip.lib.so
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ install_config {
|
||||
|
||||
build_boot_image {
|
||||
core init test-soplex
|
||||
ld.lib.so libc.lib.so libm.lib.so
|
||||
ld.lib.so libc.lib.so libm.lib.so posix.lib.so
|
||||
stdcxx.lib.so soplex.lib.so zlib.lib.so gmp.lib.so
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ set boot_modules {
|
||||
supertux
|
||||
jpeg.lib.so
|
||||
libc.lib.so
|
||||
posix.lib.so
|
||||
libm.lib.so
|
||||
libpng.lib.so
|
||||
pthread.lib.so
|
||||
|
||||
@@ -132,7 +132,7 @@ install_config $config
|
||||
# generic modules
|
||||
set boot_modules {
|
||||
core init timer rtc_drv
|
||||
ld.lib.so libc.lib.so libm.lib.so zlib.lib.so
|
||||
ld.lib.so libc.lib.so libm.lib.so zlib.lib.so posix.lib.so
|
||||
libcrypto.lib.so libevent.lib.so libssl.lib.so pthread.lib.so
|
||||
vfs_jitterentropy.lib.so lwip.lib.so
|
||||
nic_drv ram_fs tor
|
||||
|
||||
@@ -16,6 +16,7 @@ set app_config {
|
||||
set boot_modules {
|
||||
tuxmath
|
||||
libc.lib.so
|
||||
posix.lib.so
|
||||
libm.lib.so
|
||||
pthread.lib.so
|
||||
libiconv.lib.so
|
||||
|
||||
@@ -127,6 +127,7 @@ append boot_modules {
|
||||
ld.lib.so
|
||||
libc.lib.so
|
||||
libm.lib.so
|
||||
posix.lib.so
|
||||
libpng.lib.so
|
||||
pthread.lib.so
|
||||
posix.lib.so
|
||||
|
||||
@@ -233,4 +233,4 @@ append qemu_args " -soundhw es1370 "
|
||||
|
||||
run_genode_until forever
|
||||
|
||||
rm bin/variables
|
||||
rm bin/variables
|
||||
|
||||
@@ -183,7 +183,7 @@ set boot_modules {
|
||||
usb_drv
|
||||
uhexen2
|
||||
ld.lib.so
|
||||
libc.lib.so
|
||||
libc.lib.so posix.lib.so
|
||||
libm.lib.so lwip.lib.so sdl.lib.so sdl_mixer.lib.so pthread.lib.so
|
||||
hexen2demo_data.tar
|
||||
}
|
||||
|
||||
@@ -242,7 +242,6 @@ void Rom_hash::Main::handle_session_request(Xml_node request)
|
||||
|
||||
String<64> args("ram_quota=", ram_quota);
|
||||
|
||||
// XXX handle Root::Invalid_args
|
||||
env.upgrade(session.client_id.id(), args.string());
|
||||
env.parent().session_response(server_id, Parent::SESSION_OK);
|
||||
});
|
||||
|
||||
@@ -233,7 +233,7 @@ void Chroot::Main::handle_session_request(Xml_node request)
|
||||
catch (...) {
|
||||
if (session)
|
||||
destroy(heap, session);
|
||||
env.parent().session_response(server_id, Parent::INVALID_ARGS);
|
||||
env.parent().session_response(server_id, Parent::SERVICE_DENIED);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -245,7 +245,6 @@ void Chroot::Main::handle_session_request(Xml_node request)
|
||||
|
||||
String<64> args("ram_quota=", ram_quota);
|
||||
|
||||
// XXX handle Root::Invalid_args
|
||||
env.upgrade(session.client_id.id(), args.string());
|
||||
env.parent().session_response(server_id, Parent::SESSION_OK);
|
||||
});
|
||||
|
||||
@@ -75,9 +75,7 @@ class Log_tee::Root_component :
|
||||
Log_tee::Session_component *_create_session(char const *args) override
|
||||
{
|
||||
Session_label const label = label_from_args(args);
|
||||
|
||||
try { return new (md_alloc()) Session_component(_env, label, args); }
|
||||
catch (Genode::Parent::Service_denied) { throw Root::Unavailable(); }
|
||||
return new (md_alloc()) Session_component(_env, label, args);
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
@@ -307,7 +307,7 @@ void Lz_rom::Main::handle_session_request(Xml_node request)
|
||||
}
|
||||
error("failed to decompress '", lz_path, "', ", msg);
|
||||
} catch (...) { }
|
||||
env.parent().session_response(server_id, Parent::INVALID_ARGS);
|
||||
env.parent().session_response(server_id, Parent::SERVICE_DENIED);
|
||||
}
|
||||
|
||||
if (request.has_type("close")) {
|
||||
|
||||
@@ -167,35 +167,32 @@ void Rom_fallback::Main::handle_session_request(Xml_node request)
|
||||
return;
|
||||
}
|
||||
|
||||
catch (Parent::Service_denied) {
|
||||
catch (Service_denied) {
|
||||
warning("'", new_label, "' was denied"); }
|
||||
|
||||
catch (Service::Unavailable) {
|
||||
warning("'", new_label, "' is unavailable"); }
|
||||
catch (Insufficient_ram_quota) {
|
||||
warning("'", new_label, "' RAM quota donation was insufficient"); }
|
||||
|
||||
catch (Service::Invalid_args) {
|
||||
warning("'", new_label, "' received invalid args"); }
|
||||
|
||||
catch (Service::Quota_exceeded) {
|
||||
warning("'", new_label, "' quota donation was insufficient"); }
|
||||
catch (Insufficient_cap_quota) {
|
||||
warning("'", new_label, "' cap quota donation was insufficient"); }
|
||||
|
||||
if (session)
|
||||
destroy(heap, session);
|
||||
}
|
||||
|
||||
error("no service found for ROM '", original.string(), "'");
|
||||
env.parent().session_response(server_id, Parent::INVALID_ARGS);
|
||||
env.parent().session_response(server_id, Parent::SERVICE_DENIED);
|
||||
}
|
||||
|
||||
if (request.has_type("upgrade")) {
|
||||
|
||||
server_id_space.apply<Session>(server_id, [&] (Session &session) {
|
||||
|
||||
size_t ram_quota = request.attribute_value("ram_quota", 0UL);
|
||||
Ram_quota ram_quota { request.attribute_value("ram_quota", 0UL) };
|
||||
Cap_quota cap_quota { request.attribute_value("cap_quota", 0UL) };
|
||||
|
||||
String<64> args("ram_quota=", ram_quota);
|
||||
String<80> args("ram_quota=", ram_quota, ", cap_quota=", cap_quota);
|
||||
|
||||
// XXX handle Root::Invalid_args
|
||||
env.upgrade(session.client_id.id(), args.string());
|
||||
env.parent().session_response(server_id, Parent::SESSION_OK);
|
||||
});
|
||||
@@ -217,4 +214,4 @@ void Component::construct(Genode::Env &env)
|
||||
static Rom_fallback::Main inst(env);
|
||||
|
||||
env.parent().announce("ROM");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ class Tftp_rom::Session_component :
|
||||
{
|
||||
if (_pcb == NULL) {
|
||||
Genode::error("failed to create UDP context");
|
||||
throw Genode::Root::Unavailable();
|
||||
throw Genode::Service_denied();
|
||||
}
|
||||
|
||||
/* set callback */
|
||||
@@ -477,7 +477,7 @@ class Tftp_rom::Root : public Genode::Root_component<Session_component>
|
||||
ipaddr_aton(addr_str, &ipaddr);
|
||||
} catch (...) {
|
||||
Genode::error(label.string(), ": 'ip' not specified in policy");
|
||||
throw Root::Unavailable();
|
||||
throw Service_denied();
|
||||
}
|
||||
|
||||
try { policy.attribute("port").value(&port); }
|
||||
@@ -503,10 +503,10 @@ class Tftp_rom::Root : public Genode::Root_component<Session_component>
|
||||
_timeout_dispatcher.elapsed_ms(), timeout*1000);
|
||||
Genode::log(label.string(), " requested");
|
||||
}
|
||||
|
||||
} catch (Session_policy::No_policy_defined) {
|
||||
}
|
||||
catch (Session_policy::No_policy_defined) {
|
||||
Genode::error("no policy for defined for ", label.string());
|
||||
throw Root::Unavailable();
|
||||
throw Service_denied();
|
||||
}
|
||||
|
||||
_timeout_dispatcher.insert(session);
|
||||
@@ -531,7 +531,7 @@ class Tftp_rom::Root : public Genode::Root_component<Session_component>
|
||||
};
|
||||
|
||||
|
||||
void Libc::Component::construct(Genode::Env &env )
|
||||
void Libc::Component::construct(Libc::Env &env )
|
||||
{
|
||||
static Genode::Sliced_heap sliced_heap(env.ram(), env.rm());
|
||||
static Tftp_rom::Root root(env, sliced_heap);
|
||||
|
||||
Reference in New Issue
Block a user