Commit Graph

110 Commits

Author SHA1 Message Date
Norman Feske
fae63f4fa9 Merge base libraries into a single library
This patch simplifies the way of how Genode's base libraries are
organized. Originally, the base API was implemented in the form of many
small libraries such as 'thread', 'env', 'server', etc. Most of them
used to consist of only a small number of files. Because those libraries
are incorporated in any build, the checking of their inter-dependencies
made the build process more verbose than desired. Also, the number of
libraries and their roles (core only, non-core only, shared by both core
and non-core) were not easy to capture.

Hereby, the base libraries have been reduced to the following few
libraries:

- startup.mk contains the startup code for normal Genode processes.
  On some platform, core is able to use the library as well.
- base-common.mk contains the parts of the base library that are
  identical by core and non-core processes.
- base.mk contains the complete base API implementation for non-core
  processes

Consequently, the 'LIBS' declaration in 'target.mk' files becomes
simpler as well. In the most simple case, only the 'base' library must
be mentioned.

Fixes #18
2013-02-19 14:45:55 +01:00
Norman Feske
62bb85255a libc_lwip: use libc's 'get-/freeaddrinfo()'
This patch reduces problems when connecting Arora to lighttpd via
nic_bridge. Patch by Christian Prochaska
2013-02-11 12:01:27 +01:00
Ivan Loskutov
291064b5c1 nic_bridge: Add tests for static IP address configuration 2013-01-24 11:35:56 +01:00
Ivan Loskutov
2271f3e7b3 libc_lwip_nic_dhcp: Add static IP configuration 2013-01-24 11:35:56 +01:00
Christian Prochaska
1fdee7a2cc libc_lock_pipe: implement F_GETFL 'fcntl()' command
Fixes #622.
2013-01-21 11:40:38 +01:00
Norman Feske
af66043b79 New Input::Event::FOCUS, rename keycode to code
This patch introduces keyboard-focus events to the 'Input::Event' class
and changes the name 'Input::Event::keycode' to 'code'. The 'code'
represents the key code for PRESS/RELEASE events, and the focus state
for FOCUS events (0 - unfocused, 1 - focused).

Furthermore, nitpicker has been adapted to deliver FOCUS events to its
clients.

Fixes #609
2013-01-15 10:18:11 +01:00
Norman Feske
fca8994584 Introduce notifications to file-system interface
This patch extends the file-system interface with the ability to monitor
changes of files or directories. The new 'File_system::sigh' function
can be used to install a signal handler for an open node.

The 'ram_fs' server has been enhanced to support the new interface. So
any file or directory changes can now be observed by 'ram_fs' clients.

Fixes #607
2013-01-15 10:18:07 +01:00
Sebastian Sumpf
5aea55e417 Audio: Replace old with new audio interface
Issue #602
2013-01-10 23:05:43 +01:00
Sebastian Sumpf
47bb48bdd6 Audio: Adjust components to new audio interface
OSS driver, ALSA driver, audio-out test, avplay, and mixer

Issue #602
2013-01-10 23:05:37 +01:00
Norman Feske
73ab30c22c Update copyright headers to 2013 2013-01-10 21:44:47 +01:00
Norman Feske
13d4108fea Unify 'Signal_dispatcher' interfaces
Several users of the signal API used custom convenience classes to
invoke signal-handling functions on the reception of incoming signals.
The 'Signal_dispatcher' pattern turned out to be particularly useful. To
avoid the duplication of this code across the code base, this patch
adds the interface to 'base/signal.h'.

Furthermore, the patch changes the 'Signal::num()' return type from int
to unsigned because negative numbers are meaningless here.

Fixes #511
2013-01-10 21:09:14 +01:00
Norman Feske
0dbb5e1696 Propagate 'Range_allocator::alloc_aligned' errors
This patch reflects eventual allocation errors in a more specific way to
the caller of 'alloc_aligned', in particular out-of-metadata and
out-of-memory are considered as different conditions.

Related to issue #526.
2012-11-28 22:51:09 +01:00
Josef Söntgen
14c1f64733 libports: set getrlimit() to weak in libc
This functions needs to be overriden by libc_noux.
2012-11-26 20:58:10 +01:00
Josef Söntgen
569e0a2e6c Remove unneeded PDBG() messages 2012-11-26 20:58:10 +01:00
Josef Söntgen
42df6e3d01 libports: add test/libc_resolv target
libc_resolv is used by noux-pkgs and is only a runtime dependency but
therefore needs to be build.
2012-11-26 20:58:09 +01:00
Josef Söntgen
bb33c9f3cf libports: add dup() to libc
Fixes #492.
2012-11-14 16:52:33 +01:00
Christian Prochaska
d46c79b428 libc_lock_pipe: match alloc. and dealloc. funcs
Fixes #460.
2012-11-03 09:51:56 +01:00
Christian Helmuth
20ddd1bcdc lwip: setup static IP if provided
Fixes #349.
2012-11-02 14:57:47 +01:00
Norman Feske
05e60691cb Add missing libs
The eglgears application depends on 'sqrt'. With the old tool chain,
this symbol was resolved through the dependencies of the 'gallium'
library. This does not work anymore for the new tool chain.

A similar issue arised for avplay, where we need to explicitly
state the av components in the LIBS declaration of the target.
2012-10-31 18:24:08 +01:00
Sebastian Sumpf
97dd1d57cf EGL: Aligned memory allocation
Free memory allocated with 'align_malloc' using 'align_free'.

Fixes issue #391
2012-10-11 17:10:21 +02:00
Christian Prochaska
be171d86bb libc: handle 'O_APPEND' flag for 'open()'
Fixes #319.
2012-10-11 17:10:21 +02:00
Christian Prochaska
f635cc4a19 Python: use 'libc-rom' plugin
This patch removes the libc plugin of the Python port. The Python test
uses the 'libc_rom' plugin instead.

Fixes #392.
2012-10-08 15:10:22 +02:00
Norman Feske
64245dde3a Avoid superfluous compiler warnings
GCC warns about uninitialized local variables in cases where no
initialization is needed, in particular in the overloads of the
'Capability::call()' function. Prior this patch, we dealt with those
warnings by using an (unreliable) GCC pragma or by disabling the
particular warning altogether (which is a bad idea). This patch removes
the superfluous warnings by telling the compiler that the variable in
question is volatile.
2012-10-08 15:08:21 +02:00
Christian Prochaska
e9ac4b653b Add support for symbolic links
This patch adds support for symbolic links in libc, libc plugins, file
system servers and Noux.

Fixes #322.
2012-10-08 15:05:02 +02:00
Christian Prochaska
2c9c7c817b libc: return 0 in 'fchmod' and 'utimes' dummies
Fixes #371.
2012-09-28 17:07:21 +02:00
Sebastian Sumpf
ad70160847 LWIP: Fix dead lock in semaphore back-end
Make sure unlock is called when 'global_mutex' reaches zero count. Add verbose
variable in order to disable some output. Disable irritating 'Overflow' messages
in 'sys_mbox_post' and 'sys_mbox_try_post' per default. This may happen and is
not an error, since the ring buffer is full and will be emptied eventually.
Remove priority from genode_org run script.

Should fix #347
2012-09-28 17:06:35 +02:00
Sebastian Sumpf
8ed489c4bc libc: Decrease noise level of debugging output
Changed 'libc_fs', 'libc_lwip' and 'libc/clock_gettime'
2012-09-24 09:18:00 +02:00
Sebastian Sumpf
825dc783e6 libc: Change malloc's allocator
Use slab allocators for small object sizes, do it the usual way otherwise.

This patch is related to #363. Using this optimization may be a viable
alternative to switching to the FreeBSD's malloc implementation.
2012-09-24 09:17:59 +02:00
Sebastian Sumpf
7ca7b4417d lwIP: Rewrite NIC packet allocation
Use 'Nic::Packet_allocator', wait for acknowledgements if packet allocation
fails. Updated 'lwip.run' and 'genode_org.run' to support OMAP4 correctly. Use
memcpy to copy PBUFs

May resolve issue #347
2012-09-24 09:17:59 +02:00
Christian Prochaska
97c3f6599d Noux, libc_terminal: initialize 'stat' buffer
Initialize the 'stat' buffer in the 'stat()' function to avoid potential
non-deterministic program behavior.

Fixes #362.
2012-09-24 09:17:59 +02:00
Josef Söntgen
6259fcf736 libports: add lwIP tests for Pandaboard on foc 2012-09-18 10:52:57 +02:00
Christian Prochaska
97308f963a ffat_fs: work with absolute paths
The recently added 'Genode::Path' class makes it easy to create absolute
paths. With this patch the 'ffat_fs' server uses the 'Genode::Path' class
where possible instead of working with 'f_chdir()' and relative paths.
This also solves the problem reported in issue #355, which was caused by
storing a relative file name in the 'File' node.

Fixes #355.
2012-09-14 12:23:26 +02:00
Christian Prochaska
3cfc691c77 libc_fs: handle 'Packet_alloc_failed' exception
With this patch, when a 'Packet_alloc_failed' exception occurs in the
'write()' function, the function waits for a packet acknowledgement and
the release of the packet and then tries the packet allocation again.

Fixes #348.
2012-09-14 12:13:05 +02:00
Taru Karttunen
bff86ab74d libc_terminal: TIOCGETA return always echo on 2012-09-03 11:05:23 +02:00
Taru Karttunen
27bbaf75ba libc_terminal: add fstat and fake some ioctls, fix #344 2012-09-03 11:05:00 +02:00
Christian Prochaska
9c278d6b8f libc_fs: release libc file descriptor in 'close()'
Fixes #334.
2012-08-22 16:50:03 +02:00
Christian Prochaska
7f092be94c libc: allocate file descriptor sets on the stack
The 'fd_set' size calculation in the current version of the 'poll()'
function results in an  amount which is smaller than the size of the
'fd_set' data type. With this patch the file descriptor sets get
allocated as plain stack variables.

Fixes #335.
2012-08-22 16:48:35 +02:00
Christian Prochaska
3084c6f500 TAR file system service
This patch implements a service which provides the contents of a tar
archive via the 'File_system::Session' interface.

Configuration:

<config>
	<archive name="tar_archive.tar" />
	<policy label="label_of_client" root="/rootdir/for/client" />
</config>

Fixes #333.
2012-08-22 09:51:31 +02:00
Norman Feske
2b5cf1342d libc: Dummy fallbacks for user and net support 2012-08-22 09:51:29 +02:00
Josef Söntgen
f2299abab5 libports: remove passwd functions from libc
Removes getpwent.c from build because the passwd facilities provided by
the FreeBSD libc will not be used anyway and add stub functions instead.
Now services which need these functions have to implement their own
(e.g. libc_noux).
2012-08-22 09:51:28 +02:00
Josef Söntgen
ed6fa86a87 libports: add gethostbyname, getservbyname dummies 2012-08-22 09:51:28 +02:00
Josef Söntgen
6fcbea000c libports: add libc_resolv
libc_resolv is a {free,get}addrinfo() plugin, mainly for use with NOUX.

We prefix the original libc functions to with 'libc_' so there is no
symbol conflict with file_operations.cc.
2012-08-22 09:51:28 +02:00
Norman Feske
d4d229bdc7 libc: Unregister region on nunmap 2012-08-22 09:51:27 +02:00
Norman Feske
0296e6f66b lwip: Convert fcntl argument, add missing defs 2012-08-22 09:51:27 +02:00
Norman Feske
7a7adfbb63 Add mmap and nunmap to libc_noux, libc_fs
In the current form, only PROT_READ is supported. This case is emulated
by copying the file content into new allocated backing store. Even
though the performance benefits of mmap-using code will not be
preserved, code that relies on mmap can be executed via the libc_noux
or libc_fs plugins, i.e. lightttpd.
2012-08-17 11:52:02 +02:00
Norman Feske
4914032800 libc: Add munmap support to plugin interface
With this patch, libc plugins become able to handle munmap for regions
attached by the plugin.
2012-08-17 11:52:02 +02:00
Josef Söntgen
a6917d982a libports: add poll() to libc
Implements poll() via select() for certain programs like OpenSSH
which need it.

(This implementation is actually based OpenSSHp's compat function.)
2012-08-17 11:52:01 +02:00
Josef Söntgen
ced77c5403 libports: add pcre-8.3 (8bit only)
For it is enough to just provide the 8bit version of pcre.
2012-08-17 11:51:57 +02:00
Josef Söntgen
27a5edaf78 libports: disable call of lwip_loopback_init()
As of lwip-1.4.x this is not needed anymore because lwip
now always creates a loopback device. This plug-in will
be removed in the future but for now keep it around so
we currently do not need to update the other targets that
depend on it.

Fixes #329.
2012-08-16 10:03:06 +02:00
Josef Söntgen
bee2c10ce1 libports: add fcntl() to libc_lwip
Fixes #326.
2012-08-15 14:31:45 +02:00