From d9682be7711ae386808e4a370f274d7f91f22b13 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Fri, 18 Dec 2020 22:18:42 +0100 Subject: [PATCH] install --ondev: set boot label: pmOS_inst_boot (MR 2008) With postmarketos-ondev >= 0.4.0, have a different label for the boot partition in the installer OS, so the postmarketOS initramfs can find the proper partition to boot. Even if the boot partition is available twice (once installed on eMMC, once as part of installer OS on SD card). pmOS_inst_boot instead of pmOS_install_boot because of character limit. --- pmb/config/__init__.py | 5 ++++- pmb/install/_install.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pmb/config/__init__.py b/pmb/config/__init__.py index 3c51c043..7412f2cb 100644 --- a/pmb/config/__init__.py +++ b/pmb/config/__init__.py @@ -32,7 +32,10 @@ pmaports_min_version = "7" # see migrate_work_folder()). work_version = 5 -# Minimum required version of postmarketos-ondev (pmbootstrap install --ondev) +# Minimum required version of postmarketos-ondev (pmbootstrap install --ondev). +# Try to support the current versions of all channels (edge, stable). When +# bumping > 0.4.0, remove compat code in pmb/install/_install.py (search for +# get_ondev_pkgver). ondev_min_version = "0.2.0" # Programs that pmbootstrap expects to be available from the host system. Keep diff --git a/pmb/install/_install.py b/pmb/install/_install.py index 3e9355df..bfbfba6f 100644 --- a/pmb/install/_install.py +++ b/pmb/install/_install.py @@ -645,8 +645,11 @@ def install_on_device_installer(args, step, steps): # Generate installer image size_reserve = round(os.path.getsize(img_path_dest) / 1024 / 1024) + 200 + boot_label = "pmOS_inst_boot" + if pmb.parse.version.compare(get_ondev_pkgver(args), "0.4.0") == -1: + boot_label = "pmOS_boot" install_system_image(args, size_reserve, suffix_installer, step, steps, - "pmOS_install", args.split, args.sdcard) + boot_label, "pmOS_install", args.split, args.sdcard) def create_device_rootfs(args, step, steps):