Building PELUX sources¶
This chapter details how to download and configure the sources of a PELUX build, so that an image can be built.
To obtain a PELUX release, simply download the manifest (pelux.xml) used for building, and decide what image to build. Currently there are two versions: core-image-pelux-minimal and core-image-pelux-qtauto-neptune. The latter being a version that includes Qt Automotive Suite components that enable the NeptuneUI demo application.
A note on development images¶
Both PELUX images are available as -dev variants, which include some extra development and debugging tools.
It should be noted that the regular image is not a production ready image. For a production project, it is recommended to create an image that can be based on the PELUX image to begin with, but one will probably want to create a custom image eventually, as the project evolves further and further away from vanilla PELUX. For example, a PELUX-based image has an empty root password and an ssh server installed by default.
Create a directory for the PELUX build. Instruct repo tool to fetch a manifest
using the command repo init. In this context, branch denotes what branch of
git repo pelux-manifests to use. If you want to use a released version of
PELUX, use the SHA id of the commit pointed to by the release tag (or the branch
that the commit lies on). Otherwise,
master is usually a good choice for
Then make repo tool fetch all sources using the command repo sync.
mkdir pelux cd pelux repo init -u https://github.com/Pelagicore/pelux-manifests.git -b <branch> repo sync
|Image name||Variant name|
When done fetching the sources, create a build directory and set up bitbake.
TEMPLATECONF tells the
oe-init-build-env script which path to fetch
configuration samples from.
The example below get the template configuration for the Intel BSP
without Qt Automotive Suite (QtAS). Use
intel-qtauto as the last
part of the path to get QtAS support. The same pattern is used for the
Raspberry Pi BSP (
rpi-qtauto). There is also
experimental support for
TEMPLATECONF=`pwd`/sources/meta-pelux/conf/variant/intel source sources/poky/oe-init-build-env build
The script will create configs if there are no configs present, a message about
conf/bblayers.conf files is normal.
Building the image¶
Finally, build the desired image. See the variables description above for information on the different images.
When the build is complete the result will be available in
tmp/deploy/images/<machine>/. It is possible to generate a number of
different image formats, ranging from just the rootfs as a tarball to ready
disk-images containing EFI-bootloader, configuration and rootfs and that can be
written directly to a storage device. For PELUX, the preferred format for the
Intel NUC are
.wic images, which are complete disk-images. For the Raspberry
Pi 3, the preferred format is
.rpi-sdimg which can be directly written to
the SD card.
Building with Vagrant¶
When we build internally at Pelagicore in our CI system, we use Docker with Vagrant, however only in a GNU/Linux system. It should still work under Windows or OSX, but we haven’t tried it.
- Docker CE
- Virtualization enabled in BIOS
Ubuntu and Debian both have very old versions of Docker in their apt repositories. Follow the steps at docker.io to install the latest version of Docker.
- Clone the pelux-manifests git repository with submodule
git clone --recurse-submodules email@example.com:Pelagicore/pelux-manifests.git
- Start Docker through Vagrant
docker build -t pelux . docker run -d --name pelux-build -v $(pwd):/docker pelux
- Run inside the Docker container
At this point, we recommend using
vagrant ssh and follow the same
instructions as when building locally (but inside the Docker container).
- Move the built images to the host
The directory where you cloned pelux-manifests is bind-mounted to
inside the container, so you can simply run:
cp <YOCTO_DIR>/build/tmp/deploy/images /vagrant
For more detailed steps, refer to the
where we have automated our building of PELUX.