Add install flag to generate separate boot and system images (#1442)

* Usage: pmbootstrap install --split
* Make obvious that export is the next step when split images are created
* Fix note for missing rootfs image on export
  * Change wording from "system image" to "rootfs image"
  * The idea was to show the note only when the rootfs image was not
    generated yet. But this was broken, because the path we checked for
    was missing the chroot path prefix (which is added now).
  * Also don't display the message, when the split image files exist
This commit is contained in:
Daniele Debernardi 2018-05-01 02:18:40 +02:00 committed by Oliver Smith
parent 4e665a2190
commit 827a60cd25
5 changed files with 79 additions and 46 deletions

View file

@ -321,8 +321,14 @@ def arguments():
# Action: install
install = sub.add_parser("install", help="set up device specific" +
" chroot and install to sdcard or image file")
install.add_argument("--sdcard", help="path to the sdcard device,"
" eg. /dev/mmcblk0")
group = install.add_mutually_exclusive_group()
group.add_argument("--sdcard", help="path to the sdcard device,"
" eg. /dev/mmcblk0")
group.add_argument("--split", help="install the boot and root partition"
" in separated image files", action="store_true")
group.add_argument("--android-recovery-zip",
help="generate TWRP flashable zip",
action="store_true", dest="android_recovery_zip")
install.add_argument("--rsync", help="update the sdcard using rsync,"
" only works with --no-fde", action="store_true")
install.add_argument("--cipher", help="cryptsetup cipher used to"
@ -337,9 +343,6 @@ def arguments():
install.add_argument("--flavor",
help="Specify kernel flavor to include in recovery"
" flashable zip", default=None)
install.add_argument("--android-recovery-zip",
help="generate TWRP flashable zip",
action="store_true", dest="android_recovery_zip")
install.add_argument("--recovery-install-partition", default="system",
help="partition to flash from recovery,"
" eg. external_sd",