1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-15 19:23:01 +03:00
Commit Graph

342 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
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
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
JK
80412b7395
fix spelling 2020-10-13 16:23:24 -05:00
Samuel Dionne-Riel
12c60710d9 qualcomm: Add SDM845 2020-10-09 23:45:19 -04:00
Samuel Dionne-Riel
1889893a43 kernel-builder: implement QCDT configuration in the builder 2020-10-02 03:27:49 -04:00
Tom Hall
b0336c4213 initrd: handle systemd-udevd being a symlink to udevadm
Mirrors 7361f6f252
2020-09-16 23:02:36 +01:00
Samuel Dionne-Riel
6461b307a0 initrd: Make compression method an option
This is a semi-internal option. The end-user may want to change it.
Though in reality this is aimed toward device integrators that integrate
a device with a small boot partition.
2020-08-22 21:28:14 -04:00
Samuel Dionne-Riel
dcbfbff1ad nixos-disintegration: Remove the disabled showManual option
The option has been removed.

aebf9a4709
2020-08-18 17:42:08 -04:00
Samuel Dionne-Riel
8f32fbe7c0 initrd: Fix for lvm2 multiple output
See Nixpkgs d3a991d41028c5d2a5af2796c0bb542836457822
2020-07-28 16:27:04 -04:00
Samuel Dionne-Riel
7e2a4e0074 systems/u-boot: additionalCommand is optional
Optional through a default.
2020-07-27 23:26:36 -04:00
Samuel Dionne-Riel
a361e8e964 initrd: Provide firmwares through the specific option
The upstream NixOS make-initrd doesn't handle multiple content linking
to the same location.
2020-07-06 00:18:47 -04:00
Samuel Dionne-Riel
1911603231 mediatek: Add MT6755 2020-06-28 23:54:14 -04:00
Samuel Dionne-Riel
a1430b3ab8 quirks: qualcomm.msm-fb-refresher -> fb-refresher
It has been found that it may be useful on non-Qualcomm platforms.
2020-06-28 23:54:14 -04:00
Samuel Dionne-Riel
6554371388 msm-fb-handle: Drop workaround 2020-06-28 23:54:14 -04:00
Samuel Dionne-Riel
17f27ca78d hardware: init mediatek with MT6785 2020-06-26 01:17:41 -04:00
Samuel Dionne-Riel
d9cd7b336b initrd-firmware: Init module to add firmware to stage-1
Much better than the ad-hoc way used in a previous PR
2020-06-01 18:58:59 -04:00
Samuel Dionne-Riel
eaaa3980f0 initrd: Add tree output to initrd-meta
This ends up being useful to peek into the initrd cpio without actually
having to crack it open.

I have used this to track down a bad symlink.
2020-06-01 18:58:05 -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
94981be08f stage-1: Package up script loader in overlay
It will end up re-used soon.
2020-05-31 18:54:07 -04:00
Samuel Dionne-Riel
22eddafd91 generated-filesystems: overridable options for filesystem generation
This allows filesystem generation to be re-configured without overriding
all options.
2020-05-31 18:54:07 -04:00
Samuel Dionne-Riel
09fed68bcf treewide: Remove installer/mobile-installer dead weight
This didn't end up being something that's being worked on. It probably
was entirely confusing for everyone as it wasn't documented, and didn't
actually do anything useful most of the time.

Rather than polluting the build with some one-off special cases like
this, we'll implement an "installer" as an example system, if we even
want an installer.

It's not planned yet *how* users should install, it may not even be an
installer type system.

This also rewords the "successful default build failure" message.
2020-05-31 16:05:57 -04:00
Samuel Dionne-Riel
2971232eff qualcomm: Add fb notify quirk
This quirk touches the `blank` file of the framebuffer /sys nodes, which
ends up unsuspending things that start suspended until the *right thing*
is happening to not be suspended.

X11, among others, do the right things. It seems other framebuffer
interfaces are not.

This can likely be fixed in other ways, but this is the more
approachable way to me right now.
2020-05-31 02:27:49 -04:00
Andrew Childs
00edd48239 initrd-usb: provide modules required for gadgets in initrd
See the kernel documentation for configuring gadgets for more details.

https://www.kernel.org/doc/Documentation/usb/gadget_configfs.txt
2020-05-25 16:38:54 -04:00
Samuel Dionne-Riel
7ec525330f
Merge pull request #152 from samueldr-wip/fix/kernel-cmdline
Remove messy `device.info` option
2020-05-25 15:24:26 -04:00
Samuel Dionne-Riel
5da15c36db system/qemu: Fix for new kernel package option 2020-05-24 20:13:07 -04:00
Samuel Dionne-Riel
64cf2ec076 system/u-boot: Fix for new kernel package option 2020-05-24 20:13:07 -04:00
Samuel Dionne-Riel
58e2a0709f system/depthcharge: Fix for new kernel package option 2020-05-24 20:13:07 -04:00
Samuel Dionne-Riel
d60f3a501b system/android: Fix for new kernel package option 2020-05-24 20:13:07 -04:00
Samuel Dionne-Riel
92324964d1 initrd-kernel: Add options for kernel package
We cannot use a "linuxPackagesFor" attrset due to older OEM kernels.
2020-05-24 20:13:07 -04:00
Samuel Dionne-Riel
6f7567d0d6 mobile-device: Remove device.info 2020-05-24 20:13:07 -04:00
Samuel Dionne-Riel
52ea0fb075 initrd: Cleanup accidental cruft from messy device info 2020-05-24 20:13:07 -04:00
Samuel Dionne-Riel
a8ce7d0043 initrd-kernel: additional_modules -> additionalModules + document 2020-05-24 20:13:07 -04:00
Samuel Dionne-Riel
65bb1e8a35 system/android: Provide replacements for freeform device.info options 2020-05-24 20:13:07 -04:00
Samuel Dionne-Riel
e125c6ab2f system/depthcharge: Provide option and fix build
The depthcharge build doesn't rely on the freeform option anymore.
2020-05-24 20:13:07 -04:00
Samuel Dionne-Riel
a4358472b0 system/u-boot: Use NixOS boot.kernelParams 2020-05-24 20:13:07 -04:00
Samuel Dionne-Riel
ed873e606c vendor: Provide an option for the vendor partition 2020-05-24 20:13:07 -04:00
Samuel Dionne-Riel
45f9736fac usb: Provide proper gadgetfs functions option 2020-05-24 20:13:07 -04:00
Samuel Dionne-Riel
114f545889 device: Add device.firmware to allow a device to provide firmware files 2020-05-24 20:13:07 -04:00
Samuel Dionne-Riel
596a7891e4 device: Drop most of the messy "device.info" option
The last option will be cleaned up last.
2020-05-24 20:13:07 -04:00
Samuel Dionne-Riel
8a5df088b9 system/u-boot: Use boot.kernelParams 2020-05-24 20:13:07 -04:00
Samuel Dionne-Riel
2d0d5810cc system/qemu: Use boot.kernelParams 2020-05-24 20:13:07 -04:00
Samuel Dionne-Riel
b928b20e2a system/depthcharge: Use boot.kernelParams
(and fix device_info.arch)
2020-05-24 20:13:07 -04:00
Samuel Dionne-Riel
84906bb8e4 system/android: Use boot.kernelParams 2020-05-24 20:13:07 -04:00
Samuel Dionne-Riel
4db9f2ad39
Merge pull request #149 from samueldr-wip/feature/lvgui-ffi
boot/gui: Use libffi rather than bespoke bindings
2020-05-24 15:31:23 -04:00
Samuel Dionne-Riel
a35863e641 devices: Use device identity 2020-05-23 18:13:02 -04:00
Samuel Dionne-Riel
ab35b1bf4c devices: Add device identity option 2020-05-23 17:28:36 -04:00
Samuel Dionne-Riel
1442bcba8b system/android: Review recovery build
Instead of borrowing some of its system.build products, rely instead on
a full system.build for the recovery.img.

This allows us to better make use of the implicit declarativeness of the
system configuration. At some point the recovery "system" will be moved
out of that file and things will continue to work.
2020-05-23 15:59:43 -04:00
Samuel Dionne-Riel
8cb9b07be2
Merge pull request #151 from samueldr-wip/fix/leftover-container-hack
initrd: Remove leftover hack from when isContainer was used
2020-05-23 15:21:16 -04:00
Samuel Dionne-Riel
15d3f1fdbb initrd: Remove leftover hack from when isContainer was used 2020-05-23 01:58:26 -04:00
Samuel Dionne-Riel
16f25cf6f6 initrd: stop relying on pkgsStatic
This ends up saving ~100KiB. Not much, but we're already 1MiB over the
~7-8 MiB budget.

Though, in reality, it's not for the space saving, but because
dlopen/dlsym will be needed for ffi-based bindings.
2020-05-23 01:56:00 -04:00
Samuel Dionne-Riel
dcbda16fc5 system-types: Rename kernel-initrd -> qemu-startscript
In addition, put the implementation of the build side-by-side with the
system type definition. It made no sense to keep those where they were,
as it was baggage from the earlier implementation of the project.
2020-05-15 16:10:43 -04:00
Samuel Dionne-Riel
b1870eb331 modules: Move depthcharge build implementation into its system type
It didn't make sense to stuff that into systems anyway, it's baggage
from the first steps of making Mobile NixOS.

This is a *part* of depthcharge system type, so why stuff it into `system`
at the root??
2020-05-15 15:53:28 -04:00
Samuel Dionne-Riel
e7b68c834a modules: Move bootimg into its system type
It didn't make sense to stuff that into systems anyway, it's baggage
from the first steps of making Mobile NixOS.

This is a *part* of android system types, so why stuff it into `system`
at the root??
2020-05-15 15:49:38 -04:00