mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-24 07:46:42 +00:00
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:
parent
c06f5e2661
commit
a7a5c5ce54
@ -199,7 +199,9 @@ proc run_boot_dir_arm { binaries } {
|
|||||||
exec mkdir -p $tftp_base_dir$tftp_offset_dir
|
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
|
exec {*}[load_tftp_inst_cmd] [pwd]/[run_dir]/boot/image.elf $tftp_base_dir$tftp_offset_dir
|
||||||
if {[have_include "image/uboot"]} {
|
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]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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]
|
exec {*}[load_tftp_inst_cmd] [pwd]/[run_dir]/boot/image.elf [load_tftp_base_dir][load_tftp_offset_dir]
|
||||||
|
|
||||||
if {[have_include "image/uboot"]} {
|
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"]} {
|
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]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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]
|
exec {*}[load_tftp_inst_cmd] [pwd]/[run_dir]/boot/image.elf [load_tftp_base_dir][load_tftp_offset_dir]
|
||||||
|
|
||||||
if {[have_include "image/uboot"]} {
|
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]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ proc run_image { } {
|
|||||||
grep -m 1 "LOAD"]
|
grep -m 1 "LOAD"]
|
||||||
set load_addr [lindex [regexp -inline -all -- {\S+} $load_addr] 3]
|
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
|
exec [cross_dev_prefix]objcopy -O binary $elf_img $bin_img
|
||||||
|
|
||||||
set use_gzip [expr ![image_uboot_use_no_gzip]]
|
set use_gzip [expr ![image_uboot_use_no_gzip]]
|
||||||
@ -66,14 +66,14 @@ proc run_image { } {
|
|||||||
|
|
||||||
if {[image_uboot_use_fit]} {
|
if {[image_uboot_use_fit]} {
|
||||||
# create image.itb
|
# 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 \
|
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
|
-e $entrypoint -d $bin_img$bin_ext $uboot_img
|
||||||
} else {
|
} else {
|
||||||
# create uImage
|
# 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 \
|
exec mkimage -A $arch -O linux -T kernel -C $compress_type -a $load_addr \
|
||||||
-e $entrypoint -d $bin_img$bin_ext $uboot_img
|
-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
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ proc run_load { } {
|
|||||||
}
|
}
|
||||||
|
|
||||||
set device [load_fastboot_device]
|
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 a bit, board might need some time to come up
|
||||||
sleep 8
|
sleep 8
|
||||||
|
Loading…
Reference in New Issue
Block a user