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-AM64: SK-AM64 Top Level Makefile fails building firmware

Part Number: SK-AM64

Hello While debugging Top Level makefile issues I discovered another problem 

Beside Make All and make clean failing I tried building the firmware

Doing this is something probally any user would need to be working with the firmware for the PRU ie something that needs to work

I cant belive this was never tested or validated and whiile my Makefile skills are average Im more concerned this wasnt validated and doesnt work 

As once wearing an app engineer hat MYSELF  I can understand replicating the error requires a VM and the SDK BUT this latest am62x SDK looks incomplete I dont feel like I should be modifying Makefiles and I am more concerned how this half finished product appears to new customers as I am a big Texas Instruments flag waver angelical (-?:

Lets clean this mess up I am willing to help but itys obvious this makefile is incomplete

Here is 

What I did 

Make All

Make Clean

JUST TO BE CLEAR I created a new ticket to fix this sysfw issue the make all amke clean errors are another issue I can work around but sysfw-firmware needs attention

guru@TIUbuntuDevBox:~/ti-processor-sdk-linux-am64xx-evm-08.05.00.21$ make sysfw-image
=====================================
Building the Linux Kernel DTBs
=====================================
make -C /home/guru/ti-processor-sdk-linux-am64xx-evm-08.05.00.21/board-support/linux-5.10.153+gitAUTOINC+3eee621d16-g3eee621d16 ARCH=arm64 CROSS_COMPILE=/home/guru/ti-processor-sdk-linux-am64xx-evm-08.05.00.21/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/aarch64-none-linux-gnu- tisdk_am64xx-evm_defconfig
make[1]: Entering directory '/home/guru/ti-processor-sdk-linux-am64xx-evm-08.05.00.21/board-support/linux-5.10.153+gitAUTOINC+3eee621d16-g3eee621d16'
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/confdata.o
  HOSTCC  scripts/kconfig/expr.o
  LEX     scripts/kconfig/lexer.lex.c
  YACC    scripts/kconfig/parser.tab.[ch]
  HOSTCC  scripts/kconfig/lexer.lex.o
  HOSTCC  scripts/kconfig/parser.tab.o
  HOSTCC  scripts/kconfig/preprocess.o
  HOSTCC  scripts/kconfig/symbol.o
  HOSTCC  scripts/kconfig/util.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#
make[1]: Leaving directory '/home/guru/ti-processor-sdk-linux-am64xx-evm-08.05.00.21/board-support/linux-5.10.153+gitAUTOINC+3eee621d16-g3eee621d16'
make[1]: Entering directory '/home/guru/ti-processor-sdk-linux-am64xx-evm-08.05.00.21/board-support/linux-5.10.153+gitAUTOINC+3eee621d16-g3eee621d16'
  HOSTCC  scripts/dtc/dtc.o
  HOSTCC  scripts/dtc/flattree.o
  HOSTCC  scripts/dtc/fstree.o
  UPD     include/config/kernel.release
  HOSTCC  scripts/dtc/data.o
  HOSTCC  scripts/dtc/livetree.o
  HOSTCC  scripts/dtc/treesource.o
  HOSTCC  scripts/dtc/srcpos.o
  HOSTCC  scripts/dtc/checks.o
  HOSTCC  scripts/dtc/util.o
  LEX     scripts/dtc/dtc-lexer.lex.c
  YACC    scripts/dtc/dtc-parser.tab.[ch]
  HOSTCC  scripts/dtc/libfdt/fdt.o
  HOSTCC  scripts/dtc/libfdt/fdt_ro.o
  HOSTCC  scripts/dtc/libfdt/fdt_wip.o
  HOSTCC  scripts/dtc/libfdt/fdt_sw.o
  HOSTCC  scripts/dtc/libfdt/fdt_rw.o
  HOSTCC  scripts/dtc/libfdt/fdt_strerror.o
  HOSTCC  scripts/dtc/libfdt/fdt_empty_tree.o
  HOSTCC  scripts/dtc/libfdt/fdt_addresses.o
  HOSTCC  scripts/dtc/libfdt/fdt_overlay.o
  HOSTCC  scripts/dtc/fdtoverlay.o
  HOSTCC  scripts/dtc/dtc-lexer.lex.o
  HOSTCC  scripts/dtc/dtc-parser.tab.o
  HOSTLD  scripts/dtc/fdtoverlay
  HOSTLD  scripts/dtc/dtc
  DTC     arch/arm64/boot/dts/ti/k3-am642-evm.dtb
make[1]: Leaving directory '/home/guru/ti-processor-sdk-linux-am64xx-evm-08.05.00.21/board-support/linux-5.10.153+gitAUTOINC+3eee621d16-g3eee621d16'
make[1]: Entering directory '/home/guru/ti-processor-sdk-linux-am64xx-evm-08.05.00.21/board-support/linux-5.10.153+gitAUTOINC+3eee621d16-g3eee621d16'
  DTC     arch/arm64/boot/dts/ti/k3-am642-sk.dtb
make[1]: Leaving directory '/home/guru/ti-processor-sdk-linux-am64xx-evm-08.05.00.21/board-support/linux-5.10.153+gitAUTOINC+3eee621d16-g3eee621d16'
make[1]: Entering directory '/home/guru/ti-processor-sdk-linux-am64xx-evm-08.05.00.21/board-support/linux-5.10.153+gitAUTOINC+3eee621d16-g3eee621d16'
  DTC     arch/arm64/boot/dts/ti/k3-am642-evm-icssg1-dualemac.dtbo
make[1]: Leaving directory '/home/guru/ti-processor-sdk-linux-am64xx-evm-08.05.00.21/board-support/linux-5.10.153+gitAUTOINC+3eee621d16-g3eee621d16'
make[1]: Entering directory '/home/guru/ti-processor-sdk-linux-am64xx-evm-08.05.00.21/board-support/linux-5.10.153+gitAUTOINC+3eee621d16-g3eee621d16'
  DTC     arch/arm64/boot/dts/ti/k3-am642-evm-icssg1-dualemac-mii.dtbo
make[1]: Leaving directory '/home/guru/ti-processor-sdk-linux-am64xx-evm-08.05.00.21/board-support/linux-5.10.153+gitAUTOINC+3eee621d16-g3eee621d16'
make[1]: Entering directory '/home/guru/ti-processor-sdk-linux-am64xx-evm-08.05.00.21/board-support/linux-5.10.153+gitAUTOINC+3eee621d16-g3eee621d16'
  DTC     arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtbo
arch/arm64/boot/dts/ti/k3-am642-evm-nand.dts:61.8-135.3: Warning (avoid_default_addr_size): /fragment@2/__overlay__: Relying on default #address-cells value
arch/arm64/boot/dts/ti/k3-am642-evm-nand.dts:61.8-135.3: Warning (avoid_default_addr_size): /fragment@2/__overlay__: Relying on default #size-cells value
make[1]: Leaving directory '/home/guru/ti-processor-sdk-linux-am64xx-evm-08.05.00.21/board-support/linux-5.10.153+gitAUTOINC+3eee621d16-g3eee621d16'
=============================
Building SYSFW Image
=============================
make[1]: Entering directory '/home/guru/ti-processor-sdk-linux-am64xx-evm-08.05.00.21/board-support/k3-image-gen-2022.01'
Makefile:67: *** TI_SECURE_DEV_PKG must be set for HS, defaults will not work.  Stop.
make[1]: Leaving directory '/home/guru/ti-processor-sdk-linux-am64xx-evm-08.05.00.21/board-support/k3-image-gen-2022.01'
Makefile:573: recipe for target 'sysfw-image' failed
make: *** [sysfw-image] Error 2

  • Hi,

    Thanks for your query , I have assigned the thread to an expert, please allow a day or two to recreate the issue and update

    Regards

    Ashwani

  • Hi Mark,

    Make command is working fine on my side. Kindly try building with the procedure as mentioned below - 

    1. Download and Install SDK from PROCESSOR-SDK-LINUX-AM64X Software development kit (SDK) | TI.com
    2. Install SDK using -> 
      chmod +x ./ti-processor-sdk-linux-am64xx-evm-08.05.00.21-Linux-x86-Install.bin
      ./ti-processor-sdk-linux-am64xx-evm-08.05.00.21-Linux-x86-Install.bin
    3. Go to <SDK Path> 
      cd <SDK Path>/board-support/linux-5.10.153+gitAUTOINC+3eee621d16-g3eee621d16
    4. Run the following commands
      1. ti_config_fragments/defconfig_builder.sh
      2. make ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- ti_sdk_arm64_rt_release_defconfig
      3. make ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- Image
      4. make ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- dtbs
      5. make ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- modules

    If still facing issue, kindly share the procedure you are following to build image.

    Thanks and Regards,

    Rimika

  • Hello Rimka

    You are building the kernel  I asked about building sysfw-image AND

    THAT IS NOT the top level makefile you are using

    Toplevel makefile is in top directory ie ti-processor-sdk-linux-am64xx-evm-08.05.00.2

    Please do this type "make sysfw-image" in THIS directory ti-processor-sdk-linux-am64xx-evm-08.05.00.21

    cd ti-processor-sdk-linux-am64xx-evm-08.05.00.21

    From original post  its obvious I typed below

    guru@TIUbuntuDevBox:~/ti-processor-sdk-linux-am64xx-evm-08.05.00.21$ make sysfw-image

    Please try that

  • Hi Mark,

    I'm sorry for I was not clear of the query at my end.

    Which linux version are you working with?

    Thanks and Regards

    Rimika

  • Hello Rimka

    18,04 LTS Ubuntu native no VM . Make all also gives errors .

    Make all works in AM335X SDK I have installed on same computer 

    I need  make sysfw-image to work most important

    It looks like there are some paths and compiler and env vars that need to be set up looking at the README in the firmware directory

    Please advise A toplevel makefile should just work

    Maybe we need some script to run first something similar to 

    1. ti_config_fragments/defconfig_builder.sh

    Please note my SDK IS GP ti-processor-sdk-linux-am64xx-evm-08.05.00.21

    I have GP Hardware I need Firmware for it 

    Thanks

  • Hi Mark,

    I'll get back to you asap.

    Thanks and Regards,

    Rimika

  • Hi Mark,

    Kindly follow these steps:

    • Go to path: <SDK path>
    • Edit the Makefile: vim Makefile / gedit Makefile
      • Set 'PLATFORM _TYPE_am64xx-evm = gp'
    • Go to path: <SDK path>/board-support/prebuild-images
    • Create an empty file: touch ti-sci-firmware-am64x_sr2-gp.bin
    • Go back to <SDK path> and build using command: make sysfw-image

    Can you try this once on your setup and as per the result obtained this will be added as a fix .

    Thanks and Regards

    Rimika

  • Hello Rimka

    Here is output I try two times, Both failed first time after fail I did a make clean(this cleans most of project but has issues yet) 

    Below is output after make clean , make sysfw-image

    ----------Make clean output-----------------------------------------------------------

    Removing files in the "gen" directory



    Finished cleaning project: PRU_RPMsg_LED0
    ************************************************************

    make[3]: Leaving directory '/home/guru/ti-processor-sdk-linux-am64xx-evm-08.05.00.21/example-applications/pru-icss-6.1.0/labs/Hands_on_Labs/lab_6/solution/PRU_RPMsg_LED0'
    make[2]: Leaving directory '/home/guru/ti-processor-sdk-linux-am64xx-evm-08.05.00.21/example-applications/pru-icss-6.1.0/labs/Hands_on_Labs'
    make[1]: Leaving directory '/home/guru/ti-processor-sdk-linux-am64xx-evm-08.05.00.21/example-applications/pru-icss-6.1.0/labs'
    make: *** No rule to make target 'sysfw-image-hs-fs_am64_clean', needed by 'clean'.  Stop.

    ----------Make make sysfw-image  output-----------------------------------------------------------


    guru@TIUbuntuDevBox:~/ti-processor-sdk-linux-am64xx-evm-08.05.00.21$ make sysfw-image
    =====================================
    Building the Linux Kernel DTBs
    =====================================
    make -C /home/guru/ti-processor-sdk-linux-am64xx-evm-08.05.00.21/board-support/linux-5.10.153+gitAUTOINC+3eee621d16-g3eee621d16 ARCH=arm64 CROSS_COMPILE=/home/guru/ti-processor-sdk-linux-am64xx-evm-08.05.00.21/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/aarch64-none-linux-gnu- tisdk_am64xx-evm_defconfig
    make[1]: Entering directory '/home/guru/ti-processor-sdk-linux-am64xx-evm-08.05.00.21/board-support/linux-5.10.153+gitAUTOINC+3eee621d16-g3eee621d16'
      HOSTCC  scripts/basic/fixdep
      HOSTCC  scripts/kconfig/conf.o
      HOSTCC  scripts/kconfig/confdata.o
      HOSTCC  scripts/kconfig/expr.o
      LEX     scripts/kconfig/lexer.lex.c
      YACC    scripts/kconfig/parser.tab.[ch]
      HOSTCC  scripts/kconfig/lexer.lex.o
      HOSTCC  scripts/kconfig/parser.tab.o
      HOSTCC  scripts/kconfig/preprocess.o
      HOSTCC  scripts/kconfig/symbol.o
      HOSTCC  scripts/kconfig/util.o
      HOSTLD  scripts/kconfig/conf
    #
    # configuration written to .config
    #
    make[1]: Leaving directory '/home/guru/ti-processor-sdk-linux-am64xx-evm-08.05.00.21/board-support/linux-5.10.153+gitAUTOINC+3eee621d16-g3eee621d16'
    make[1]: Entering directory '/home/guru/ti-processor-sdk-linux-am64xx-evm-08.05.00.21/board-support/linux-5.10.153+gitAUTOINC+3eee621d16-g3eee621d16'
      UPD     include/config/kernel.release
      HOSTCC  scripts/dtc/dtc.o
      HOSTCC  scripts/dtc/flattree.o
      HOSTCC  scripts/dtc/fstree.o
      HOSTCC  scripts/dtc/data.o
      HOSTCC  scripts/dtc/livetree.o
      HOSTCC  scripts/dtc/treesource.o
      HOSTCC  scripts/dtc/srcpos.o
      HOSTCC  scripts/dtc/checks.o
      HOSTCC  scripts/dtc/util.o
      LEX     scripts/dtc/dtc-lexer.lex.c
      YACC    scripts/dtc/dtc-parser.tab.[ch]
      HOSTCC  scripts/dtc/libfdt/fdt.o
      HOSTCC  scripts/dtc/libfdt/fdt_ro.o
      HOSTCC  scripts/dtc/libfdt/fdt_wip.o
      HOSTCC  scripts/dtc/libfdt/fdt_sw.o
      HOSTCC  scripts/dtc/libfdt/fdt_rw.o
      HOSTCC  scripts/dtc/libfdt/fdt_strerror.o
      HOSTCC  scripts/dtc/libfdt/fdt_empty_tree.o
      HOSTCC  scripts/dtc/libfdt/fdt_addresses.o
      HOSTCC  scripts/dtc/libfdt/fdt_overlay.o
      HOSTCC  scripts/dtc/fdtoverlay.o
      HOSTCC  scripts/dtc/dtc-lexer.lex.o
      HOSTCC  scripts/dtc/dtc-parser.tab.o
      HOSTLD  scripts/dtc/fdtoverlay
      HOSTLD  scripts/dtc/dtc
      DTC     arch/arm64/boot/dts/ti/k3-am642-evm.dtb
    make[1]: Leaving directory '/home/guru/ti-processor-sdk-linux-am64xx-evm-08.05.00.21/board-support/linux-5.10.153+gitAUTOINC+3eee621d16-g3eee621d16'
    make[1]: Entering directory '/home/guru/ti-processor-sdk-linux-am64xx-evm-08.05.00.21/board-support/linux-5.10.153+gitAUTOINC+3eee621d16-g3eee621d16'
      DTC     arch/arm64/boot/dts/ti/k3-am642-sk.dtb
    make[1]: Leaving directory '/home/guru/ti-processor-sdk-linux-am64xx-evm-08.05.00.21/board-support/linux-5.10.153+gitAUTOINC+3eee621d16-g3eee621d16'
    make[1]: Entering directory '/home/guru/ti-processor-sdk-linux-am64xx-evm-08.05.00.21/board-support/linux-5.10.153+gitAUTOINC+3eee621d16-g3eee621d16'
      DTC     arch/arm64/boot/dts/ti/k3-am642-evm-icssg1-dualemac.dtbo
    make[1]: Leaving directory '/home/guru/ti-processor-sdk-linux-am64xx-evm-08.05.00.21/board-support/linux-5.10.153+gitAUTOINC+3eee621d16-g3eee621d16'
    make[1]: Entering directory '/home/guru/ti-processor-sdk-linux-am64xx-evm-08.05.00.21/board-support/linux-5.10.153+gitAUTOINC+3eee621d16-g3eee621d16'
      DTC     arch/arm64/boot/dts/ti/k3-am642-evm-icssg1-dualemac-mii.dtbo
    make[1]: Leaving directory '/home/guru/ti-processor-sdk-linux-am64xx-evm-08.05.00.21/board-support/linux-5.10.153+gitAUTOINC+3eee621d16-g3eee621d16'
    make[1]: Entering directory '/home/guru/ti-processor-sdk-linux-am64xx-evm-08.05.00.21/board-support/linux-5.10.153+gitAUTOINC+3eee621d16-g3eee621d16'
      DTC     arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtbo
    arch/arm64/boot/dts/ti/k3-am642-evm-nand.dts:61.8-135.3: Warning (avoid_default_addr_size): /fragment@2/__overlay__: Relying on default #address-cells value
    arch/arm64/boot/dts/ti/k3-am642-evm-nand.dts:61.8-135.3: Warning (avoid_default_addr_size): /fragment@2/__overlay__: Relying on default #size-cells value
    make[1]: Leaving directory '/home/guru/ti-processor-sdk-linux-am64xx-evm-08.05.00.21/board-support/linux-5.10.153+gitAUTOINC+3eee621d16-g3eee621d16'
    =============================
    Building SYSFW Image
    =============================
    make[1]: Entering directory '/home/guru/ti-processor-sdk-linux-am64xx-evm-08.05.00.21/board-support/k3-image-gen-2022.01'
    make[1]: *** No rule to make target '/home/guru/ti-processor-sdk-linux-am64xx-evm-08.05.00.21/board-support/u-boot_build/r5/spl/u-boot-spl.bin', needed by 'tiboot3-am64x_sr2-gp-evm.bin'.  Stop.
    make[1]: Leaving directory '/home/guru/ti-processor-sdk-linux-am64xx-evm-08.05.00.21/board-support/k3-image-gen-2022.01'
    Makefile:573: recipe for target 'sysfw-image' failed
    make: *** [sysfw-image] Error 2
    guru@TIUbuntuDevBox:~/ti-processor-sdk-linux-am64xx-evm-08.05.00.21$

     

  • Hi Mark,

    Kindly follow these steps:

    1. Go to path: <SDK path>
    2. Edit the Makefile: vim Makefile / gedit Makefile
      1. Set 'PLATFORM _TYPE_am64xx-evm = gp'
    3. To create u-boot_build facility, run:
      1. make u-boot-spl
      2. make u-boot-r5
    4. Go to path: <SDK path>/board-support/prebuild-images
    5. Create an empty file: touch ti-sci-firmware-am64x_sr2-gp.bin
    6. Go back to <SDK path> and build using command: make sysfw-image

    u-boot-spl and u-boot-r5 commands will help you setup required packages.

    Thanks and Regards

    Rimika

  • Hello Rimka

    That works! 

    Uhmm Make All should do the same I am happy I want to  start on Cortex M4 and Cortex R5 development now uisng jtag and CCS

    Before you close this can you describe what exactly Linux is loading to these R5 and M4 cores and how its done AND confirm the firmware sysfw-image we just build is for what? Wifi?

    Thanks 

    Mark

  • Hi Mark,

    It's good to know it works.

    • sysfw-image - Builds the system firmware itb file, which is a single binary for the system firmware release along with the different board configs. It is responsible for TI Foundational Security (TIFS), Resource management (RS), Power Management (PM) services.
      Refer this document: Chapter 1: Introduction — TISCI User Guide
    • The boot loader (U-Boot/SPL) boots and loads the A53 with the HLOS. The A53 then boots the R5 and M4F cores.

    • The remoteproc driver looks for specific files for loading R5 core. Here is the reference for how to boot remote cores from linux: 3.7. IPC for AM64x — Processor SDK AM64X Documentation

    Thanks and Regards

    Rimika