run/image/uboot: move uImage to boot/

This patch changes the 'run_image' function to replace a boot/image.elf
file by the corresponding boot/uImage file.

Issue #4730
This commit is contained in:
Norman Feske 2023-01-18 17:23:14 +01:00 committed by Christian Helmuth
parent c06f5e2661
commit a7a5c5ce54
5 changed files with 17 additions and 9 deletions

View File

@ -199,7 +199,9 @@ proc run_boot_dir_arm { binaries } {
exec mkdir -p $tftp_base_dir$tftp_offset_dir
exec {*}[load_tftp_inst_cmd] [pwd]/[run_dir]/boot/image.elf $tftp_base_dir$tftp_offset_dir
if {[have_include "image/uboot"]} {
exec {*}[load_tftp_inst_cmd] [pwd]/[run_dir]/uImage $tftp_base_dir$tftp_offset_dir/uImage
exec {*}[load_tftp_inst_cmd] \
[file join [pwd] [run_dir] boot uImage] \
[file join $tftp_base_dir$tftp_offset_dir uImage]
}
}
}

View File

@ -150,11 +150,15 @@ proc run_boot_dir {binaries} {
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] [pwd]/[run_dir]/uImage [load_tftp_base_dir][load_tftp_offset_dir]
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] [pwd]/[run_dir]/image.itb [load_tftp_base_dir][load_tftp_offset_dir]
exec {*}[load_tftp_inst_cmd] \
[file join [pwd] [run_dir] boot image.itb] \
[load_tftp_base_dir][load_tftp_offset_dir]
}
}

View File

@ -124,7 +124,9 @@ proc run_boot_dir {binaries} {
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] [pwd]/[run_dir]/uImage [load_tftp_base_dir][load_tftp_offset_dir]
exec {*}[load_tftp_inst_cmd] \
[file join [pwd] [run_dir] boot uImage] \
[file join [load_tftp_base_dir][load_tftp_offset_dir]]
}
}

View File

@ -47,7 +47,7 @@ proc run_image { } {
grep -m 1 "LOAD"]
set load_addr [lindex [regexp -inline -all -- {\S+} $load_addr] 3]
set bin_img "[run_dir]/image.bin"
set bin_img [file join [run_dir] boot image.bin]
exec [cross_dev_prefix]objcopy -O binary $elf_img $bin_img
set use_gzip [expr ![image_uboot_use_no_gzip]]
@ -66,14 +66,14 @@ proc run_image { } {
if {[image_uboot_use_fit]} {
# create image.itb
set uboot_img [run_dir]/image.itb
set uboot_img [file join [run_dir] boot image.itb]
exec mkimage -f auto -A $arch -O linux -T kernel -C $compress_type -a $load_addr \
-e $entrypoint -d $bin_img$bin_ext $uboot_img
} else {
# create uImage
set uboot_img [run_dir]/uImage
set uboot_img [file join [run_dir] boot uImage]
exec mkimage -A $arch -O linux -T kernel -C $compress_type -a $load_addr \
-e $entrypoint -d $bin_img$bin_ext $uboot_img
}
exec rm -rf $bin_img$bin_ext
exec rm -rf $bin_img$bin_ext $elf_img
}

View File

@ -32,7 +32,7 @@ proc run_load { } {
}
set device [load_fastboot_device]
set uimg "[run_dir]/uImage"
set uimg [file join [run_dir] boot uImage]
# sleep a bit, board might need some time to come up
sleep 8