Build a Target Image

To build your own target image:
  1. Set up the environment variables for the QNX development environment:
    • For Linux, enter the following command:
      # source install_location/qnx660-env.sh

      where by default the install_location is $HOME/qnx660/.

    • For Windows, enter the following command:
      install_location\qnx660-env.bat

      where by default the install_location is C:\qnx660.

    As part of the installation process for the QNX CAR platform, a workspace was created for you that contains the scripts and configuration files you'll be using. These files are located in the following locations:

    • Scripts:

      • For Linux: $QNX_CAR_DEPLOYMENT/deployment/scripts/
      • For Windows: %QNX_CAR_DEPLOYMENT%\deployment\scripts

        where QNX_CAR_DEPLOYMENT is install_location/qnx660/deployment/qnx-car/.

    • Configuration files:

      • For Linux: $QNX_CAR_DEPLOYMENT/boards/<platform>/etc/
      • For Windows: %QNX_CAR_DEPLOYMENT%\boards\<platform>\etc
  2. Extract a BSP. For detailed instructions, see "Building a BSP".
  3. Create an output directory where you want to have the image generated.
    Note: You must specify a valid directory name; the directory must exist prior to running the mksysimage.py script, otherwise the image won't be generated.
  4. To generate a target system image, run the appropriate mksysimage.py command.
    • For Linux, enter the following command:
      mksysimage.sh -vvvvvvv -o outputPath platform.external
    • For Windows, enter the following command:
      mksysimage.bat -vvvvvvv -o outputPath platform.external

    where outputPath is the location for the new system image. If this directory isn't empty, run mksysimage.py with the -f option (mksysimage.py won't overwrite existing system images unless -f is specified). Specify a filename according to your platform as shown in the following table:

    Platform Filename
    Texas Instruments OMAP5432 EVM omap5uevm.external
    Texas Instruments J5 ECO EVM811x EVM jacinto5eco.external
    Freescale i.MX6Q SABRE Lite imx61sabre.external

The mksysimage.py utility generates images for various configurations. For example, for SABRE Lite, image files are created for SD and SD/SATA:

The following output shows the results from creating an image for the OMAP5432 board:

[info]: Generating os.version file...
[info] gen-osversion.py: Generated os.version file: [C:\Users\Public\repos\trunk\deployment\qnx-car\
       scripts\..\..\..\target\etc\os.version]
date:		Thu Oct 10 12:06:07 2013
project:	Local Build
buildHost:	WIN-M9DICV29QL6
buildID:	Local Build
buildNum:	Local Build

platform:	omap5uevm.external
car2Branch:	trunk
car2Rev:	7244
externalBranch:	mainline
externalRev:	3171

[info]: Generating qnxcar/system/info PPS file...
[info]: Generating IFS [omap5-sd.ifs]...
** Building omap5-sd.ifs...
** Building omap5-emmc.ifs...
** Building omap5-emmc-sata.ifs...
** Building etc/secondary.ifs...
[info]: Copying Boot IFS: [omap5-sd.ifs] to qnx-ifs...
[info]: Generating Archive...
Locating files...
Writing tar file...
Locating files...
Writing tar file...
[info]: Generating Image...
Open tar: C:\myWork\myimage\omapExample\omap5uevm-os.tar
Open tar: C:\myWork\myimage\omapExample\omap5uevm-dos-sd.tar
Created temporary directory c:\users\admini~1\appdata\local\temp\tmpoklciy
data <-- accounts [dir]
      .
      .
      .

base <-- /etc/system/hmi-notification/policy.cfg [file]
      .
      .
      .
      
data <-- appinfo/menuentry/ApiDemos.bar [file]
data <-- var/pps/system/installer/upd/current/job.testEMll63ejTBOmgnEnAHlA6AA [file]
boot <-- /MLO [file]
boot <-- /qnx-ifs [file]
invoking: mkxfs -t qnx6fsimg c:\users\admini~1\appdata\local\temp\tmpo0ydtl/data.build c:\users\admini~1\appdata\local\temp\tmpo0ydtl/data.image
invoking: mkxfs -t qnx6fsimg c:\users\admini~1\appdata\local\temp\tmpo0ydtl/base.build c:\users\admini~1\appdata\local\temp\tmpo0ydtl/base.image
invoking: mkxfs -t fatfsimg c:\users\admini~1\appdata\local\temp\tmpo0ydtl/boot.build c:\users\admini~1\appdata\local\temp\tmpo0ydtl/boot.image
invoking: diskimage -c c:\users\admini~1\appdata\local\temp\tmpo0ydtl/image.cfg -o C:\myWork\myimage\
          omapExample\omap5uevm-emmc.img
Removed temporary directory c:\users\admini~1\appdata\local\temp\tmpo0ydtl

Disk image created at C:\myWork\myimage\omapExample\omap5uevm-emmc.img
[info]: Generating os.version file...
[info] gen-osversion.py: Generated os.version file: [C:\Users\Public\repos\trunk\deployment\qnx-car\
       deployment\scripts\..\..\..\target\etc\os.version]
date:		Thu Oct 10 12:56:47 2013
project:	Local Build
buildHost:	WIN-M9DICV29QL6
buildID:	Local Build
buildNum:	Local Build

platform:	omap5uevm.external
car2Branch:	trunk
car2Rev:	7244
externalBranch:	mainline
externalRev:	3171

[info]: Generating qnxcar/system/info PPS file...
[info]: Generating IFS [omap5-emmc-sata.ifs]...
** Building omap5-sd.ifs...
** Building omap5-emmc.ifs...
** Building omap5-emmc-sata.ifs...
** Building etc/secondary.ifs...
[info]: Copying Boot IFS: [omap5-emmc-sata.ifs] to qnx-ifs...
[info]: Generating Archive...
[warning]: Tar file already exists. (Use --force to force overwriting): [C:\myWork\myimage\
           omapExample\omap5uevm-os.tar].
Locating files...
Writing tar file...
[info]: Generating Image...
DONE
WARNING: DISKIMAGE ONLY SUPPORT LITTLE ENDIAN. 
Open tar: C:\myWork\myimage\omapExample\omap5uevm-dos-emmc-sata.tar
Created temporary directory c:\users\admini~1\appdata\local\temp\tmprozsm_
boot <-- /MLO [file]
boot <-- /qnx-ifs [file]
invoking: mkxfs -t fatfsimg c:\users\admini~1\appdata\local\temp\tmprozsm_/boot.build c:\users\admini~1\appdata\local\temp\tmprozsm_/boot.image
invoking: diskimage -c c:\users\admini~1\appdata\local\temp\tmprozsm_/image.cfg -o C:\myWork\
          myimage\omapExample\omap5uevm-emmc-sata.img
Removed temporary directory c:\users\admini~1\appdata\local\temp\tmprozsm_

Disk image created at C:\myWork\myimage\omapExample\omap5uevm-emmc-sata.img