1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-17 21:11:34 +03:00
Commit Graph

127 Commits

Author SHA1 Message Date
Samuel Dionne-Riel
36aa305f27 boot/init: Add LUKS device support 2020-11-07 19:22:33 -05:00
Samuel Dionne-Riel
f45b5b301c boot/init: Implement asking user 2020-11-07 19:22:33 -05:00
Samuel Dionne-Riel
eaf8fa9dde boot/init: Long running tasks can export a label
With the same tooling we will be able to ask for a throbber or some
other kind of work indicator.
2020-11-07 19:22:33 -05:00
Samuel Dionne-Riel
c80476a047 boot/init: Rework Progress into a "state stash"
This way we really only update the current state bit we want to affect.
2020-11-07 19:22:33 -05:00
Samuel Dionne-Riel
e891e2f752 boot/init: Minimal changes required to continue working
These changes implement the different protocol changes.
2020-11-07 19:22:33 -05:00
Samuel Dionne-Riel
7b477b9ca5 boot/splash: Allow textual questions to be asked
For now, extremely assumed to be passphrase input.
2020-11-07 19:22:33 -05:00
Samuel Dionne-Riel
665d58a7cd boot/splash: Add textarea and keyboard, allowing text input
The following commit will plug it into the messages queue.
2020-11-07 19:22:33 -05:00
Samuel Dionne-Riel
1f93066e89 boot/splash: Ensure no funny business if given bogus progress bar values 2020-11-07 19:22:33 -05:00
Samuel Dionne-Riel
5755438dfa boot/splash: Add wrappers around text area and keyboard
They will, at some point, be promoted into LVGUI. For the time being
they are local as they have only been verified to work in a useful
manner for this limited use case.
2020-11-07 19:22:33 -05:00
Samuel Dionne-Riel
71149eb01d boot/splash: Ensure cover doesn't intercept events 2020-11-07 18:26:47 -05:00
Samuel Dionne-Riel
a50f838e13 boot/recovery-menu: Add missing file 2020-11-06 16:30:22 -05:00
Samuel Dionne-Riel
d929d798fe boot/init: auto-resize task shows a message 2020-11-06 16:30:22 -05:00
Samuel Dionne-Riel
bd030cbe73 boot/init: Add required plumbing to control the forked process 2020-11-06 16:30:22 -05:00
Samuel Dionne-Riel
9b85943be1 boot/init: Add progress tracking 2020-11-06 16:30:22 -05:00
Samuel Dionne-Riel
6cd2985bc1 boot/splash: Implement progress status display
The splash is now an application that should be started and forked from.
Once started, it will listen for messages on a ZeroMQ socket reporting
progress.

The current protocol is extremely simple, reporting (optional) label,
and reporting a progress amount.

Additionally, it responds to a string commant ("quit") to quit as
needed.
2020-11-06 16:30:22 -05:00
Samuel Dionne-Riel
fb4984cb90 s/boot-gui/boot-recovery-menu/g
The applet is specifically written to show what we call the "recovery
menu". Yes, it's also the boot selection, but it will get confusing with
the upcoming boot tracking splash UI that's upcoming.
2020-10-27 15:23:40 -04:00
Samuel Dionne-Riel
16b96cb5fb boot/script-loader: Add mruby-zmq
This will be used by the upcoming progress-tracking feature.
2020-10-27 15:23:40 -04:00
Samuel Dionne-Riel
ef436a64b1 boot/init: More verbose tasks loop in DEBUG 2020-10-27 15:23:40 -04:00
Samuel Dionne-Riel
99a7671769 boot/init: Ensure graphics setup is also a UX priority 2020-10-27 15:23:40 -04:00
Samuel Dionne-Riel
0365079e1f boot/init: Tasks restart the queue
This is to ensure "UX-friendly" tasks gets run ASAP.

Quickly explained, this makes sure that the top tasks (e.g. Splash) gets
ran as soon as possible.

Given the list:

 - Splash
 - Graphics
 - AAA
 - BBB
 - CCC

If `Graphics` ends up running, and AAA, BBB and CCC can too, Splash will
have to wait until all those tasks got ran once!

Not ideal for UX, if e.g. BBB takes time to *run* and we can't show the
progress to users!

The added cost of restarting the queue is minimal with tests I ran. It
was not more than a tenth of a second, and could even be rounding
errors.
2020-10-27 15:23:40 -04:00
Samuel Dionne-Riel
2542487348 boot/init: Improve Task#to_s for better inspection 2020-10-27 15:23:40 -04:00
Samuel Dionne-Riel
cf84880e87 boot/init: clean-up logger initialization 2020-10-27 15:23:40 -04:00
Samuel Dionne-Riel
1cee1c681b boot/init: Log offset from logger init
This gives us a better idea, relatively, when things happen to be
logged.
2020-10-27 15:23:40 -04:00
Samuel Dionne-Riel
cf49659fe3 boot/init: Add CLOCK_MONOTONIC output at boot 2020-10-27 15:23:40 -04:00
Samuel Dionne-Riel
2f87df4121 init: Add mruby-process-clock_gettime to script-loader 2020-10-27 15:23:40 -04:00
Samuel Dionne-Riel
1c720aa1b1 boot/gui: Use HAL configs for reboot options
This way we can clean up the recovery menu from useless options.

Furthermore, if a device in the future gives us more option, we can
implement them.
2020-10-15 22:08:25 -04:00
Samuel Dionne-Riel
b42063fe70 boot/gui: Fix for new back button implementation 2020-07-25 21:56:50 -04:00
Samuel Dionne-Riel
55938bab90 boot/gui: Rely on the GUI builder 2020-07-23 19:21:50 -04:00
Samuel Dionne-Riel
659b627d6e script-loader: ensure anything lvgui needs is provided...
...by loading it last
2020-07-23 18:07:45 -04:00
Samuel Dionne-Riel
9f50617ba7 boot/gui: Fix cross-compilation breakage
Turns out that `mruby`'s require looks at the actual file name (not the
link) when deciding between loading bytecode or ruby code.

Cross-compilation appends the system to derivation names.

Fun ensues.

This fixes the issue by using `runCommand`, for which it doesn't happen.
2020-06-26 17:38:12 -04:00
Samuel Dionne-Riel
b38caeec1a boot/init: Fixup for $PROGRAM_NAME now pointing to the applet
We know that the loader is at "/loader" in our initrd. Use that
knowledge.
2020-05-31 18:54:07 -04:00
Samuel Dionne-Riel
6d6df159ef boot/script-loader: Add environment support to wrapper 2020-05-31 18:54:07 -04:00
Samuel Dionne-Riel
dfedfda949 boot/script-loader: Provide appropriate $0 and $PROGRAM_NAME 2020-05-31 18:54:07 -04:00
Samuel Dionne-Riel
d617424ded boot/gui: review build with a proper derivation
Then, the simulator is re-tooled to use it, and the new wrapper thingy.
2020-05-31 18:54:07 -04:00
Samuel Dionne-Riel
21b17451b2 boot/init: add wrap to script-loader
This allows wrapping an applet into a script that will start it.
2020-05-31 18:54:07 -04:00
Samuel Dionne-Riel
ba9a9852af boot/init: Remove unused variable 2020-05-23 01:43:12 -04:00
Samuel Dionne-Riel
3e50ec600f boot/gui: review simulator build
Can be launched with `DEBUGGER="gdb --args" ./result/bin/simulator`.
2020-05-23 01:43:12 -04:00
Samuel Dionne-Riel
528c8b8bdb boot/gui: Further fix applets for LVNanoSVG namespace change 2020-05-21 18:15:21 -04:00
Samuel Dionne-Riel
aa2deb72b6 boot/gui: Fix with added introspection 2020-05-19 23:27:36 -04:00
Samuel Dionne-Riel
cc1a2e75e5 boot/gui: Moving LVNanoSVG hacks under the hacks namespace 2020-05-18 21:49:04 -04:00
Samuel Dionne-Riel
6692f6d6f4 boot/init: Use the new error reporting applet 2020-03-09 19:45:49 -04:00
Samuel Dionne-Riel
b2f4aecdd4 boot/error: Init error reporting applet 2020-03-09 19:44:27 -04:00
Samuel Dionne-Riel
c35116cdcd boot/init: Use the new boot/splash applet 2020-03-09 17:34:31 -04:00
Samuel Dionne-Riel
426f31113d boot/splash: Init splash applet 2020-03-09 17:31:03 -04:00
Samuel Dionne-Riel
8fad3b296e boot/gui: Use mruby that will splice
Using `loader.mruby` will not splice :(
2020-03-08 17:05:15 -04:00
Samuel Dionne-Riel
9c8e1f7d17 boot/gui: Fix console restoring on exit 2020-03-08 17:05:15 -04:00
Samuel Dionne-Riel
a083acef55 boot/gui: Use newly split script loader in simulator 2020-03-01 23:27:56 -05:00
Samuel Dionne-Riel
12c9d29f58 boot/init: Use the newly split script-loader 2020-03-01 23:27:56 -05:00
Samuel Dionne-Riel
11897bcdb6 boot/script-loader: Split into its distinct package 2020-03-01 22:21:31 -05:00
Samuel Dionne-Riel
8594a19538 boot/gui: Use the loader's mruby build
It doesn't change the mrbc end-result.
2020-03-01 22:02:45 -05:00