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.

CCS/TDA4VMXEVM: u-boot add new board

Part Number: TDA4VMXEVM

Tool/software: Code Composer Studio

I use sdk 06_02_00

I want to add new board base j721e

When adding a new board, the following steps are generally needed:
 [1] Add a header file include/configs/<target>.h
 [2] Make sure to define necessary CONFIG_SYS_* in Kconfig:
       Define CONFIG_SYS_CPU="cpu" to compile arch/<arch>/cpu/<cpu>
       Define CONFIG_SYS_SOC="soc" to compile arch/<arch>/cpu/<cpu>/<soc>
       Define CONFIG_SYS_VENDOR="vendor" to compile board/<vendor>/common/*
         and board/<vendor>/<board>/*
       Define CONFIG_SYS_BOARD="board" to compile board/<board>/*
         (or board/<vendor>/<board>/* if CONFIG_SYS_VENDOR is defined)
       Define CONFIG_SYS_CONFIG_NAME="target" to include
         include/configs/<target>.h
 [3] Add a new entry to the board select menu in Kconfig.
     The board select menu is located in arch/<arch>/Kconfig or
     arch/<arch>/*/Kconfig.
 [4] Add a MAINTAINERS file
     It is generally placed at board/<board>/MAINTAINERS or
     board/<vendor>/<board>/MAINTAINERS
 [5] Add configs/<target>_defconfig
I do depend on above way,but build error
below is build log:
  CC      arch/arm/mach-k3/common.o
/home/wangyi/ti/ti-processor-sdk-linux-automotive-j7-evm-06_02_00/board-support/u-boot-vdcu/arch/arm/mach-k3/common.c: In function ‘init_env’:
/home/wangyi/ti/ti-processor-sdk-linux-automotive-j7-evm-06_02_00/board-support/u-boot-vdcu/arch/arm/mach-k3/common.c:74:7: error: ‘BOOT_DEVICE_MMC2’ undeclared (first use in this function); did you mean ‘U_BOOT_DEVICES’?
  case BOOT_DEVICE_MMC2:
       ^~~~~~~~~~~~~~~~
       U_BOOT_DEVICES
/home/wangyi/ti/ti-processor-sdk-linux-automotive-j7-evm-06_02_00/board-support/u-boot-vdcu/arch/arm/mach-k3/common.c:74:7: note: each undeclared identifier is reported only once for each function it appears in
/home/wangyi/ti/ti-processor-sdk-linux-automotive-j7-evm-06_02_00/board-support/u-boot-vdcu/arch/arm/mach-k3/common.c:79:7: error: ‘BOOT_DEVICE_SPI’ undeclared (first use in this function); did you mean ‘U_BOOT_DEVICES’?
  case BOOT_DEVICE_SPI:
       ^~~~~~~~~~~~~~~
       U_BOOT_DEVICES
/home/wangyi/ti/ti-processor-sdk-linux-automotive-j7-evm-06_02_00/board-support/u-boot-vdcu/arch/arm/mach-k3/common.c: In function ‘load_firmware’:
/home/wangyi/ti/ti-processor-sdk-linux-automotive-j7-evm-06_02_00/board-support/u-boot-vdcu/arch/arm/mach-k3/common.c:104:7: error: ‘BOOT_DEVICE_MMC2’ undeclared (first use in this function); did you mean ‘U_BOOT_DEVICES’?
 anyone know why?
 
  • Hi,

    arch/arm/mach-k3/include/mach/j721e_spl.h is having all the definitions of the macros: BOOT_DEVICE_SPI, BOOT_DEVICE_MMC2.

    That is included by arch/arm/mach-k3/include/mach/spl.h.

    #ifdef CONFIG_SOC_K3_J721E
    #include "j721e_spl.h"
    #endif

    So you need to add your config to include some file that has the BOOT_DEVICE_* macros.
    Also similar header needed for  arch/arm/mach-k3/include/mach/hardware.h

    that includes: 

    #ifdef CONFIG_SOC_K3_J721E
    #include "j721e_hardware.h"
    #endif

    Just try to replicate that for your board as well. Hope this gets you forward.

    Best Regards,
    Keerthy

  • thank you,can resolve this question,but Another error occurred:

    arm-linux-gnueabihf-ld.bfd: arch/arm/mach-k3/built-in.o: in function `init_env':
    /home/wangyi/ti/ti-processor-sdk-linux-automotive-j7-evm-06_02_00/board-support/u-boot-vdcu/arch/arm/mach-k3/common.c:73: undefined reference to `spl_boot_device'
    arm-linux-gnueabihf-ld.bfd: /home/wangyi/ti/ti-processor-sdk-linux-automotive-j7-evm-06_02_00/board-support/u-boot-vdcu/arch/arm/mach-k3/common.c:85: undefined reference to `spl_boot_device'
    arm-linux-gnueabihf-ld.bfd: arch/arm/mach-k3/built-in.o: in function `load_firmware':
    /home/wangyi/ti/ti-processor-sdk-linux-automotive-j7-evm-06_02_00/board-support/u-boot-vdcu/arch/arm/mach-k3/common.c:103: undefined reference to `spl_boot_device'
    arm-linux-gnueabihf-ld.bfd: /home/wangyi/ti/ti-processor-sdk-linux-automotive-j7-evm-06_02_00/board-support/u-boot-vdcu/arch/arm/mach-k3/common.c:109: undefined reference to `spl_boot_device'
    arm-linux-gnueabihf-ld.bfd: arch/arm/mach-k3/built-in.o: in function `jump_to_image_no_args':
    /home/wangyi/ti/ti-processor-sdk-linux-automotive-j7-evm-06_02_00/board-support/u-boot-vdcu/arch/arm/mach-k3/common.c:173: undefined reference to `release_resources_for_core_shutdown'
    arm-linux-gnueabihf-ld.bfd: common/spl/built-in.o: in function `board_boot_order':
    /home/wangyi/ti/ti-processor-sdk-linux-automotive-j7-evm-06_02_00/board-support/u-boot-vdcu/common/spl/spl.c:480: undefined reference to `spl_boot_device'
    arm-linux-gnueabihf-ld.bfd: drivers/built-in.o: in function `am654_sdhci_probe':
    /home/wangyi/ti/ti-processor-sdk-linux-automotive-j7-evm-06_02_00/board-support/u-boot-vdcu/drivers/mmc/am654_sdhci.c:431: undefined reference to `spl_boot_device'
    /home/wangyi/ti/ti-processor-sdk-linux-automotive-j7-evm-06_02_00/board-support/u-boot-vdcu/scripts/Makefile.spl:378: recipe for target 'spl/u-boot-spl' failed
    make[2]: *** [spl/u-boot-spl] Error 1
    /home/wangyi/ti/ti-processor-sdk-linux-automotive-j7-evm-06_02_00/board-support/u-boot-vdcu/Makefile:1659: recipe for target 'spl/u-boot-spl' failed

  • Hi,

    If you look at arch/arm/mach-k3/j721e_init.c you have spl_boot_device. Do you have that in your build
    path or do you have something defined like that for your custom board?

    Same case with release_resources_for_core_shutdown.

    Please look at j7 specific file: arch/arm/mach-k3/j721e_init.c

    Have something similar for your target.

    Hope you can resolve this issue.

    BR,
    Keerthy

  • ok,thank you very much

    if you add a new board in uboot base on j721e.

    what do you need to do?

    or do you have some decument about how to add new board in uboot.

    perhaps I am not clear.

  • ok,I can build succefully.

    but uboot can not run,i change the borad info

    change the dtsi file model value

  • Hi,

    There is no such document available yet.

    When you say you could build it: Do you have?

    1) tiboot3.bin, tispl.bin, u-boot.img built successfully?
    2) Did you try SD card boot?
    3) Do you have the console logs?

    Regards,
    Keerthy

  • 1.tiboot3.bin,sispl.bin ,u-boot.ima built successfully

    2.i try to SD card boot

    3.have console logs,but can not enter into uboot

    I change some evm info,like dts model.

  • Hi,

    Please share the console logs. So that we can check where it is failing.

    Thanks,
    Keerthy


  • U-Boot SPL 2019.01-dirty (May 06 2020 - 09:27:23 +0800)
    SYSFW ABI: 2.9 (firmware rev 0x0013 '19.12.1-v2019.12a (Terrific Lla')
    U-Boot SPL 2019.01-dirty (May 06 2020 - 09:27:23 +0800)
    SYSFW ABI: 2.9 (firmware rev 0x0013 '19.12.1-v2019.12a (Terrific Lla')
  • I think ATF and OPTEE are not passed while building u-boot. Can you look at building procedure at[0] and see you have those components are included?

    [0] http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_01_00_11/linux/Foundational_Components_U-Boot.html#u-boot-for-am65x-family-of-socs 

    Thanks and regards,

    Lokesh