Customization
This project has been designed so that the content integrated into the Raspberry Pi 4 image can be modified 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 rpi4.config.
This line controls the partition sizes:
OPT_PART_SIZES='70:3072:32000'
The first number controls the boot partition size, the second controls the system partition size, and the third controls the data partition size. The third 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).
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.
Note that 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
If you want to customize the project by adding or removing packages installed from the QSC, there are some important items to take into account before you try this, as mentioned below.
qsc_install_packages.list
This file contains the list of packages that are installed at the beginning of the build to setup 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 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.02005T202411230033L
Removing the following packages breaks Wi-Fi:
# Section 6: WI-FI packages com.qnx.qnx800.target.net.wpa_supplicant_2.10.iosock/0.0.1.00135T202311191043L
Removing 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.00106T202312020421L
If 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 that no attempt is made to remove 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 rollback a change to get back to a stable state.
qsc_packages.mk
This Makefile controls installing the local QNX SDP installation for the build, all required QSC packages, and builds the base BSP, containing some components needed for the image.
Two of the 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_file
This 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 qnx800
Remember to execute the corresponding
clean_qnx800
target 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
Folder | About | Repo |
---|---|---|
assets | The assets folder 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 Raspberry Pi 4 image. | https://gitlab.com/qnx/custom-target-image-builds/raspberry-pi-4-qnx-8.0/-/tree/release/CTI-8.0.2/assets |
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. | https://gitlab.com/qnx/custom-target-image-builds/raspberry-pi-4-qnx-8.0/-/tree/release/CTI-8.0.2/boot |
snippets | The snippets folder contains snippets of buildfiles that are combined with some boilerplate build segments to generate final build files for these partitions:
| https://gitlab.com/qnx/custom-target-image-builds/raspberry-pi-4-qnx-8.0/-/tree/release/CTI-8.0.2/snippets |
src | The src folder Makefile controls what open source projects are downloaded, built, and readied for integration into the image. | https://gitlab.com/qnx/custom-target-image-builds/raspberry-pi-4-qnx-8.0/-/tree/release/CTI-8.0.2/src |
system | The system folder can contain either pre-built binaries, or configuration files and assets separate from built or installed binaries. | https://gitlab.com/qnx/custom-target-image-builds/raspberry-pi-4-qnx-8.0/-/tree/release/CTI-8.0.2/system |