TLDR: if you just want my image: here you go
p-boot is a project by megi. It aims to be a small, fast graphical bootloader for the Pinephone. You may have seen it before if you've tried megi's multi distro image.
megi currently only makes the multi distro image which currently has 15 distros. However, you may want to add in your own list of distros. I personally wanted to make an image with only Jumpdrive and the option to boot to eMMC.
There's a chance your distro of choice will be setup to correctly build images, but I was running into many issues running Ubuntu 20.04. So, I setup a vagrant setup
vagrant init, and make a Vagrantfile. this one will make a basic arch setup with a synced_folder
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "archlinux/archlinux"
config.vm.synced_folder "./data", "/vagrant_data"
end
vagrant up
vagrant ssh
sudo pacman -Sy
sudo pacman -S git wget
Now that you have a basic setup up and running, you can download the actual code.
mkdir builds
mv ppd.tar.gz builds/
cd builds/
tar xvf ppd.tar.gz
cd ..
git clone https://megous.com/git/p-boot
git clone https://megous.com/git/pinephone-multi-boot
There's a few modifications you have to make in order for the code to work
ppd-5.14 to whatever version you downloaded
sed -i 's/ppd-\d-\d\d/ppd-5.14/g' mkimage-boot.sh
distros folder, and remove all the directories that you don't want
argb files in the files folderdistros folder, then make a README file that is actually a bash script that will download and extract the initramfs (check the existing ones for examples)
argb files into the files folder. however, I'm not sure how to do thatconfigIMGSIZE to whatever size you want. (you may have to play around with it to get the appropriate size)
sed -i 's/..\/p-boot\/.build/..\/p-boot\/dist/g' mkimage-boot.sh
Now all you should have to do is run ./download-images.sh to download the distros, and then run ./mkimage.sh to attempt to generate the image. The image will output to /tmp/multi.img by default