1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2025-01-07 12:11:28 +03:00
Commit Graph

479 Commits

Author SHA1 Message Date
Samuel Dionne-Riel
62297b2e10
Merge pull request #300 from samueldr-wip/feature/stage-0-finishing-touches
Finish stage-0 boot features
2021-02-15 16:19:44 -05:00
Samuel Dionne-Riel
34ad416e77 stage-1/usb-gadget: Fix error message error
`#constantize` does not exist on `String`.

This would only have been an issue in the improbable cause that a daemon
is not configured for an FFS gadget.
2021-02-11 19:52:38 -05:00
Samuel Dionne-Riel
ff73bb6ccf stage-0: Allow adding nodes and props to forward 2021-02-11 18:15:34 -05:00
Samuel Dionne-Riel
3014bcb858 stage-0: Add fdt-forward 2021-02-11 18:15:34 -05:00
Samuel Dionne-Riel
c81e858ea5 initrd: Add kexectool in stage-0 module 2021-02-11 18:15:34 -05:00
Samuel Dionne-Riel
c85712a663 system-build: Add DTB mapping 2021-02-11 18:14:30 -05:00
Samuel Dionne-Riel
826315aa11 system-build: Init module adding details to toplevel
For now, device-name... but see following commit.
2021-02-11 18:14:30 -05:00
Samuel Dionne-Riel
ed93aa4678 modules/initrd-kernel: Fix mocked kernelPackages
.ci/instantiate-all.nix wouldn't pass otherwise.
2021-02-02 05:37:31 -05:00
Samuel Dionne-Riel
cc77670be1 modules: Remove kernel nixos-disintegration
The solution is, ugh, to add `...` to allow additional params on kernel
builder call derivations.
2021-02-02 01:58:41 -05:00
Samuel Dionne-Riel
25b2d8fbba modules/stage-0: Use composeConfig 2021-02-02 01:58:41 -05:00
Samuel Dionne-Riel
84b7e5eead modules/recovery: Use composeConfig 2021-02-02 01:58:41 -05:00
Samuel Dionne-Riel
34b033330f Replace evalConfig with config.lib.mobile-nixos.composeConfig 2021-02-02 01:58:41 -05:00
Samuel Dionne-Riel
b57495c363 release-tools: Remove _mobile-nixos.nixpkgsPath
`modulesPath` is enough for our needs.
2021-02-02 01:58:41 -05:00
Edward Amsden
c507b39099 Make the package set a parameter instead of using <nixpkgs> everywhere.
Co-authored-by: Samuel Dionne-Riel <samuel@dionne-riel.com>
Co-authored-by: Edward Amsden <edward@blackriversoft.com>
2021-02-02 01:58:41 -05:00
Samuel Dionne-Riel
a96c2b845c boot/init: Add support for FunctionFS on GadgetFS
FunctionFS on GadgetFS requires this to happen in order:

 - (1) preparing the gadget
 - (2) preparing the function
 - (3) mounting the functionfs
 - (4) starting the daemon
 - (5) enabling the device

Doing any of these steps in the wrong order *will* fail. You cannot
mount functionfs if the function name hasn't been allocated yet. You
cannot start the daemon without functionfs being mounted. You cannot
enable the device without the daemon running on the USB endpoints.

This is why the GadgetFS stuff here *has* to know about mounting the
filesystem and starting the daemon.

In fact, the generic library to be written to handle USB gadget mode
**will** have to have that knowledge!

The added TODOs are to be done when extracting as a standalone library.
2021-01-27 22:16:55 -05:00
Samuel Dionne-Riel
6f6940226a modules/adb: ADB works just fine on any usb gadget
(Though it may require fiddling with udev perms)
2021-01-27 22:16:55 -05:00
Samuel Dionne-Riel
4d7bd722a6 modules/adb: Decouple implementation details
The service and mount points are more of an implementation detail of the
GadgetFS handling library and not an implementation detail of the init
library.

In turn, this means that we are decoupling this from the init, follow-up
on the next commit...
2021-01-27 19:09:07 -05:00
Samuel Dionne-Riel
5ba41dd963 boot/init: Fix shellOnFail
- It was running too late.
 - Wasn't actually using `shellOnFail` config
2021-01-27 19:09:07 -05:00
Samuel Dionne-Riel
10fc8bc0bb initrd-shell: Fix job control 2021-01-24 23:38:05 -05:00
Samuel Dionne-Riel
3a48ed5fa1 quirks/wifi: Add quirk to disable MAC address randomization 2021-01-10 21:08:09 -05:00
Samuel Dionne-Riel
62d00f17fc system-types/android: Add odin-specific device-notes fragment 2021-01-09 19:23:21 -05:00
Samuel Dionne-Riel
7381c783a7 system-types/android: Rename fastboot device notes fragment 2021-01-09 19:23:20 -05:00
Samuel Dionne-Riel
2b674af725 system-types/android: Choose the appropriate device-notes fragment 2021-01-09 19:23:20 -05:00
Samuel Dionne-Riel
f5fbeb1b76 system-types/uefi: Add device-notes fragment 2021-01-09 19:23:20 -05:00
Samuel Dionne-Riel
7a4ddb41ff system-types/u-boot: Add device-notes fragment 2021-01-09 19:23:20 -05:00
Samuel Dionne-Riel
ec7a2d120d devices-metadata: Export documentation config
Since *anyway* this is mainly intended to be consuemd by the
documentation.
2021-01-09 19:23:20 -05:00
Samuel Dionne-Riel
8d2af65cc4 modules/documentation: Init 2021-01-09 19:23:20 -05:00
Samuel Dionne-Riel
1a083f8b3e system-types/android: Output different instructions for Odin 2021-01-09 19:22:32 -05:00
Samuel Dionne-Riel
ea684466e5 system-types/android: Allow defining flashing method 2021-01-09 19:22:32 -05:00
Samuel Dionne-Riel
5b81f1d6dd android: Use Exynos dt.img for android bootimg 2021-01-09 16:26:28 -05:00
Samuel Dionne-Riel
6bc8e35681 quirks: Add exynos fb "notify" quirk
Used to "toggle" the framebuffer so the driver starts rendering.
2021-01-09 16:26:28 -05:00
Samuel Dionne-Riel
205d1bbfca exynos: Add Exynos 7880 2021-01-09 16:24:32 -05:00
Samuel Dionne-Riel
179d8b1b70 stage-1/usb-gadget: Add mass storage usb gadget support 2021-01-03 23:08:24 -05:00
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
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
Samuel Dionne-Riel
f019d84c88 modules: Move rootfs into the modules hierarchy
It didn't make sense to stuff that into systems anyway, it's baggage
from the first steps of making Mobile NixOS.
2020-05-15 15:49:15 -04:00
Samuel Dionne-Riel
e0ca6d43d6 cross-workarounds: Disable udisks for cross-builds
From https://hydra.nixos.org/eval/1581751

1580f35dfb accidentally introduced udisks
in the build.

A local test build of the default "dummy" system disk image wasn't done,
thus the failure not found.
2020-04-23 00:01:33 -04:00
Samuel Dionne-Riel
fd66311f9f qemu-x86_64: Use qemu EDID support
This removes the need for the gnarly hack we were using to get a custom
resolution.
2020-04-22 22:48:30 -04:00
Samuel Dionne-Riel
c7a121fbae quirks: Add msm-dwc3-otg_switch quirk 2020-04-13 17:44:28 -04:00
Samuel Dionne-Riel
467702a853 quirks: Add qualcomm wcnss-wlan quirk
This quirk assumes the firmware has been set appropriately in the NixOS
configuration, using something akin to:

```
  hardware.firmware = [
    pkgs.my-device-firmware
  ];
```
2020-04-09 22:27:15 -04:00
Samuel Dionne-Riel
1580f35dfb nixos-integration: Use initrd.enable = false
That new option allows us to remove the crutch of pretending to be a
container.

Pretending to be a container had a couple drawbacks, they are now
irrelevant.

The dummy outputs could be re-worked to instead use out own stage-1
infra, but I prefer using dummies for now, for better insulation.
2020-04-09 22:27:15 -04:00
Samuel Dionne-Riel
2e28977e49 qualcomm quirks: Reformat descriptions 2020-04-06 18:32:45 -04:00
Samuel Dionne-Riel
eba0021c87 initrd-ssh: Reformat option description 2020-04-06 18:32:45 -04:00
Samuel Dionne-Riel
fb64a005de Allow evaluating without NixOS.
We are now splitting the concerns more clearly, by making `baseModules`
the reason we are evaluating NixOS, rather than wholesale always
including it into the modules.
2020-04-06 18:32:45 -04:00
Samuel Dionne-Riel
2f28151fd2 doc: Add depthcharge notes 2020-04-04 21:04:33 -04:00
Samuel Dionne-Riel
4f6659933f android: Add device notes 2020-04-04 20:30:57 -04:00
Samuel Dionne-Riel
02ab2066ce system-types: Move in discrete directories 2020-04-04 19:56:56 -04:00
Samuel Dionne-Riel
75a0d1a7db devices-metadata: Generate metadata using the modules system 2020-04-04 15:19:44 -04:00
Samuel Dionne-Riel
2cd23f3370
Merge pull request #114 from danielfullmer/vendor-ro
initrd-vendor: mount vendor read-only
2020-04-03 20:22:56 -04:00
Samuel Dionne-Riel
c37da93225 modules/internal: Init 2020-03-30 23:49:28 -04:00
Daniel Fullmer
d142490aa0 initrd-vendor: mount vendor read-only 2020-03-29 15:23:26 -04:00
Samuel Dionne-Riel
558907989b systems/u-boot: Fix eval with release.nix
The "default" output was missing.
2020-03-28 22:53:48 -04:00
Samuel Dionne-Riel
1483a3bcb4 system-types: Add "none" system type for evals
I'm not sure why it doesn't matter on Hydra, and when using `nix-build`,
but it does matter for `nix-env`.
2020-03-28 22:53:48 -04:00
Samuel Dionne-Riel
ad4c5f811a hardware-allwinner: Configure initial gap 2020-03-28 16:40:10 -04:00
Samuel Dionne-Riel
df75b6debd systems/u-boot: Allow configuring the initial gap 2020-03-28 16:40:10 -04:00
Samuel Dionne-Riel
5227e3a462 hardware: Add Allwinner A64 SOC
This file was introduced when working on the devkit. The R18 will be
kept for now, even though no devices use it for now.
2020-03-28 16:40:10 -04:00
Samuel Dionne-Riel
6d3e26a14d hardware: Add Allwinner R18 SOC 2020-03-28 16:40:10 -04:00
Samuel Dionne-Riel
3036ffe0ab system-types: Init u-boot system type
This system type assumes the target will boot using a u-boot based
bootloader.
2020-03-28 16:40:10 -04:00
Samuel Dionne-Riel
eba58e13ed initrd: Fix regression from removal of _module 2020-03-19 16:57:08 -04:00
Samuel Dionne-Riel
a6d221c72c
Merge pull request #97 from samueldr-wip/feature/hydra
Add release.nix for hydra consumption
2020-03-13 22:52:25 -04:00
Samuel Dionne-Riel
bd37657b16 Add workarounds to enable minimal rootfs cross-compilation.
This alone does not make the rootfs it makes useful.
2020-03-13 22:45:48 -04:00
Samuel Dionne-Riel
4ac71a9722 kernel-initrd: vm is the default build artifact 2020-03-13 19:44:08 -04:00
Samuel Dionne-Riel
3b5fe89b7c depthcharge: disk-image is the default build artifact 2020-03-13 19:44:08 -04:00
Samuel Dionne-Riel
97cca51825 android: android-device is the default build artifact 2020-03-13 19:44:08 -04:00
Samuel Dionne-Riel
7a30a6f3c1 system-target: Stop relying on builtins.currentSystem 2020-03-13 19:43:34 -04:00
Samuel Dionne-Riel
987be3bf59 hardware: Add generic ARM platforms
Will be used by the release.nix configurations. Though these may be just
as useful as the x86_64 one is!
2020-03-13 14:56:21 -04:00
Samuel Dionne-Riel
99d626dc1a module-list: Remove now removed module 2020-03-10 14:17:22 -04:00
Samuel Dionne-Riel
281f546bff stage-2-splash: Init re-purposed module
This resets the VT for platforms with VTs.

If a console is attached to that VT the logo will be covered by text as
it begins showing up on the VT.

The current way to "opt-out" of VT messages during stage-2 is to opt-out
of console messages on the VT.
2020-03-09 19:57:31 -04:00
Samuel Dionne-Riel
6692f6d6f4 boot/init: Use the new error reporting applet 2020-03-09 19:45:49 -04:00
Samuel Dionne-Riel
b2f4aecdd4 boot/error: Init error reporting applet 2020-03-09 19:44:27 -04:00
Samuel Dionne-Riel
9a92d10289 initrd-splash: Remove dead code 2020-03-09 17:48:52 -04:00
Samuel Dionne-Riel
c35116cdcd boot/init: Use the new boot/splash applet 2020-03-09 17:34:31 -04:00
Samuel Dionne-Riel
426f31113d boot/splash: Init splash applet 2020-03-09 17:31:03 -04:00
Samuel Dionne-Riel
741eba11ac
Merge pull request #90 from samueldr-wip/feature/initrd-meta
initrd: Add `initrd-meta` build output, with ncdu metadata
2020-03-08 18:06:28 -04:00
Samuel Dionne-Riel
8a71c8dd85 initrd: Add initrd-meta build output, with ncdu metadata
This can be used to sift through the files in stage-1, and hopefully
pare it down when it bloats.
2020-03-08 17:49:12 -04:00
Samuel Dionne-Riel
9ab16a6c66 initrd: Add udev rules for input devices
Otherwise, there is no trivial way to dinstinguish a trackpad from a
touchscreen.
2020-03-08 17:01:31 -04:00
Samuel Dionne-Riel
e121b722a7
Merge pull request #86 from samueldr-wip/feature/boot-gui/simulator-fixes
Boot GUI: Simulator fixes
2020-03-02 14:04:10 -05:00
Samuel Dionne-Riel
74f3dc5711 android-devices: Output a flash-critical.sh script
This script will flash the "critical" bits to the device.

Though note that this will flash both A/B slots unconditionally.

Similarly, this will flash both the boot and recovery partitions.
2020-03-02 14:02:05 -05:00
Samuel Dionne-Riel
12c9d29f58 boot/init: Use the newly split script-loader 2020-03-01 23:27:56 -05:00
Samuel Dionne-Riel
2b2d2ad7ea boot/applets: Add key-held utility 2020-02-29 16:10:00 -05:00
Samuel Dionne-Riel
e326b38b4b system-types/android: Output recovery.img
That recovery image unconditionally assumes it's running as recovery
2020-02-29 16:10:00 -05:00
Samuel Dionne-Riel
3acc3ee63d initrd: Add boot_as_recovery to config 2020-02-29 16:10:00 -05:00
Samuel Dionne-Riel
cab9a214b2 initrd-boot-gui: Add to initrd 2020-02-28 23:14:09 -05:00
Samuel Dionne-Riel
c487e0d7d3 initrd: Implement split loader/script 2020-02-28 23:14:09 -05:00
Samuel Dionne-Riel
8bb0ba8bc4 qualcomm: Rely on refresher, lvgl does not play well with handle. 2020-02-28 23:14:09 -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
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
57a7de2610 initrd-usb: Only enable when a mode is available 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
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
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