compressed artifcats
All checks were successful
image / image (push) Successful in 1h54m35s

This commit is contained in:
Jorijn van der Graaf 2026-08-10 10:40:50 +02:00
commit bebf66f4fd
3 changed files with 38 additions and 10 deletions

View file

@ -26,12 +26,19 @@ carriers are very welcome.
## Flashing ## Flashing
Download `boot.img` and `fairphone-fp6.img` from the latest release and unlock Download `fp6-img.tar.xz` from the latest release and unlock the bootloader
the bootloader ([Fairphone's official process](https://support.fairphone.com/hc/en-us/articles/10492476238737)). ([Fairphone's official process](https://support.fairphone.com/hc/en-us/articles/10492476238737)).
**Install**: with the phone in fastboot mode, **Install**: with the phone in fastboot mode,
run [`install.sh`](install.sh) (also attached to every release) from the
directory holding the two images. ```sh
tar xf fp6-img.tar.xz
cd fp6-img
./install.sh
```
[`install.sh`](install.sh) and this README are attached to every release
uncompressed as well, so you can read them before committing to the download.
It erases dtbo, flashes the rootfs, **RAM-boots** the kernel (`fastboot It erases dtbo, flashes the rootfs, **RAM-boots** the kernel (`fastboot
boot` — verified to write nothing), writes the boot partition from inside boot` — verified to write nothing), writes the boot partition from inside

View file

@ -34,7 +34,8 @@ if [ "$(id -u)" = 0 ]; then
# reads channels.cfg from origin/master (upstream pmaports moved to main). # reads channels.cfg from origin/master (upstream pmaports moved to main).
# multipath-tools: kpartx; util-linux: losetup with --json support # multipath-tools: kpartx; util-linux: losetup with --json support
# (pmbootstrap's host-tool checks + image mounting need both) # (pmbootstrap's host-tool checks + image mounting need both)
apk add -q git sudo openssl python3 py3-pip multipath-tools util-linux apk add -q git sudo openssl python3 py3-pip multipath-tools util-linux \
tar xz
pip install -q --break-system-packages \ pip install -q --break-system-packages \
git+https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git@3.11.1 git+https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git@3.11.1
# The container cannot modprobe (no /lib/modules in here), but it doesn't # The container cannot modprobe (no /lib/modules in here), but it doesn't
@ -175,8 +176,6 @@ pmbootstrap install --password 147147
EXPORT=/tmp/postmarketOS-export EXPORT=/tmp/postmarketOS-export
rm -rf "$EXPORT" rm -rf "$EXPORT"
pmbootstrap export "$EXPORT" pmbootstrap export "$EXPORT"
cp -L "$EXPORT/boot.img" dist/boot.img
cp -L "$EXPORT/fairphone-fp6.img" dist/fairphone-fp6.img
{ {
echo "kernel: $KERNEL_REPO $KERNEL_BRANCH @ $COMMIT" echo "kernel: $KERNEL_REPO $KERNEL_BRANCH @ $COMMIT"
@ -187,5 +186,24 @@ cp -L "$EXPORT/fairphone-fp6.img" dist/fairphone-fp6.img
cp README.md dist/README.md cp README.md dist/README.md
cp install.sh dist/install.sh cp install.sh dist/install.sh
# The images ship as one archive, not as loose files: the rootfs is 3.0 GiB
# raw and 812 MiB under xz -6 (gzip -6 stops at 1144 MiB), and a bundle makes
# it impossible to pair a boot.img with a rootfs from a different build.
# README/install.sh/build-info stay loose in dist too, so they can be read
# before committing to the download.
#
# pmbootstrap export writes symlinks into its work dir; tar -h resolves them,
# so the archive is built without a second 3 GiB copy on disk.
STAGE="$WORK/stage"
rm -rf "$STAGE"
mkdir -p "$STAGE/fp6-img"
ln -s "$EXPORT/boot.img" "$STAGE/fp6-img/boot.img"
ln -s "$EXPORT/fairphone-fp6.img" "$STAGE/fp6-img/fairphone-fp6.img"
cp dist/build-info.txt dist/README.md dist/install.sh "$STAGE/fp6-img/"
# sums of the extracted contents (the outer sha256sums.txt covers the archive)
(cd "$STAGE/fp6-img" && sha256sum -- * > sha256sums.txt)
tar -C "$STAGE" -chf - fp6-img | xz -T0 -6 > dist/fp6-img.tar.xz
rm -rf "$STAGE"
(cd dist && sha256sum -- * > sha256sums.txt) (cd dist && sha256sum -- * > sha256sums.txt)
ls -la dist/ ls -la dist/

View file

@ -17,7 +17,8 @@
# #
# Requirements on this machine: fastboot, ssh. Phone: bootloader unlocked, # Requirements on this machine: fastboot, ssh. Phone: bootloader unlocked,
# in fastboot mode (Vol-down + Power), connected over USB. # in fastboot mode (Vol-down + Power), connected over USB.
# Run from a directory containing boot.img and fairphone-fp6.img. # Run from the directory the release archive extracts to:
# tar xf fp6-img.tar.xz && cd fp6-img && ./install.sh
PHONE=172.16.42.1 PHONE=172.16.42.1
BOOT=${BOOT:-boot.img} BOOT=${BOOT:-boot.img}
@ -29,8 +30,10 @@ die() { printf 'ERROR: %s\n' "$*" >&2; exit 1; }
# --- preflight --------------------------------------------------------------- # --- preflight ---------------------------------------------------------------
command -v fastboot >/dev/null || die "fastboot not found (install android-tools)" command -v fastboot >/dev/null || die "fastboot not found (install android-tools)"
command -v ssh >/dev/null || die "ssh not found" command -v ssh >/dev/null || die "ssh not found"
[ -f "$BOOT" ] || die "$BOOT not found (download it from the release)" [ -f "$BOOT" ] || die "$BOOT not found - run this from the extracted fp6-img
[ -f "$ROOTFS" ] || die "$ROOTFS not found (download it from the release)" directory (tar xf fp6-img.tar.xz && cd fp6-img)"
[ -f "$ROOTFS" ] || die "$ROOTFS not found - run this from the extracted fp6-img
directory (tar xf fp6-img.tar.xz && cd fp6-img)"
# NEVER pipe fastboot into grep -q or anything that exits early: the reader # NEVER pipe fastboot into grep -q or anything that exits early: the reader
# quitting mid-output SIGPIPEs fastboot to death mid-transaction and leaves # quitting mid-output SIGPIPEs fastboot to death mid-transaction and leaves
# the bootloader's fastboot state machine wedged - the NEXT command then # the bootloader's fastboot state machine wedged - the NEXT command then