mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 05:37:54 +00:00
Add support for ipxe load (nova, foc, fiasco)
This makes use of the iPXE sanboot command [1] which downloads and boots an ISO image directly via HTTP. Therefore, your RUN_OPT needs both --include image/iso and --include load/ipxe NOTE: The webserver serving the ISO image must support ranged requests, see [2]. [1] - http://ipxe.org/cmd/sanboot [2] - http://forum.ipxe.org/showthread.php?tid=7295&pid=10482#pid10482
This commit is contained in:
parent
94afc1a340
commit
8eec092851
@ -144,4 +144,10 @@ proc run_boot_dir {binaries} {
|
|||||||
|
|
||||||
generate_tftp_config
|
generate_tftp_config
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if {[have_include "load/ipxe"]} {
|
||||||
|
create_ipxe_iso_config
|
||||||
|
update_ipxe_boot_dir
|
||||||
|
create_symlink_for_iso
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -183,6 +183,12 @@ proc run_boot_dir_x86 {binaries} {
|
|||||||
|
|
||||||
generate_tftp_config
|
generate_tftp_config
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if {[have_include "load/ipxe"]} {
|
||||||
|
create_ipxe_iso_config
|
||||||
|
update_ipxe_boot_dir
|
||||||
|
create_symlink_for_iso
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -93,4 +93,10 @@ proc run_boot_dir {binaries} {
|
|||||||
|
|
||||||
generate_tftp_config
|
generate_tftp_config
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if {[have_include "load/ipxe"]} {
|
||||||
|
create_ipxe_iso_config
|
||||||
|
update_ipxe_boot_dir
|
||||||
|
create_symlink_for_iso
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,3 +46,23 @@ proc create_symlink_for_iso { } {
|
|||||||
proc update_ipxe_boot_dir { } {
|
proc update_ipxe_boot_dir { } {
|
||||||
exec ln -sfn [pwd]/[run_dir] [load_ipxe_base_dir]/[load_ipxe_boot_dir]
|
exec ln -sfn [pwd]/[run_dir] [load_ipxe_base_dir]/[load_ipxe_boot_dir]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
##
|
||||||
|
# Create iPXE config file which directly boots an ISO file.
|
||||||
|
#
|
||||||
|
proc create_ipxe_iso_config { } {
|
||||||
|
if {[have_include "image/iso"]} {
|
||||||
|
set fh [open "[run_dir]/boot.cfg" "WRONLY CREAT TRUNC"]
|
||||||
|
puts $fh "#!ipxe"
|
||||||
|
puts $fh "sanboot [run_name].iso || goto failed"
|
||||||
|
puts $fh
|
||||||
|
puts $fh ":failed"
|
||||||
|
puts $fh "echo Booting failed, dropping to shell"
|
||||||
|
puts $fh "shell"
|
||||||
|
puts $fh "boot"
|
||||||
|
close $fh
|
||||||
|
} else {
|
||||||
|
puts "Warning, iPXE requires ISO image."
|
||||||
|
exit -1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user