mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 13:47:56 +00:00
parent
455f606f31
commit
8a393183e9
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user