tool: Extend hw boot_dir script to support Muen SK build

This commit is contained in:
Adrian-Ken Rueegsegger 2015-08-21 18:12:42 +02:00 committed by Christian Helmuth
parent aefacc9310
commit bffddd7e15

View File

@ -145,20 +145,14 @@ proc run_boot_dir {binaries} {
# offer ELF image
set elf_img "[run_dir]/image.elf"
# Use raw binary object for base-hw on Muen
if {[have_spec "muen"]} {
set raw_img "[run_dir]/image.raw"
exec [cross_dev_prefix]objcopy -O binary bin/$core_bin $raw_img
exit 0
}
if {[have_spec "x86_64"] && ![have_spec "muen"]} {
if {[have_spec "x86_64"]} {
# as startup is done in 32 bit mode, GRUB expects a 32 bit image
exec [cross_dev_prefix]objcopy -O elf32-i386 bin/$core_bin $elf_img
}
if {[expr [have_spec "arm"] || [have_spec "x86_32"]]} {
exec cp -L bin/$core_bin $elf_img
}
exec [cross_dev_prefix]strip $elf_img
if {[have_include "image/iso"] || [have_include "image/disk"]} {
@ -173,9 +167,15 @@ proc run_boot_dir {binaries} {
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 base-hw"
puts $fh " kernel /boot/bender"
puts $fh " module /image.elf"
if {[have_spec "muen"]} {
puts $fh "\ntitle Genode on base-hw/Muen SK"
puts $fh " kernel /image.bin"
} else {
puts $fh "\ntitle Genode on base-hw"
puts $fh " kernel /boot/bender"
puts $fh " module /image.elf"
}
close $fh
}
@ -190,7 +190,7 @@ proc run_boot_dir {binaries} {
}
}
if {[have_spec x86] && [have_include "load/tftp"]} {
if {[have_spec x86] && ![have_spec muen] && [have_include "load/tftp"]} {
#
# Install PXE bootloader pulsar
#