From e13123552100ad88d286cf8712602ceff275b284 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Mon, 1 Jun 2015 15:17:54 +0200 Subject: [PATCH] hw: support booting via tftp on x86 Fixes #1580 --- tool/run/boot_dir/hw | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/tool/run/boot_dir/hw b/tool/run/boot_dir/hw index 8c6090653..2abf560a7 100644 --- a/tool/run/boot_dir/hw +++ b/tool/run/boot_dir/hw @@ -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