These instructions describe how to build a QNX Apps and Media target image for i.MX6x SABRE Smart Devices platforms.
Before building your target image, you should understand the available scripts and configuration files, and prepare your working environment, as described in "Setting up." You should also understand the general procedure for extracting and building a BSP, as discussed in "Board Support Packages (BSPs)." Be aware, however, that the steps that follow are not the same as the general BSP build steps.
To build your own QNX Apps and Media image for Freescale i.MX6x SABRE Smart Devices platforms, on your host system:
Set up the environment variables for the QNX SDP, and the development environment for QNX Apps and Media:
Linux:
# source base_dir/qnx660-env.sh
Windows:
base_dir\qnx660-env.bat
where base_dir is the directory where you installed the QNX 6.6.0 SDP.
Set the QNX_QT environment variable to the location of the Qt runtime on your host system:
Linux:
export QNX_QT=qt_base_dir/QNX-qt/Qt-5.3.1-armle-v7
Windows:
set QNX_QT=qt_base_dir\QNX-qt\Qt-5.3.1-armle-v7
Extract a BSP, then copy everything from the /prebuilt directory to the board-specific directory in the $QNX_DEPLOYMENT_WORKSPACE path, as follows. We'll refer to the directory where you extracted the BSP as bsp_dir:
cd bsp_dir
cp -r prebuilt/* $QNX_DEPLOYMENT_WORKSPACE/target/boards/imx61sabresmart/
From the BSP directory, run make, then from the /images subdirectory, run mkflashimage to generate an IPL:
Linux:
cd bsp_dir make cd bsp_dir/images mkflashimge
Windows:
cd bsp_dir make cd bsp_dir/images sh mkflashimge
This utility script is shipped in the BSP. It creates the IPL as the following binary file:
bsp_dir/images/ipl-mx6q-sabresmart.bin
mkdir output_dir
From the $QNX_DEPLOYMENT_WORKSPACE/infra/utils/scripts/ directory, run the following command to generate a system image file (.img):
Linux:
mksysimage.sh -P AnM -o output_dir imx61sabresmart.ext -f
Windows:
mksysimage.bat -P AnM -o output_dir imx61sabresmart.ext -f
where output_dir is the location of the new image.
Copy the IPL to offset 1024 of the image file (.img) you just created:
dd if=bsp_dir/images/ipl-mx6q-sabresmart.bin of=output_dir/imx61sabresmart-sd.img bs=512 seek=2 skip=2 conv=notrunc
You should now have an image file (.img) ready to write to a micro SD card so you can transfer it to your target. For instructions, see "Downloading and transferring a reference image."