This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[FAQ] PROCESSOR-SDK-AM65X: Steps to build and flash linux sdk image

Part Number: PROCESSOR-SDK-AM65X

Can you provide steps to build and flash Linux sdk image (using SDK release baseline + commit from Github)?

  • To build ti-linux-kernel code before flashing, follow the below steps:

    1. Download and install  PROCESSOR-SDK-LINUX-RT-AM65X -- Linux -RT processor SDK for AM65x for respective version via link:  https://www.ti.com/tool/PROCESSOR-SDK-AM65X

      chmod +x ./ti-processor-sdk-linux-[platform]-<version>-Linux-x86-Install.bin
      ./ti-processor-sdk-linux-[platform]-<version>-Linux-x86-Install.bin


      Refer 
      https://software-dl.ti.com/processor-sdk-linux-rt/esd/AM65X/08_02_00_01/exports/docs/linux/Overview_Getting_Started_Guide.html

    2. Prepare the SD card
      cd <path>/ti-processor-sdk-linux-rt-am65xx-evm-"$SDK_VERSION"/bin
      sudo ./mksdboot.sh --sdk <path>/ti-processor-sdk-linux-rt-am65xx-evm-"$SDK_VERSION"/ --device /dev/sd<x>
      sync

    3. If flashing code from ti-linux-kernel and not from default image available, clone from ti-linux-kernel and checkout to required tag
      git clone https://git.ti.com/git/ti-linux-kernel/ti-linux-kernel.git
      //checkout to required tag
      git checkout tags/{specify the tag}


    4. If editing and building code from ti-linux-kernel, go to the path to downloaded git repository otherwise, go to path of downloaded SDK
      //Go to path of downloaded repository
      cd Downloads/ti-linux-kernel
      
      //if building from SDK
      cd <path of SDK>/board-support/linux-rt...
      


    5. Build SDK and copy Image and dtb to SD card
       //sdk path is the path of the downloaded sdk
      export PATH=<sdk path>/linux-devkit/sysroots/x86_64-arago-linux/usr/bin:$PATH
       
      //Command to clean kernel
      make ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- distclean
       
      //Build defconfig from kernel git repository 
      //for version before 9.0
      ti_config_fragments/defconfig_builder.sh -t ti_sdk_arm64_release || ti_config_fragments/defconfig_builder.sh
      make ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- ti_sdk_arm64_rt_release_defconfig
      
      //for 9.0 or later versions
      make ARCH=arm64 CROSS_COMPILE=$V8_CROSS defconfig ti_arm64_prune.config 
       
      //Build Image
      make ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- Image
       
      //Build device tree binaries
      make ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- dtbs
       
      //Compiling kernel modules
      make ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- modules
       
      //Copying kernal image and device tree binaries to rootfs partition of sd card
      cd <kernel sources dir>
      sudo cp arch/arm64/boot/Image /media/rootfs/boot
      sudo cp arch/arm64/boot/dts/ti/*.dtb /media/rootfs/boot
      sudo cp arch/arm64/boot/dts/ti/*.dtbo /media/rootfs/boot
       
      //Installing kernel modules
      sudo make ARCH=arm64 INSTALL_MOD_PATH=/media/rootfs modules_install


    6. Insert SD card in the board and boot
    7. Reboot the board