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] EVMK2GX: Build Linux for K2G - ARM

Part Number: EVMK2GX

How to build Linux for K2G - ARM? from the package "PROCESSOR-SDK-LINUX-K2G"

  • Pre-requisite:

    1. Linux-PC with Ubuntu 18.04 LTS
    2. Download and Install " PROCESSOR-SDK-LINUX-K2G — Linux Processor SDK for K2G " from https://www.ti.com/tool/download/PROCESSOR-SDK-LINUX-K2G (Make sure SDK is installed in "$HOME" directory)

    Steps:

    1. Install all the dependency packages (Open Linux bash terminal and give the following commands).
      sudo apt-get install diffstat texi2html texinfo subversion chrpath build-essential subversion ccache sed wget cvs coreutils unzip texinfo docbook-utils gawk help2man file g++ bison flex htmldoc chrpath libxext-dev xserver-xorg-dev doxygen socat u-boot-tools git
    2. Download the arm compiler toolchain using the below commands and extract them in "$HOME" directory
      wget https://developer.arm.com/-/media/Files/downloads/gnu-a/8.3-2019.03/binrel/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.tar.xz
      tar -Jxvf gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.tar.xz -C $HOME
      wget https://developer.arm.com/-/media/Files/downloads/gnu-a/8.3-2019.03/binrel/gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu.tar.xz
      tar -Jxvf gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu.tar.xz -C $HOME
      cd ~/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin
    3. Export Toolchain: Add the toolchain path to the "$PATH" variable
       
      vi ~/.bashrc
      export PATH=$HOME/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin:$PATH
      export PATH=$HOME/gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu/bin:$PATH
    4. Building Linux: Goto "{SDK_FOLDER}/board-support/linux-{VERSION}/" folder and give below command
      make clean distclean ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
      ls arch/arm/configs/ | grep k2g
      make tisdk_k2g-evm_defconfig ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
      make -j8 zImage dtbs ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
      ls -al ./arch/arm/boot/dts/keystone-k2g-evm.dtb
      ls -al ./arch/arm/boot/zImage
    5. After successful compilation, inside "k2g_evm" directory "zImage" and "keystone-k2g-evm.dtb" file will be present.

    Screenshots are attached for the above commands -

    For Step 4:

    Refer to this link for more info: https://software-dl.ti.com/processor-sdk-linux/esd/docs/06_03_00_106/linux/Overview_Building_the_SDK.html#prerequisites-one-time-setup

    Thanks,

    Ranjeet Kumar