From 8422520d6b37957ed73a55e640328a312516ea4d Mon Sep 17 00:00:00 2001 From: Luca Weiss Date: Sun, 10 Mar 2024 20:35:49 +0100 Subject: [PATCH] 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: