mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-07 19:34:56 +00:00
sculpt: propagate managing_system role
This change allows for the hosting of system-management components in Sculpt's runtime. The special role must be declared either as <launcher managing_system="yes"> attribute or in the deploy configuration's <start managing_system="yes"> attribute. Issue #5009
This commit is contained in:
parent
558a00138c
commit
aff17cb177
@ -598,7 +598,7 @@ install_config {
|
||||
</route>
|
||||
</start>
|
||||
|
||||
<start name="runtime" caps="50000" priority="-1">
|
||||
<start name="runtime" caps="50000" priority="-1" managing_system="yes">
|
||||
<binary name="init"/>
|
||||
<resource name="RAM" quantum="32G"/>
|
||||
<resource name="CPU" quantum="40"/>
|
||||
|
@ -426,6 +426,20 @@ void Depot_deploy::Child::gen_start_node(Xml_generator &xml,
|
||||
xml.attribute("priority", priority);
|
||||
}
|
||||
|
||||
auto permit_managing_system = [&]
|
||||
{
|
||||
if (start_xml.attribute_value("managing_system", false))
|
||||
return true;
|
||||
|
||||
if (_defined_by_launcher())
|
||||
if (launcher_xml.attribute_value("managing_system", false))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
};
|
||||
if (permit_managing_system())
|
||||
xml.attribute("managing_system", "yes");
|
||||
|
||||
bool shim_reroute = false;
|
||||
|
||||
/* lookup if PD/CPU service is configured and use shim in such cases */
|
||||
|
@ -167,6 +167,7 @@ struct Sculpt::Deploy
|
||||
copy_attribute("cpu");
|
||||
copy_attribute("priority");
|
||||
copy_attribute("pkg");
|
||||
copy_attribute("managing_system");
|
||||
|
||||
/* copy start-node content */
|
||||
node.with_raw_content([&] (char const *start, size_t length) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user