Skip to content

Commit

Permalink
noux: adaptation to new component environment
Browse files Browse the repository at this point in the history
  • Loading branch information
nfeske authored and chelmuth committed Feb 29, 2016
1 parent 99f0389 commit 6dda3cf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 19 deletions.
9 changes: 1 addition & 8 deletions repos/ports/run/noux_bash.run
Expand Up @@ -14,8 +14,6 @@ set build_components {
drivers/framebuffer drivers/input
server/terminal server/ram_fs
test/libports/ncurses

drivers/rtc
}

lappend_if [use_usb_input] build_components drivers/usb
Expand Down Expand Up @@ -73,10 +71,6 @@ append config {
<start name="timer">
<resource name="RAM" quantum="1M"/>
<provides><service name="Timer"/></provides>
</start>
<start name="rtc_drv">
<resource name="RAM" quantum="1M"/>
<provides><service name="Rtc"/></provides>
</start>}

append_if [have_spec sdl] config {
Expand Down Expand Up @@ -167,7 +161,7 @@ append config {
<dir name="ram"> <fs label="root" /> </dir>
<dir name="tmp"> <fs label="tmp" /> </dir>

<dir name="dev"> <rtc/> <zero/> <null/> </dir>
<dir name="dev"> <zero/> <null/> </dir>

</fstab>
<start name="/bin/bash">
Expand All @@ -190,7 +184,6 @@ set boot_modules {
core init timer ld.lib.so noux terminal ram_fs
libc.lib.so libm.lib.so libc_noux.lib.so ncurses.lib.so
bash.tar coreutils.tar vim.tar
rtc_drv
}

# platform-specific modules
Expand Down
15 changes: 5 additions & 10 deletions repos/ports/src/noux/cpu_session_component.h
Expand Up @@ -74,18 +74,13 @@ namespace Noux {
Thread_capability create_thread(size_t weight, Name const &name,
addr_t utcb)
{
/*
* Prevent any attempt to create more than the main
* thread.
*/
if (_main_thread.valid()) {
PWRN("Invalid attempt to create a thread besides main");
while (1);
return Thread_capability();
if (!_main_thread.valid()) {
_main_thread = _cpu.create_thread(weight, name, utcb);
return _main_thread;
}
_main_thread = _cpu.create_thread(weight, name, utcb);

return _main_thread;
/* create non-main thread */
return _cpu.create_thread(weight, name, utcb);
}

Ram_dataspace_capability utcb(Thread_capability thread) {
Expand Down
2 changes: 1 addition & 1 deletion repos/ports/src/noux/main.cc
Expand Up @@ -1139,7 +1139,7 @@ int main(int argc, char **argv)

/* whitelist of service requests to be routed to the parent */
static Genode::Service_registry parent_services;
char const *service_names[] = { "LOG", "ROM", "Timer", 0 };
char const *service_names[] = { "LOG", "ROM", "CAP", "Timer", 0 };
for (unsigned i = 0; service_names[i]; i++)
parent_services.insert(new Genode::Parent_service(service_names[i]));

Expand Down

0 comments on commit 6dda3cf

Please sign in to comment.