From f98216d2c35dabde89efd899fcd801a7e4fff0ee Mon Sep 17 00:00:00 2001 From: Andrew Davis Date: Tue, 28 Jan 2025 09:59:57 -0600 Subject: [PATCH] K3: Update to latest U-Boot v2025.01 Now that upstream U-Boot has support for building K3 boot artifacts we can drop using the ti-u-boot fork. Switch to v2025.01 and adjust file names and add new dependencies as needed. --- config/boards/sk-tda4vm.conf | 2 ++ config/bootscripts/boot-k3.cmd | 2 +- config/sources/families/k3.conf | 20 ++++++++++++-------- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/config/boards/sk-tda4vm.conf b/config/boards/sk-tda4vm.conf index 3e7b0cdd8..7236a1e0c 100644 --- a/config/boards/sk-tda4vm.conf +++ b/config/boards/sk-tda4vm.conf @@ -9,6 +9,8 @@ BOOT_FDT_FILE="ti/k3-j721e-sk.dts" TIBOOT3_BOOTCONFIG="j721e_evm_r5_defconfig" TIBOOT3_FILE="tiboot3-j721e-gp-evm.bin" SYSFW_FILE="sysfw-j721e-gp-evm.itb" +TISPL_FILE="tispl.bin_unsigned" +UBOOT_FILE="u-boot.img_unsigned" DEFAULT_CONSOLE="serial" KERNEL_TARGET="current,edge" KERNEL_TEST_TARGET="current" diff --git a/config/bootscripts/boot-k3.cmd b/config/bootscripts/boot-k3.cmd index a7fbd5f11..f2b5b8e3d 100644 --- a/config/bootscripts/boot-k3.cmd +++ b/config/bootscripts/boot-k3.cmd @@ -4,4 +4,4 @@ finduuid=part uuid \${boot} 1:2 uuid name_rd=uInitrd get_rd_mmc=load mmc ${bootpart} ${rdaddr} ${bootdir}/${name_rd} -uenvcmd=run get_rd_${boot}; env set rd_spec ${rdaddr}:${filesize} +uenvcmd=run get_rd_${boot}; env set rd_spec ${rdaddr}:${filesize}; setexpr fdtfile sub ti/ti ti; run bootcmd_ti_mmc diff --git a/config/sources/families/k3.conf b/config/sources/families/k3.conf index c3a36e8a8..1266eec88 100644 --- a/config/sources/families/k3.conf +++ b/config/sources/families/k3.conf @@ -12,7 +12,7 @@ declare -g LINUXFAMILY="k3" declare -g OVERLAY_DIR="/boot/dtb/ti/overlay" declare -g ATFBRANCH="tag:v2.12.0" -declare -g BOOTBRANCH="tag:v2023.10-rc3" +declare -g BOOTBRANCH="tag:v2025.01" declare -g BOOTSCRIPT="boot-k3.cmd:uEnv.txt" case "${BRANCH}" in @@ -44,18 +44,17 @@ ROOT_FS_LABEL="root" function add_host_dependencies__k3_python3_dep() { display_alert "Preparing K3 U-Boot host-side dependencies" "${EXTENSION}" "info" - declare -g EXTRA_BUILD_DEPS="${EXTRA_BUILD_DEPS} python3-yaml python3-jsonschema" + declare -g EXTRA_BUILD_DEPS="${EXTRA_BUILD_DEPS} python3-yaml python3-jsonschema yamllint" } function compile_k3_bootgen() { # Source code checkout (fetch_from_repo "https://git.ti.com/cgit/processor-firmware/ti-linux-firmware" "ti-linux-firmware" "branch:ti-linux-firmware") - (fetch_from_repo "https://git.ti.com/cgit/ti-u-boot/ti-u-boot" "ti-u-boot" "branch:ti-u-boot-2023.04") - pushd ${SRC}/cache/sources/ti-u-boot || exit + pushd ${SRC}/cache/sources/u-boot-worktree/${BOOTDIR}/${BOOTBRANCH##*:} || exit - run_host_command_logged make -j$(nproc) CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm ${TIBOOT3_BOOTCONFIG} - run_host_command_logged make -j$(nproc) CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm BINMAN_INDIRS=${SRC}/cache/sources/ti-linux-firmware + run_host_command_logged make -j$(nproc) CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm O=build-r5 ${TIBOOT3_BOOTCONFIG} + run_host_command_logged make -j$(nproc) CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm O=build-r5 BINMAN_INDIRS=${SRC}/cache/sources/ti-linux-firmware popd } @@ -64,8 +63,13 @@ function pre_config_uboot_target__build_first_stage() { # Compile first stage bootloader compile_k3_bootgen - cp ${SRC}/cache/sources/ti-u-boot/${TIBOOT3_FILE} tiboot3.bin - cp ${SRC}/cache/sources/ti-u-boot/${SYSFW_FILE} sysfw.itb || true + cp ${SRC}/cache/sources/u-boot-worktree/${BOOTDIR}/${BOOTBRANCH##*:}/build-r5/${TIBOOT3_FILE} tiboot3.bin + cp ${SRC}/cache/sources/u-boot-worktree/${BOOTDIR}/${BOOTBRANCH##*:}/build-r5/${SYSFW_FILE} sysfw.itb || true +} + +function post_uboot_custom_postprocess__update_uboot_names() { + cp ${TISPL_FILE} tispl.bin || true + cp ${UBOOT_FILE} u-boot.img || true } function pre_prepare_partitions() {