1
0
Fork 1
mirror of https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git synced 2025-07-19 10:35:08 +03:00

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

@ -204,6 +204,24 @@ def install(args):
if args.rsync and not args.sdcard:
raise ValueError("Installation using rsync only works on sdcard.")
# On-device installer checks
# Note that this can't be in the mutually exclusive group that has most of
# the conflicting options, because then it would not work with --sdcard.
if args.on_device_installer:
if args.full_disk_encryption:
raise ValueError("--on-device-installer cannot be combined with"
" --fde. The user can choose to encrypt their"
" installation later in the on-device installer.")
if args.android_recovery_zip:
raise ValueError("--on-device-installer cannot be combined with"
" --android-recovery-zip (patches welcome)")
if args.no_image:
raise ValueError("--on-device-installer cannot be combined with"
" --no-image")
if args.rsync:
raise ValueError("--on-device-installer cannot be combined with"
" --rsync")
if not args.sdcard and args.split is None:
# Default to split if the flash method requires it
flasher = pmb.config.flashers.get(args.deviceinfo["flash_method"], {})