Pmbootstrap
pmbootstrap is the abootstrap fork from postmarketOS
it has quite some changes, and using it can be a little confusing
to install pmbootstrap run : pip3 install --user pmbootstrap
quick tips to get started building postmarketOS for your phone and how to use pmbootstrap
first you need to initialize pmbootstrap by running : pmbootstrap init
to update to pull the latest changes from git with pmbootstrap run : pmbootstrap pull
its best to choose the default paths in the initialisation, when customising the path i had some issues
to create a adb sideload flashable zip run :
pmbootstrap install --android-recovery-zip --recovery-install-partition=data
the install
part creates the pmbootstrap installation
the --android-recovery-zip
creates a recovery flashable zip
--recovery-install-partition=data
chooses what partition to use for your install the default is system, you can use data for a bigger single partition
to export a flashable zip run : pmbootstrap export
it will be exported to : /tmp/postmarketOS
Develop
if you want to make changes to the packages in your build go to /home/$USER/.local/var/pmbootstrap/cache_git/pmaports
a easy way to access the build files is to symlink it to a easy accessible location like workspace in your homedir.
to create a workspace and symlink the the pmaports directory do :
mkdir /home/$USER/workspace
ln -s /home/$USER/.local/var/pmbootstrap/cache_git/pmaports /home/$USER/workspace/
to fork the repo go to gitlab create a account add a ssh key and click the fork button
if you want to keep your own fork of the pmaports its useful to add your fork to the git remotes so you can push your changes run :
git remote add pmaports-fork git@gitlab.com:$USER/pmaports.git
to push your changes to your fork just run :
git push pmaports-fork
if you want to make changes to a package make them in the package directory, when you are done with your changes run : pmbootstrap checksum packagename
if its a change without upgrade you will need to update the rel version in the APKBUILD file
a easy way to do that is to run : pmabootstrap pkgrel_bump
to test your changes run : pmabootstrap build packagename