Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TI K3 updates #7762

Merged
merged 3 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
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.
  • Loading branch information
glneo committed Jan 29, 2025
commit e69fa01d9d84d310deeebf3038da23327662a426
2 changes: 2 additions & 0 deletions config/boards/sk-tda4vm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion config/bootscripts/boot-k3.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -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
20 changes: 12 additions & 8 deletions config/sources/families/k3.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}
Expand All @@ -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() {
Expand Down