1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-17 04:51:31 +03:00
Commit Graph

1255 Commits

Author SHA1 Message Date
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
95b1c7b2bb boot/splash: Fix build as it is now a proper applet 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
d6982bb82b mruby-lvgui: Update bindings and implementation to latest version 2020-10-27 15:23:40 -04:00
Samuel Dionne-Riel
a779e28e49 mruby-builder: Fix double error messages print in stub 2020-10-27 15:23:40 -04: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
2b57dd33e3 mrbgems: Add mruby-zmq 2020-10-27 15:23:40 -04:00
Samuel Dionne-Riel
efd31433ba mrbgems: Add mruby-simplemsgpack 2020-10-27 15:23:40 -04:00
Samuel Dionne-Riel
0a458bfcde mrbgems: Add mruby-proc-irep-ext 2020-10-27 15:23:40 -04:00
Samuel Dionne-Riel
05d7446384 mrbgems: Add mruby-pack 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
a91e6196a5 mrbgems: Add mruby-process-clock_gettime 2020-10-27 15:23:40 -04:00
Samuel Dionne-Riel
6675a044d5
Merge pull request #231 from samueldr-wip/feature/pinephone/modem
pine64-pinephone: Modem support improvements
2020-10-27 15:15:15 -04:00
Samuel Dionne-Riel
258cb1acd0
Merge pull request #228 from samueldr-wip/feature/reboot-hal
Boot GUI: only show relevant reboot options
2020-10-18 18:04:55 -04:00
Samuel Dionne-Riel
c7b196c4f3
Merge pull request #227 from samueldr-wip/feature/u-boot/gpt
system-types/u-boot: Use GPT for partitions + add partitions
2020-10-18 17:58:01 -04:00
Samuel Dionne-Riel
082770117c pine64-pinephone: Add modem firmware updater
This has not been made "fancier" for easier use yet. It is unknown how
useful updating the firmware is.

Usage:

```
 $ NIXPKGS_ALLOW_UNFREE=1 nix-build --argstr device pine64-pinephone -A pkgs.pine64-pinephone.qfirehose
 $ sudo ./result/bin/QFirehose -l ./ -f ./newfw
```

But maybe read more about whether you want to update or not beforehand?

https://forum.pine64.org/showthread.php?tid=11815
2020-10-18 17:53:41 -04:00
Samuel Dionne-Riel
40b9d73e22
Merge pull request #229 from samueldr-wip/feature/examples-demo/misc
Misc. updates to the examples/demo system
2020-10-18 17:32:53 -04:00
Samuel Dionne-Riel
d43cd22c07
Merge pull request #230 from samueldr-wip/feature/mruby-lvgui/update
mruby-lvgui: update with latest changes to battery HAL
2020-10-18 16:47:50 -04:00
Samuel Dionne-Riel
788b1605e9 pine64-pinephone: Add service to control the modem 2020-10-18 16:30:24 -04:00
Samuel Dionne-Riel
e379e18fff pine64-pinephone: Re-configure based on megi's defconfig
The following from megi's have to be disabled (not set) or else the
console logo will not show up at boot (pre-init).

> CONFIG_FRAMEBUFFER_CONSOLE_ROTATION
> CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER
2020-10-18 16:30:24 -04:00
Samuel Dionne-Riel
91cec80471 pine64-pinephone: Switch to megi's fork 2020-10-18 16:30:24 -04:00
Samuel Dionne-Riel
dced7ef12b pine64-pinephone: Fix kernel build
The kernel shouldn't be compressed for our current usage.

Otherwise we need to do more work with U-Boot.
2020-10-18 16:30:24 -04:00
Samuel Dionne-Riel
42f6f54a9d mruby-lvgui: update with latest changes to battery HAL 2020-10-18 16:27:36 -04:00
Samuel Dionne-Riel
e09f57838e examples/demo: Misc reorganization 2020-10-18 16:24:14 -04:00
Samuel Dionne-Riel
a5c63b2cd6 examples/demo: Fix warnings from upstream changes 2020-10-18 16:24:14 -04:00
Samuel Dionne-Riel
2b573fbfb1 examples/demo: Add dtc as it is useful to debug things 2020-10-18 16:24:14 -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
b81ab29350 system-types/android: Provide reboot options 2020-10-15 22:08:25 -04:00
Samuel Dionne-Riel
f1d4bc324f initrd: Provide all HAL configuration to stage-1 config 2020-10-15 22:08:25 -04:00
Samuel Dionne-Riel
95ae031200 hardware: init module with HAL for reboot modes
This will be used by the boot GUI to only show relevant reboot options.

We might add other HAL-ish things in there.

Note that this is all internal stuff :)
2020-10-15 22:08:21 -04:00
Samuel Dionne-Riel
9870fc5ad1 examples/hello: Don't provide misc. reboot modes for now
We'll think it over for how we want to handle custom reboot commands,
but some platforms (e.g. u-boot, depthcharge, qemu) don't and can't use
them.

A goal is to keep stage-2 as generic as possible, so building into it
some knowledge of this is harder.

At any rate, the user can still reboot, and hold the key combo as
needed!
2020-10-15 22:08:21 -04:00
Samuel Dionne-Riel
317bf728fa pine64-pinephone: u-boot: Add now required CONFIG_REGEX 2020-10-15 19:15:46 -04:00
Samuel Dionne-Riel
108c8a56d3 system-types/u-boot: Actually boot from the desired partition
Ugh... The whole `''${devtype} ''${devnum}:''${bootpart}` thing was
cargo-culted from other u-boot scripts as "the way to go" to re-use the
information set by the generic distro boot...

EXCEPT that it doesn't work since 2018.

13dd6665ed

They are not environment variables since that change. So any of those
scripts end up working *by sheer luck* since it would end up booting
from the first device's first partition.

Ugh ugh ugh...

There is one **major** difference with the choice: We are now selecting
on a partition's label, rather than booting whatever is deemed bootable.

This assumes the upcoming change where we are using GPT rather than MBR.

But still, this is compatible with the default expectation from U-Boot
by falling back to the "bootable" attribute.
2020-10-15 19:15:46 -04:00
Samuel Dionne-Riel
ecceccb57f system-types/u-boot: Add debug information output 2020-10-15 19:15:46 -04:00
Samuel Dionne-Riel
973778dc68 system-types/u-boot: Abort on failure to load any kernel 2020-10-15 19:15:46 -04:00
Samuel Dionne-Riel
fdc4778d7e u-boot: Prefer GPT over MBR 2020-10-15 19:15:46 -04:00
Samuel Dionne-Riel
d9b346cf31 u-boot systems now have misc/persist partitions
This is so stage-1 can end up using it as needed.
2020-10-15 19:15:46 -04:00
Samuel Dionne-Riel
aca6dc811b image-builder: build GPT using cgpt
This allows us to make a hold in the header, while all other options
apparently can't cope with that in scriptable and stable manner.
2020-10-15 19:15:46 -04:00
Samuel Dionne-Riel
12a2743163
Merge pull request #225 from J-Kirch/fix-spelling
fix spelling
2020-10-14 23:51:18 -04:00
JK
80412b7395
fix spelling 2020-10-13 16:23:24 -05:00
Samuel Dionne-Riel
6c800b8dad
Merge pull request #223 from samueldr-wip/device/razer-cheryl2/port
razer-cheryl2: init
2020-10-10 20:13:56 -04:00