Building the SDK

From AsteroidOS
Revision as of 14:41, 3 September 2023 by Beroset (talk | contribs) (prettify Related pages)

The Software Development Kit (SDK) for AsteroidOS is a set of tools and libraries for developing software to run on AsteroidOS. Since AsteroidOS is a Linux distribution, you can use just about any programming language to develop software, but most of the core applications use a combination of C++ and Qt, with CMake to build. To get things running quickly, it's recommended to download and install the prebuilt version as described in Installing the SDK. This page describes how to build the SDK from source. Be aware that this can take several hours, even on a fast computer. There are two choices to build the SDK: build natively without software containers or build within a software container (such as docker or podman).

Building natively requires somewhat fewer resources (memory and disk space) than building with containers but requires software, such a compilers and other tools, to be installed on the host system. Since these software packages are different for each Linux distribution, this method requires more knowledge and patience to install required software that might not already be installed on your host computer.

The alternative, building with software containers, is somewhat more simpler in that the required software is only installed within the container and not on your host computer, but it requires much more time to compile everything. Still, this may be preferable for people who wish to keep the build environment isolated from the host computer.

Building the Cross Compilation Toolchain

If you’ve already got an OpenEmbedded build directory via the Building AsteroidOS page, cd to that directory. Else, create one with:

Build without containers

git clone
cd asteroid/

Then, build the cross compilation toolchain with:

source ./ dory
bitbake meta-toolchain-qt5

Build with containers

Assuming you already prepared a docker or podman build environment as described in Building AsteroidOS, build the SDK like so:

sudo docker rm -f asteroidos-toolchain
sudo docker run -it \
  --name asteroidos-toolchain \
  -v /etc/passwd:/etc/passwd:ro \
  -u "$(id -u):$(id -g)" \
  -v "$HOME/.gitconfig:/$HOME/.gitconfig:ro" \
  -v "$(pwd):/asteroid" asteroidos-toolchain \
  bash -c "source ./ dory && bitbake meta-toolchain-qt5"


podman run --rm -it \
  -v "$(pwd)":/asteroid:z \
  --userns keep-id asteroidos-toolchain \
  bash -c "source ./ dory && bitbake meta-toolchain-qt5"

Install the SDK

Whether you have built with or without containers, if the process was successful, you should have an SDK installation script tmp-glibc/deploy/sdk/ (relative to the build> directory). Follow these steps to install the SDK.

Related pages

installing the SDK

Building AsteroidOS

Creating an Asteroid app