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

1465 Commits

Author SHA1 Message Date
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
a8f14efead qemu-cryptsetup: Use uefi-x86_64 system
It is incomplete because it does not use the (not implemented) VM
attribute.
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
ed23cbaeb6 uefi-x86_64: default values for ram and display
This is basically what I think are the minimum requirements for support.
720p display, 2GB of RAM.

Not that it will be a great experience.
2020-12-29 19:21:02 -05:00
Samuel Dionne-Riel
01de3d31a4 devices/uefi-x86_64: Init, from qemu-x86_64
For the time being, this is mostly a copy of the QEMU system.

The QEMU system is slated to be removed, once the UEFI system provides
the necessary tooling to get a VM going easily.

We'll probably want to add other generically-useful modules to that
system.

We'll have to look at NixOS's boot.initrd.availableKernelModules and
boot.initrd.kernelModules options.
2020-12-29 19:21:02 -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
a14e0244d3 kernel/builder: Fix for non-dtb-based platforms
Like intel-based hardware
2020-12-29 19:21:02 -05:00
Samuel Dionne-Riel
cff021e9ca kernel/builder: Support newer kernel versions
Fixes menuconfig for 5.10 for chuwi hi10 pro
2020-12-29 19:21:02 -05:00
Samuel Dionne-Riel
c2ac23379c image-builder: Provide a LUKS partition type UUID 2020-12-29 18:21:52 -05:00
Samuel Dionne-Riel
96a71e1b2b makeFAT32: fix build for bigger filesystems 2020-12-29 18:21:52 -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
e88ace2a3e boot/init: switch_root keeps selected generation in stage-0 2020-12-29 17:59:09 -05:00
Samuel Dionne-Riel
5113fad354 pine64-pinephone: Enable stage-0 support 2020-12-29 17:59:09 -05:00
Samuel Dionne-Riel
b81fd24f33 pine64-pinephone: Enable proc kcore 2020-12-29 17:59:09 -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
002bf7c1e9
Merge pull request #263 from samueldr-wip/devices/motorola-surfna/init
motorola-surfna: init
2020-12-28 14:08:44 -05:00
Samuel Dionne-Riel
b49dcaaa4c motorola-surfna: Note quirk about flashing 2020-12-28 06:04:18 -05:00
Samuel Dionne-Riel
a7441ec1cc motorola-surfna: Edit kernel configuration as needed 2020-12-28 06:04:18 -05:00
Samuel Dionne-Riel
b4150e7579 motorola-surfna: Normalized OEM kernel configuration
(But the 64 bit variant)
2020-12-28 06:04:18 -05:00
Samuel Dionne-Riel
4eacd4bbc8 motorola-surfna: Basic defconfig
To be normalized. Built this way:

```
cat \
    arch/arm64/configs/msm8937-perf_defconfig \
    arch/arm64/configs/ext_config/moto-msm8937.config \
    arch/arm64/configs/ext_config/moto-msm8937_64.config \
    arch/arm64/configs/ext_config/moto-msm8937-surfna.config \
    > surfna.64.defconfig
```
2020-12-28 06:04:18 -05:00
Samuel Dionne-Riel
0d5c580df8 motorola-surfna: Init kernel at 4.9.112 2020-12-28 06:04:18 -05:00
Samuel Dionne-Riel
fe5a135992 motorola-surfna: Clean-up device description 2020-12-28 06:04:18 -05:00
Samuel Dionne-Riel
f67bbf99d9 motorola-surfna: Import config from autoport
NOTE: this has been detected as armv7l as the kernel and system on the
device is built for 32 bit ARM. The SoC actually supports 64 bit.
2020-12-28 05:59:46 -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
479f431883 doc: List stage-0 support on the device page
The support is according to the default device configuration. For now
this means the kernel version, but a device can also configure it as
needed.
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
e9dba7afb9 boot/init: Fix logic in symlink resolution 2020-12-27 17:50:30 -05:00
Samuel Dionne-Riel
ebd095e019 boot/init: AutoResize only if needed 2020-12-27 17:50:30 -05:00
Samuel Dionne-Riel
22ba517ac8 boot/init: Control the splash fades for kexec 2020-12-27 17:50:30 -05:00
Samuel Dionne-Riel
fa4804e67d boot/init: Add kernel cmdline helper 2020-12-27 17:50:30 -05:00
Samuel Dionne-Riel
cb0d21d2fc boot/init: booting from kexec communicated using cmdline 2020-12-27 17:50:30 -05:00
Samuel Dionne-Riel
200e5aac1b boot/init: Kexecing keeps the splash as-is 2020-12-27 17:50:30 -05:00
Samuel Dionne-Riel
b82492a565 boot/init: Use kexec only in stage-0. 2020-12-27 17:50:30 -05:00
Samuel Dionne-Riel
eed796865e boot/init: Use configurable stage value 2020-12-27 17:50:30 -05:00
Samuel Dionne-Riel
6ad92214da boot/init: switch_root can and will kexec
This is partly complete; we need to handle the situation where **only**
stage-0 should kexec into the next system.

This is yet to be implemented, but will be done through a configuration
that transforms the current bootloader-launched stage-1 into a stage-0,
while keeping the on-disk stage-1 stage-1.
2020-12-27 17:50:30 -05:00
Samuel Dionne-Riel
812b02dd32 boot/init: Fix partial teardown for splash
`#quit` would leave the `@pid` variable around, which in turn meant that
calling `#kill` after would fail since the process was already gone.
2020-12-27 17:50:30 -05:00
Samuel Dionne-Riel
ad4efeff2f boot/splash: Allow skipping fade-out (sticky) 2020-12-27 17:50:30 -05:00
Samuel Dionne-Riel
bece0564d8 boot/splash: Allow skipping fade-in 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