Cross-compiling for Debian

The CrossCompiling page contains a lot of useful advice and instructions for cross-compiling software on Debian.

However, following this workflow can sometimes be difficult (particularly when developing new features and/or modifying patches). In order to ease development in such situations, we provide Mobian-specific helpers.

Cross-compiling for Mobian

Prerequisites

There are a few prerequisites you need in order to get the docker image running

When running Debian, the following command should be enough to get you going:

# apt install binfmt-support qemu-user-static

Running the Docker image

Mobian provides a number of Docker images for development. Those images have the Mobian package repository pre-configured and are built for every supported architecture (armhf, arm64 and amd64).

You can execute the following command to start bash in the Docker image:

docker run -u 1000:1000 -i -v <workspace-directory>:/home/debian/build -w /home/debian/build -it registry.salsa.debian.org/mobian-team/docker-images/mobian-builder-arm64:latest bash

<workspace-directory> should be replaced by the directory (in your local filesystem) you want to have available under /home/debian/build (in the Docker environment).

The user password for the user mobian is pass. This can be changed in the Dockerfile from https://salsa.debian.org/Mobian-team/docker-images/-/blob/master/Dockerfile.common if you are building the images yourself.