From 455f606f31d596504de9c9c35f5418d459125904 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Fri, 8 Mar 2013 11:32:20 +0100 Subject: [PATCH] run: add Pulsar PXE boot support for x86 kernels Issue #679 --- base-fiasco/run/env | 28 ++++++++++++++++++++++++++++ base-foc/run/env | 22 ++++++++++++++++++++++ base-okl4/run/env | 19 +++++++++++++++++++ base-pistachio/run/env | 29 +++++++++++++++++++++++++++++ 4 files changed, 98 insertions(+) diff --git a/base-fiasco/run/env b/base-fiasco/run/env index 902525f20..c76f08a12 100644 --- a/base-fiasco/run/env +++ b/base-fiasco/run/env @@ -8,6 +8,14 @@ # +## +# Install files needed to boot via PXE +# +proc install_pxe_bootloader_to_run_dir { } { + exec cp [genode_dir]/tool/boot/pulsar [run_dir]/boot/pulsar +} + + ## # Read the location of the Fiasco user directory from 'etc/fiasco.conf' # @@ -122,7 +130,27 @@ proc build_boot_image {binaries} { puts $fh " vbeset 0x117 506070" close $fh + # + # Install PXE bootloader pulsar + # + install_pxe_bootloader_to_run_dir + create_iso_image_from_run_dir + + # + # Generate pulsar config file + # + set fh [open "[run_dir]/config-52-54-00-12-34-56" "WRONLY CREAT TRUNC"] + puts $fh " exec /fiasco/bootstrap -serial -modaddr=0x02000000" + puts $fh " load /fiasco/fiasco -serial -serial_esc -jdb_cmd=JH" + puts $fh " load /fiasco/sigma0" + puts $fh " load /genode/core" + puts $fh " load /genode/config" + foreach binary $binaries { + if {$binary != "core"} { + puts $fh " load /genode/$binary" } } + close $fh + } diff --git a/base-foc/run/env b/base-foc/run/env index 03c9041e4..dc055a464 100644 --- a/base-foc/run/env +++ b/base-foc/run/env @@ -6,6 +6,13 @@ # This file is meant to be used as '--include' argument for 'tool/run'. # +## +# Install files needed to boot via PXE +# +proc install_pxe_bootloader_to_run_dir { } { + exec cp [genode_dir]/tool/boot/pulsar [run_dir]/boot/pulsar +} + ## # Return the location of the Fiasco.OC user directory # @@ -184,7 +191,22 @@ proc build_boot_image_x86 {binaries} { puts $fh " vbeset 0x117 506070" close $fh + install_pxe_bootloader_to_run_dir create_iso_image_from_run_dir + + # + # Generate pulsar config file + # + set fh [open "[run_dir]/config-52-54-00-12-34-56" "WRONLY CREAT TRUNC"] + puts $fh " exec /fiasco/bootstrap -modaddr=0x01100000" + puts $fh " load /fiasco/fiasco -serial_esc" + puts $fh " load /fiasco/sigma0" + puts $fh " load /genode/core" + puts $fh " load /genode/config" + foreach binary $binaries { + if {$binary != "core"} { + puts $fh " load /genode/$binary" } } + close $fh } diff --git a/base-okl4/run/env b/base-okl4/run/env index dabf44643..db20376db 100644 --- a/base-okl4/run/env +++ b/base-okl4/run/env @@ -6,6 +6,13 @@ # This file is meant to be used as '--include' argument for 'tool/run'. # +## +# Install files needed to boot via PXE +# +proc install_pxe_bootloader_to_run_dir { } { + exec cp [genode_dir]/tool/boot/pulsar [run_dir]/boot/pulsar +} + ## # Get the base-okl4 repository # @@ -177,6 +184,11 @@ proc build_boot_image {binaries} { # install_iso_bootloader_to_run_dir + # + # Install PXE bootloader pulsar + # + install_pxe_bootloader_to_run_dir + # # Generate grub config file # @@ -193,6 +205,13 @@ proc build_boot_image {binaries} { close $fh create_iso_image_from_run_dir + + # + # 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" + close $fh } diff --git a/base-pistachio/run/env b/base-pistachio/run/env index 091a92ccd..5d793d8a4 100644 --- a/base-pistachio/run/env +++ b/base-pistachio/run/env @@ -7,6 +7,14 @@ # +## +# Install files needed to boot via PXE +# +proc install_pxe_bootloader_to_run_dir { } { + exec cp [genode_dir]/tool/boot/pulsar [run_dir]/boot/pulsar +} + + ## # Read the location of the Pistachio user directory from 'etc/pistachio.conf' # @@ -100,7 +108,28 @@ proc build_boot_image {binaries} { puts $fh " module /genode/$binary" } } close $fh + # + # Install PXE bootloader pulsar + # + install_pxe_bootloader_to_run_dir + create_iso_image_from_run_dir + + # + # Generate pulsar config file + # + set fh [open "[run_dir]/config-52-54-00-12-34-56" "WRONLY CREAT TRUNC"] + puts $fh " exec /pistachio/kickstart" + puts $fh " load /pistachio/kernel" + puts $fh " load /pistachio/sigma0" + puts $fh " load /genode/core" + puts $fh " load /genode/config" + puts $fh " load /genode/config" + foreach binary $binaries { + if {$binary != "core"} { + puts $fh " load /genode/$binary" } } + close $fh + }