mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-18 21:27:56 +00:00
run: rename hw boot/image.elf -> boot/image-hw.elf
This disambiguates the boot images installed for base-hw from those installed for base-nova. Note that the image.elf file for other kernels (i.e., NOVA) is not named image-<kernel>.elf at this point because this would prevent the update from a pre-24.04 Sculpt system to a later one as the grub.cfg is not touched by the old update mechanism. So after a system update, grub would keep loading the last installed image.elf. Issue #5182
This commit is contained in:
parent
e1ebcd8019
commit
dcd4578585
@ -1,6 +1,7 @@
|
||||
proc binary_name_ld_lib_so { } { return "ld-hw.lib.so" }
|
||||
proc binary_name_core_a { } { return "core-hw.a" }
|
||||
proc binary_name_timer { } { return "hw_timer_drv" }
|
||||
proc binary_name_image_elf { } { return "image-hw.elf" }
|
||||
|
||||
|
||||
proc run_boot_string { } { return "\nkernel initialized" }
|
||||
@ -90,16 +91,16 @@ proc run_boot_dir {binaries} {
|
||||
# create core binary containing the boot modules
|
||||
build_core [run_dir]/genode/$core_obj $modules [run_dir]/genode/core.elf [core_link_address]
|
||||
exec [cross_dev_prefix]strip [run_dir]/genode/core.elf
|
||||
build_core [run_dir]/genode/$bootstrap_obj { core.elf } [run_dir]/image.elf [bootstrap_link_address]
|
||||
build_core [run_dir]/genode/$bootstrap_obj { core.elf } [run_dir]/image-hw.elf [bootstrap_link_address]
|
||||
|
||||
# Save config part of the image.elf for easy inspection
|
||||
exec cp -f [run_dir]/genode/config [run_dir].config
|
||||
|
||||
remove_genode_dir
|
||||
exec [cross_dev_prefix]strip [run_dir]/image.elf
|
||||
exec [cross_dev_prefix]strip [run_dir]/image-hw.elf
|
||||
|
||||
exec mkdir -p [run_dir]/boot
|
||||
exec mv [run_dir]/image.elf [run_dir]/boot/image.elf
|
||||
exec mv [run_dir]/image-hw.elf [run_dir]/boot/image-hw.elf
|
||||
|
||||
set options_bender "[boot_output] "
|
||||
|
||||
@ -107,7 +108,7 @@ proc run_boot_dir {binaries} {
|
||||
#
|
||||
# Compress Genode image, to be uncompressed by GRUB
|
||||
#
|
||||
exec gzip -n [run_dir]/boot/image.elf
|
||||
exec gzip -n [run_dir]/boot/image-hw.elf
|
||||
|
||||
if {[have_include "image/disk"]} {
|
||||
install_disk_bootloader_to_run_dir
|
||||
@ -130,7 +131,7 @@ proc run_boot_dir {binaries} {
|
||||
puts $fh "menuentry 'Genode on base-hw' {"
|
||||
puts $fh " insmod multiboot2"
|
||||
puts $fh " multiboot2 /boot/bender $options_bender"
|
||||
puts $fh " module2 /boot/image.elf.gz image.elf"
|
||||
puts $fh " module2 /boot/image-hw.elf.gz image-hw.elf"
|
||||
puts $fh "}"
|
||||
close $fh
|
||||
}
|
||||
@ -150,7 +151,7 @@ proc run_boot_dir {binaries} {
|
||||
[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]
|
||||
exec {*}[load_tftp_inst_cmd] [pwd]/[run_dir]/boot/image-hw.elf [load_tftp_base_dir][load_tftp_offset_dir]
|
||||
}
|
||||
}
|
||||
|
||||
@ -165,7 +166,7 @@ proc run_boot_dir {binaries} {
|
||||
#
|
||||
set fh [open "[run_dir]/config-52-54-00-12-34-56" "WRONLY CREAT TRUNC"]
|
||||
puts $fh " exec /boot/bender $options_bender"
|
||||
puts $fh " load /boot/image.elf"
|
||||
puts $fh " load /boot/image-hw.elf"
|
||||
close $fh
|
||||
|
||||
generate_tftp_config
|
||||
|
@ -37,7 +37,7 @@ proc image_uboot_gzip_opt { } {
|
||||
#
|
||||
proc run_image { } {
|
||||
|
||||
set elf_img [file join [run_dir] boot image.elf]
|
||||
set elf_img [file join [run_dir] boot [kernel_specific_binary image.elf]]
|
||||
|
||||
# parse ELF entrypoint and load address
|
||||
set entrypoint [exec [cross_dev_prefix]readelf -h $elf_img | \
|
||||
|
@ -24,7 +24,7 @@ proc run_load { } {
|
||||
|
||||
set debugger [load_jtag_debugger]
|
||||
set board [load_jtag_board]
|
||||
set elf_img "[run_dir]/image.elf"
|
||||
set elf_img "[run_dir]/[kernel_specific_binary image.elf]"
|
||||
|
||||
# sleep a bit, board might need some time to come up
|
||||
sleep 8
|
||||
|
@ -134,7 +134,7 @@ proc run_power_on { } {
|
||||
|
||||
# on ARM/RISC-V, we supply the boot image as kernel
|
||||
if {[have_spec arm] || [have_spec arm_v8] || [have_spec riscv]} {
|
||||
append qemu_args " -kernel [run_dir]/boot/image.elf " }
|
||||
append qemu_args " -kernel [run_dir]/boot/[kernel_specific_binary image.elf] " }
|
||||
|
||||
set board_qemu_args [board_qemu_args]
|
||||
|
||||
|
@ -1142,8 +1142,9 @@ proc build_core_image { modules } {
|
||||
check_xml_syntax $file }
|
||||
|
||||
# create core binary containing the boot modules
|
||||
build_core [run_dir]/genode/$core_obj $modules [run_dir]/image.elf [core_link_address]
|
||||
exec [cross_dev_prefix]strip [run_dir]/image.elf
|
||||
set image_elf [run_dir]/[kernel_specific_binary image.elf]
|
||||
build_core [run_dir]/genode/$core_obj $modules $image_elf [core_link_address]
|
||||
exec [cross_dev_prefix]strip $image_elf
|
||||
|
||||
# Save config part of the image.elf for easy inspection
|
||||
exec cp -f [run_dir]/genode/config [run_dir].config
|
||||
|
Loading…
Reference in New Issue
Block a user