2017-05-26 20:09:50 +00:00
# pmbootstrap
2017-05-26 20:13:15 +00:00
Sophisticated chroot/build/flash tool to develop and install [postmarketOS ](https://ollieparanoid.github.io/post/postmarketOS ).
2017-05-26 20:09:50 +00:00
2017-05-28 01:04:45 +00:00
[Static code analysis ](https://github.com/postmarketOS/pmbootstrap/blob/master/test/static_code_analysis.sh ) status: [![travis badge ](https://api.travis-ci.org/postmarketOS/pmbootstrap.png?branch=master )](https://travis-ci.org/postmarketOS/pmbootstrap)
2017-05-28 01:01:27 +00:00
2017-05-26 20:09:50 +00:00
## Requirements
* GNU/Linux
* Python 3
2017-05-27 23:13:29 +00:00
* OpenSSL
2017-05-26 20:09:50 +00:00
## Usage
2017-05-27 22:57:21 +00:00
**Check out the [porting guide ](https://github.com/postmarketOS/pmbootstrap/wiki/Porting-to-a-new-device ) for a practical start!**
2017-05-26 20:43:36 +00:00
Run `./pmbootstrap.py init` first, to select a target device and the work folder, which will contain all the chroots and other data.
2017-05-26 20:09:50 +00:00
After that, you can run any command. All dependencies (e.g. chroots) will be installed automatically, if they are not available yet.
Here are some examples:
2017-05-26 20:40:30 +00:00
`./pmbootstrap.py --help` :
2017-05-26 20:09:50 +00:00
List all available commands
2017-05-26 20:40:30 +00:00
`./pmbootstrap.py log` :
2017-05-26 20:09:50 +00:00
Run tail -f on the logfile, which contains detailed output. Do this in a second terminal, while executing another `pmbootstrap` command to get all the details.
2017-05-26 20:40:30 +00:00
`./pmbootstrap.py chroot` :
2017-05-26 20:09:50 +00:00
Open a shell inside a native Alpine Linux chroot (~6 MB install size).
2017-05-26 20:40:30 +00:00
`./pmbootstrap.py chroot --suffix=buildroot_armhf` :
2017-05-26 20:09:50 +00:00
Open a shell inside an `armhf` Alpine Linux chroot, with qemu user mode emulation and binfmt support automatically set up.
2017-05-26 20:40:30 +00:00
`./pmbootstrap.py build heimdall` :
2017-05-26 20:09:50 +00:00
Build the "heimdall" package (specify any package from the `aports` -folder here).
2017-05-26 20:40:30 +00:00
`./pmbootstrap.py build heimdall --arch=armhf` :
2017-05-26 20:09:50 +00:00
Build the "heimdall" package for `armhf` inside the `armhf` chroot, with the cross-compiler installed in the native chroot (chroots are connected via distcc).
2017-05-26 20:40:30 +00:00
`./pmbootstrap.py install` :
2017-05-26 20:09:50 +00:00
Generate a system image file with a full postmarketOS installation. All required packages get built first, if they do not exist yet. You will get asked for the "user" password and the root partition password.
2017-05-26 20:40:30 +00:00
`./pmbootstrap.py install --sdcard=/dev/mmcblk0` :
2017-05-26 20:09:50 +00:00
Format and partition the SD card `/dev/mmcblk0` , and put a full postmarketOS installation on it
## Testsuite
2017-05-26 20:13:15 +00:00
Simply install `pytest` (via your package manager or via pip) and run it inside the pmbootstrap folder.
2017-05-28 01:01:27 +00:00