This is a guide on how I patched TI Edge AI v10_00_00_08 SD card image for BBAI64. Based on BBAI64 now can use TI SDK10.0 and debug R5 thread.
Some steps could be redundant or wrong. Any advice would be appreciated ![]()
On Ubuntu 22.14:
-
Download the ti-processor-sdk-linux-edgeai-j721e-evm-10_00_00_08-Linux-x86-Install.bin and tisdk-edgeai-image-j721e-evm.wic.xz
from PROCESSOR-SDK-LINUX-SK-TDA4VM Software development kit (SDK) | TI.com -
Install the sdk:
chmod +x ti-processor-sdk-linux-edgeai-j721e-evm-10_00_00_08-Linux-x86-Install.bin
./ti-processor-sdk-linux-edgeai-j721e-evm-<version>-Linux-x86-Install.bin
-
Extract
tisdk-edgeai-image-j721e-evm.wic.xzwith double click -
Flash
tisdk-edgeai-image-j721e-evm.wicimage into SD card with Balena Etcher -
Prepare build environment:
cd ~/ti-processor-sdk-linux-edgeai-j721e-evm-10_00_00_08
sudo apt install -y python3-pip xinetd nfs-kernel-server minicom build-essential libncurses5-dev autoconf automake dos2unix screen lrzsz lzop flex libssl-dev swig bison flex libssl-dev bc u-boot-tools
sudo apt install -y python3-jsonschema python3-pyelftools python3-yaml yamllint python3-setuptools
- Modify
Rules.make:
UBOOT_MACHINE=j721e_beagleboneai64_a72_defconfig
UBOOT_MACHINE_R5=j721e_beagleboneai64_r5_defconfig
EXEC_DIR?=targetfs/lib/firmware
ROOTFS_PART?=targetfs
BOOT_PART?=targetfs/boot
- Modify
board-support/ti-u-boot-2024.04+git/arch/arm/mach-k3/arm64-mmu.c:
#ifdef CONFIG_TARGET_J721E_A72_EVM // replace this line with the next line:
#if defined (CONFIG_TARGET_J721E_A72_EVM) || defined (CONFIG_TARGET_J721E_A72_BEAGLEBONEAI64)
- Rebuild
bl31.bin:
cd board-support/trusted-firmware-a-2.10+git/
make CROSS_COMPILE=aarch64-linux-gnu- ARCH=aarch64 PLAT=k3 TARGET_BOARD=generic SPD=opteed K3_USART=0x0
cd -
cp board-support/trusted-firmware-a-2.10+git/build/k3/generic/release/bl31.bin board-support/prebuilt-images/bl31.bin
- Rebuild
bl32.bin:
cd board-support/optee-os-4.2.0+git/
make CROSS_COMPILE=arm-linux-gnueabihf- CROSS_COMPILE64=aarch64-linux-gnu- CFG_CONSOLE_UART=0x0 PLATFORM=k3-j721e CFG_ARM64_core=y
cd -
cp board-support/optee-os-4.2.0+git/out/arm-plat-k3/core/tee-pager_v2.bin board-support/prebuilt-images/bl32.bin
- Build u-boot:
mkdir -p targetfs/boot
make u-boot
mv board-support/ti-u-boot-2024.04+git/build/a72/u-boot.img_unsigned board-support/ti-u-boot-2024.04+git/build/a72/u-boot.img
mv board-support/ti-u-boot-2024.04+git/build/a72/tispl.bin_unsigned board-support/ti-u-boot-2024.04+git/build/a72/tispl.bin
make u-boot_install
-
Replace
board-support/ti-linux-kernel-6.6.32+git-ti/arch/arm64/boot/dts/ti/k3-j721e-beagleboneai64.dtswith: k3-j721e-beagleboneai64.dts from BBAI64 now can use TI SDK10.0 and debug R5 thread. -
Build Linux kernel
Image:
make linux
make linux_install
cp board-support/prebuilt-images/uEnv.txt targetfs/boot/
cp -a board-support/ti-linux-kernel-6.6.32+git-ti/targetfs/* targetfs/
cp board-support/prebuilt-images/ti-sysfw/ti-fs-firmware-j721e-gp.bin targetfs/boot/
rm -rf targetfs/lib/modules/6.6.32-*/build
- Replace
name_overlaysintargetfs/boot/uEnv.txtwith:
name_overlays=ti/k3-j721e-beagleboneai64.dtb ti/k3-j721e-common-proc-board.dtb ti/k3-j721e-sk.dtb ti/k3-j721e-edgeai-apps.dtbo
- Create
extlinux.conf:
mkdir -p targetfs/boot/extlinux
touch targetfs/boot/extlinux/extlinux.conf
- Populate
extlinux.conf:with:
menu title BeagleBone AI-64 microSD (extlinux.conf) Options
timeout 50
default BeagleBone AI-64 microSD (default)
label BeagleBone AI-64 microSD Recovery
kernel /Image
append root=/dev/mmcblk1p2 ro rootfstype=ext4 rootwait net.ifnames=0
fdtdir /
label BeagleBone AI-64 microSD (default)
kernel /Image
append root=/dev/mmcblk1p2 ro rootfstype=ext4 rootwait net.ifnames=0 quiet
fdtdir /
- Patch the SD card (I assume that it is mounted under
/media/<user_name>/BOOT/and/media/<user_name>/rootfs/):
rm -rf /media/<user_name>/BOOT/*
mkdir /media/<user_name>/BOOT/extlinux
cp targetfs/boot/extlinux/* /media/<user_name>/BOOT/extlinux/
cp targetfs/boot/Image /media/<user_name>/BOOT/
cp targetfs/boot/sysfw.itb /media/<user_name>/BOOT/
cp targetfs/boot/tiboot3.bin /media/<user_name>/BOOT/
cp targetfs/boot/tispl.bin /media/<user_name>/BOOT/
cp targetfs/boot/u-boot.img /media/<user_name>/BOOT/
cp targetfs/boot/uEnv.txt /media/<user_name>/BOOT/
cp targetfs/boot/ti-fs-firmware-j721e-gp.bin /media/<user_name>/BOOT/
cp -r targetfs/boot/dtb/* /media/<user_name>/BOOT/
sudo cp -r targetfs/lib/modules/* /media/<user_name>/rootfs/lib/modules/
sudo rm -rf /media/<user_name>/rootfs/lib/modules/6.6.32-ti-gdb8871293143-dirty/
sudo cp targetfs/boot/Image /media/<user_name>/rootfs/boot/Image-6.6.32-ti-gdb8871293143-dirty
sudo cp -r targetfs/boot/dtb/* /media/<user_name>/rootfs/boot/dtb/
