diff --git a/ports/run/noux_tool_chain.run b/ports/run/noux_tool_chain.inc
similarity index 64%
rename from ports/run/noux_tool_chain.run
rename to ports/run/noux_tool_chain.inc
index eac1676921..9d57e80305 100644
--- a/ports/run/noux_tool_chain.run
+++ b/ports/run/noux_tool_chain.inc
@@ -1,20 +1,11 @@
#
-# Uncomment the following line when working on the binutils source code. Otherwise,
-# the package may get recompiled, yet it does not get reinstalled into 'bin/'.
+# Configuration variables for the platform-specific run scripts:
#
-#exec rm -rf noux-pkg/binutils bin/binutils
-
+# $platform - name of the platform passed to the 'create_builddir' script
+# $platform_base_dir - name of the platform-specific Genode base directory
+# $platform_cmds - platform-specific shell commands to be executed at startup
+# $platform_pkgs - names of platform-specific tar archives without the '.tar' extension
#
-# Uncomment the following line when working on the GCC source code. Otherwise,
-# the package may get recompiled, yet it does not get reinstalled into 'bin/'.
-#
-#exec rm -rf noux-pkg/gcc bin/gcc
-
-#
-# Uncomment the following line when working on the make source code. Otherwise,
-# the package may get recompiled, yet it does not get reinstalled into 'bin/'.
-#
-#exec rm -rf noux-pkg/make bin/make
set build_components {
core init drivers/timer noux/minimal lib/libc_noux
@@ -43,7 +34,7 @@ if {[have_spec x86]} {
#
# Build Noux packages only once
#
-set noux_pkgs "bash coreutils vim findutils make $binutils $gcc"
+set noux_pkgs "bash coreutils vim findutils make which $binutils $gcc"
foreach pkg $noux_pkgs {
lappend_if [expr ![file exists bin/$pkg]] build_components noux-pkg/$pkg }
@@ -63,12 +54,21 @@ close $vimrc_fd
# strip all binaries prior archiving
set find_args ""
-foreach pkg $noux_pkgs { append find_args " bin/$pkg/" }
-exec sh -c "find $find_args -type f | (xargs [cross_dev_prefix]strip || true) 2>/dev/null"
+foreach pkg $noux_pkgs { append find_args " bin/$pkg" }
+exec sh -c "find $find_args -type f | (xargs [cross_dev_prefix]strip -g || true) 2>/dev/null"
+
+exec ln -sf bash bin/bash/bin/sh
foreach pkg $noux_pkgs {
exec tar cfv bin/$pkg.tar -h -C bin/$pkg . }
+set genode_repositories "tool base $platform_base_dir os demo"
+foreach rep $genode_repositories { append genode_repositories_filter_out_find " -not -name $rep " }
+set genode_repositories_filter_out [exec sh -c "find $genode_dir -mindepth 1 -maxdepth 1 $genode_repositories_filter_out_find -printf \"%f \""]
+foreach rep $genode_repositories_filter_out { append genode_repositories_filter_out_tar " --exclude=./$rep " }
+set tar_command "tar cfv bin/genode.tar $genode_repositories_filter_out_tar -C $genode_dir ."
+eval exec $tar_command
+
create_boot_directory
append config {
@@ -136,38 +136,36 @@ append config {
-
+
-
-
-
- int main(int argc, char **argv) { return 0; }
- }
-append config "
-SHELL=/bin/bash
-all:
- ${tool_prefix}gcc $cc_march -v -c a.c -o a.o
-"
-append config {
-
-
- cd /tmp; make; }
-append config "${tool_prefix}readelf -a a.o"
+ cp /bin/make /usr/bin/
+ cp /bin/echo /usr/bin/
+ cp /bin/mkdir /usr/bin/
+}
+append config " /genode/tool/create_builddir $platform BUILD_DIR=/home/build"
append config {
-
+ cd /home/build
+ echo "CROSS_DEV_PREFIX=genode-x86-" > etc/tools.conf }
+append config " $platform_cmds"
+append config {
+
+
+
+
+
@@ -176,25 +174,40 @@ append config {
}
foreach pkg $noux_pkgs {
- append config " " }
+ append config " " }
-append config {
-
+append config { }
+foreach pkg $platform_pkgs {
+ append config "
+
+ " }
-
+append config {
-
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -219,6 +232,10 @@ append boot_modules { gmp.lib.so mpfr.lib.so mpc.lib.so }
foreach pkg $noux_pkgs {
lappend boot_modules "$pkg.tar" }
+append boot_modules { genode.tar }
+
+foreach pkg $platform_pkgs { append boot_modules "$pkg.tar" }
+
# platform-specific modules
lappend_if [have_spec linux] boot_modules fb_sdl
lappend_if [have_spec pci] boot_modules pci_drv
@@ -228,12 +245,6 @@ lappend_if [have_spec pl11x] boot_modules pl11x_drv
build_boot_image $boot_modules
-if {[have_spec x86_64]} {
- append qemu_args " -m 512 "
-} else {
- append qemu_args " -m 320 "
-}
+append qemu_args " -m 768 "
run_genode_until forever
-
-exec rm bin/bash.tar
diff --git a/ports/run/noux_tool_chain_foc.run b/ports/run/noux_tool_chain_foc.run
new file mode 100644
index 0000000000..d189073976
--- /dev/null
+++ b/ports/run/noux_tool_chain_foc.run
@@ -0,0 +1,31 @@
+#
+# \brief Noux environment for building the Genode/Fiasco.OC demo scenario on Genode/Fiasco.OC
+# \author Christian Prochaska
+# \date 2012-11-26
+#
+
+if {![have_spec foc]} {
+ puts "\nThis run script is only supported on Fiasco.OC\n"
+ exit 0
+}
+
+# create a tar archive containing the l4 header files
+build core
+exec tar cfv bin/l4.tar -h --exclude=std_tmpl include l4
+
+set platform "foc_x86_32"
+set platform_base_dir "base-foc"
+set platform_pkgs "l4"
+set platform_cmds {
+ ln -s /platform/l4/include include
+ ln -s /platform/l4/l4 l4
+ mkdir -p var/libcache/platform/libvcpu
+ touch var/libcache/platform/libvcpu/include.tag
+ touch var/libcache/platform/l4sys.tag
+ touch var/libcache/platform/ldscripts.tag
+ touch var/libcache/platform/libgcc-pure.tag
+ touch var/libcache/platform/libgcc.tag
+ touch var/libcache/platform/libsigma0.tag
+}
+
+source ${genode_dir}/ports/run/noux_tool_chain.inc
diff --git a/ports/run/noux_tool_chain_nova.run b/ports/run/noux_tool_chain_nova.run
new file mode 100644
index 0000000000..184d2ee00e
--- /dev/null
+++ b/ports/run/noux_tool_chain_nova.run
@@ -0,0 +1,12 @@
+#
+# \brief Noux environment for building the Genode/NOVA demo scenario on Genode
+# \author Christian Prochaska
+# \date 2012-11-26
+#
+
+set platform "nova_x86_32"
+set platform_base_dir "base-nova"
+set platform_pkgs ""
+set platform_cmds ""
+
+source ${genode_dir}/ports/run/noux_tool_chain.inc