3. Build Steps

Important

  • ${PSDK_RTOS_PATH} refers to the path where Processor SDK RTOS (PSDK RTOS) is installed

  • ${PSDK_QNX_PATH} refers to the path where Processor SDK QNX (PSDK QNX) is installed inside the ${PSDK_RTOS_PATH}

  • The build is tested on Ubuntu (x86_64) 18.04 system and may not work on earlier or later Ubuntu systems.

  • 20GB of free space is required to install and build PSDK RTOS + PSDK QNX

  • Make sure you have sudo access

Note

Please note that $PSDK_RTOS_PATH/psdkqa will be referred at PSDK_QNX_PATH

3.1. Build

3.1.1. Steps 1: To Build PSDK QNX components along with QNX BSP

Make sure that that the QNX SDP 7.1 installed in your PC as mentioned in Getting Started

  • On Command line call the below environment variables:

export QNX_SDP_VERSION=710
export QNX_BASE=<path_to_qnx710_dir>
export BUILD_QNX_A72=yes
export PROFILE=release
export BOARD=j7200_evm
  • Run the below commands to build the source code provided in the SDK installer, with “N” being the number of parallel threads

cd ${PSDK_QNX_PATH}/qnx
make all -jN
make qnx_fs_create
  • The generated QNX executables are stored at:

Generated Files

Path

QNX® BSP IFS file

${PSDK_QNX_PATH}/bootfs

PSDK QNX binaries

${PSDK_QNX_PATH}/bootfs/tibin

PSDK QNX libraries

${PSDK_QNX_PATH}/bootfs/tilib

3.1.2. Steps 2: To Build SBL and associated BootApp Images (EthFW Images)

  • Make sure Step 1 above is completed.

  • To SBL build along with bootApp, and Main R5 EthFW images , the following commands need to be run:

cd ${PSDK_QNX_PATH}/qnx
make sbl_ethfw
  • The generated binaries are stored at:

Generated Files

Path

SBL

${PSDK_QNX_PATH}/sbl_bootfiles/tiboot3.bin

TIFS

${PSDK_QNX_PATH}/sbl_bootfiles/tifs.bin

Boot App

${PSDK_QNX_PATH}/sbl_bootfiles/app

Firmware Image 1

${PSDK_QNX_PATH}/sbl_bootfiles/lateapp1

ATF Appimage

${PSDK_QNX_PATH}/sbl_bootfiles/atf_optee.appimage

QNX IFS Appimage

${PSDK_QNX_PATH}/sbl_bootfiles/ifs_qnx.appimage

  • Also, the following EthFW Firmware images are generated which is useful when using SPL-Uboot.

Generated Files

Path

Main R50_0 image

${PSDK_QNX_PATH}/ethfw_firmware/j7200-main-r5f0_0-fw

Main R50_1 image

${PSDK_QNX_PATH}/ethfw_firmware/j7200-main-r5f0_1-fw

3.1.3. Steps 2a: Optional - To Build SBL and associated BootApp Images (IPC Echo firmware Images)

  • Make sure Step 1 above is completed.

  • To SBL build along with bootApp, and Main R5 IPC Echo test images , the following commands need to be run:

cd ${PSDK_QNX_PATH}/qnx
make sbl_echo_test
  • The generated binaries are are same as show in Step 2 above, expect for Firmware Image 1 will not include IPC Echo test images.

  • Also, the following IPC Echo test images are generated which is useful when using SPL-Uboot.

Generated Files

Path

Main R50_0 image

${PSDK_QNX_PATH}/echo_firmware/j7200-main-r5f0_0-fw

Main R50_1 image

${PSDK_QNX_PATH}/echo_firmware/j7200-main-r5f0_1-fw

3.2. Run Instructions

3.2.1. Step 1: Prepare SD card for boot (one time only)

  • Insert SD card onto your PC SD card slot and format SD card in two partitions

    • FAT32 partition: for boot loader, 2GB size recommended

    • ext4 partition: for root filesystem, rest of SD card, atleast 16GB SD card recommended.(Used only for SPL-Uboot boot to store firmware images)

  • You can use one of two options to format your SD card

    • Option 1: You can use the utility script ${PSDK_QNX_PATH}/qnx/scripts/mkcard_qnx.sh to make the partitions

      • Use the command “df -h” to identify the device used by SD card

      • Unmount the SD card before running the script

      • Example, if your SD card is on device /dev/sdb having two partitions, do below to unmount them

      umount /dev/sdb1
      umount /dev/sdb2
      
      • Run the script as below to partition it, answer “y” to all questions asked when running the script

      cd ${PSDK_QNX_PATH}
      sudo ${PSDK_QNX_PATH}/qnx/scripts/mkcard_qnx.sh --device /dev/sdb
      

      Note

      Make sure to give the correct device name to this script, example /dev/sda is typically local harddisk, if you give this by mistake, your whole hard disk will be wiped off !!!

    • Option 2: you can use “gparted” utility (sudo apt install gparted) to use a GUI based interface to create the partitions.

      • Make sure you set the FAT32 partition flags as “boot”, “lba”

      • Name the FAT32 partition as “BOOT” and the ext4 partition as “rootfs”

  • After formatting, remove and insert the SD card for the freshly formatted partitions to get auto mounted on the host PC.

3.2.2. Step 2: Copy files to the SD Card - QNX + SBL BootApps

  • Copy/untar filesystem and boot files to SD card by executing the script as shown below

cd ${PSDK_QNX_PATH}
## Remove existing files on bootfs
rm -rf <path_to_SD_card_mount_dir>/boot/*
## Copy PSDK QNX binaries + QNX FS
cp -fv ${PSDK_QNX_PATH}/bootfs/*                            <path_to_SD_card_mount_dir>/boot
## Copy SBL + boot apps
cp -fv ${PSDK_QNX_PATH}/sbl_bootfiles/tiboot3.bin           <path_to_SD_card_mount_dir>/boot
cp -fv ${PSDK_QNX_PATH}/sbl_bootfiles/tifs.bin              <path_to_SD_card_mount_dir>/boot
cp -fv ${PSDK_QNX_PATH}/sbl_bootfiles/app                   <path_to_SD_card_mount_dir>/boot
cp -fv ${PSDK_QNX_PATH}/sbl_bootfiles/lateapp1              <path_to_SD_card_mount_dir>/boot
cp -fv ${PSDK_QNX_PATH}/sbl_bootfiles/atf_optee.appimage    <path_to_SD_card_mount_dir>/boot
cp -fv ${PSDK_QNX_PATH}/sbl_bootfiles/ifs_qnx.appimage      <path_to_SD_card_mount_dir>/boot

3.2.3. Step 2a: Copy files to the SD Card - QNX + SPL-Uboot

Note

The SPL-Uboot binaries must be downladed directly from https://www.ti.com/tool/download/PROCESSOR-SDK-LINUX-J7200

  • Download and extract the boot-j7200-evm-tar.gz file to a know location say ${PSDK_LINUX_UBOOT_PATH}

  • Copy/untar filesystem and boot files to SD card by executing the script as shown below

cd ${PSDK_QNX_PATH}
## Remove existing files on bootfs
rm -rf <path_to_SD_card_mount_dir>/boot/*
## Copy PSDK QNX binaries + QNX FS
cp -fv ${PSDK_QNX_PATH}/bootfs/*                            <path_to_SD_card_mount_dir>/boot
## Copy SPL-Uboot
cp -fv ${PSDK_QNX_PATH}/qnx/scripts/u-boot/uEnv_j7200.txt   <path_to_SD_card_mount_dir>/boot/uEnv.txt
cp -fv ${PSDK_LINUX_UBOOT_PATH}/sbl_bootfiles/tiboot3.bin   <path_to_SD_card_mount_dir>/boot
cp -fv ${PSDK_LINUX_UBOOT_PATH}/sbl_bootfiles/tispl.bin     <path_to_SD_card_mount_dir>/boot
cp -fv ${PSDK_LINUX_UBOOT_PATH}/sbl_bootfiles/u-boot.img    <path_to_SD_card_mount_dir>/boot
## Remove existing files on rootfs
sudo rm -rf <path_to_SD_card_mount_dir>/rootfs/*
## Copy remote proc images
sudo mkdir -p <path_to_SD_card_mount_dir>/rootfs/lib/firmware
sudo cp -fv ${PSDK_QNX_PATH}/ethfw_firmware/j7200-main-r5f0_0-fw  <path_to_SD_card_mount_dir>/rootfs/lib/firmware
sudo cp -fv ${PSDK_QNX_PATH}/ethfw_firmware/j7200-main-r5f0_1-fw  <path_to_SD_card_mount_dir>/rootfs/lib/firmware