Samuel Dionne-Riel
ac95c64c92
boot/gui: Fix bad arguments handling for simulator
2020-03-01 16:58:07 -05:00
Samuel Dionne-Riel
20f2cbcc56
init: Interrupt boot when some keys are held.
2020-02-29 16:10:00 -05:00
Samuel Dionne-Riel
2b2d2ad7ea
boot/applets: Add key-held utility
2020-02-29 16:10:00 -05:00
Samuel Dionne-Riel
d79466747d
boot/init: Launch boot GUI when asked
2020-02-29 16:10:00 -05:00
Samuel Dionne-Riel
584c484d0c
boot/gui: Init boot GUI
2020-02-28 23:14:09 -05:00
Samuel Dionne-Riel
3b9d04d3bd
stage-1: workaround issue with e2fsck successfully failing
2020-02-28 23:14:09 -05:00
Samuel Dionne-Riel
26b4215547
boot/init: Add newly required dependencies
2020-02-28 23:14:09 -05:00
Samuel Dionne-Riel
68e4c2b7f3
boot/init: Split interpreter from script
...
This needs the following commits where the init script will now tell the
loader to load init.mrb
2020-02-28 23:14:09 -05:00
Samuel Dionne-Riel
95016e1250
boot/init: Add autoResize support
2020-02-03 21:58:22 -05:00
Samuel Dionne-Riel
7e9a7875ac
boot/init: Mark as 0.1
2020-02-03 21:58:22 -05:00
Samuel Dionne-Riel
c4f76db65f
boot/init: Handle remounting existing mounts
...
This is used to ensure mount points are mounted with the right options,
if for some reason they were already mounted.
Reasons they could be mounted? They could have been required for things
like logging the boot.
2020-02-03 21:58:21 -05:00
Samuel Dionne-Riel
8962b595f5
boot/init: brown sad phone on main failure
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
d349e66554
boot/init: Use System#shell
if available on failure
...
When it is available, it is assumed it is okay to use.
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
67f907c952
initrd: System.write for login environment tasks
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
75020873c8
initrd: System.write for graphics tasks
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
462a3ae2e7
boot/init: System.write for hard reboot
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
4f83d41d33
boot/init: Add System.write
alias
...
This does the same thing as `File.write`, but with debug logging.
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
cd963d2b59
boot/init: Allow crashing to bootloader
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
a1e3d231be
boot/init: Handle exception to flush logs
...
Otherwise, it somehow happened that the messages were truncated before
the kernel panic.
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
c868bcea46
boot/init: Add network interface dependencies
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
711a521f54
boot/init: Allows dependencies as an OR
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
15964966b6
boot/init: Mounts will only wait for absolute paths
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
e41e35a84b
boot/init: Fix mounting special filesystems with devices
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
6354a156dd
boot/init: Add Dir.children monkey patch
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
cd74c94fde
boot/init: De-hardcode /mnt
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
7dff001d75
boot/init: Prefer running UX tasks first
...
This ensures graphical progress is shown ASAP when dependencies are
equally likely to run.
Otherwise, when the graphical step was ready, and switchroot about to
run, the shell step could run before the splash. This means that, in
practice, a long running task like e2fsck could have prevented the
splash to show. It doesn't make sense to make the other tasks depend on
a splash task!
There is no intention to implement any other special-cased ordering. If
there is the need to, it might mean that there is a deficiency in the
design.
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
a3c8cd78e8
boot/init: Sort tasks before running them
...
This is partly to reduce the amount of loops it needs to run, but mainly
to control the order rather than rely on the order they were added in.
The control of order seems weird in a dependency-based system, but it'll
be used mainly for one thing in the next commit...
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
bdee7cf0e0
boot/init: Removes SingletonTask special dependency
...
Instead, rely on targets.
Additionally removes the "Boot" special dependency which only made sense
when it was expected that having no dependency was an error.
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
046dcdc8ea
boot/init: Register singleton tasks only once
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
62b7b47117
boot/init: Add System.spawn
porcelain
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
0361ccad00
init: Allow adding tasks to boot/init
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
a81afccbb8
cleanup: Move initrd-fail settings in boot/init
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
a6f2195921
boot/init: Return the symlink itself for the generation
...
Reading the symlink gives a relative path. That's no good in this case.
There is no actual need to resolve the symlink.
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
01e298eafc
boot/init: Make failure to splash not fatal
...
That is, some devices, notable google-walleye, fail to show the splash
for yet unknown reasons.
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
30dd9259af
boot/init: Fixup bug with System,pretty_command change
...
The prettified command ended up missing from the debug log.
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
b887db59c5
boot/init: Add SwitchRoot task
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
75454e4ba5
boot/init: Add System.exec and System.which
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
962b36ec97
boot/init: Implements Target tasks
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
6234128c00
boot/init: misc cleanups
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
3c9b5057c0
boot/init: Handles generic mounting
...
This implements reading the configuration to know about mount points.
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
eb15a159de
boot/init: Fixup bug in mount task
...
Welp, == != = !
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
b804ca6c5f
boot/init: Adds graphical failure
...
Though, not sure I exactly like the way it's done here.
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
d4571cf9aa
boot/init: Use boot.specialFileSystems
...
This is an internal configuration from NixOS. This is what is used by
the NixOS stage-1 to mount the special filesystems.
It would be dumb not to rely on the same!
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
de9ca16934
boot/init: udev depends on /sys too
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
7eb1f81b3e
boot/init: Allow passing options to System.mount
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
c54aa77911
boot/init: Add Proc tasks
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
694513d9f0
boot/init: Adds missing dependency on /dev
...
Though, this is only *incidental* in that for using the framebuffer the
/dev/ mount point needs to exist for /dev/fb0 to exist.
The Graphics step will succeed without that, but users of the Graphics
step might not.
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
62b48d2077
boot/init: Make udev depend on mounts
...
Rather than cheating with files inside the mount points
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
3550d694b3
boot/init: Allow a task to depend on a mount point being mounted
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
741b3f3fa7
boot/init: Minor logging rewording
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
8b4ae5b2fc
boot/init: Logger is configurable
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
971a7241f6
boot/init: fulfilled -> fulfilled?
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
555548d3f4
boot/init: Review how configuration is loaded and used
...
This way it can be used at any time, regardless of execution state, as
long as the Configuration module has been parsed.
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
83df40bc40
boot/init: Add task to load modules
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
24f99c593b
boot/init: Rework of task mount
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
d072e6395c
boot/init: Use configuration for mount point
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
dea888833a
boot/init: misc. cleanups
...
Mostly removed useless dirs...
Also fixed the hardcoded mountpoint.
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
583f555f81
boot/init: Now loads configuration file
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
8353f7ea79
boot/init: Minor rework of udev task
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
a6bb2aa3a7
boot/init: Fix printing debug info for unfulfilled Files
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
5208741f3c
boot/init: Fix pretty printing shelled out commands
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
293d949648
boot/init: Print mkdir_p for debug
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
9f416471f7
boot/init: Add udevd task
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
4d0c1218f0
boot/init: Guard against global environment pollution
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
d4123fd3e2
boot/init: Allows a task to depend on a specific instance of Task
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
b3e1f2dbac
boot/init: Import all tasks, yet allow adding tasks
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
df8cafe832
boot/init: Better tracing in dependencies
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
60a92acbe8
boot/init: Continuously improving POC
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
39d44bf64c
boot/init: Continuing extremly POC
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
9d9700cbaf
boot/init: Build interpreter with more gems
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
8f01d54b25
boot/init: Load all libraries
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
6f25c1ee3b
boot/init: Import ruby shellwords
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
e48bc514c6
init: Extremely WIP POC
2020-02-03 16:19:10 -05:00