diff --git a/repos/ports/src/noux/construct.h b/repos/ports/src/noux/construct.h new file mode 100644 index 0000000000..3021e37ca8 --- /dev/null +++ b/repos/ports/src/noux/construct.h @@ -0,0 +1,21 @@ +/** + * \brief Noux initialization + * \author Sebastian Sumpf + * \date 2017-02-24 + */ + +/* + * Copyright (C) 2017 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#ifndef __NOUX_CONSTRUCT_H_ +#define __NOUX_CONSTRUCT_H_ + +namespace Genode { class Env; } + +void noux_construct(Genode::Env &env); + +#endif /* __NOUX_CONSTRUCT_H_ */ diff --git a/repos/ports/src/noux/main.cc b/repos/ports/src/noux/main.cc index b8af927d64..db9042cb5e 100644 --- a/repos/ports/src/noux/main.cc +++ b/repos/ports/src/noux/main.cc @@ -18,6 +18,7 @@ /* Noux includes */ #include +#include #include #include #include @@ -307,10 +308,7 @@ struct Noux::Main }; -void Component::construct(Genode::Env &env) { static Noux::Main main(env); } - - -/** - * Support for the noux/net version - */ -void Libc::Component::construct(Libc::Env &env) { Component::construct(env); } +void noux_construct(Genode::Env &env) +{ + static Noux::Main main(env); +} diff --git a/repos/ports/src/noux/minimal/construct.cc b/repos/ports/src/noux/minimal/construct.cc new file mode 100644 index 0000000000..f0eae330a9 --- /dev/null +++ b/repos/ports/src/noux/minimal/construct.cc @@ -0,0 +1,20 @@ +/** + * \brief Noux initialization + * \author Sebastian Sumpf + * \date 2017-02-24 + */ + +/* + * Copyright (C) 2017 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#include +#include + +void Component::construct(Genode::Env &env) +{ + noux_construct(env); +} diff --git a/repos/ports/src/noux/minimal/target.mk b/repos/ports/src/noux/minimal/target.mk index 7b82b0f327..845154b4a9 100644 --- a/repos/ports/src/noux/minimal/target.mk +++ b/repos/ports/src/noux/minimal/target.mk @@ -1,6 +1,6 @@ TARGET = noux LIBS = alarm vfs -SRC_CC = main.cc syscall.cc dummy_net.cc +SRC_CC = main.cc syscall.cc dummy_net.cc construct.cc INC_DIR += $(PRG_DIR) INC_DIR += $(PRG_DIR)/../ diff --git a/repos/ports/src/noux/net/construct.cc b/repos/ports/src/noux/net/construct.cc new file mode 100644 index 0000000000..3c4f5c115f --- /dev/null +++ b/repos/ports/src/noux/net/construct.cc @@ -0,0 +1,20 @@ +/** + * \brief Noux initialization + * \author Sebastian Sumpf + * \date 2017-02-24 + */ + +/* + * Copyright (C) 2017 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#include +#include + +void Libc::Component::construct(Libc::Env &env) +{ + noux_construct(env); +} diff --git a/repos/ports/src/noux/net/target.mk b/repos/ports/src/noux/net/target.mk index dd40c7fb3d..aea8a240d6 100644 --- a/repos/ports/src/noux/net/target.mk +++ b/repos/ports/src/noux/net/target.mk @@ -1,6 +1,6 @@ TARGET = noux_net LIBS += alarm libc libc_lwip_nic_dhcp vfs -SRC_CC = main.cc syscall.cc net.cc +SRC_CC = main.cc syscall.cc net.cc construct.cc INC_DIR += $(PRG_DIR) INC_DIR += $(PRG_DIR)/../