tool: use grub2 instead of grub1 for iso boot

Fixes #2526
This commit is contained in:
Alexander Boettcher
2017-09-20 22:56:00 +02:00
committed by Christian Helmuth
parent 7ff6e96623
commit 44adc3c404
24 changed files with 182 additions and 163 deletions

View File

@@ -45,10 +45,14 @@ proc run_boot_dir {binaries} {
if {[have_include "image/iso"] || [have_include "image/disk"]} {
#
# Install isolinux/GRUB files and bender
#
install_iso_bootloader_to_run_dir
if {[have_include "image/disk"]} {
exec mkdir -p [run_dir]/boot/grub
exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender
}
if {[have_include "image/iso"]} {
install_iso_bootloader_to_run_dir
}
#
# Generate GRUB config file
@@ -56,16 +60,16 @@ proc run_boot_dir {binaries} {
# The core binary is part of the 'binaries' list but it must
# appear right after 'sigma0' as boot module. Hence the special case.
#
set fh [open "[run_dir]/boot/grub/menu.lst" "WRONLY CREAT TRUNC"]
puts $fh "timeout 0"
puts $fh "default 0"
puts $fh "\ntitle Genode on L4/Fiasco"
puts $fh " kernel /boot/bender"
set fh [open "[run_dir]/boot/grub/grub.cfg" "WRONLY CREAT TRUNC"]
puts $fh "set timeout=0"
puts $fh "menuentry 'Genode on L4/Fiasco' {"
puts $fh " insmod multiboot"
puts $fh " multiboot /boot/bender"
puts $fh " module /bootstrap -serial"
puts $fh " module /kernel -serial -jdb_cmd=JH [fiasco_serial_esc_arg]"
puts $fh " module /sigma0"
puts $fh " module /image.elf"
puts $fh " vbeset 0x117 506070"
puts $fh "}"
close $fh
}