hw: add UEFI boot support

via grub2 using multiboot 2

Issue #2242
This commit is contained in:
Alexander Boettcher
2017-02-02 14:25:06 +01:00
committed by Christian Helmuth
parent c2950e13eb
commit 972031cbbc
5 changed files with 168 additions and 10 deletions

View File

@@ -119,6 +119,25 @@ proc run_boot_dir {binaries} {
close $fh
}
if {[have_include image/uefi]} {
exec mkdir -p [run_dir]/efi/boot
exec cp [genode_dir]/tool/boot/grub2_32.efi [run_dir]/efi/boot/bootia32.efi
exec cp [genode_dir]/tool/boot/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
#
# Generate GRUB2 config file
#
set fh [open "[run_dir]/boot/grub/grub.cfg" "WRONLY CREAT TRUNC"]
puts $fh "set timeout=0"
puts $fh "menuentry 'Genode on base-hw' {"
puts $fh " multiboot2 /boot/bender serial_fallback"
puts $fh " module2 /image.elf"
puts $fh "}"
close $fh
}
run_image [run_dir]/image.elf
# set symbolic link to image.elf file in TFTP directory for PXE boot