From 02753b3c2c81c5a608817c84275bec14bf5ad2e2 Mon Sep 17 00:00:00 2001 From: Tomasz Gajewski Date: Sat, 21 Oct 2023 22:41:55 +0200 Subject: [PATCH] tool/run: fixed tftp support in boot_dir/hw Changes needed after merging `uboot` and `uboot_fit` modules into a single module. Additionally `image.elf` file is removed when either `image.itb` or `uImage` is created, so it cannot be processed when `image/uboot` module is loaded. Therefore `image.elf` processing is done conditionally now. Fixes #5037 --- tool/run/boot_dir/hw | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tool/run/boot_dir/hw b/tool/run/boot_dir/hw index f85cdcd9bb..014abe7b7f 100644 --- a/tool/run/boot_dir/hw +++ b/tool/run/boot_dir/hw @@ -139,18 +139,18 @@ proc run_boot_dir {binaries} { # install image.elf file in TFTP directory for PXE boot if {[expr [have_spec arm] || [have_spec arm_64]] && [have_include "load/tftp"]} { - exec {*}[load_tftp_inst_cmd] [pwd]/[run_dir]/boot/image.elf [load_tftp_base_dir][load_tftp_offset_dir] - if {[have_include "image/uboot"]} { - exec {*}[load_tftp_inst_cmd] \ - [file join [pwd] [run_dir] boot uImage] \ - [load_tftp_base_dir][load_tftp_offset_dir] - } - - if {[have_include "image/uboot_fit"]} { - exec {*}[load_tftp_inst_cmd] \ - [file join [pwd] [run_dir] boot image.itb] \ - [load_tftp_base_dir][load_tftp_offset_dir] + if {[image_uboot_use_fit]} { + exec {*}[load_tftp_inst_cmd] \ + [file join [pwd] [run_dir] boot image.itb] \ + [load_tftp_base_dir][load_tftp_offset_dir] + } else { + exec {*}[load_tftp_inst_cmd] \ + [file join [pwd] [run_dir] boot uImage] \ + [load_tftp_base_dir][load_tftp_offset_dir] + } + } else { + exec {*}[load_tftp_inst_cmd] [pwd]/[run_dir]/boot/image.elf [load_tftp_base_dir][load_tftp_offset_dir] } }