diff --git a/run/abuse.run b/run/abuse.run
index 5d70693..c590159 100644
--- a/run/abuse.run
+++ b/run/abuse.run
@@ -48,7 +48,8 @@ append config {
- }
+
+ }
append_if [have_spec sdl] config {
@@ -84,6 +85,7 @@ append_if [have_spec ps2] config {
append config {
+
@@ -91,7 +93,7 @@ append config {
-
+
@@ -121,14 +123,12 @@ install_config $config
file copy -force app/abuse/abuse.tar bin
# generic modules
-set boot_modules {
- core init
- audio_drv
+append boot_modules {
+ core init } [audio_drv_binary] {
jpeg.lib.so
ld.lib.so
libc.lib.so
libm.lib.so
- posix.lib.so
libpng.lib.so
pthread.lib.so
sdl_image.lib.so
diff --git a/run/chocolate-doom.run b/run/chocolate-doom.run
index 2e2b307..3338daa 100644
--- a/run/chocolate-doom.run
+++ b/run/chocolate-doom.run
@@ -18,7 +18,6 @@ set use_audio [expr ![have_spec arm]]
set build_components {
core init
drivers/timer
- server/tar_fs
drivers/framebuffer
drivers/input
@@ -65,6 +64,7 @@ append config {
+
@@ -112,6 +112,7 @@ append_if [expr ![have_spec linux]] config {
append_if $use_audio config {
+
}
@@ -134,22 +135,14 @@ append_if [expr !$use_usb_input_only] config {
}
append config {
-
-
-
-
-
-
-
-
-
-
+
+
-
+
@@ -173,10 +166,6 @@ if {![file exists bin/data.tar]} {
puts ""
exit 1
}
-
- catch { exec mkdir bin/wads }
- catch { exec cp bin/doom1.wad bin/wads }
- exec tar cf bin/data.tar -C bin wads
}
#
@@ -184,13 +173,11 @@ if {![file exists bin/data.tar]} {
#
# generic modules
-set boot_modules {
- core init timer tar_fs
- chocolate-doom
- ld.lib.so
- libc.lib.so posix.lib.so libm.lib.so sdl.lib.so sdl_net.lib.so
- sdl_mixer.lib.so pthread.lib.so
- data.tar
+append boot_modules {
+ core init timer } [audio_drv_binary] {
+ ld.lib.so libc.lib.so libm.lib.so pthread.lib.so
+ sdl.lib.so sdl_net.lib.so sdl_mixer.lib.so
+ chocolate-doom doom1.wad
}
# platform-specific modules
diff --git a/run/framebuffer_app.inc b/run/framebuffer_app.inc
index c2e1a07..a005db0 100644
--- a/run/framebuffer_app.inc
+++ b/run/framebuffer_app.inc
@@ -62,7 +62,8 @@ append config {
- }
+
+ }
append_platform_drv_config
diff --git a/run/grafx2.run b/run/grafx2.run
index 5769bc4..67e1d63 100644
--- a/run/grafx2.run
+++ b/run/grafx2.run
@@ -40,6 +40,8 @@ append config {
+
+
@@ -87,10 +89,10 @@ append config {
-
+
-
+
@@ -119,7 +121,6 @@ set boot_modules {
ld.lib.so
libc.lib.so
libm.lib.so
- posix.lib.so
libpng.lib.so
pthread.lib.so
sdl_image.lib.so
diff --git a/run/ltris.run b/run/ltris.run
index 1633dd2..22f31c1 100644
--- a/run/ltris.run
+++ b/run/ltris.run
@@ -30,7 +30,6 @@ set boot_modules {
ram_fs
ltris
libc.lib.so
- posix.lib.so
libm.lib.so
pthread.lib.so
sdl_mixer.lib.so
diff --git a/run/numptyphysics.run b/run/numptyphysics.run
index a5b69de..a7ce826 100644
--- a/run/numptyphysics.run
+++ b/run/numptyphysics.run
@@ -10,7 +10,7 @@ set app_config {
-
+
@@ -29,7 +29,6 @@ set boot_modules {
freetype.lib.so
jpeg.lib.so
libc.lib.so
- posix.lib.so
libm.lib.so
libpng.lib.so
pthread.lib.so
diff --git a/run/supertux.run b/run/supertux.run
index d267c07..fb7d48d 100644
--- a/run/supertux.run
+++ b/run/supertux.run
@@ -8,7 +8,7 @@ set app_config {
-
+
@@ -26,7 +26,6 @@ set boot_modules {
supertux
jpeg.lib.so
libc.lib.so
- posix.lib.so
libm.lib.so
libpng.lib.so
pthread.lib.so
diff --git a/run/tuxmath.run b/run/tuxmath.run
index f71bb2b..0b3ef53 100644
--- a/run/tuxmath.run
+++ b/run/tuxmath.run
@@ -1,7 +1,7 @@
set build_components { app/tuxmath }
set app_config {
-
+
@@ -16,7 +16,6 @@ set app_config {
set boot_modules {
tuxmath
libc.lib.so
- posix.lib.so
libm.lib.so
pthread.lib.so
libiconv.lib.so
diff --git a/run/tyrian.run b/run/tyrian.run
index 20a7c15..629ac21 100644
--- a/run/tyrian.run
+++ b/run/tyrian.run
@@ -49,7 +49,8 @@ append config {
- }
+
+ }
append_platform_drv_config
@@ -127,7 +128,6 @@ append boot_modules {
ld.lib.so
libc.lib.so
libm.lib.so
- posix.lib.so
libpng.lib.so
pthread.lib.so
posix.lib.so
diff --git a/run/uhexen2.run b/run/uhexen2.run
index 7676b13..9022393 100644
--- a/run/uhexen2.run
+++ b/run/uhexen2.run
@@ -15,10 +15,6 @@ set build_components {
source ${genode_dir}/repos/base/run/platform_drv.inc
append_platform_drv_build_components
-set usb_only 0
-
-lappend_if [expr !$usb_only] build_components server/input_merger
-
build $build_components
create_boot_directory
@@ -45,6 +41,8 @@ append config {
+
+
@@ -82,51 +80,17 @@ append_if [have_spec pl11x] config {
}
-append_if [expr [have_spec ps2] && !$usb_only] config {
+append_if [have_spec ps2] config {
}
-append config {
-
-
-
-
-
-
-
-
-
-
- }
-
-append_if [expr !$usb_only] config {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
-
append config {
+
-
@@ -139,11 +103,7 @@ append config {
- }
-
-append_if [expr !$usb_only] config {
- }
-append config {
+
@@ -176,23 +136,16 @@ if {![file exists bin/hexen2demo_data.tar]} {
#
# generic modules
-set boot_modules {
- core init
- timer
- audio_drv
- usb_drv
- uhexen2
- ld.lib.so
- libc.lib.so posix.lib.so
- libm.lib.so lwip.lib.so sdl.lib.so sdl_mixer.lib.so pthread.lib.so
- hexen2demo_data.tar
+append boot_modules {
+ core init timer } [audio_drv_binary] {
+ ld.lib.so libc.lib.so libm.lib.so lwip.lib.so
+ pthread.lib.so sdl.lib.so sdl_mixer.lib.so
+ uhexen2 hexen2demo_data.tar
}
# platform-specific modules
append_platform_drv_boot_modules
-lappend_if [expr !$usb_only] boot_modules input_merger
-
lappend_if [have_spec linux] boot_modules fb_sdl
lappend_if [have_spec vesa] boot_modules fb_drv
lappend_if [have_spec ps2] boot_modules ps2_drv
diff --git a/src/app/abuse/target.mk b/src/app/abuse/target.mk
index 97dd96a..0276340 100644
--- a/src/app/abuse/target.mk
+++ b/src/app/abuse/target.mk
@@ -30,7 +30,7 @@ INC_DIR += $(PRG_DIR) \
$(ABUSE_SRC)/net \
$(ABUSE_SRC)/ui
-LIBS += abuse_imlib posix stdcxx sdl sdl_image sdl_mixer sdl_net
+LIBS += abuse_imlib libc libm stdcxx sdlmain sdl sdl_image sdl_mixer sdl_net
CC_WARN += \
-Wno-unused-but-set-variable \
diff --git a/src/app/chocolate-doom/target.inc b/src/app/chocolate-doom/target.inc
index 1d49c8c..b7c73dc 100644
--- a/src/app/chocolate-doom/target.inc
+++ b/src/app/chocolate-doom/target.inc
@@ -83,6 +83,6 @@ INC_DIR += $(CHOCOLATE_DOOM_DIR)/src
INC_DIR += $(CHOCOLATE_DOOM_DIR)/src/$(GAME)
INC_DIR += $(CHOCOLATE_DOOM_DIR)/textscreen
-LIBS = posix sdl sdl_mixer sdl_net
+LIBS = sdl sdlmain libc sdl_mixer sdl_net
# vi:set ft=make :
diff --git a/src/app/grafx2/target.mk b/src/app/grafx2/target.mk
index eb03e18..aff1dd9 100644
--- a/src/app/grafx2/target.mk
+++ b/src/app/grafx2/target.mk
@@ -9,7 +9,7 @@ INC_DIR += $(GRAFX2_DIR)
CC_OPT += -DGENODE -DNOTTF=1
-LIBS += posix libpng sdl sdl_image zlib
+LIBS += libc libpng sdlmain sdl sdl_image zlib
$(TARGET): grafx2_data.tar
grafx2_data.tar:
diff --git a/src/app/ltris/target.mk b/src/app/ltris/target.mk
index e759184..4af6982 100644
--- a/src/app/ltris/target.mk
+++ b/src/app/ltris/target.mk
@@ -1,5 +1,5 @@
TARGET = ltris
-LIBS = posix stdcxx sdl sdl_mixer
+LIBS = libc libm stdcxx sdlmain sdl sdl_mixer
LTRIS_DIR := $(call select_from_ports,ltris)/src/app/ltris
diff --git a/src/app/numptyphysics/target.mk b/src/app/numptyphysics/target.mk
index 5208b83..feb3844 100644
--- a/src/app/numptyphysics/target.mk
+++ b/src/app/numptyphysics/target.mk
@@ -54,8 +54,8 @@ vpath getenv.cc $(PRG_DIR)
INC_DIR += $(NUMPTY_DIR) $(NUMPTY_DIR)/Box2D/Include
-LIBS += base posix stdcxx
-LIBS += sdl sdl_image sdl_ttf zlib
+LIBS += base stdcxx libc libm
+LIBS += sdlmain sdl sdl_image sdl_ttf zlib
CC_OPT_Canvas := -DGENODE
diff --git a/src/app/opentyrian/target.mk b/src/app/opentyrian/target.mk
index 57871d5..1cfa174 100644
--- a/src/app/opentyrian/target.mk
+++ b/src/app/opentyrian/target.mk
@@ -7,7 +7,7 @@ SRC_C := $(notdir $(wildcard $(OPENTYRIAN_SRC)/*.c))
vpath %.c $(OPENTYRIAN_SRC)
-LIBS += posix sdl sdl_net
+LIBS += libc libm sdlmain sdl sdl_net
CC_OPT += -std=c99 -DTARGET_UNIX
diff --git a/src/app/supertux/target.mk b/src/app/supertux/target.mk
index 9b6eba1..60fe5de 100644
--- a/src/app/supertux/target.mk
+++ b/src/app/supertux/target.mk
@@ -9,8 +9,8 @@ vpath %.cpp $(SUPERTUX_DIR)/src
INC_DIR += $(SUPERTUX_DIR)/src
-LIBS += posix stdcxx
-LIBS += sdl sdl_image sdl_mixer zlib
+LIBS += stdcxx
+LIBS += sdl sdlmain sdl_image sdl_mixer zlib
$(TARGET): supertux_data.tar
supertux_data.tar:
diff --git a/src/app/tuxmath/component_support.cc b/src/app/tuxmath/component_support.cc
deleted file mode 100644
index 50bbe61..0000000
--- a/src/app/tuxmath/component_support.cc
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * \brief Component bootstrap
- * \author Martin Stein
- * \date 2016-09-07
- */
-
-/*
- * Copyright (C) 2016 Genode Labs GmbH
- *
- * This file is part of the Genode OS framework, which is distributed
- * under the terms of the GNU General Public License version 2.
- */
-
-/* Genode includes */
-#include
-
-Genode::size_t Component::stack_size() { return 128*1024*sizeof(long); }
diff --git a/src/app/tuxmath/target.mk b/src/app/tuxmath/target.mk
index 393b786..1391a5b 100644
--- a/src/app/tuxmath/target.mk
+++ b/src/app/tuxmath/target.mk
@@ -2,7 +2,7 @@ TARGET := tuxmath
TUXMATH_DIR := $(call select_from_ports,tuxmath)/src/app/tuxmath
-LIBS += posix sdl sdl_image sdl_mixer sdl_ttf sdl_net tuxmath_t4k
+LIBS += libc libm sdlmain sdl sdl_image sdl_mixer sdl_ttf sdl_net tuxmath_t4k
INC_DIR += $(REP_DIR)/src/app/tuxmath \
$(TUXMATH_DIR)/t4k/src
@@ -13,7 +13,7 @@ CC_OPT += -DDATA_PREFIX=\"/data\" \
SRC_C := tuxmath.c setup.c titlescreen.c menu.c menu_lan.c game.c \
factoroids.c fileops_media.c options.c credits.c highscore.c \
audio.c network.c mathcards.c campaign.c multiplayer.c fileops.c \
- SDL_rotozoom.c lessons.c server.c component_support.cc
+ SDL_rotozoom.c lessons.c server.c
#
# Disable sound during the game because the current version of sdl_mixer is
diff --git a/src/app/uhexen2/sys_genode.cc b/src/app/uhexen2/sys_genode.cc
index 88bcc68..0e0460c 100644
--- a/src/app/uhexen2/sys_genode.cc
+++ b/src/app/uhexen2/sys_genode.cc
@@ -736,12 +736,3 @@ int main(int argc, char **argv)
extern "C" int _sigprocmask(int, const sigset_t*, sigset_t*) { return -1; }
/* arm */
extern "C" int sigprocmask(int, const sigset_t*, sigset_t*) { return -1; }
-
-
-/*
- * Hexen 2 needs a stack of at least 128 KiB while loading PAK files but
- * the libc application stack is merely so large on 32Bit.
- */
-#include
-
-Genode::size_t Component::stack_size() { return 256UL * 1024; }
diff --git a/src/app/uhexen2/target.mk b/src/app/uhexen2/target.mk
index 74d1a55..ee53572 100644
--- a/src/app/uhexen2/target.mk
+++ b/src/app/uhexen2/target.mk
@@ -118,7 +118,7 @@ CC_OPT += -DNO_ALSA_AUDIO -DNO_OSS_AUDIO -DNO_SUN_AUDIO
CC_OPT += -DDEMOBUILD
-LIBS = posix libc_lwip lwip libm sdl sdl_mixer config_args
+LIBS = libc libc_lwip lwip libm sdl sdlmain sdl_mixer
vpath % $(UHEXEN2_DIR)/common
vpath % $(UHEXEN2_DIR)/engine/hexen2
diff --git a/src/test/sdl_opengl/sdl_main.cc b/src/test/sdl_opengl/sdl_main.cc
index 5bcb9ef..861c52f 100644
--- a/src/test/sdl_opengl/sdl_main.cc
+++ b/src/test/sdl_opengl/sdl_main.cc
@@ -31,8 +31,15 @@ Genode::Entrypoint &genode_entrypoint()
/* provided by the application */
extern "C" int main(int argc, char ** argv, char **envp);
+
+/* provided by our SDL backend */
+extern void sdl_init_genode(Genode::Env &env);
+
+
void Libc::Component::construct(Libc::Env &env)
{
+ sdl_init_genode(env);
+
genode_env = &env;
signal_ep.construct(env, 1024*sizeof(long), "sdl_signal_ep");
Libc::with_libc([] () { main(0, nullptr, nullptr); });