Customization
This chapter shows you how to modify the content integrated into the CTI to suit your needs.
Resizing partitions
As you customize this project with additional assets and open-source software, you may need to increase the size of the system partition. You may also need to resize the data partition if you integrate assets into it.
The maximum partition sizes are defined in the target's configuration file:
- Raspberry Pi 4 — targets/rpi4/mkqnximage.config
- Raspberry Pi 5 — targets/rpi5/mkqnximage.config
The following line controls the partition sizes:
OPT_PART_SIZES='70:3072:32000'To resize a partition, you need to reassign OPT_PART_SIZES in the configuration file, where:
- The first number controls the boot partition size.
- The second controls the system partition size.
- The third controls the data partition size. This size is optional, as the default behavior is to create a data partition that fills the available space.
The numbers represent multiples of 2048 sectors that are 512 bytes in size. The above sizing is meant to fit on a 32 GB SD card (the data size partition is slightly too large, but the boot mechanism that creates the file system partitions ensures that the actual partition size doesn't exceed what is available on the SD card).
Resizing partitions on a larger SD card
If you have a larger SD card, such as a 64 GB SD card, you can roughly double the size of the data partition as follows:
OPT_PART_SIZES='70:3072:62000'Then, run the build again. If you flash the resulting image to a 64 GB SD card and boot up a device with the image, then the data partition has roughly double the number of blocks.
Increasing either the system partition size or data partition size doesn't generate a larger overall image size. Integrating extra content increases the size of the generated image file proportionally to the size of the extra content integrated.
Adding or changing QNX Software Center (QSC) packages
You can add or change packages by editing qsc_install_packages.list and qsc_packages.mk.
The qsc_install_packages.list file contains the list of packages that are installed at the beginning of the build to set up a local QNX SDP installation for the build.
Adding extra packages shouldn't break the build immediately. However, you need to perform extra steps to integrate package contents for additional packages into the image. Refer to the "snippets" and "system" sections in this chapter for more details on which snippets would have to be updated to integrate the content from new packages.
Removing packages
Removing packages is somewhat tricky because:
Some packages are essential to build integrity and should never be removed. Packages that you should never remove include:
# Section 8: RaspBerry PI 4-specific packages com.qnx.qnx800.bsp.hw.raspberrypi_bcm2711_rpi4/0.0.1.00198T202406181654L com.qnx.qnx800.target.pci.hw.bcm2711/3.0.0.02005T202411230033LRemoving the following packages breaks Wi-Fi:
# Section 6: WI-FI packages com.qnx.qnx800.target.net.wpa_supplicant_2.10.iosock/0.0.1.00135T202311191043LRemoving the following packages breaks Screen functionality (with extra snippet removals, this may be acceptable for advanced users trying to generate an image for a headless RPI 4 operating system):
# Section 4: Screen / Graphics / HID packages com.qnx.qnx800.target.screen.img_codecs/0.0.1.00077T202410011913L com.qnx.qnx800.target.screen.device_input_screen/4.0.2.00132T202501161817L com.qnx.qnx800.target.screen.screen_utils/4.0.2.00132T202501161817L com.qnx.qnx800.target.screen.board.drm/4.0.2.00132T202501161817L com.qnx.qnx800.target.screen.board.rpi4/4.0.1.00106T202312020421LIf you clean your project and rebuild after removing packages without updating snippets, then you'll likely encounter warnings of missing files preventing the image from being created. The only way to get past this is to find the entries in the snippets for those files and removing them.
Note:It's highly recommended not to remove any QSC packages until you are more familiar with the project and understand the purpose of the packages included by default. You should also know how to roll back a change to get back to a stable state.
qsc_packages.mk
After you've added or removed the packages from qsc_install_packages.list, you can control the installation of the local QNX SDP and build the base BSP using the qsc_packages.mk Makefile.
Two of the make targets of interest to manage the SDP installation are:
- clean_qnx800
The target in qsc_packages.mk looks like:
clean_qnx800: $(QSC_CLT_PATH) -uninstallBaseline $(STAGE_QNX_SDP)Executing this target safely uninstalls the local QNX SDP installation. If anything goes wrong during the SDP installation, or you need to clean it to reinstall with updates, run:
make clean_qnx800- qnx800
The target in qsc_packages.mk looks like this:
$(STAGE_QNX_SDP): $(INSTALL_PACKAGES_LIST) options_file $(QSC_CLT_PATH) -mirrorBaseline qnx800 @options_file $(QSC_CLT_PATH) -setExperimentalEnabled=true -setPolicy=conservative -destination $(STAGE_QNX_SDP) -importAndInstall $(INSTALL_PACKAGES_LIST) @options_fileThis target installs a local QNX SDP baseline installation, then installs the QSC packages required for the image build. To execute the target on its own, run:
make qnx800Remember to execute the corresponding
clean_qnx800target first to ensure reliable installation.
To learn more about how to use the QNX Software Center (QSC) Command Line Tool, refer to the "Using the QNX Software Center Command Line" section of the QNX Software Center documentation.
Folders
You can use the following folders to control assets, snippets, and other important system files:
| Folder | About |
|---|---|
| assets | The assets folder's Makefile integrates additional assets such as fonts and icons into the image. These may be required for the extra applications you may want to integrate into your CTI. |
| boot | The boot folder contains files that are added to the boot partition. Its Makefile also downloads required firmware from their source repos on GitHub during the build. |
| snippets | The snippets folder contains snippets of buildfiles that are combined with some boilerplate build segments to generate final buildfiles for these partitions:
|
| src | The src folder's Makefile controls what open-source projects are downloaded, built, and readied for integration into the image. |
| system | The system folder can contain either pre-built binaries, or configuration files and assets separate from built or installed binaries. |
| targets | The targets folder contains the essential files needed to build a given target. |
