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: Can't start the board using DFU

Part Number: SK-AM62

Hi,

I've been trying to start an SK-AM62 through DFU following the instruction there, compiled tiboot3.bin according to the instructions here, and using the SDK currently available on the website (ti-processor-sdk-linux-am62xx-evm-08.06.00.42-Linux-x86-Install.bin)

The board boot switches seem to be properly configured as I can see the board being enumerated on USB when started using dmesg, and dfu-util -l looks reasonable:

$ sudo dfu-util -l 
dfu-util 0.11

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

Found DFU: [0451:6165] ver=0200, devnum=69, cfg=1, intf=0, path="9-2.4.2", alt=1, name="SocId", serial="01.00.00.00"
Found DFU: [0451:6165] ver=0200, devnum=69, cfg=1, intf=0, path="9-2.4.2", alt=0, name="bootloader", serial="01.00.00.00"

However, when I try to boot the tiboot3.bin file I created, I get the following dfu-util error:

$ sudo dfu-util -R -a bootloader -D sdk/board-support/k3-image-gen-2022.01/tiboot3.bin
dfu-util 0.11

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Warning: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release
Opening DFU capable USB device...
Device ID 0451:6165
Device DFU version 0110
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 0110
Device returned transfer size 512
Copying data from PC to DFU device
Download	[=========================] 100%       332477 bytes
Download done.
DFU state(6) = dfuMANIFEST-SYNC, status(0) = No error condition is present
dfu-util: unable to read DFU status after completion (LIBUSB_ERROR_TIMEOUT)

The UART outputs something a bit more specific:

U-Boot SPL 2021.01-00001-g45cb7e44ae84 (Jul 06 2023 - 16:35:31 +0200)
SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
SPL initial stack usage: 13424 bytes
SPL: Unsupported Boot Device!
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

It seems to indicate that the DFU support is entirely missing from the SPL, but yet I did use am62x_evm_r5_usbdfu_defconfig which was suggested in the doc mentioned above.

I tried to automate it to follow the procedure (and be sure I do so) using the following script:

#!/bin/bash

DEVICE="am62x"
TI_SYSFW_NAME="ti-fs-firmware-am62x-gp.bin"
UBOOT_R5_DEFCONFIG="${DEVICE}_evm_r5_usbdfu_defconfig"
UBOOT_A53_DEFCONFIG="${DEVICE}_evm_a53_defconfig"

DFU=$(which dfu-util)
if [ -z ${DFU} ]; then
	echo "dfu-util not found"
	exit 1
fi

SDK_DIR=$(realpath $1)
if [ ! -d ${SDK_DIR} ]; then
	echo "SDK Directory doesn't exist"
	exit 1
fi

export PATH=${PATH}:${SDK_DIR}/linux-devkit/sysroots/x86_64-arago-linux/usr/bin

PREBUILT_DIR=${SDK_DIR}/board-support/prebuilt-images
echo ${PREBUILT_DIR}
if [ ! -d ${PREBUILT_DIR} ]; then
	echo "Prebuilt images Directory doesn't exist"
	exit 1
fi

ATF_BIN=${PREBUILT_DIR}/bl31.bin
if [ ! -f ${ATF_BIN} ]; then
	echo "Prebuilt ATF image missing"
	exit 1
fi

TEE_BIN=${PREBUILT_DIR}/bl32.bin
if [ ! -f ${TEE_BIN} ]; then
	echo "Prebuilt TEE image missing"
	exit 1
fi

DM_BIN=${PREBUILT_DIR}/ipc_echo_testb_mcu1_0_release_strip.xer5f
if [ ! -f ${DM_BIN} ]; then
	echo "Prebuilt DM image missing"
	exit 1
fi

TI_SYSFW_BIN=${PREBUILT_DIR}/${TI_SYSFW_NAME}
if [ ! -f ${TI_SYSFW_BIN} ]; then
	echo "Prebuilt sysfw image missing"
	exit 1
fi

UBOOT_DIR=$(ls -d ${SDK_DIR}/board-support/u-boot-*)
if [ ! -d ${UBOOT_DIR} ]; then
	echo "U-Boot directory doesn't exist"
	exit 1
fi

R5_BUILD_DIR=${UBOOT_DIR}/build/r5
A53_BUILD_DIR=${UBOOT_DIR}/build/a53

K3_IMAGE_GEN_DIR=$(ls -d ${SDK_DIR}/board-support/k3-image-gen-*)
if [ ! -d ${K3_IMAGE_GEN_DIR} ]; then
	echo "K3 image gen directory doesn't exist"
	exit 1
fi

cd ${UBOOT_DIR}

export ARCH=arm
export CROSS_COMPILE=arm-none-linux-gnueabihf-

echo "Compiling U-Boot"

make ${DEVICE}_evm_r5_defconfig O=${R5_BUILD_DIR} > /dev/null
make -j $(nproc) O=${R5_BUILD_DIR} > /dev/null

SPL_BIN=${R5_BUILD_DIR}/spl/u-boot-spl.bin
if [ ! -f ${SPL_BIN} ]; then
	echo "SPL binary missing"
	exit 1
fi

cd ${K3_IMAGE_GEN_DIR}
ln -fs ${TI_SYSFW_BIN} .

echo "Compiling tiboot3.bin"

make SOC=${DEVICE} SBL=${SPL_BIN} > /dev/null

echo "Generated ${K3_IMAGE_GEN_DIR}/tiboot3.bin"

cd ${UBOOT_DIR}

export ARCH=arm
export CROSS_COMPILE=aarch64-none-linux-gnu-

make ${UBOOT_A53_DEFCONFIG} O=${A53_BUILD_DIR} > /dev/null
make ATF=${ATF_BIN} TEE=${TEE_BIN} DM=${DM_BIN} O=${A53_BUILD_DIR} -j $(nproc) > /dev/null

echo "Generated ${A53_BUILD_DIR}/tispl.bin"
echo "Generated ${A53_BUILD_DIR}/u-boot.img"

It seems to follow the procedure to the letter, but something must be wrong somewhere.

Thanks!

Maxime