image/uefi: factor out common boot parts

to avoid divergence.

Issue #4741
This commit is contained in:
Alexander Boettcher 2023-01-27 07:57:52 +01:00 committed by Christian Helmuth
parent 264ee999a1
commit eb354be20d
4 changed files with 15 additions and 25 deletions

View File

@ -117,14 +117,7 @@ proc run_boot_dir {binaries} {
}
if {[have_include image/uefi]} {
set grub2_path [get_grub2_dir]
exec mkdir -p [run_dir]/efi/boot
exec cp $grub2_path/boot/grub2/grub2_32.efi [run_dir]/efi/boot/bootia32.efi
exec cp $grub2_path/boot/grub2/grub2_64.efi [run_dir]/efi/boot/bootx64.efi
exec mkdir -p [run_dir]/boot/grub
exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender
install_uefi_bootloader_to_run_dir
set serial_bender_opt "serial_fallback"
}

View File

@ -120,15 +120,7 @@ proc run_boot_dir {binaries} {
}
if {[have_include image/uefi]} {
exec mkdir -p [run_dir]/efi/boot
exec cp [get_grub2_dir]/boot/grub2/grub2_32.efi [run_dir]/efi/boot/bootia32.efi
exec cp [get_grub2_dir]/boot/grub2/grub2_64.efi [run_dir]/efi/boot/bootx64.efi
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_uefi_bootloader_to_run_dir
append options_bender " serial_fallback"
}

View File

@ -67,14 +67,7 @@ proc run_boot_dir {binaries} {
}
if {[have_include image/uefi]} {
set grub2_path [get_grub2_dir]
exec mkdir -p [run_dir]/efi/boot
exec cp $grub2_path/boot/grub2/grub2_32.efi [run_dir]/efi/boot/bootia32.efi
exec cp $grub2_path/boot/grub2/grub2_64.efi [run_dir]/efi/boot/bootx64.efi
exec mkdir -p [run_dir]/boot/grub
exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender
install_uefi_bootloader_to_run_dir
set serial_bender_opt "serial_fallback"
}

View File

@ -39,3 +39,15 @@ proc run_image { } {
exec rm -f [run_dir].header [run_dir].partition
}
proc install_uefi_bootloader_to_run_dir { } {
exec mkdir -p [run_dir]/efi/boot
exec cp [get_grub2_dir]/boot/grub2/grub2_32.efi [run_dir]/efi/boot/bootia32.efi
exec cp [get_grub2_dir]/boot/grub2/grub2_64.efi [run_dir]/efi/boot/bootx64.efi
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
}