Skip to content

Commit

Permalink
Adaptation to removed component_entry_point lib
Browse files Browse the repository at this point in the history
This patch adapts the world components according to the following issue:

  genodelabs/genode#2199

Fixes #57
  • Loading branch information
nfeske committed Jan 19, 2017
1 parent 4c60efa commit 4114699
Show file tree
Hide file tree
Showing 27 changed files with 48 additions and 57 deletions.
4 changes: 2 additions & 2 deletions src/app/abuse/target.mk
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ INC_DIR += $(PRG_DIR) \
$(ABUSE_SRC)/net \
$(ABUSE_SRC)/ui

LIBS += abuse_imlib libc stdcxx sdl sdl_image sdl_mixer sdl_net
LIBS += abuse_imlib posix stdcxx sdl sdl_image sdl_mixer sdl_net

CC_WARN += \
-Wno-unused-but-set-variable \
Expand All @@ -50,4 +50,4 @@ CC_OPT += \
$(TARGET): abuse.tar

abuse.tar:
$(VERBOSE) tar cf $@ -C $(ABUSE_DIR)/data .
$(VERBOSE) tar cf $@ -C $(ABUSE_DIR)/data .
7 changes: 2 additions & 5 deletions src/app/audio_player/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

/* Genode includes */
#include <base/attached_rom_dataspace.h>
#include <base/component.h>
#include <libc/component.h>
#include <base/heap.h>
#include <base/printf.h>
#include <base/sleep.h>
Expand Down Expand Up @@ -852,10 +852,7 @@ void Audio_player::Main::handle_config()
** Component **
***************/

Genode::size_t Component::stack_size() { return 8 * 1024 * sizeof(long); }


void Component::construct(Genode::Env &env)
void Libc::Component::construct(Genode::Env &env)
{
static Audio_player::Main main(env);
}
2 changes: 1 addition & 1 deletion src/app/chocolate-doom/target.inc
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,6 @@ INC_DIR += $(CHOCOLATE_DOOM_DIR)/src
INC_DIR += $(CHOCOLATE_DOOM_DIR)/src/$(GAME)
INC_DIR += $(CHOCOLATE_DOOM_DIR)/textscreen

LIBS = libc libm sdl sdl_mixer sdl_net
LIBS = posix sdl sdl_mixer sdl_net

# vi:set ft=make :
4 changes: 2 additions & 2 deletions src/app/chuck/component.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <audio_out_session/audio_out_session.h>
#include <timer_session/connection.h>
#include <base/attached_rom_dataspace.h>
#include <base/component.h>
#include <libc/component.h>
#include <base/log.h>

/* ChucK includes */
Expand Down Expand Up @@ -395,7 +395,7 @@ Main::Main(Genode::Env &env) : env(env)
};


void Component::construct(Genode::Env &env)
void Libc::Component::construct(Genode::Env &env)
{
static Main inst(env);
}
2 changes: 1 addition & 1 deletion src/app/fesrv/target.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ SRC_CC = main.cc \
term.cc

TARGET = fesrv
LIBS = stdcxx
LIBS = stdcxx posix
INC_DIR += $(FESRV_SRC)

# Some defines to keep the fesrv compilation process happy
Expand Down
4 changes: 2 additions & 2 deletions src/app/fetchurl/component.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <timer_session/connection.h>
#include <os/path.h>
#include <base/attached_rom_dataspace.h>
#include <base/component.h>
#include <libc/component.h>
#include <base/log.h>

/* cURL includes */
Expand Down Expand Up @@ -66,7 +66,7 @@ int progress_callback(void *clientp,
return CURLE_OK;
}

void Component::construct(Genode::Env &env)
void Libc::Component::construct(Genode::Env &env)
{
Genode::Attached_rom_dataspace config(env, "config");

Expand Down
2 changes: 1 addition & 1 deletion src/app/grafx2/target.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ INC_DIR += $(GRAFX2_DIR)

CC_OPT += -DGENODE -DNOTTF=1

LIBS += libc libm libpng sdl sdl_image zlib
LIBS += posix libpng sdl sdl_image zlib

$(TARGET): grafx2_data.tar
grafx2_data.tar:
Expand Down
2 changes: 1 addition & 1 deletion src/app/ltris/target.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
TARGET = ltris
LIBS = libc stdcxx sdl sdl_mixer
LIBS = posix stdcxx sdl sdl_mixer

LTRIS_DIR := $(call select_from_ports,ltris)/src/app/ltris

Expand Down
2 changes: 1 addition & 1 deletion src/app/numptyphysics/target.mk
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ vpath getenv.cc $(PRG_DIR)

INC_DIR += $(NUMPTY_DIR) $(NUMPTY_DIR)/Box2D/Include

LIBS += base libc stdcxx
LIBS += base posix stdcxx
LIBS += sdl sdl_image sdl_ttf zlib

CC_OPT_Canvas := -DGENODE
Expand Down
2 changes: 1 addition & 1 deletion src/app/opentyrian/target.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SRC_C := $(notdir $(wildcard $(OPENTYRIAN_SRC)/*.c))

vpath %.c $(OPENTYRIAN_SRC)

LIBS += libc libm sdl sdl_net
LIBS += posix sdl sdl_net

CC_OPT += -std=c99 -DTARGET_UNIX

Expand Down
2 changes: 1 addition & 1 deletion src/app/supertux/target.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ vpath %.cpp $(SUPERTUX_DIR)/src

INC_DIR += $(SUPERTUX_DIR)/src

LIBS += base libc libm stdcxx
LIBS += posix stdcxx
LIBS += sdl sdl_image sdl_mixer zlib

$(TARGET): supertux_data.tar
Expand Down
2 changes: 1 addition & 1 deletion src/app/tor/target.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
TARGET = tor
LIBS = libevent libc libm libssl libcrypto zlib pthread
LIBS = libevent posix libssl libcrypto zlib pthread
LIBS += libc_lwip_nic_dhcp
TOR_DIR = $(call select_from_ports,tor)/src/app/tor
INC_DIR = $(PRG_DIR) \
Expand Down
2 changes: 1 addition & 1 deletion src/app/tuxmath/target.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ TARGET := tuxmath

TUXMATH_DIR := $(call select_from_ports,tuxmath)/src/app/tuxmath

LIBS += libc libm sdl sdl_image sdl_mixer sdl_ttf sdl_net tuxmath_t4k
LIBS += posix sdl sdl_image sdl_mixer sdl_ttf sdl_net tuxmath_t4k

INC_DIR += $(REP_DIR)/src/app/tuxmath \
$(TUXMATH_DIR)/t4k/src
Expand Down
2 changes: 1 addition & 1 deletion src/app/uhexen2/target.mk
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ CC_OPT += -DNO_ALSA_AUDIO -DNO_OSS_AUDIO -DNO_SUN_AUDIO

CC_OPT += -DDEMOBUILD

LIBS = libc libc_lwip lwip libm sdl sdl_mixer config_args
LIBS = posix libc_lwip lwip libm sdl sdl_mixer config_args

vpath % $(UHEXEN2_DIR)/common
vpath % $(UHEXEN2_DIR)/engine/hexen2
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/gpio/spec/zynq/target.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
TARGET = zynq_gpio_drv

SRC_CC = main.cc
LIBS = base config libc libm stdcxx
LIBS = base config posix stdcxx
INC_DIR += $(PRG_DIR)
REQUIRES += zynq

Expand Down
4 changes: 2 additions & 2 deletions src/drivers/vdma/spec/zynq/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ class Vdma::Root : public Genode::Root_component<Vdma::Session_component>
Genode::size_t ram_quota = Genode::Arg_string::find_arg(args, "ram_quota").ulong_value(0);

if (ram_quota < sizeof(Session_component)) {
PWRN("Insufficient dontated ram_quota (%zd bytes), require %zd bytes",
ram_quota, sizeof(Session_component));
warning("Insufficient dontated ram_quota (", ram_quota, " bytes), "
"require ", sizeof(Session_component), " bytes");
throw Genode::Root::Quota_exceeded();
}

Expand Down
2 changes: 1 addition & 1 deletion src/drivers/vdma/spec/zynq/target.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
TARGET = zynq_vdma_drv

SRC_CC = main.cc
LIBS = base config libc libm stdcxx
LIBS = base config posix stdcxx
INC_DIR += $(PRG_DIR)

vpath main.cc $(PRG_DIR)
Expand Down
21 changes: 7 additions & 14 deletions src/server/synergy_input/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <os/static_root.h>
#include <os/signal_rpc_dispatcher.h>
#include <os/config.h>
#include <os/server.h>
#include <libc/component.h>

/* Synergy includes */
#include <uSynergy.h>
Expand Down Expand Up @@ -358,7 +358,7 @@ using namespace Genode;

struct Main
{
Server::Entrypoint &ep;
Genode::Entrypoint &ep;

/*
* Input session provided to our client
Expand All @@ -378,7 +378,7 @@ struct Main
/**
* Constructor
*/
Main(Server::Entrypoint &ep) : ep(ep)
Main(Genode::Entrypoint &ep) : ep(ep)
{
session_component.event_queue().enabled(true);

Expand All @@ -389,15 +389,8 @@ struct Main
};


/************
** Server **
************/
/***************
** Component **
***************/

namespace Server {

char const *name() { return "synergy_client_ep"; }

size_t stack_size() { return 1; }

void construct(Entrypoint &ep) { static Main inst(ep); }
}
void Libc::Component::construct(Genode::Env &env) { static Main inst(env.ep()); }
2 changes: 1 addition & 1 deletion src/server/synergy_input/target.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ TARGET = synergy_input
INC_DIR += $(SYNERGY_SRC_DIR)
SRC_C = uSynergy.c
SRC_CC = main.cc
LIBS = base server libc libc_lwip_nic_dhcp
LIBS = libc libc_lwip_nic_dhcp

vpath uSynergy.c $(SYNERGY_SRC_DIR)
vpath main.cc $(PRG_DIR)
10 changes: 5 additions & 5 deletions src/server/tftp_rom/component.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <base/attached_rom_dataspace.h>
#include <base/heap.h>
#include <root/component.h>
#include <base/component.h>
#include <libc/component.h>
#include <util/list.h>
#include <util/string.h>
#include <util/endian.h>
Expand Down Expand Up @@ -203,6 +203,8 @@ class Tftp_rom::Session_component :
*/
bool add_block(pbuf *data)
{
using Genode::size_t;

uint8_t *buf = (uint8_t*)data->payload;

/* TFTP packets always start with zero */
Expand Down Expand Up @@ -514,7 +516,7 @@ class Tftp_rom::Root : public Genode::Root_component<Session_component>
void _destroy_session(Session_component *session) override
{
_timeout_dispatcher.remove(session);
destroy(md_alloc(), session);
Genode::destroy(md_alloc(), session);
}

public:
Expand All @@ -529,9 +531,7 @@ class Tftp_rom::Root : public Genode::Root_component<Session_component>
};


Genode::size_t Component::stack_size() { return 4*1024*sizeof(long); }

void Component::construct(Genode::Env &env )
void Libc::Component::construct(Genode::Env &env )
{
static Genode::Sliced_heap sliced_heap(env.ram(), env.rm());
static Tftp_rom::Root root(env, sliced_heap);
Expand Down
4 changes: 2 additions & 2 deletions src/test/glucose/target.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
TARGET = test-glucose
LIBS = base stdcxx zlib glucose
SRC_CC = main.cc
LIBS = posix stdcxx zlib glucose
SRC_CC = main.cc

CC_OPT += -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS
2 changes: 1 addition & 1 deletion src/test/lemon/target.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
TARGET = test-lemon
LIBS = lemon stdcxx
LIBS = lemon stdcxx posix
LEMON = $(call select_from_ports,lemon)/src/lib/lemon/test
SRC_CC = graph_test.cc

Expand Down
2 changes: 1 addition & 1 deletion src/test/scip/target.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
TARGET = test-scip
LIBS = libc scip stdcxx config_args
LIBS = posix scip stdcxx config_args
SCIP_DIR = $(call select_from_ports,scip)/src/lib/scip/
EX_DIR = $(SCIP_DIR)/examples/Queens/src
INC_DIR += $(EX_DIR)
Expand Down
2 changes: 1 addition & 1 deletion src/test/soplex/target.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
TARGET = test-soplex
LIBS = soplex stdcxx
LIBS = soplex stdcxx posix
SOPLEX = $(call select_from_ports,soplex)/src/lib/soplex/src/
SRC_CC = example.cpp

Expand Down
4 changes: 2 additions & 2 deletions src/test/sqlite_speedtest/target.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
TARGET = test-sqlite_speedtest
LIBS = sqlite pthread libc
SRC_C = speedtest1.c
LIBS = sqlite pthread posix
SRC_C = speedtest1.c

SQLITE_DIR = $(call select_from_ports,sqlite)/src/lib/sqlite

Expand Down
4 changes: 2 additions & 2 deletions src/test/testu01_alphabet/main.cc
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#include <base/attached_rom_dataspace.h>
#include <base/component.h>
#include <libc/component.h>
#include <base/log.h>

extern "C" {
#include "bbattery.h"
}

void Component::construct(Genode::Env &env)
void Libc::Component::construct(Genode::Env &env)
{
using namespace Genode;

Expand Down
7 changes: 4 additions & 3 deletions src/test/testu01_rabbit/main.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <base/attached_rom_dataspace.h>
#include <base/component.h>
#include <libc/component.h>
#include <base/log.h>

extern "C" {
Expand All @@ -9,9 +9,10 @@ extern "C" {
}

/* This is a big one */
Genode::size_t Component::stack_size() { return 64*1024*sizeof(Genode::addr_t); }
Genode::size_t Libc::Component::stack_size() { return 64*1024*sizeof(Genode::addr_t); }

void Component::construct(Genode::Env &env)

void Libc::Component::construct(Genode::Env &env)
{
using namespace Genode;

Expand Down

0 comments on commit 4114699

Please sign in to comment.