8.8. Using Processor SDK Linux with Processor SDK RTOS

8.8.1. Introduction

Processor SDK Linux J721E (PSDK LINUX) and Processor SDK RTOS J721E (PSDK RTOS) work together to realize use-cases on the J721E platform. In most cases using the pre-built linux filesystem, kernel, bootloader is sufficient to build different usecases. However sometimes it is needed to rebuild certain parts of PSDK LINUX to update things like bootloader, SYSFW configuration, kernel dtb/dtbo and so on.

This page shows quick steps to rebuild and update below,

  • R5F SPL, A72 SPL, A72 uboot (tiboot3.bin, tispl.bin, u-boot.img)

  • SYSFW configuration (sysfw.itb)

  • Linux kernel .dtb’s and .dtbo’s ( /boot/*.dtb, /boot/*.dtbo)

  • Linux kernel and kernel modules ( /boot/Image, /lib/modules/*)

More detailed instruction to build PSDK LINUX are given in PSDK LINUX user guide. Refer ${PSDK_LINUX_PATH}//docs/linux/index.html for more details.

8.8.2. Setup PSDK LINUX

  • Download and install the PSDK LINUX installer as shown below

    chmod +x ti-processor-sdk-linux-j7-evm-xx_xx_xx-Linux-x86-Install.bin
    ./ti-processor-sdk-linux-j7-evm-xx_xx_xx-Linux-x86-Install.bin
    
  • Edit below files to adjust some paths and variables needed to build SYSFW config, uboot, kernel, dtb’s

    1. Edit below in ${PSDK_LINUX_PATH}/Rule.make to point to the root filesystem in SD card

      #root of the target file system for installing applications
      DESTDIR ?=/media/<user name>/rootfs
      
    2. Edit the file ${PSDK_LINUX_PATH}/board-support/k3-image-gen-*/gen_its.sh, comment the below line

      #SYSFW_IMG_GEN_REV=`git describe --tags --abbrev=5 --dirty`
      
  • Now PSDK LINUX is setup to build bootloader, kernel, SYSFW configuration

8.8.3. Build R5F SPL, A72 SPL and A72 u-boot

  • R5F SPL, A72 SPL and A72 u-boot can be found below

    ${PSDK_LINUX_PATH}/board-support/u-boot-*
    
  • Do below to build R5F SPL, A72 SPL and A72 u-boot in ${PSDK_LINUX_PATH}/

    make u-boot
    
  • After successful build, copy below files to ‘BOOT’ partition in the SD card

    ${PSDK_LINUX_PATH}/board-support/u-boot_build/r5/tiboot3.bin
    ${PSDK_LINUX_PATH}/board-support/u-boot_build/a72/tispl.bin
    ${PSDK_LINUX_PATH}/board-support/u-boot_build/a72/u-boot.img
    

8.8.4. Build SYSFW configuration

  • SYSFW configuration files can be found below

    ${PSDK_LINUX_PATH}/board-support/k3-image-gen-*
    
  • To change the config, modify below files

    ${PSDK_LINUX_PATH}/board-support/k3-image-gen-*/soc/<j721e|j7200>/evm/*.c
    
  • To build with a new SYSFW binary, copy the new SYSFW binary at below path, replacing the original one

    ${PSDK_LINUX_PATH}/board-support/prebuilt-images/ti-sci-firmware-<j721e|j7200>-gp.bin
    
  • Do below in ${PSDK_LINUX_PATH}/ to regenerate SYSFW config

    make sysfw-image_clean
    make sysfw-image
    
  • After successful build, copy below file to ‘BOOT’ partition in the SD card

    ${PSDK_LINUX_PATH}/board-support/k3-image-gen-*/sysfw.itb
    

8.8.5. Build Linux DTB and DTBO

  • The linux kernel input dts, dtso and generated dtb, dtbo are located below

    ${PSDK_LINUX_PATH}/board-support/linux-*/arch/arm64/boot/dts/ti/
    
  • Do below in ${PSDK_LINUX_PATH}/ to regenerate the linux kernel .dtb, dtbo files

    make linux-dtbs
    
  • Do below in ${PSDK_LINUX_PATH}/ to copy the updated .dtb, dtbo files to SD card

    sudo make linux-dtbs_install;sync
    

8.8.6. Build Linux kernel and kernel modules

  • Linux kernel can be found below

    ${PSDK_LINUX_PATH}/board-support/linux-*
    
  • Do below in ${PSDK_LINUX_PATH}/ to rebuild the linux kernel and kernel modules

    make linux
    
  • Do below in ${PSDK_LINUX_PATH}/ to copy the updated linux kernel and kernel modules to SD card

    sudo make linux_install;sync