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.

SK-AM62: How to compile only the necessary Device-Tree and create a fitImage.

Expert 2440 points
Part Number: SK-AM62

Tool/software:

Hi All,

I believe that the Makefile, Makerules directory, and Rules.make exist in the Directory of the SDK (ti-processor-sdk-linux-am62xx-evm-11.00.09.04) currently in use.
When you run ‘make all’ using this Makefile, it executes all the MakeRules in the Makerules directory,
so I modified Rules.make (around the last line, MAKE_ALL_TARGETS)to execute only linux, linux-dtbs, ti-img-rogue-driver, linux-extras, and linux-extras-dtbs.
However, this still compiles all Device-Trees under board-support/ti-linux-kernel-6.12.17+git-ti/arch/arm64/boot/dts/ti and generates a fitimage.
Please advise on how to compile only the necessary Device-Trees and generate a fitImage.

Best Regards,

Ito

  • Hi All,

    Additional question.

    When you run ‘make all’,
    ... u-boot, linux, linux-dtbs, ti-img-rogue-driver, jailhouse, linux-extras, linux-extras-dtbs, u-boot-extras, etc.
    are compiled.
    Here, there are linux and linux-extras, linux-dtbs and linux-extras-dtbs, u-boot and u-boot-extras.
    I asked this question because I was unclear about the difference between these “extras”.

    Best Regards,

    Ito

  • Hi K.Z,



    To build an individual device tree file find the name of the dts file and replace the .dts extension with .dtb. Then run the following command:

    make DTC_FLAGS=-@ ARCH=arm64 CROSS_COMPILE="$CROSS_COMPILE_64" ti/<dt filename>.dtb

    For example, the AM64x EVM device tree file is named k3-am642-evm.dts. To build the device tree binary you would run:
    make DTC_FLAGS=-@ ARCH=arm64 CROSS_COMPILE="$CROSS_COMPILE_64" ti/k3-am642-evm.dtb


    The compiled device tree file with be located in arch/arm64/boot/dts/ti.

    (You should run the commands from the drirectory:-ti-processor-sdk-linux-am62xx-evm-11.00.09.04/board-support/ti-linux-kernel-6.12.17+git-ti)

    Note:-

    1. Before compiling set thecross compiler paths
      export CROSS_COMPILE_64="${SDK_INSTALL_DIR}/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/aarch64-oe-linux/aarch64-oe-linux-"

    2. For more information you can refer the below path:-

       software-dl.ti.com/.../Foundational_Components_Kernel_Users_Guide.html

    3. The "extras" in the TI Processor SDK Linux build system (linux-extras, linux-extras-dtbs, u-boot-extras) refer to additional, often optional, components or configurations that extend the functionality of the base Linux kernel and U-Boot.