Guidelines/HowToDevelopOnDevices
This document aims to explain how to develop on devices running the reference Apertis images.
Which image to choose
The APT-based images like apertis_18.09-minimal-amd64-uefi_18.09.0.img.gz
and apertis_18.09-target-amd64-uefi_18.09.0.img.gz
are the ones providing all the flexibility needed for development, letting developers install and remove packages, and otherwise customize the rootfs.
The OSTree-based images are tailored as a reference for product deployments: their constraints make installing and removing packages impossible, and the more care must be taken to get write access to the rootfs managed by OSTree.
Making a device suitable for development
Apertis device images come with some restriction out-of-the-box when trying to develop directly on them:
- only the
target
APT repository is enabled by default, while most of the useful development tools are in the `development` repository - the rootfs is mounted read-only
- some utilities are kept to a older, less featureful versions since the newer ones switched to GPLv3
To easily overcome these issues, Apertis images ship the apertis-dev
tool:
$ sudo apertis-dev --help
usage: sudo apertis-dev [OPTIONS]
Enable debugging and basic development.
OPTIONS are:
-b|--build: install basic build tools
-d|--build-dep PACKAGE: install build-deps of PACKAGE
-g|--debug: install basic debugging tools
-3|--gpl3: install GPL3 versions of tar, coreutils
--enable-debug: enable debug logging from applications
--disable-debug: disable debug logging from applications
For developer use only: do not do this in production.
For instance, to install gdbserver
, run:
$ sudo apertis-dev
$ sudo apt install gdbserver
Building software
The recommended environment to build platform packages and application bundles is the Apertis SDK.
However, it is also possible to build software on the devices directly with the preparation steps below:
$ sudo apertis-dev --build --gpl3
$ sudo apt install apertis-dev-tools