diff --git a/base-fiasco/run/env b/base-fiasco/run/env index c76f08a12..957074376 100644 --- a/base-fiasco/run/env +++ b/base-fiasco/run/env @@ -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 + } } diff --git a/base-foc/run/env b/base-foc/run/env index dc055a464..e1f851b89 100644 --- a/base-foc/run/env +++ b/base-foc/run/env @@ -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 + } } diff --git a/base-okl4/run/env b/base-okl4/run/env index db20376db..9f2904506 100644 --- a/base-okl4/run/env +++ b/base-okl4/run/env @@ -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 + } } diff --git a/base-pistachio/run/env b/base-pistachio/run/env index 5d793d8a4..890a014fe 100644 --- a/base-pistachio/run/env +++ b/base-pistachio/run/env @@ -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 + } }