From 9cb71d02607f4cd50b3c3f5e2ee4556aab69708e Mon Sep 17 00:00:00 2001 From: Adrian-Ken Rueegsegger Date: Tue, 27 Feb 2018 14:46:44 +0100 Subject: [PATCH] run: Move shared procedure to load/pxe.inc The install_pxe_bootloader_to_run_dir procedure is required by the tftp as well as the ipxe load script. Move it to a separate file which is include by both. --- tool/run/load/ipxe | 1 + tool/run/load/pxe.inc | 12 ++++++++++++ tool/run/load/tftp | 15 +-------------- 3 files changed, 14 insertions(+), 14 deletions(-) create mode 100644 tool/run/load/pxe.inc diff --git a/tool/run/load/ipxe b/tool/run/load/ipxe index 888b7881af..7c71ceed5c 100644 --- a/tool/run/load/ipxe +++ b/tool/run/load/ipxe @@ -6,6 +6,7 @@ # source [genode_dir]/tool/run/load.inc +source [genode_dir]/tool/run/load/pxe.inc ## diff --git a/tool/run/load/pxe.inc b/tool/run/load/pxe.inc new file mode 100644 index 0000000000..f1a1b253c0 --- /dev/null +++ b/tool/run/load/pxe.inc @@ -0,0 +1,12 @@ +## +# Install files needed to boot via PXE +# +proc install_pxe_bootloader_to_run_dir { } { + exec mkdir -p [run_dir]/boot + exec cp [genode_dir]/tool/boot/pulsar [run_dir]/boot/pulsar + exec chmod a+r [run_dir]/boot/pulsar + exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender + exec chmod a+r [run_dir]/boot/bender + exec cp [genode_dir]/tool/boot/unzip [run_dir]/boot/unzip + exec chmod a+r [run_dir]/boot/unzip +} diff --git a/tool/run/load/tftp b/tool/run/load/tftp index 2fb54cf264..dc4366d520 100644 --- a/tool/run/load/tftp +++ b/tool/run/load/tftp @@ -8,6 +8,7 @@ # source [genode_dir]/tool/run/load.inc +source [genode_dir]/tool/run/load/pxe.inc ## @@ -29,20 +30,6 @@ proc load_tftp_offset_dir { } { return [get_cmd_arg --load-tftp-offset-dir ""] } proc load_tftp_use_absolute { } { return [get_cmd_switch --load-tftp-absolute] } -## -# Install files needed to boot via PXE -# -proc install_pxe_bootloader_to_run_dir { } { - exec mkdir -p [run_dir]/boot - exec cp [genode_dir]/tool/boot/pulsar [run_dir]/boot/pulsar - exec chmod a+r [run_dir]/boot/pulsar - exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender - exec chmod a+r [run_dir]/boot/bender - exec cp [genode_dir]/tool/boot/unzip [run_dir]/boot/unzip - exec chmod a+r [run_dir]/boot/unzip -} - - ## # Generate pulsar config file used for loading files from TFTP #