mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-18 02:40:08 +00:00
run: support loading images via iPXE/HTTP
iPXE is an open source network boot firmware which supports booting from a web server via HTTP [1]. The following two parameters can be used to specify the iPXE/HTTP setup: --load-ipxe-base-dir This parameter specifies the base directory of the HTTP server from which the target machine downloads the files. --load-ipxe-boot-dir The directory relative to iPXE base dir which contains the iPXE chainload configuration and all necessary files. The target machine is expected to request the following iPXE configuration via HTTP: http://${HOST_URL}/${ipxe-boot-dir}/boot.cfg This can be achieved by building iPXE with the following embedded script: #!ipxe dhcp chain http://${HOST_URL}/${ipxe-boot-dir}/boot.cfg See also [2] for additional information. [1] - http://ipxe.org/ [2] - http://ipxe.org/howto/chainloading#breaking_the_loop_with_an_embedded_script Fixes #1708
This commit is contained in:
parent
ccb968ff7d
commit
94afc1a340
48
tool/run/load/ipxe
Normal file
48
tool/run/load/ipxe
Normal file
@ -0,0 +1,48 @@
|
||||
##
|
||||
# Load files needed by the scenario via iPXE/HTTP
|
||||
#
|
||||
# \param --load-ipxe-base-dir base directory of iPXE/HTTP server
|
||||
# \param --load-ipxe-boot-dir boot directory relative to HTTP base
|
||||
#
|
||||
|
||||
source [genode_dir]/tool/run/load.inc
|
||||
|
||||
|
||||
##
|
||||
# The files are loaded implicitly via iPXE/HTTP to the target machine
|
||||
#
|
||||
proc run_load { } {
|
||||
global load_spawn_id
|
||||
set load_spawn_id -1
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
proc load_ipxe_base_dir { } { return [get_cmd_arg --load-ipxe-base-dir ""] }
|
||||
|
||||
|
||||
proc load_ipxe_boot_dir { } { return [get_cmd_arg --load-ipxe-boot-dir ""] }
|
||||
|
||||
|
||||
##
|
||||
# Install files needed to boot via iPXE
|
||||
#
|
||||
proc install_bender_to_run_dir { } {
|
||||
exec mkdir -p [run_dir]/boot
|
||||
exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender
|
||||
}
|
||||
|
||||
|
||||
##
|
||||
# Create symlink for ISO image in current run directory.
|
||||
#
|
||||
proc create_symlink_for_iso { } {
|
||||
exec ln -sfn [pwd]/[run_dir].iso [pwd]/[run_dir]/[run_name].iso
|
||||
}
|
||||
|
||||
##
|
||||
# Update iPXE boot directory to point to current run directory.
|
||||
#
|
||||
proc update_ipxe_boot_dir { } {
|
||||
exec ln -sfn [pwd]/[run_dir] [load_ipxe_base_dir]/[load_ipxe_boot_dir]
|
||||
}
|
Loading…
Reference in New Issue
Block a user