run: PXE+AMT support for x86 kernels

Issue #679
This commit is contained in:
Alexander Boettcher 2013-03-25 10:21:13 +01:00 committed by Norman Feske
parent 455f606f31
commit 8a393183e9
4 changed files with 78 additions and 3 deletions

View File

@ -150,7 +150,25 @@ proc build_boot_image {binaries} {
if {$binary != "core"} {
puts $fh " load /genode/$binary" } }
close $fh
#
# Generate pulsar config file pointing to the config file above.
#
if {[info exists ::env(PXE_TFTP_DIR_BASE)] && [info exists ::env(PXE_TFTP_DIR_OFFSET)]} {
set len [string length $::env(PXE_TFTP_DIR_BASE)]
set tmp [string range [pwd] 0 $len-1]
# if PXE_TFTP_DIR_BASE is part of pwd (autopilot) we don't need DIR_OFFSET
if ([string match $tmp $::env(PXE_TFTP_DIR_BASE)]) {
set tftp_local_offset [string range [pwd] $len [string length [pwd]]]
} else {
set tftp_local_offset $::env(PXE_TFTP_DIR_OFFSET)
}
set fh [open "$::env(PXE_TFTP_DIR_BASE)$::env(PXE_TFTP_DIR_OFFSET)/config-00-00-00-00-00-00" "WRONLY CREAT TRUNC"]
puts $fh " root $tftp_local_offset/[run_dir]"
puts $fh " config config-52-54-00-12-34-56"
close $fh
}
}

View File

@ -207,6 +207,25 @@ proc build_boot_image_x86 {binaries} {
if {$binary != "core"} {
puts $fh " load /genode/$binary" } }
close $fh
#
# Generate pulsar config file pointing to the config file above.
#
if {[info exists ::env(PXE_TFTP_DIR_BASE)] && [info exists ::env(PXE_TFTP_DIR_OFFSET)]} {
set len [string length $::env(PXE_TFTP_DIR_BASE)]
set tmp [string range [pwd] 0 $len-1]
# if PXE_TFTP_DIR_BASE is part of pwd (autopilot) we don't need DIR_OFFSET
if ([string match $tmp $::env(PXE_TFTP_DIR_BASE)]) {
set tftp_local_offset [string range [pwd] $len [string length [pwd]]]
} else {
set tftp_local_offset $::env(PXE_TFTP_DIR_OFFSET)
}
set fh [open "$::env(PXE_TFTP_DIR_BASE)$::env(PXE_TFTP_DIR_OFFSET)/config-00-00-00-00-00-00" "WRONLY CREAT TRUNC"]
puts $fh " root $tftp_local_offset/[run_dir]"
puts $fh " config config-52-54-00-12-34-56"
close $fh
}
}

View File

@ -172,7 +172,6 @@ proc build_boot_image {binaries} {
}
exec [cross_dev_prefix]strip [run_dir]/image.elf
exec cp [run_dir]/image.elf [run_dir].elf
exec gzip [run_dir]/image.elf
#
# Keep only the ELF boot image, but remove stripped binaries
@ -200,7 +199,7 @@ proc build_boot_image {binaries} {
puts $fh "default 0"
puts $fh "hiddenmenu"
puts $fh "\ntitle Genode on OKL4"
puts $fh "kernel /image.elf.gz"
puts $fh "kernel /image.elf"
puts $fh "vbeset 0x117"
close $fh
@ -210,8 +209,29 @@ proc build_boot_image {binaries} {
# Generate pulsar config file
#
set fh [open "[run_dir]/config-52-54-00-12-34-56" "WRONLY CREAT TRUNC"]
puts $fh " exec /image.elf.gz"
# load okl4 at 256M to avoid overwritting binary, adjust by need
puts $fh " addr 0x10000000"
puts $fh " exec /image.elf"
close $fh
#
# Generate pulsar config file pointing to the config file above.
#
if {[info exists ::env(PXE_TFTP_DIR_BASE)] && [info exists ::env(PXE_TFTP_DIR_OFFSET)]} {
set len [string length $::env(PXE_TFTP_DIR_BASE)]
set tmp [string range [pwd] 0 $len-1]
# if PXE_TFTP_DIR_BASE is part of pwd (autopilot) we don't need DIR_OFFSET
if ([string match $tmp $::env(PXE_TFTP_DIR_BASE)]) {
set tftp_local_offset [string range [pwd] $len [string length [pwd]]]
} else {
set tftp_local_offset $::env(PXE_TFTP_DIR_OFFSET)
}
set fh [open "$::env(PXE_TFTP_DIR_BASE)$::env(PXE_TFTP_DIR_OFFSET)/config-00-00-00-00-00-00" "WRONLY CREAT TRUNC"]
puts $fh " root $tftp_local_offset/[run_dir]"
puts $fh " config config-52-54-00-12-34-56"
close $fh
}
}

View File

@ -130,6 +130,24 @@ proc build_boot_image {binaries} {
puts $fh " load /genode/$binary" } }
close $fh
#
# Generate pulsar config file pointing to the config file above.
#
if {[info exists ::env(PXE_TFTP_DIR_BASE)] && [info exists ::env(PXE_TFTP_DIR_OFFSET)]} {
set len [string length $::env(PXE_TFTP_DIR_BASE)]
set tmp [string range [pwd] 0 $len-1]
# if PXE_TFTP_DIR_BASE is part of pwd (autopilot) we don't need DIR_OFFSET
if ([string match $tmp $::env(PXE_TFTP_DIR_BASE)]) {
set tftp_local_offset [string range [pwd] $len [string length [pwd]]]
} else {
set tftp_local_offset $::env(PXE_TFTP_DIR_OFFSET)
}
set fh [open "$::env(PXE_TFTP_DIR_BASE)$::env(PXE_TFTP_DIR_OFFSET)/config-00-00-00-00-00-00" "WRONLY CREAT TRUNC"]
puts $fh " root $tftp_local_offset/[run_dir]"
puts $fh " config config-52-54-00-12-34-56"
close $fh
}
}