make sure swapper is PID 2 by making it the first service added

This commit is contained in:
bunnie 2024-03-07 22:18:32 +08:00
parent e4c7a86aa1
commit ab9fe13ac8

View file

@ -228,11 +228,13 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
}
Some("renode-swap") => {
builder.target_renode();
// It is important that this is the first service added, because the swapper *must* be in PID 2
builder.add_service("xous-swapper", true);
builder.add_kernel_feature("swap");
for service in base_pkgs {
builder.add_service(service, true);
}
builder.add_service("xous-swapper", true);
builder.add_apps(&get_cratespecs());
}