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
This commit is contained in:
Tomasz Gajewski 2023-10-21 22:41:55 +02:00 committed by Christian Helmuth
parent 6402182815
commit 02753b3c2c

View File

@ -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]
}
}