From 7752d8b2ae7816fe71978df2ede9d4318da72df6 Mon Sep 17 00:00:00 2001 From: Luca Weiss Date: Sun, 10 Mar 2024 20:34:53 +0100 Subject: [PATCH 1/2] FP4: Update user action wording Make the wording more generic since the installer supports also postmarketOS. Also update the support URLs, especially the first one doesn't work anymore. --- v2/devices/FP4.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/v2/devices/FP4.yml b/v2/devices/FP4.yml index 1a005ea2..e8d8a5af 100644 --- a/v2/devices/FP4.yml +++ b/v2/devices/FP4.yml @@ -9,12 +9,12 @@ user_actions: description: "Please check that your device is a Fairphone 4 (FP4)." confirm_os: title: "Confirm OS version" - description: "Your device must be running the Fairphone OS version of Android 11 before installing Ubuntu Touch. With a previously installed custom ROM, it won't work!" - link: "https://support.fairphone.com/hc/en-us/articles/4405858261777" + description: "Your device must be running the Fairphone OS version of Android 11 before installing another operating system. With a previously installed custom ROM, it won't work!" + link: "https://support.fairphone.com/hc/en-us/articles/18896094650513-Installing-Fairphone-OS-Manually" unlock_phone: title: "Unlock the bootloader" - description: "Before installing Ubuntu Touch you must unlock the bootloader of your phone manually. Follow the steps in the linked page if you haven't already." - link: "https://support.fairphone.com/hc/en-us/articles/10492476238865" + description: "Before installing another operating system you must unlock the bootloader of your phone manually. Follow the steps in the linked page if you haven't already." + link: "https://support.fairphone.com/hc/en-us/articles/10492476238865-Manage-the-Bootloader" bootloader: title: "Reboot to Bootloader" description: "With the device powered off, press and hold the VOLUME DOWN button and plug the device into your PC via USB. After some seconds you'll see the fastboot mode." From 8422520d6b37957ed73a55e640328a312516ea4d Mon Sep 17 00:00:00 2001 From: Luca Weiss Date: Sun, 10 Mar 2024 20:35:49 +0100 Subject: [PATCH 2/2] FP4: Add bootloader unlock check & set_active for postmarketOS Similar to the Ubuntu Touch installation steps, for postmarketOS the bootloader needs to be unlocked. Also making sure we use the _a partition can't be a bad idea. --- v2/devices/FP4.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/v2/devices/FP4.yml b/v2/devices/FP4.yml index e8d8a5af..d1277520 100644 --- a/v2/devices/FP4.yml +++ b/v2/devices/FP4.yml @@ -217,12 +217,28 @@ operating_systems: postmarketos:interfaces: prerequisites: [] steps: + ### Ensure we always start in bootloader mode - actions: - adb:reboot: to_state: "bootloader" fallback: - core:user_action: action: "bootloader" + ### Ensure the bootloader has been unlocked already + - actions: + - fastboot:wait: + - actions: + - fastboot:assert_var: + variable: "unlocked" + value: "yes" + fallback: + - core:user_action: + action: "unlock_phone" + ### As this is an A/B device, force all future operations in "a" slot. + - actions: + - fastboot:set_active: + slot: "a" + ### Flash partitions - actions: - postmarketos:download: - fastboot:erase: