1. Copy and paste the existing EVM A53 and R5 Kconfig targets in TI_U_BOOT/arch/arm/mach-k3/am62x/ Kconfig and rename the symbols for the custom board. Optionally, modify the corresponding board specific string. An example is below. + config TARGET_AM625_A53_ + bool " K3 based AM625 running on A53" + select ARM64 + select BINMAN + select OF_SYSTEM_SETUP + config TARGET_AM625_R5_ + bool " K3 based AM625 running on R5" + select CPU_V7R + select SYS_THUMB_BUILD + select K3_LOAD_SYSFW + select RAM + select SPL_RAM + select K3_DDRSS + select BINMAN + imply SYS_K3_SPL_ATF Add the following line to the bottom of the same Kconfig file. + source "board///Kconfig 2. Make new and directories to store files that will be copied and modified. $ mkdir -p TI_U_BOOT/board/// $ mkdir -p TI_U_BOOT/board//common/ 3. Copy and rename board files from the TI directory to the new directories. $ cp TI_U_BOOT/board/ti/am62x/* TI_U_BOOT/board// $ cp TI_U_BOOT/board/ti/common/* TI_U_BOOT/board//common 4. In the TI_U_BOOT/board// directory, edit the Kconfig by modifying the default value of the configuration options as seen below. if TARGET_AM625_A53_ config SYS_BOARD default "" config SYS_VENDOR default "" config SYS_CONFIG_NAME default "_evm" source "board//common/Kconfig" endif if TARGET_AM625_R5_ config SYS_BOARD default "" config SYS_VENDOR default "" config SYS_CONFIG_NAME default "_evm" config SPL_LDSCRIPT default "arch/arm/mach-omap2/u-boot-spl.lds" source "board//common/Kconfig" endif 4. In the same directory, rename the file evm.c to .c and the file am62x.env to .env. In the same directory, edit the Makefile as seen below. - obj-y += evm.o + obj-y += .o 5. Copy the EVM board header file and rename the file for the custom board. $ cp TI_U_BOOT/include/configs/am62x_evm.h TI_U_BOOT/include/configs/am62x_.h Make the following modification inside the newly created header file. - #ifndef __CONFIG_AM625_EVM_H - #define __CONFIG_AM625_EVM_H + #ifndef __CONFIG_AM625__H + #define __CONFIG_AM625__H 6. Create the following configuration fragments in TI_U_BOOT/configs/ and add the lines below to set the Kconfig targets. am62x__r5.config CONFIG_TARGET_AM625_R5_=y # CONFIG_TARGET_AM625_R5_EVM is not set am62x__a53.config CONFIG_TARGET_AM625_A53_=y # CONFIG_TARGET_AM625_A53_EVM is not set 7. Device tress were downloaded in the references section. $ cp TI_U_BOOT/arch/arm/dts/k3-am625-minimal.dts TI_U_BOOT/arch/arm/dts/k3-am625-.dts $ cp TI_U_BOOT/arch/arm/dts/k3-am625-r5-minimal.dts TI_U_BOOT/arch/arm/dts/k3-am625-r5- .dts $ cp TI_U_BOOT/arch/arm/dts/k3-am625-minimal-u-boot.dtsi TI_U_BOOT/arch/arm/dts/k3-am625- -u-boot.dtsi These naming changes need to be reflected in the #include preprocessor directives in k3-am625-r5- .dts. // in k3-am625-r5-.dts - #include "k3-am625-minimal.dts" - #include "k3-am625-minimal-u-boot.dtsi" + #include "k3-am625-.dts" + #include "k3-am625--u-boot.dtsi" 8. $ cp k3-am62x-ddr-config.dtsi TI_U_BOOT/arch/arm/dts/k3-am62x--ddr4-<#MTs>.dtsi Replace the following line in k3-am625-r5-.dts. - #include "k3-am62x-sk-ddr4-1600MTs.dtsi" + #include "k3-am62x--ddr4-<#MTs>.dtsi" 9. Setup Binman for Custom Board. Binman is used to generate U-Boot binaries. Use the following command to duplicate the existing EVM binman devicetree file and rename it for a custom board. $ cp TI_U_BOOT/arch/arm/dts/k3-am625-sk-binman.dtsi TI_U_BOOT/arch/arm/dts/k3-am625-- binman.dtsi In this newly created file, make the following modification to use the custom devicetree. - #define SPL_AM625_SK_DTB "spl/dts/k3-am625-sk.dtb" + #define SPL_AM625_SK_DTB "spl/dts/k3-am625-.dtb" Include this new file in k3-am625--u-boot.dtsi. - #include "k3-am625-sk-binman.dtsi" + #include "k3-am625--binman.dtsi" 10. dtb-$(CONFIG_SOC_K3_AM625) += k3-am625-sk.dtb \ k3-am625-r5-sk.dtb \ k3-am62sip-r5-sk.dtb \ k3-am625-beagleplay.dtb \ k3-am625-r5-beagleplay.dtb \ k3-am625-verdin-wifi-dev.dtb \ k3-am625-verdin-r5.dtb \ k3-am625-phyboard-lyra-rdk.dtb \ k3-am625-r5-phycore-som-2gb.dtb \ k3-am62-lp-sk.dtb \ k3-am62-r5-lp-sk.dtb \ + k3-am625-.dtb \ + k3-am625-r5-.dtb 11. am62x__r5.config CONFIG_DEFAULT_DEVICE_TREE="k3-am625-r5-" am62x__a53.config CONFIG_DEFAULT_DEVICE_TREE="k3-am625-" CONFIG_SPL_OF_LIST="k3-am625-" CONFIG_OF_LIST="k3-am625-" 12. $ export CROSS_COMPILE_64="${SDK_INSTALL_DIR}/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/aarch64-oe-linux/aarch64-oe-linux-" $ export SYSROOT_64="${SDK_INSTALL_DIR}/linux-devkit/sysroots/aarch64-oe-linux" $ export CC_64="${CROSS_COMPILE_64}gcc --sysroot=${SYSROOT_64}" $ export CROSS_COMPILE_32="${SDK_INSTALL_DIR}/k3r5-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-oe-eabi/arm-oe-eabi-" $ export LNX_FW_PATH=TI_SDK/board-support/prebuilt-images/am62xx-evm/ $ export TFA_PATH=TI_SDK/board-support/prebuilt-images/am62xx-evm/bl31.bin $ export OPTEE_PATH=TI_SDK/board-support/prebuilt-images/am62xx-evm/bl32.bin $ export UBOOT_CFG_CORTEXR="am62x_evm_r5_defconfig am62x__r5.config" $ export UBOOT_CFG_CORTEXA="am62x_evm_a53_defconfig am62x__a53.config" 13. $ make clean O=OUTPUT_DIR/r5 $ make ARCH=arm CROSS_COMPILE="$CROSS_COMPILE_32" $UBOOT_CFG_CORTEXR O=OUTPUT_DIR/r5 $ make ARCH=arm CROSS_COMPILE="$CROSS_COMPILE_32" O=OUTPUT_DIR/r5 BINMAN_INDIRS=$LNX_FW_PATH