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

296 Commits

Author SHA1 Message Date
Samuel Dionne-Riel
61c6776cb8 stage-1/usb-gadget: Quirk is aware of its path
This will be used for quirks that needs to know where to write more
configuration.
2021-01-03 23:08:24 -05:00
Samuel Dionne-Riel
10c1ccece2 stage-1/usb-gadget: Implement gadgetfs teardown
This way on kexec the device is in a better state, and the kernel that
boots next is able to use the controller.

This was verified to fix an issue with kexec+gadget on the Chuwi Hi10
Pro HQ64 tablet.
2021-01-03 20:23:44 -05:00
Samuel Dionne-Riel
3487b77503 fix build failure by providing kernel filename to internal NixOS option
The update from 29a10085f3 caused the
uncompressed kernel to not be installed anymore into the kernel output.

This meant that building the top-level argument failed as a file assumed
to exist wasn't there anymore.

We now provide the appropriate filename when we know it.
2020-12-31 16:21:38 -05:00
Samuel Dionne-Riel
7fe40c1817 system-types/uefi: VM outputs logs on serial 2020-12-29 19:22:43 -05:00
Samuel Dionne-Riel
e215099597 system-types/uefi: Use stage-0 2020-12-29 19:22:43 -05:00
Samuel Dionne-Riel
b2790d13d6 qemu-x86_64: Delete device
It's being replaced by the generic uefi-x86_64 device.

Basically, replace the QEMU-specific system type by the totally standard
UEFI system type. This way we're dogfooding it way better!
2020-12-29 19:22:43 -05:00
Samuel Dionne-Riel
1098b55236 system-types/uefi: Introduce the .vm attribute
This results in a script that launches a QEMU VM.
2020-12-29 19:22:43 -05:00
Samuel Dionne-Riel
bec8c7dbd0 system-types/uefi: Init, largely inspired by u-boot
This is the minimum viable product.

This builds a disk image that can be booted.
2020-12-29 19:21:02 -05:00
Samuel Dionne-Riel
a8fbbebfbb initrd: Allow adding extra dev rules
Will be used to pass along extra properties for devies, e.g. libinput
calibration matrix.
2020-12-29 19:21:02 -05:00
Samuel Dionne-Riel
403c4141ce system-types/u-boot: Cleanup file
The same changes have been made in the upcoming UEFI equivalent file.
2020-12-29 18:21:52 -05:00
Samuel Dionne-Riel
dacfa93de9 recovery.nix: Provide generic access to the recovery build 2020-12-29 18:21:52 -05:00
Samuel Dionne-Riel
32f58ada71
Merge pull request #262 from samueldr-wip/feature/stage-0
stage-0: Add ability to boot in generation kernel+initrd
2020-12-29 18:13:24 -05:00
Samuel Dionne-Riel
798ae8526a initrd-kernel: only build kernel into derivation when relevant
If stage-0 is not supported, default to not bundling a kernel into the
derivation.

This way, no useless builds of the kernels only to rebuild.
2020-12-29 17:59:09 -05:00
Samuel Dionne-Riel
f2bebaa5a3 hardware-qualcomm: Add msm8940 2020-12-28 05:59:46 -05:00
Samuel Dionne-Riel
12be2e5f1c stage-0: Disable by default 2020-12-27 17:50:30 -05:00
Samuel Dionne-Riel
02068b29a9 devices-metadata: Export stage-0 support 2020-12-27 17:50:30 -05:00
Samuel Dionne-Riel
e533ce8864 modules: Make kernel package nullable
This is to use the value in the documentation.
2020-12-27 17:50:30 -05:00
Samuel Dionne-Riel
2c007dfb23 system-types/u-boot: Use stage-0 2020-12-27 17:50:30 -05:00
Samuel Dionne-Riel
6a785b19e5 system-types/depthcharge: Use stage-0 2020-12-27 17:50:30 -05:00
Samuel Dionne-Riel
9fc322894f system-types/android: Use stage-0 2020-12-27 17:50:30 -05:00
Samuel Dionne-Riel
0ece77292b stage-0: defaults according to platform and kernel version
AArch64 Linux (arm64) didnd't support kexec up until 4.8
2020-12-27 17:50:30 -05:00
Samuel Dionne-Riel
f1dd2a69c0 stage-0: init module for stage-0 bootloader build 2020-12-27 17:50:30 -05:00
Samuel Dionne-Riel
c72fd544e8 initrd-kernel: Disable some NixOS verifications
Not great to outright disable, but we're not always using compatible
kernels :/.
2020-12-27 17:50:30 -05:00
Samuel Dionne-Riel
648eb09448 initrd-kernel: Allow disabling kernel for shared rootfs 2020-12-27 17:50:30 -05:00
Samuel Dionne-Riel
f33b918c69 initrd: Make stage configurable 2020-12-27 17:50:30 -05:00
Samuel Dionne-Riel
ab8b8af907 initrd: Add kexec tools 2020-12-27 17:50:30 -05:00
Samuel Dionne-Riel
393df47277 initrd: Allow disabling for shared rootfs 2020-12-27 17:38:29 -05:00
Samuel Dionne-Riel
0999683e23 modules: Add shared-rootfs
Used to undo some of the close-knit integration work NixOS does, so we
can cheat an make a more generic rootfs.
2020-12-27 17:38:29 -05:00
Samuel Dionne-Riel
d53c6e9868 nixos-disintegration: Neuter opinionated boot.kernelPackages 2020-12-27 17:38:29 -05:00
Samuel Dionne-Riel
c45582e224 initrd: Fix where logging happens for a message 2020-12-27 17:38:29 -05:00
Andy Chun
692544a5ef Fix attribute 'selectBySystem' missing with lib.systems.elaborate
Closes #252.

This uses the `lib.systems.elaborate` function which builds the
complete attrset as preferred by Nixpkgs by using
`lib.systems.elaborate`, rather than building a partial equivalent.

@noneucat originally implemented it the simplest way possible, re-using
parts of the now unneeded custom functions. We can, instead, simply
pass a system name to `elaborate`, which ends up doing the right thing.

Co-authored-by: Andy Chun <andy@lolc.at>
Co-authored-by: Samuel Dionne-Riel <samuel@dionne-riel.com>
2020-12-24 18:25:13 -05:00
Samuel Dionne-Riel
7a30ed255a initrd-boot-gui: Drop evtest dependency 2020-11-22 16:48:32 -05:00
Samuel Dionne-Riel
f2d1cf95b2 boot/applets: Remove last applet (key-held)
It'll be, at first, bundled-in as-is in a library, then re-done through
evdev ffi.
2020-11-22 16:48:32 -05:00
Samuel Dionne-Riel
a97cf091dd initrd: Provide configuration needed for xkbcommon 2020-11-22 16:45:34 -05:00
Samuel Dionne-Riel
6c7abb0dac initrd: Basic environment is now configurable 2020-11-22 16:45:25 -05:00
Samuel Dionne-Riel
0bcfc63cb8 initrd: Make initrd-meta aware of xz compression 2020-11-22 16:45:25 -05:00
Samuel Dionne-Riel
8d182d07d2 boot/error: Rework UI for better reporting
First, right now we're putting the full error message front and center,
rather than the sad phone.

We're keeping the sad face though, but only as an accent icon.

Finally, not part of this PR, we'll add actions to abort a total crash.
2020-11-13 19:46:44 -05:00
Samuel Dionne-Riel
bb6a7ddc5f boot/error: Add a tangible derivation
This also allows us to add library files.
2020-11-12 23:13:20 -05:00
Samuel Dionne-Riel
13d73a7115 u-boot: Use types.lines for additional commands 2020-11-07 20:25:49 -05:00
Samuel Dionne-Riel
a28cd3a293 modules/luks: Init
This, with the upcoming luks task allows encrypted drives to work!
2020-11-07 18:26:47 -05:00
Samuel Dionne-Riel
1fb62bdf63 generated-filesystems: Allow passing raw images
This will be useful for some tests.
2020-11-07 18:26:47 -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
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
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
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
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