hw: support booting via tftp on x86

Fixes #1580
This commit is contained in:
Alexander Boettcher 2015-06-01 15:17:54 +02:00 committed by Christian Helmuth
parent 6f6fb69dc9
commit e131235521
1 changed files with 18 additions and 1 deletions

View File

@ -173,7 +173,7 @@ proc run_boot_dir {binaries} {
run_image $elf_img
# set symbolic link to image.elf file in TFTP directory for PXE boot
if {[have_include "load/tftp"]} {
if {[have_spec arm] && [have_include "load/tftp"]} {
exec ln -sf [pwd]/$elf_img [load_tftp_base_dir][load_tftp_offset_dir]
if {[have_include "image/uboot"]} {
@ -181,6 +181,23 @@ proc run_boot_dir {binaries} {
}
}
if {[have_spec x86] && [have_include "load/tftp"]} {
#
# Install PXE bootloader pulsar
#
install_pxe_bootloader_to_run_dir
#
# Generate pulsar config file
#
set fh [open "[run_dir]/config-52-54-00-12-34-56" "WRONLY CREAT TRUNC"]
puts $fh " exec /boot/bender"
puts $fh " load /image.elf"
close $fh
generate_tftp_config
}
# retrieve stand-alone core
exec cp $core_target/$core_bin.standalone bin/$core_bin
exec rm $core_target/$core_bin.standalone