diff --git a/run/framebuffer_app.inc b/run/framebuffer_app.inc
new file mode 100644
index 0000000..6e7622b
--- /dev/null
+++ b/run/framebuffer_app.inc
@@ -0,0 +1,137 @@
+#
+# This is a skeleton for simple interactive system scenarios that solely rely
+# on a framebuffer and input device. The following variables should/can be
+# defined prior including this file:
+#
+# fb_config - optional XML config to be passed to the fb_drv
+# build_components - application-specific build supplements
+# boot_modules - application-specific boot modules
+# app_config - start node(s) of init for running the application
+#
+
+if {![info exists fb_config]} {
+ set fb_config {} }
+
+
+#
+# Build
+#
+
+append build_components {
+ core init
+ drivers/timer
+ drivers/framebuffer drivers/platform drivers/input
+}
+
+lappend_if [have_spec usb] build_components drivers/usb
+
+source ${genode_dir}/repos/base/run/platform_drv.inc
+# override default platform driver policy
+proc platform_drv_policy {} {
+ return {
+
+
+
+ }
+}
+
+append_platform_drv_build_components
+
+build $build_components
+
+create_boot_directory
+
+
+#
+# Generate config
+#
+
+append config {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+
+append_platform_drv_config
+
+if {[have_spec sdl]} {
+append config {
+
+
+
+
+
+ }
+append config $fb_config
+append config {
+ }
+}
+
+if {[have_spec framebuffer]} {
+append config {
+
+
+ }
+append config $fb_config
+append config {
+ }
+}
+
+append_if [have_spec ps2] config {
+
+
+
+ }
+
+append_if [expr ![have_spec ps2] && [have_spec usb]] config {
+
+
+
+
+ }
+
+append config {
+
+
+
+ }
+
+append config $app_config
+
+append config {
+}
+
+install_config $config
+
+
+#
+# Boot modules
+#
+
+# generic modules
+append boot_modules { core init timer ld.lib.so }
+
+# platform-specific modules
+lappend_if [have_spec linux] boot_modules fb_sdl
+lappend_if [have_spec framebuffer] boot_modules fb_drv
+lappend_if [have_spec ps2] boot_modules ps2_drv
+lappend_if [have_spec usb] boot_modules usb_drv
+
+append_platform_drv_boot_modules
+
+build_boot_image $boot_modules
+
+append qemu_args " -m 256 "
+
+run_genode_until forever
diff --git a/run/ltris.run b/run/ltris.run
index 15be3a0..22f31c1 100644
--- a/run/ltris.run
+++ b/run/ltris.run
@@ -1,91 +1,12 @@
-#
-# Build
-#
+set build_components { app/ltris server/ram_fs }
-set build_components {
- core init
- drivers/timer
- app/ltris server/ram_fs
- drivers/framebuffer drivers/platform drivers/input
-}
-
-lappend_if [have_spec usb] build_components drivers/usb
-
-build $build_components
-
-create_boot_directory
-
-#
-# Generate config
-#
-
-append config {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
-
-append_if [have_spec sdl] config {
-
-
-
-
-
-
-
- }
-
-append_if [have_spec platform_rpi] config {
-
-
-
-
- }
-
-append_if [have_spec framebuffer] config {
-
-
-
-
- }
-
-append_if [have_spec ps2] config {
-
-
-
- }
-
-append_if [expr ![have_spec ps2] && [have_spec usb]] config {
-
-
-
-
- }
-
-append config {
-
-
-
-
+set app_config {
-
+
@@ -103,21 +24,11 @@ append config {
-
-}
+ }
-install_config $config
-
-#
-# Boot modules
-#
-
-# generic modules
set boot_modules {
- core init
- timer ram_fs
+ ram_fs
ltris
- ld.lib.so
libc.lib.so
libm.lib.so
pthread.lib.so
@@ -128,15 +39,4 @@ set boot_modules {
ltris_data.tar
}
-# platform-specific modules
-lappend_if [have_spec linux] boot_modules fb_sdl
-lappend_if [have_spec framebuffer] boot_modules fb_drv
-lappend_if [have_spec ps2] boot_modules ps2_drv
-lappend_if [have_spec usb] boot_modules usb_drv
-lappend_if [have_spec platform_rpi] boot_modules platform_drv
-
-build_boot_image $boot_modules
-
-append qemu_args " -m 256 "
-
-run_genode_until forever
+source ${genode_dir}/repos/world/run/framebuffer_app.inc
diff --git a/run/numptyphysics.run b/run/numptyphysics.run
index 4a238c7..53b0dcf 100644
--- a/run/numptyphysics.run
+++ b/run/numptyphysics.run
@@ -1,89 +1,13 @@
-#
-# Build
-#
+set build_components { app/numptyphysics server/ram_fs }
-set build_components {
- core init
- drivers/timer
- app/numptyphysics server/ram_fs
- drivers/framebuffer drivers/platform drivers/input
-}
+set fb_config { }
-lappend_if [have_spec usb] build_components drivers/usb
-
-build $build_components
-
-create_boot_directory
-
-#
-# Generate config
-#
-
-append config {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
-
-append_if [have_spec sdl] config {
-
-
-
-
-
-
- }
-
-append_if [have_spec platform_rpi] config {
-
-
-
-
- }
-
-append_if [have_spec framebuffer] config {
-
-
-
-
- }
-
-append_if [have_spec ps2] config {
-
-
-
- }
-
-append_if [expr ![have_spec ps2] && [have_spec usb]] config {
-
-
-
-
- }
-
-append config {
-
-
-
-
+set app_config {
-
+
@@ -100,20 +24,11 @@ append config {
}
-install_config $config
-
-#
-# Boot modules
-#
-
-# generic modules
set boot_modules {
- core init
- timer ram_fs
+ ram_fs
numptyphysics
freetype.lib.so
jpeg.lib.so
- ld.lib.so
libc.lib.so
libm.lib.so
libpng.lib.so
@@ -126,15 +41,4 @@ set boot_modules {
numptyphysics_data.tar
}
-# platform-specific modules
-lappend_if [have_spec linux] boot_modules fb_sdl
-lappend_if [have_spec framebuffer] boot_modules fb_drv
-lappend_if [have_spec ps2] boot_modules ps2_drv
-lappend_if [have_spec usb] boot_modules usb_drv
-lappend_if [have_spec platform_rpi] boot_modules platform_drv
-
-build_boot_image $boot_modules
-
-append qemu_args " -m 256 "
-
-run_genode_until forever
+source ${genode_dir}/repos/world/run/framebuffer_app.inc
diff --git a/run/supertux.run b/run/supertux.run
index 07188e8..a308c20 100644
--- a/run/supertux.run
+++ b/run/supertux.run
@@ -1,89 +1,11 @@
-#
-# Build
-#
+set build_components { app/supertux server/ram_fs }
-set build_components {
- core init
- drivers/timer
- app/supertux server/ram_fs
- drivers/framebuffer drivers/platform drivers/input
-}
-
-lappend_if [have_spec usb] build_components drivers/usb
-
-build $build_components
-
-create_boot_directory
-
-#
-# Generate config
-#
-
-append config {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
-
-append_if [have_spec sdl] config {
-
-
-
-
-
-
- }
-
-append_if [have_spec platform_rpi] config {
-
-
-
-
- }
-
-append_if [have_spec framebuffer] config {
-
-
-
-
- }
-
-append_if [have_spec ps2] config {
-
-
-
- }
-
-append_if [expr ![have_spec ps2] && [have_spec usb]] config {
-
-
-
-
- }
-
-append config {
-
-
-
-
+set app_config {
-
+
@@ -100,19 +22,10 @@ append config {
}
-install_config $config
-
-#
-# Boot modules
-#
-
-# generic modules
set boot_modules {
- core init
- timer ram_fs
+ ram_fs
supertux
jpeg.lib.so
- ld.lib.so
libc.lib.so
libm.lib.so
libpng.lib.so
@@ -125,15 +38,4 @@ set boot_modules {
supertux_data.tar
}
-# platform-specific modules
-lappend_if [have_spec linux] boot_modules fb_sdl
-lappend_if [have_spec framebuffer] boot_modules fb_drv
-lappend_if [have_spec ps2] boot_modules ps2_drv
-lappend_if [have_spec usb] boot_modules usb_drv
-lappend_if [have_spec platform_rpi] boot_modules platform_drv
-
-build_boot_image $boot_modules
-
-append qemu_args " -m 256 "
-
-run_genode_until forever
+source ${genode_dir}/repos/world/run/framebuffer_app.inc