pmbootstrap install --ondev: new option (MR 1946)

Add initial support for the on-device installer in pmbootstrap. Let
pmbootstrap create a regular split image, then prepare a new installer
rootfs and copy the previously generated rootfs image into the installer
rootfs. Put the installer rootfs into a new image, with reserved space.

There is more to do from here, such as disabling the generation of the
user account when using --ondev. But this requires support in
postmarketos-ondev first, so let's build that iteratively.

Related: https://wiki.postmarketos.org/wiki/On-device_installer
Related: https://gitlab.com/postmarketOS/postmarketos-ondev/-/issues
This commit is contained in:
Oliver Smith 2020-06-06 23:38:34 +02:00 committed by Bart Ribbers
parent 8fb69f9c46
commit ddb5d9ae2c
No known key found for this signature in database
GPG key ID: 699D16185DAFAE61
6 changed files with 90 additions and 8 deletions

View file

@ -25,7 +25,7 @@ def alpine_native():
def from_chroot_suffix(args, suffix):
if suffix == "native":
return args.arch_native
if suffix == "rootfs_" + args.device:
if suffix in [f"rootfs_{args.device}", f"installer_{args.device}"]:
return args.deviceinfo["arch"]
if suffix.startswith("buildroot_"):
return suffix.split("_", 1)[1]