Refactor bootstrapping sequence for a consistent experience.

This commit is contained in:
Anna Rose Wiggins 2021-08-02 00:06:43 -04:00
parent 826df45ff2
commit f2f81cd838
5 changed files with 76 additions and 37 deletions

View file

@ -1,19 +1,22 @@
// rocketOS bootstrapping sequence
runoncepath("0:/lib/boot").
// To maximize space, remove this file first thing. The in-memory copy
// will still run to completion, and it should only run once per vessel.
deletepath("/boot/rocket").
parameter debug is false.
// Install software.
copypath("0:/lib/ui", "1:/lib/ui").
compile "0:/lib/navigation" to "1:/lib/navigation".
compile "0:/lib/throttle" to "1:/lib/throttle".
compile "0:/lib/stabilize_rocket" to "1:/lib/stabilize_rocket".
compile "0:/lib/node" to "1:/lib/node".
compile "0:/init/rocket" to "1:/init".
compile "0:/rocket/launch" to "1:/launch".
local compiled is list(
"/lib/navigation",
"/lib/throttle",
"/lib/stabilize_rocket",
"/lib/node"
).
// Set OS to boot and restart.
set core:bootfilename to "/init".
local copied is list(
"/lib/ui"
).
reboot.
Bootstrap(
"/boot/rocket",
"/init/rocket",
compiled,
copied,
debug
).