Skip to content

Commit

Permalink
devices: Add config for Fairphone 5
Browse files Browse the repository at this point in the history
Add the ability to install postmarketOS on the device using the
installer.
  • Loading branch information
z3ntu committed Mar 10, 2024
1 parent 5cf5c67 commit 2789393
Showing 1 changed file with 85 additions and 0 deletions.
85 changes: 85 additions & 0 deletions v2/devices/FP5.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: "Fairphone 5"
codename: "FP5"
formfactor: "phone"
aliases: ["fp5"]
doppelgangers: []
user_actions:
confirm_model:
title: "Confirm your model"
description: "Please check that your device is a Fairphone 5 (FP5)."
confirm_os:
title: "Confirm OS version"
description: "Your device must be running the Fairphone OS version of Android 13 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 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."
image: "phone_power_down"
button: true
unlock:
- "confirm_model"
- "confirm_os"
- "unlock_phone"
operating_systems:
- name: "postmarketOS"
codename: "fairphone-fp5"
compatible_installer: ">=0.9.8-beta"
options:
- var: "release"
name: "Release"
tooltip: "The postmarketOS release"
link: "https://wiki.postmarketos.org/wiki/Releases"
type: "select"
remote_values:
postmarketos:releases:
- var: "interface"
name: "User Interface"
tooltip: "The user interface"
link: "https://wiki.postmarketos.org/wiki/Category:Interface"
type: "select"
remote_values:
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:
partition: "dtbo"
- fastboot:erase:
partition: "vendor_boot"
- fastboot:flash:
partitions:
- partition: "userdata"
file: "rootfs.img"
group: "postmarketOS"
- partition: "boot"
file: "boot.img"
group: "postmarketOS"
- fastboot:continue:
slideshow: []

0 comments on commit 2789393

Please sign in to comment.