1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-18 05:21:47 +03:00
Commit Graph

609 Commits

Author SHA1 Message Date
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
7dd8408dd9 initrd: Fix early logging
We're now starting `bootlogd` first thing, this in turn allows it to
capture all logs. Though, this does mean that `sh` is back in the
critical path of the system. Anyway, it was never exactly out.
2020-02-03 21:58:21 -05:00
Samuel Dionne-Riel
8f8728b46a
Merge pull request #76 from samueldr-wip/devices/asus-dumo/kernel-5.5.0
asus-dumo: kernel 5.3.0 -> 5.5.0
2020-02-03 16:25:22 -05:00
Samuel Dionne-Riel
a53f7cf463 initrd: Expose extraUtils 2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
290d2ff757 initrd: Fix strace packaging 2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
bcda887e7a initrd-usb: ffs -> adb for ADB
It looks like it didn't matter for some device, but may be an issue for
`google-marlin`.

I'm not sure where the `ffs` feature name came from.
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
53413080cc initrd-usb: Follow AOSP init order more closely
This is part of what may be required to fix ADB on google-marlin.
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
3c2c24a832 docs: Document brown sad phone 2020-02-03 16:19:10 -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
57a7de2610 initrd-usb: Only enable when a mode is available 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
bdd234fc0e initrd-shell: Allows using a shell on failure...
This needs to be plugged into the init via duck-typing.
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
c9f43ba25e demo: Remove "hard-shutdown" from system
It's not needed, and systemd's shutdown already handles `reboot
bootloader` appropriately, thus the `hardshutdown` replacement is not
required.
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
36a78e23ea demo: System.write for brightness task in burn tool 2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
c15460b6d4 demo: Enable adbd in burn tool 2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
0815a83dcf demo: Greatly simplifies burn-tool 2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
22bd4406b0 demo: Use shell as a replacement for "loop-forever" 2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
2356bd2947 adb: Disables by default
This was a bit rude! There are security consideration in making adb
available!
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
f30f2e0e5e adb: Implement as a boot/init task 2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
4289996f3c initrd: System.write for USB gadget tasks 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
8d3833691b initrd: Setup ffs aliases before mounting functionfs
It turns out to be required for some devices.

Namely, google-marlin.
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
74a1a190ca initrd-usb: Force device to declare mode
The detection cannot be done reliably. Some android_usb devices
(motorola-addison) have gadgetfs available, while some gadgetfs devices
will have the android_usb path available.

Anyway, this is probably better to explicitly declare the mode to use.
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
eee5b2d608 boot-initrd: Removes outdated option 2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
4cc403e3cd initrd-vendor: Stop assuming there is a vendor partition
Older devices will not have a vendor *partition*.
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
57a18403bd initrd-usb: Implement android_usb gadget in task 2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
d913324948 initrd: make bootConfig deeply mergeable
With JSONValue from:

 * https://github.com/NixOS/nixpkgs/pull/75584
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
eb29edda6d initrd-ssh: Port to a boot/init task. 2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
c4ec0480fd initrd-network: Port to a boot/init task 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
776b8bf151 initrd-vendor: init module
This is required for some devices, as some features only work when
firmwares are loaded on some devices.

Here, `google-walleye` `gsi.rndis` usb gadget requires the IPA firmware.
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
50a04bd651 initrd-usb: Implement gadgetfs usb gadget
This has only been tested with google-walleye, with gsi.rndis.
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
b47ffc14e4 initrd-usb: Prepare for gadget handling task 2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
3b16a080f7 initrd: Make bootConfig a tangible internal option 2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
5b3b72870b initrd-shell: Remove with. 2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
43c25fe059 initrd-loop: Remove
We'll see what will be done in a bit.
2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
333ae6b6da initrd-logs: Add bootlogd multiplexer/logger support. 2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
3379bc5954 initrd-fbterm: Port to new stage-1 init 2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
50849b0598 bootlogd: Init at 2020-01-02 2020-02-03 16:19:10 -05:00
Samuel Dionne-Riel
b932adb0d2 Fixups in modules from changes to boot/init 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