Note re: qemu-user-static and binfmt

This commit is contained in:
Tony Garnock-Jones 2022-07-22 10:12:48 +02:00
parent c3af8c2095
commit d8ea641baf
1 changed files with 11 additions and 0 deletions

View File

@ -30,6 +30,13 @@ Synit builds upon many existing technologies, but primarily relies on the follow
- Make, a C compiler, and so on; standard Unix programming tools.
- <a id="binfmt"></a>For cross builds (e.g. the very common case of building for `aarch64` on
an `x86_64` host), `qemu` and its `binfmt` support. On Debian, `apt install binfmt-support
qemu-user-static`. (**NB.** Version `1:7.0+dfsg-7` of `qemu-user-static` has a bug (possibly
[this one](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1014177)) which makes
Docker-based cross builds hang. *Downgrading* `qemu-user-static` to version
`1:5.2+dfsg-11+deb11u2` worked for me.)
- Source code for Synit components (see below).
- A standard PostmarketOS distribution for the target computer or mobile phone. If you don't
@ -71,6 +78,10 @@ To build, type `make ARCH=`*\<architecture\>* in the root of your checkout, wher
- `aarch64` (default), for e.g. Pinephone or Samsung Galaxy S7 deployment
- `x86_64`, for e.g. `qemu-amd64` deployment
If you see errors of the form "`exec /bin/sh: exec format error`" while building, say, the
`aarch64` packages using an `x86_64` build host, you need to install qemu's binfmt support. See
[above](#binfmt).
The result of the build will be a collection of Alpine Linux `apk` packages in
`packaging/target/packages/`*\<architecture\>*`/`. At the time of writing, these include