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

@@ -88,10 +88,14 @@ proc run_boot_dir_x86 {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
@@ -99,15 +103,16 @@ proc run_boot_dir_x86 {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 Fiasco.OC"
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 Fiasco.OC' {"
puts $fh " insmod multiboot"
puts $fh " multiboot /boot/bender"
puts $fh " module /bootstrap"
puts $fh " module /kernel [fiasco_serial_esc_arg]"
puts $fh " module /sigma0"
puts $fh " module /image.elf"
puts $fh "}"
close $fh
}