Getting started
Clone and configure
To clone and configure this project, use the following steps:
Clone the custom target image repo from GitLab:
git clone https://gitlab.com/qnx/custom-target-image-builds/repo.gitExport the path to the qnxsoftwarecenter_clt executable according to your installation location. For example:
export QSC_CLT_PATH=$HOME/qnx/qnxsoftwarecenter/qnxsoftwarecenter_cltCreate a file called options_file and populate it with:
-myqnx.user <username> -myqnx.password <password>Replace the placeholders with your qnx.com credentials.
This file provides your credentials to QNX Software Center (QSC) to install required packages locally for the image build. Take care not to share this file with others or commit it to a fork of this project.
Run the following
makecommand for your target:- Raspberry Pi 4 —
make TARGET=rpi4 - Raspberry Pi 5 —
make TARGET=rpi5 - QEMU —
make TARGET=qemu(refer to "QEMU build options" below to control how QEMU is generated)
Note:- The first build can take 30 minutes or more.
- A separate installation of the QNX Software Development Platform (SDP) is installed within the project folder. The separate SDP installation is also used to build the open-source projects integrated into the build.
- Due to the size of asset packages and projects that are downloaded from the Internet, you'll need approximately 10 GB of free disk space.
- During the build, you'll see output from the different integration, download, and build steps in each of the project subfolders as the build proceeds. This is normal and expected. Some of the steps seen in the initial build are skipped in later builds, because the required artifacts have been downloaded and unpacked in previous builds.
- Raspberry Pi 4 —
If the build is successful, it produces an image file or directory for your given target:
- Raspberry Pi 4 — build/rpi4/rpi4.img
- Raspberry Pi 5 — build/rpi5/rpi5.img
- QEMU — build/qemu/output/disk-qemu
If the image generation isn't successful, refer to the "Troubleshooting" section later in this chapter for more details.
QEMU build options
You can specify the following options to control how the QEMU is generated.
- CTI_QEMU_CPU
Controls the number of CPUs QEMU creates. The default value is 2.
- CTI_QEMU_RAM
Controls the amount of RAM provided to the guest. The default value is 1G. The option includes the amount of RAM (numeric value) and one of the following units (single letter):
Using the Image
Raspberry Pi
You can flash the generated image file using the Raspberry Pi Imager. For more information, refer to the "Flashing the image to a micro SD card" section of the "Quick start target image (QSTI)" chapter.
QEMU
To start and control the QEMU image, use mkqnximage. To access the command, source the QNX development environment into your path. For example:
source qnx800/qnxsdp-env.sh
cd build/qemu
mkqnximage --runThe terminal that starts QEMU becomes a serial console. To get the IP address, you can do one the following:
- Use the serial console to run
ifconfig. - Read the IP address from the Welcome screen.
- Use
mkqnximage --getipfrom a different terminal from within the build/qemu directory.
To exit QEMU, enter Ctrl + A + x into the serial console, or execute mkqnximage --stop in another terminal within the build/qemu directory.
Moving the image
The QEMU target doesn't produce a single image file that you can move or copy to different locations. If you want to move or copy the QEMU image, ensure to keep the following directories under build/qemu as siblings:
- build/qemu/local
- build/qemu/output
For example, to create an archive to around, execute:
tar czvf /tmp/cti_qemu.tar.gz -C build/qemu local output