mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 17:52:52 +00:00
image/disk: factor out common boot parts
to avoid divergence Issue #4741
This commit is contained in:
parent
eb354be20d
commit
c3843cd0d6
@ -49,8 +49,7 @@ proc run_boot_dir {binaries} {
|
||||
if {[have_include "image/iso"] || [have_include "image/disk"]} {
|
||||
|
||||
if {[have_include "image/disk"]} {
|
||||
exec mkdir -p [run_dir]/boot/grub
|
||||
exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender
|
||||
install_disk_bootloader_to_run_dir
|
||||
}
|
||||
|
||||
if {[have_include "image/iso"]} {
|
||||
|
@ -93,8 +93,7 @@ proc run_boot_dir_x86 {binaries} {
|
||||
if {[have_include "image/iso"] || [have_include "image/disk"]} {
|
||||
|
||||
if {[have_include "image/disk"]} {
|
||||
exec mkdir -p [run_dir]/boot/grub
|
||||
exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender
|
||||
install_disk_bootloader_to_run_dir
|
||||
}
|
||||
|
||||
if {[have_include "image/iso"]} {
|
||||
|
@ -108,8 +108,7 @@ proc run_boot_dir {binaries} {
|
||||
set serial_bender_opt ""
|
||||
|
||||
if {[have_include "image/disk"]} {
|
||||
exec mkdir -p [run_dir]/boot/grub
|
||||
exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender
|
||||
install_disk_bootloader_to_run_dir
|
||||
}
|
||||
|
||||
if {[have_include "image/iso"]} {
|
||||
|
@ -109,10 +109,7 @@ proc run_boot_dir {binaries} {
|
||||
exec gzip [run_dir]/boot/image.elf
|
||||
|
||||
if {[have_include "image/disk"]} {
|
||||
exec mkdir -p [run_dir]/boot/grub
|
||||
exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender
|
||||
exec cp [genode_dir]/tool/boot/boot.png [run_dir]/boot/boot.png
|
||||
exec cp [get_grub2_dir]/boot/font.pf2 [run_dir]/boot/font.pf2
|
||||
install_disk_bootloader_to_run_dir
|
||||
}
|
||||
|
||||
if {[have_include "image/iso"]} {
|
||||
|
@ -161,8 +161,7 @@ proc run_boot_dir {binaries} {
|
||||
if {[have_include "image/iso"] || [have_include "image/disk"]} {
|
||||
|
||||
if {[have_include "image/disk"]} {
|
||||
exec mkdir -p [run_dir]/boot/grub
|
||||
exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender
|
||||
install_disk_bootloader_to_run_dir
|
||||
}
|
||||
|
||||
if {[have_include "image/iso"]} {
|
||||
|
@ -48,8 +48,7 @@ proc run_boot_dir {binaries} {
|
||||
if {[have_include "image/iso"] || [have_include "image/disk"]} {
|
||||
|
||||
if {[have_include "image/disk"]} {
|
||||
exec mkdir -p [run_dir]/boot/grub
|
||||
exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender
|
||||
install_disk_bootloader_to_run_dir
|
||||
}
|
||||
|
||||
if {[have_include "image/iso"]} {
|
||||
|
@ -58,8 +58,7 @@ proc run_boot_dir {binaries} {
|
||||
set serial_bender_opt ""
|
||||
|
||||
if {[have_include "image/disk"]} {
|
||||
exec mkdir -p [run_dir]/boot/grub
|
||||
exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender
|
||||
install_disk_bootloader_to_run_dir
|
||||
}
|
||||
|
||||
if {[have_include "image/iso"]} {
|
||||
|
@ -91,3 +91,11 @@ proc run_image { } {
|
||||
set size_image [expr [regsub {\s.*} [exec du -sk [run_dir].img] {}]]
|
||||
puts "Created image file [run_dir].img (${size_image}kiB)"
|
||||
}
|
||||
|
||||
|
||||
proc install_disk_bootloader_to_run_dir { } {
|
||||
exec mkdir -p [run_dir]/boot/grub
|
||||
exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender
|
||||
exec cp [genode_dir]/tool/boot/boot.png [run_dir]/boot/boot.png
|
||||
exec cp [get_grub2_dir]/boot/font.pf2 [run_dir]/boot/font.pf2
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user