PinePhone - Instructions for creating a PureOS image for PinePhone
Instructions for creating a PureOS Image for PinePhone by mozzwald
You will need u-boot-tools
package for your distro and it helps to have binfmt
and qemu
packages for chrooting to the image. Paths and devices may be different on your system. Always verify before blindly copying and pasting commands.
Make a new working directory
Download and extract PinePhone phosh image (check for newer releases if you like)
Download and extract PureOS Librem 5 image (check for newer releases if you like)
Make temporary dirs for mounting images
List used loop devices
List all loop devices
The remaining commands should be run with sudo or as root user (sudo su)
Pick an unused loop device (5 in my case) and mount pmOS image with partitions
Pick an unused loop device (6 in my case) and mount PureOS image with partitions
Get pmOS PinePhone bootloader
Put pmOS PinePhone bootloader on PureOS image
Mount partitions
Copy PinePhone kernel & dtb to PureOS image
Copy PinePhone modules to PureOS image
Copy PinePhone firmware to PureOS image
Make u-boot initramfs from PureOS initramfs
Get uboot-script
Compile uboot script
Put helper files into rootfs
If you have binfmt setup for arm64/aarch64 then you can chroot and enable modem service and do whatever else you want. Otherwise this needs done after bootup
Unmount disk images
Copy the new image to SD card
Optionally resize PureOS Root partition on SD card
Put in PinePhone and boot. WIN!
Last updated