Add a new architecture to postmarketOS
Appearance
If you would like to port to a device architecture, that is supported by Alpine, but not by postmarketOS, you can bootstrap the architecture in pmOS with the following steps.
- Run this to avoid querying the pmOS repos for the new architecture and therefore failing.
$ pmbootstrap config mirrors.pmaports none $ pmbootstrap config mirrors.systemd none
- Add the architecture to
build_device_architectures
inpmb/core/arch.py
and add it to the test cases inpmb/core/test_arch.py
. - Create aports for cross compilation (replace
armhf
with your new architecture):$ pmbootstrap aportgen gcc-armhf musl-armhf
- Try to build one package for the new architecture. pmbootstrap will build necessary packages first, such as the cross compiler. If you get any Python errors, you might need to adjust architecture mappings in
pmb/core/arch.py
.$ pmbootstrap build hello-world --arch=armhf
- Build your device's
linux-...
package.$ pmbootstrap build linux-samsung-i9100
- Do a full installation:
$ pmbootstrap install
If everything worked out, please make one separate merge request to add the new architecture and mention there which device you have ported. After that merge request is through, make another one for the device.