diff --git a/repos/dde_linux/run/usb_rndis.run b/repos/dde_linux/run/usb_rndis.run index 414753e315..5ce4c26a1c 100644 --- a/repos/dde_linux/run/usb_rndis.run +++ b/repos/dde_linux/run/usb_rndis.run @@ -66,8 +66,9 @@ set config { + - + @@ -93,7 +94,7 @@ install_config $config # generic modules set boot_modules { core ld.lib.so init timer usb_drv - libc.lib.so vfs.lib.so libc_pipe.lib.so lwip_legacy.lib.so + libc.lib.so vfs.lib.so lwip_legacy.lib.so tcp_terminal test-terminal_echo vfs_lwip.lib.so diff --git a/repos/dde_linux/run/vfs_lxip.run b/repos/dde_linux/run/vfs_lxip.run index cc9b410dab..c933a92bd1 100644 --- a/repos/dde_linux/run/vfs_lxip.run +++ b/repos/dde_linux/run/vfs_lxip.run @@ -44,14 +44,14 @@ append config { - - - - - - - - + + + + + + + + --> @@ -65,7 +65,7 @@ append config { - + @@ -114,8 +116,8 @@ install_config $config set boot_modules { core init timer usb_drv test-smartcard ld.lib.so pcsc-lite.lib.so ccid.lib.so libusb.lib.so - libc.lib.so vfs.lib.so libm.lib.so libc_pipe.lib.so posix.lib.so - Info.plist + libc.lib.so vfs.lib.so libm.lib.so posix.lib.so + Info.plist vfs_pipe.lib.so } append_platform_drv_boot_modules diff --git a/repos/libports/src/lib/libc_pipe/plugin.cc b/repos/libports/src/lib/libc_pipe/plugin.cc deleted file mode 100644 index abc29a6a23..0000000000 --- a/repos/libports/src/lib/libc_pipe/plugin.cc +++ /dev/null @@ -1,476 +0,0 @@ -/* - * \brief Pipe plugin implementation - * \author Christian Prochaska - * \date 2014-07-11 - */ - -/* - * Copyright (C) 2014-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. - */ - - -/* Genode includes */ -#include -#include -#include -#include -#include - -/* libc includes */ -#include -#include -#include - -/* libc plugin interface */ -#include -#include -#include - - -/* function to notify libc about a socket event */ -extern void (*libc_select_notify)(); - - -namespace Libc_pipe { - - using namespace Genode; - - enum Type { READ_END, WRITE_END }; - enum { PIPE_BUF_SIZE = 4096 }; - - typedef Ring_buffer Pipe_buffer; - - class Plugin_context : public Libc::Plugin_context - { - private: - - Type _type; - - Libc::File_descriptor *_partner; - - Genode::Allocator &_alloc; - - Pipe_buffer *_buffer; - - Genode::Semaphore *_write_avail_sem; - - bool _nonblock = false; - - public: - - /** - * Constructor - * - * \param type information if the file descriptor belongs to the - * read end or to the write end of the pipe - * - * \param partner the other pipe end - */ - Plugin_context(Type type, Libc::File_descriptor *partner, - Genode::Allocator &alloc); - - ~Plugin_context(); - - Type type() const { return _type; } - Pipe_buffer *buffer() const { return _buffer; } - Libc::File_descriptor *partner() const { return _partner; } - Genode::Semaphore *write_avail_sem() const { return _write_avail_sem; } - bool nonblock() const { return _nonblock; } - - void set_partner(Libc::File_descriptor *partner) { _partner = partner; } - void set_nonblock(bool nonblock) { _nonblock = nonblock; } - }; - - - class Plugin : public Libc::Plugin - { - private: - - Genode::Constructible _heap; - - public: - - /** - * Constructor - */ - Plugin(); - - void init(Genode::Env &env) override; - - bool supports_pipe() override; - bool supports_poll() override; - bool supports_select(int nfds, - fd_set *readfds, - fd_set *writefds, - fd_set *exceptfds, - struct timeval *timeout) override; - - int close(Libc::File_descriptor *pipefdo) override; - int fcntl(Libc::File_descriptor *pipefdo, int cmd, long arg) override; - int pipe(Libc::File_descriptor *pipefdo[2]) override; - bool poll(Libc::File_descriptor &, struct pollfd &) override; - ssize_t read(Libc::File_descriptor *pipefdo, void *buf, - ::size_t count) override; - int select(int nfds, fd_set *readfds, fd_set *writefds, - fd_set *exceptfds, struct timeval *timeout) override; - ssize_t write(Libc::File_descriptor *pipefdo, const void *buf, - ::size_t count) override; - }; - - - /*************** - ** Utilities ** - ***************/ - - Plugin_context *context(Libc::File_descriptor *fd) - { - return static_cast(fd->context); - } - - - static inline bool read_end(Libc::File_descriptor *fdo) - { - return (context(fdo)->type() == READ_END); - } - - - static inline bool write_end(Libc::File_descriptor *fdo) - { - return (context(fdo)->type() == WRITE_END); - } - - - /******************** - ** Plugin_context ** - ********************/ - - Plugin_context::Plugin_context(Type type, Libc::File_descriptor *partner, - Genode::Allocator &alloc) - : _type(type), _partner(partner), _alloc(alloc) - { - if (!_partner) { - - /* allocate shared resources */ - - _buffer = new (_alloc) Pipe_buffer; - _write_avail_sem = new (_alloc) Genode::Semaphore(PIPE_BUF_SIZE); - - } else { - - /* get shared resource pointers from partner */ - - _buffer = context(_partner)->buffer(); - _write_avail_sem = context(_partner)->write_avail_sem(); - } - } - - - Plugin_context::~Plugin_context() - { - if (_partner) { - - /* remove the fd this context belongs to from the partner's context */ - context(_partner)->set_partner(0); - - } else { - - /* partner fd is already destroyed -> free shared resources */ - destroy(_alloc, _buffer); - destroy(_alloc, _write_avail_sem); - } - } - - - /************ - ** Plugin ** - ************/ - - Plugin::Plugin() - { - Genode::log("using the pipe libc plugin"); - } - - - void Plugin::init(Genode::Env &env) - { - _heap.construct(env.ram(), env.rm()); - } - - - bool Plugin::supports_pipe() - { - return true; - } - - - bool Plugin::supports_poll() - { - return true; - } - - - bool Plugin::supports_select(int nfds, - fd_set *readfds, - fd_set *writefds, - fd_set *exceptfds, - struct timeval *timeout) - { - /* - * Return true if any file descriptor which is marked set in one of - * the sets belongs to this plugin - */ - for (int libc_fd = 0; libc_fd < nfds; libc_fd++) { - - if (FD_ISSET(libc_fd, readfds) || - FD_ISSET(libc_fd, writefds) || - FD_ISSET(libc_fd, exceptfds)) { - - Libc::File_descriptor *fdo = - Libc::file_descriptor_allocator()->find_by_libc_fd(libc_fd); - - if (fdo && (fdo->plugin == this)) - return true; - } - } - return false; - } - - - int Plugin::close(Libc::File_descriptor *pipefdo) - { - Genode::destroy(*_heap, context(pipefdo)); - Libc::file_descriptor_allocator()->free(pipefdo); - - return 0; - } - - - int Plugin::fcntl(Libc::File_descriptor *pipefdo, int cmd, long arg) - { - switch (cmd) { - - case F_SETFD: - { - const long supported_flags = FD_CLOEXEC; - /* if unsupported flags are used, fall through with error */ - if (!(arg & ~supported_flags)) { - /* close fd if exec is called - no exec support -> ignore */ - if (arg & FD_CLOEXEC) - return 0; - } - } - - case F_GETFL: - - if (write_end(pipefdo)) - return O_WRONLY; - else - return O_RDONLY; - - case F_SETFL: - { - /* - * O_RDONLY, O_WRONLY, O_RDWR, O_CREAT, O_TRUNC, O_EXCL - * are ignored - */ - constexpr long supported_flags = O_NONBLOCK - | O_RDONLY | O_WRONLY | O_RDWR - | O_CREAT | O_TRUNC | O_EXCL; - - context(pipefdo)->set_nonblock(arg & O_NONBLOCK); - - if ((arg & ~supported_flags) == 0) - return 0; - - /* unsupported flags present */ - - Genode::error(__PRETTY_FUNCTION__, ": " - "command F_SETFL arg ", arg, " not fully supported"); - - return -1; - } - - default: - - Genode::error(__PRETTY_FUNCTION__, "s: command ", cmd, " " - "arg ", arg, " not supported"); - return -1; - } - - return -1; - } - - - int Plugin::pipe(Libc::File_descriptor *pipefdo[2]) - { - pipefdo[0] = Libc::file_descriptor_allocator()->alloc(this, - new (*_heap) Plugin_context(READ_END, 0, *_heap)); - pipefdo[1] = Libc::file_descriptor_allocator()->alloc(this, - new (*_heap) Plugin_context(WRITE_END, pipefdo[0], *_heap)); - static_cast(pipefdo[0]->context)->set_partner(pipefdo[1]); - - return 0; - } - - - bool Plugin::poll(Libc::File_descriptor &fdo, struct pollfd &pfd) - { - if (fdo.plugin != this) return false; - - enum { - POLLIN_MASK = POLLIN | POLLRDNORM | POLLRDBAND | POLLPRI, - POLLOUT_MASK = POLLOUT | POLLWRNORM | POLLWRBAND, - }; - - bool res { false }; - - if ((pfd.events & POLLIN_MASK) - && read_end(&fdo) - && !context(&fdo)->buffer()->empty()) - { - pfd.revents |= pfd.events & POLLIN_MASK; - res = true; - } - - if ((pfd.events & POLLOUT_MASK) - && write_end(&fdo) - && (context(&fdo)->buffer()->avail_capacity() > 0)) - { - pfd.revents |= pfd.events & POLLOUT_MASK; - res = true; - } - - return res; - } - - - ssize_t Plugin::read(Libc::File_descriptor *fdo, void *buf, ::size_t count) - { - if (!read_end(fdo)) { - Genode::error("cannot read from write end of pipe"); - errno = EBADF; - return -1; - } - - if (!context(fdo)->partner()) - return 0; - - if (context(fdo)->nonblock() && context(fdo)->buffer()->empty()) { - errno = EAGAIN; - return -1; - } - - /* blocking mode, read at least one byte */ - - ssize_t num_bytes_read = 0; - - do { - - ((unsigned char*)buf)[num_bytes_read] = - context(fdo)->buffer()->get(); - - num_bytes_read++; - - context(fdo)->write_avail_sem()->up(); - - } while ((num_bytes_read < (ssize_t)count) && - !context(fdo)->buffer()->empty()); - - return num_bytes_read; - } - - - /* no support for execptfds right now */ - - int Plugin::select(int nfds, - fd_set *readfds, - fd_set *writefds, - fd_set *exceptfds, - struct timeval *timeout) - { - int nready = 0; - Libc::File_descriptor *fdo; - fd_set in_readfds, in_writefds; - - in_readfds = *readfds; - FD_ZERO(readfds); - in_writefds = *writefds; - FD_ZERO(writefds); - FD_ZERO(exceptfds); - - for (int libc_fd = 0; libc_fd < nfds; libc_fd++) { - - fdo = Libc::file_descriptor_allocator()->find_by_libc_fd(libc_fd); - - /* handle only libc_fds that belong to this plugin */ - if (!fdo || (fdo->plugin != this)) - continue; - - if (FD_ISSET(libc_fd, &in_readfds) && - read_end(fdo) && - !context(fdo)->buffer()->empty()) { - FD_SET(libc_fd, readfds); - nready++; - } - - if (FD_ISSET(libc_fd, &in_writefds) && - write_end(fdo) && - (context(fdo)->buffer()->avail_capacity() > 0)) { - FD_SET(libc_fd, writefds); - nready++; - } - } - return nready; - } - - - ssize_t Plugin::write(Libc::File_descriptor *fdo, const void *buf, - ::size_t count) - { - if (!write_end(fdo)) { - Genode::error("cannot write into read end of pipe"); - errno = EBADF; - return -1; - } - - if (context(fdo)->nonblock() && - (context(fdo)->buffer()->avail_capacity() == 0)) { - errno = EAGAIN; - return -1; - } - - ::size_t num_bytes_written = 0; - while (num_bytes_written < count) { - - if (context(fdo)->buffer()->avail_capacity() == 0) { - - if (context(fdo)->nonblock()) - return num_bytes_written; - - if (libc_select_notify) - libc_select_notify(); - Plugin::resume_all(); - } - - context(fdo)->write_avail_sem()->down(); - - context(fdo)->buffer()->add(((unsigned char*)buf)[num_bytes_written]); - num_bytes_written++; - } - - if (libc_select_notify) - libc_select_notify(); - Plugin::resume_all(); - - return num_bytes_written; - } -} - - -void __attribute__((constructor)) init_libc_pipe() -{ - static Libc_pipe::Plugin plugin; -} diff --git a/repos/libports/src/test/libc_pipe/main.cc b/repos/libports/src/test/libc_pipe/main.cc index f4f691325f..a8f4cac37e 100644 --- a/repos/libports/src/test/libc_pipe/main.cc +++ b/repos/libports/src/test/libc_pipe/main.cc @@ -1,5 +1,5 @@ /* - * \brief libc_pipe test + * \brief Test for using libc with VFS pipe plugin * \author Christian Prochaska * \date 2016-04-24 */ diff --git a/repos/libports/src/test/libc_select/target.mk b/repos/libports/src/test/libc_select/target.mk index efaffb7023..1deaceea7e 100644 --- a/repos/libports/src/test/libc_select/target.mk +++ b/repos/libports/src/test/libc_select/target.mk @@ -1,5 +1,5 @@ TARGET = test-libc_select SRC_CC = main.cc -LIBS = posix stdcxx libc_pipe +LIBS = posix stdcxx CC_CXX_WARN_STRICT = diff --git a/repos/ports/doc/gdb.txt b/repos/ports/doc/gdb.txt index 94eb95fc85..c3ae7e0018 100644 --- a/repos/ports/doc/gdb.txt +++ b/repos/ports/doc/gdb.txt @@ -224,11 +224,10 @@ driver ('pci_drv'). For an example of integrating TCP terminal into a Genode scenario, please refer to the 'tcp_terminal.run' script proved at 'gems/run/'. GDB monitor is built upon the libc and a few custom libc plugins, each coming -in the form of a separate shared library. Please make sure to integrate those -shared libraries along with the dynamic linker (ld.lib.so) in your boot image. -They are 'libc.lib.so' (the libc), and 'libc_pipe.lib.so' (used for synchronizing -threads via 'select' and 'pipe'). For using the TCP terminal, 'lwip.lib.so' (TCP/IP -stack) is needed as well. +in the form of a separate shared library. Please make sure to integrate the +shared C library (libc.lib.so) along with the dynamic linker (ld.lib.so) in +your boot image. For using the TCP terminal, 'lwip.lib.so' (TCP/IP stack) is +needed as well. Examples diff --git a/repos/ports/recipes/pkg/report_dump/runtime b/repos/ports/recipes/pkg/report_dump/runtime index c37fc60bc0..b189415c1c 100644 --- a/repos/ports/recipes/pkg/report_dump/runtime +++ b/repos/ports/recipes/pkg/report_dump/runtime @@ -32,8 +32,8 @@ - + @@ -72,7 +72,7 @@ + stderr="/dev/log" rtc="/dev/rtc" pipe="/pipe"/> diff --git a/repos/ports/recipes/pkg/vbox5-nova-sculpt/runtime b/repos/ports/recipes/pkg/vbox5-nova-sculpt/runtime index 5e50f5c6f9..6dbbae3a7c 100755 --- a/repos/ports/recipes/pkg/vbox5-nova-sculpt/runtime +++ b/repos/ports/recipes/pkg/vbox5-nova-sculpt/runtime @@ -23,7 +23,6 @@ - diff --git a/repos/ports/recipes/pkg/vbox5/runtime b/repos/ports/recipes/pkg/vbox5/runtime index 4374dc9c66..d83aeee0ba 100755 --- a/repos/ports/recipes/pkg/vbox5/runtime +++ b/repos/ports/recipes/pkg/vbox5/runtime @@ -78,7 +78,6 @@ - diff --git a/repos/ports/recipes/raw/system_shell/system_shell.config b/repos/ports/recipes/raw/system_shell/system_shell.config index 2d0844b76a..d97576afd4 100644 --- a/repos/ports/recipes/raw/system_shell/system_shell.config +++ b/repos/ports/recipes/raw/system_shell/system_shell.config @@ -49,9 +49,9 @@ - 2018-01-01 00:01 + @@ -90,7 +90,7 @@ + stderr="/dev/terminal" rtc="/dev/rtc" pipe="/pipe"/> diff --git a/repos/ports/recipes/src/vbox5-nova/content.mk b/repos/ports/recipes/src/vbox5-nova/content.mk index 40d0169e24..5baeec96f7 100644 --- a/repos/ports/recipes/src/vbox5-nova/content.mk +++ b/repos/ports/recipes/src/vbox5-nova/content.mk @@ -33,9 +33,7 @@ $(MIRROR_FROM_PORT_DIR): mkdir -p $(dir $@) cp -r $(PORT_DIR)/$@ $(dir $@) -MIRROR_FROM_LIBPORTS := lib/mk/libc_pipe.mk \ - src/lib/libc_pipe \ - lib/mk/libc-mem.mk \ +MIRROR_FROM_LIBPORTS := lib/mk/libc-mem.mk \ lib/mk/libc-common.inc \ src/lib/libc/internal/init.h \ src/lib/libc/internal/mem_alloc.h \ diff --git a/repos/ports/recipes/src/vbox5/content.mk b/repos/ports/recipes/src/vbox5/content.mk index 4d0e2db957..e933bcef8e 100644 --- a/repos/ports/recipes/src/vbox5/content.mk +++ b/repos/ports/recipes/src/vbox5/content.mk @@ -34,9 +34,7 @@ $(MIRROR_FROM_PORT_DIR): mkdir -p $(dir $@) cp -r $(PORT_DIR)/$@ $(dir $@) -MIRROR_FROM_LIBPORTS := lib/mk/libc_pipe.mk \ - src/lib/libc_pipe \ - lib/mk/libc-mem.mk \ +MIRROR_FROM_LIBPORTS := lib/mk/libc-mem.mk \ lib/mk/libc-common.inc \ src/lib/libc/internal/init.h \ src/lib/libc/internal/mem_alloc.h \ diff --git a/repos/ports/run/bash.run b/repos/ports/run/bash.run index ca085052fe..841038a157 100644 --- a/repos/ports/run/bash.run +++ b/repos/ports/run/bash.run @@ -111,9 +111,9 @@ install_config { - 2018-01-01 00:01 + @@ -136,7 +136,7 @@ install_config { + stderr="/dev/terminal" rtc="/dev/rtc" pipe="/pipe"/> diff --git a/repos/ports/run/debug_nitpicker.run b/repos/ports/run/debug_nitpicker.run index 1f2370ed47..6a4dcca64c 100644 --- a/repos/ports/run/debug_nitpicker.run +++ b/repos/ports/run/debug_nitpicker.run @@ -22,7 +22,8 @@ import_from_depot [depot_user]/src/[base_src] \ [depot_user]/pkg/[drivers_interactive_pkg] \ [depot_user]/src/nitpicker \ [depot_user]/src/demo \ - [depot_user]/src/init + [depot_user]/src/init \ + [depot_user]/src/vfs_pipe set build_components { drivers/uart @@ -93,8 +94,11 @@ install_config { - - + + + + + @@ -115,7 +119,7 @@ proc binary_name_gdbserver_platform_lib_so { } { # generic modules build_boot_image { - stdcxx.lib.so libc.lib.so libm.lib.so vfs.lib.so libc_pipe.lib.so + stdcxx.lib.so libc.lib.so libm.lib.so vfs.lib.so pc_uart_drv gdb_monitor gdbserver_platform.lib.so } diff --git a/repos/ports/run/gdb_monitor.run b/repos/ports/run/gdb_monitor.run index 1463ab5a41..2e696886a2 100644 --- a/repos/ports/run/gdb_monitor.run +++ b/repos/ports/run/gdb_monitor.run @@ -23,6 +23,7 @@ set build_components { drivers/uart app/gdb_monitor test/gdb_monitor + lib/vfs/pipe } lappend build_components "lib/gdbserver_platform-$::env(KERNEL)" @@ -75,8 +76,11 @@ set config { - - + + + + + @@ -96,8 +100,8 @@ proc binary_name_gdbserver_platform_lib_so { } { # generic modules set boot_modules { core init timer - ld.lib.so libc.lib.so vfs.lib.so libm.lib.so libc_pipe.lib.so - pc_uart_drv posix.lib.so stdcxx.lib.so + ld.lib.so libc.lib.so vfs.lib.so libm.lib.so + pc_uart_drv posix.lib.so stdcxx.lib.so vfs_pipe.lib.so gdb_monitor gdbserver_platform.lib.so test-gdb_monitor } diff --git a/repos/ports/run/gdb_monitor_interactive.run b/repos/ports/run/gdb_monitor_interactive.run index d5d9acec90..76e6360e90 100644 --- a/repos/ports/run/gdb_monitor_interactive.run +++ b/repos/ports/run/gdb_monitor_interactive.run @@ -19,6 +19,7 @@ set build_components { drivers/uart app/gdb_monitor test/gdb_monitor + lib/vfs/pipe } lappend build_components "lib/gdbserver_platform-$::env(KERNEL)" @@ -53,7 +54,10 @@ set config { - + + + + @@ -68,8 +72,11 @@ set config { - - + + + + + @@ -88,8 +95,9 @@ proc binary_name_gdbserver_platform_lib_so { } { # generic modules set boot_modules { - libc_pipe.lib.so - pc_uart_drv + core init timer + ld.lib.so libc.lib.so libm.lib.so vfs.lib.so stdcxx.lib.so + pc_uart_drv vfs_pipe.lib.so gdb_monitor gdbserver_platform.lib.so test-gdb_monitor } diff --git a/repos/ports/run/gdb_monitor_target_config.run b/repos/ports/run/gdb_monitor_target_config.run index 337a97b6fc..a34117886c 100644 --- a/repos/ports/run/gdb_monitor_target_config.run +++ b/repos/ports/run/gdb_monitor_target_config.run @@ -18,6 +18,7 @@ set build_components { drivers/uart app/gdb_monitor test/gdb_monitor_target_config + lib/vfs/pipe } lappend build_components "lib/gdbserver_platform-$::env(KERNEL)" @@ -52,7 +53,10 @@ set config { - + + + + @@ -68,8 +72,11 @@ set config { - - + + + + + @@ -89,8 +96,8 @@ proc binary_name_gdbserver_platform_lib_so { } { # generic modules set boot_modules { core init timer - ld.lib.so libc.lib.so libm.lib.so vfs.lib.so libc_pipe.lib.so stdcxx.lib.so - pc_uart_drv + ld.lib.so libc.lib.so libm.lib.so vfs.lib.so stdcxx.lib.so + pc_uart_drv vfs_pipe.lib.so gdb_monitor gdbserver_platform.lib.so test-gdb_monitor_target_config } diff --git a/repos/ports/run/tool_chain_auto.run b/repos/ports/run/tool_chain_auto.run index f8a7d76ed9..075aa247ab 100644 --- a/repos/ports/run/tool_chain_auto.run +++ b/repos/ports/run/tool_chain_auto.run @@ -168,9 +168,9 @@ install_config { - 2030-01-01 00:01 + @@ -210,7 +210,7 @@ install_config { + rtc="/dev/rtc" pipe="/pipe"/> diff --git a/repos/ports/run/vbox5_genode_usb_hid.run b/repos/ports/run/vbox5_genode_usb_hid.run index 99ee94fe13..51e277d125 100644 --- a/repos/ports/run/vbox5_genode_usb_hid.run +++ b/repos/ports/run/vbox5_genode_usb_hid.run @@ -38,7 +38,8 @@ create_boot_directory import_from_depot [depot_user]/src/[base_src] \ [depot_user]/src/init \ - [depot_user]/src/nitpicker + [depot_user]/src/nitpicker \ + [depot_user]/src/vfs_pipe set config { @@ -207,10 +208,11 @@ append config { + - + @@ -257,7 +259,7 @@ set boot_modules { virtualbox5-nova usb_hid.iso vm_genode_usb_hid.vbox - ld.lib.so libc.lib.so libm.lib.so libc_pipe.lib.so + ld.lib.so libc.lib.so libm.lib.so libiconv.lib.so stdcxx.lib.so qemu-usb.lib.so } diff --git a/repos/ports/run/vbox_share.inc b/repos/ports/run/vbox_share.inc index 1422479788..7499104623 100644 --- a/repos/ports/run/vbox_share.inc +++ b/repos/ports/run/vbox_share.inc @@ -139,8 +139,9 @@ set config_of_app { + - + @@ -184,9 +185,9 @@ set config_of_app { - 2018-01-01 00:01 + @@ -218,7 +219,7 @@ set config_of_app { + stderr="/dev/terminal" rtc="/dev/rtc" pipe="/pipe"/> @@ -316,9 +317,12 @@ append_if [expr $use_vbox5] config_of_app " append config_of_app { - + - + + + + } append_if [expr $use_ram_fs] config_of_app { diff --git a/repos/ports/run/vbox_win.inc b/repos/ports/run/vbox_win.inc index 19a7afdd6b..2a16154fdd 100644 --- a/repos/ports/run/vbox_win.inc +++ b/repos/ports/run/vbox_win.inc @@ -239,7 +239,7 @@ for { set i 1} { $i <= $use_vms } { incr i} { " } append config_of_app { - + } @@ -249,7 +249,8 @@ for { set i 1} { $i <= $use_vms } { incr i} { append_if [expr !$use_rumpfs] config_of_app { } append config_of_app { - } + + } append_if [expr $use_ram_fs] config_of_app { } diff --git a/repos/ports/run/virtualbox.run b/repos/ports/run/virtualbox.run index 35cbda963c..986cc47c2d 100644 --- a/repos/ports/run/virtualbox.run +++ b/repos/ports/run/virtualbox.run @@ -28,7 +28,8 @@ create_boot_directory import_from_depot [depot_user]/src/[base_src] \ [depot_user]/src/init \ - [depot_user]/src/nitpicker + [depot_user]/src/nitpicker \ + [depot_user]/src/vfs_pipe source ${genode_dir}/repos/base/run/platform_drv.inc # override defaults of platform_drv.inc @@ -102,7 +103,7 @@ append_if [expr $use_usb] config { append_if [have_spec framebuffer] config { - } + } append_if [expr [have_spec framebuffer] && [have_include power_on/qemu]] config { } append_if [expr [have_spec framebuffer] && [have_include power_on/qemu]] config { @@ -207,9 +208,12 @@ append_if [expr $use_gui] config { - + - + + + + @@ -229,9 +233,12 @@ append config { - + - } + + + + } append_if [expr $use_serial] config { } @@ -275,7 +282,7 @@ lappend_if [expr $use_top] boot_modules top lappend_if [expr $use_gui] boot_modules report_rom append boot_modules { - libc.lib.so vfs.lib.so libm.lib.so libc_pipe.lib.so + libc.lib.so vfs.lib.so libm.lib.so libiconv.lib.so stdcxx.lib.so qemu-usb.lib.so } diff --git a/repos/ports/run/virtualbox_auto.inc b/repos/ports/run/virtualbox_auto.inc index 33ce58b735..7923027004 100644 --- a/repos/ports/run/virtualbox_auto.inc +++ b/repos/ports/run/virtualbox_auto.inc @@ -23,7 +23,8 @@ create_boot_directory import_from_depot [depot_user]/src/[base_src] \ [depot_user]/src/init \ - [depot_user]/src/nitpicker + [depot_user]/src/nitpicker \ + [depot_user]/src/vfs_pipe if {$use_vms > 1} { import_from_depot [depot_user]/pkg/themed_wm @@ -382,7 +383,6 @@ install_config $config append boot_modules { part_block ahci_drv fs_rom vfs libc.lib.so vfs.lib.so libm.lib.so - libc_pipe.lib.so libiconv.lib.so stdcxx.lib.so qemu-usb.lib.so } diff --git a/repos/ports/run/virtualbox_nic_router.run b/repos/ports/run/virtualbox_nic_router.run index 030e8cf639..4956e5ff6b 100644 --- a/repos/ports/run/virtualbox_nic_router.run +++ b/repos/ports/run/virtualbox_nic_router.run @@ -26,6 +26,7 @@ append build_components { drivers/rtc } append build_components { drivers/usb } append build_components { drivers/nic } append build_components { server/input_filter } +append build_components { lib/vfs/pipe } append_platform_drv_build_components @@ -338,8 +339,11 @@ append config { - - + + + + + @@ -384,7 +388,6 @@ append boot_modules { virtualbox_nic_router.vbox } append boot_modules { ld.lib.so } append boot_modules { libc.lib.so } append boot_modules { libm.lib.so } -append boot_modules { libc_pipe.lib.so } append boot_modules { libiconv.lib.so } append boot_modules { stdcxx.lib.so } append boot_modules { qemu-usb.lib.so } @@ -397,6 +400,7 @@ append boot_modules { vfs.lib.so } append boot_modules { ipxe_nic_drv } append boot_modules { input_filter } append boot_modules { log_terminal } +append boot_modules { vfs_pipe.lib.so } append_platform_drv_boot_modules build_boot_image $boot_modules diff --git a/repos/ports/src/app/gdb_monitor/target.mk b/repos/ports/src/app/gdb_monitor/target.mk index a142a73080..11f64c356e 100644 --- a/repos/ports/src/app/gdb_monitor/target.mk +++ b/repos/ports/src/app/gdb_monitor/target.mk @@ -12,7 +12,7 @@ INC_DIR += $(GDB_CONTRIB_DIR)/include \ $(PRG_DIR)/gdbserver \ $(PRG_DIR) -LIBS = stdcxx libc libc_pipe \ +LIBS = stdcxx libc \ gdbserver_platform gdbserver_libc_support # libiberty diff --git a/repos/ports/src/virtualbox5/target.inc b/repos/ports/src/virtualbox5/target.inc index 40f40408af..5a93c8e71d 100644 --- a/repos/ports/src/virtualbox5/target.inc +++ b/repos/ports/src/virtualbox5/target.inc @@ -20,7 +20,7 @@ LIBS += virtualbox5-bios virtualbox5-recompiler virtualbox5-runtime \ virtualbox5-xml virtualbox5-main virtualbox5-apiwrap \ virtualbox5-dis -LIBS += libc_pipe libiconv +LIBS += libiconv LIBS += qemu-usb