pmboootstrap is the central tool to develop and install postmarketOS. It works using Alpine chroots to avoid installing software on the host's machine. It works well on any Linux distribution, but preforms poorly on WSL. If you are using Windows, you should set up a dual boot or use a VM.
refer to the installation page.
Example Development Workflows
This doesn't concern installation for an existing device. For that refer to the installation guide. It will be useful for working on postmarketOS packages and when one want to port postmarketOS to a new device (along with the porting guide).
Developing packages with pmbootstrap
When developing postmarketOS packages, you will want to keep the package definition at hand. For that, you can move the pmaports repository to an accessible location, using for example:
$ olddir="$(pmbootstrap config aports)" $ newdir="$HOME/pmaports" $ mv "$olddir" "$newdir" $ pmbootstrap config aports "$newdir"
or just the last command, if you don't have something to save yet.
When you are editing packages and want to test the modifications, you will maybe notice that pmbootstrap doesn't rebuild the package, as it already built a package with the same version number and revision. To force a rebuild, don't increment the pkgrel. Instead, use
pmbootstrap build --force package-name.
Before uploading a package you just created, you may use
pmbootstrap build --force --strict to check that the dependencies you specified are sufficient to build the package.
Developing pmbootstrap itself