Commit Graph

82 Commits

Author SHA1 Message Date
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
Josef Söntgen 69fd7e1c32 libports: update lwip to STABLE-1.4.1-RC1
The new version works fine but there is an issue with connect()
that needs the included patch:

There is no actual handling of EALREADY in lwip. It sets errno
to EALREADY when the connection was established. Unfortunatly this
is really bad because most programs expect to receive errno EISCONN
if the connection was successfully established. So this behaviour
breaks Qt4 and several noux/net packages (like lynx) because those
programs end up in an endless loop trying to connect via an already
connected socket. The longterm solution would be fixing the wrong
behaviour in lwip (there are already bug-reports on lwip's mailinglist)
but for now, it works well enough to simple change lwip's err_to_errno
table to set errno to EISCONN when the connection was established.
2012-08-15 14:31:18 +02:00
Christian Prochaska 94fad13adb libc: add support for 'O_TRUNC' flag in 'open()'
Fixes #320.
2012-08-09 11:09:43 +02:00
Christian Prochaska 266d5e0be3 libc_noux test
With this patch the libc plugin / file operations test can be built for
libc_noux.

Fixes #317.
2012-08-09 11:09:43 +02:00
Christian Prochaska dcfcbce856 libc: add support for 'ftruncate()'
Fixes #307.
2012-08-09 11:09:43 +02:00
Christian Prochaska 280fc59edf Fix 'O_CREAT' flag handling in 'open()'
Fixes #313.
2012-08-09 11:09:43 +02:00
Josef Söntgen 8c306bde67 libports: add libc's rpc framework headers
Certain rpc headers are needed for compiling getaddrinfo.c. Unfortunatly
that means we have to generate _a few_ header files which we do when we
prepare the libc.

These header files need to be created before the symlinks. Also, some of
these header files depend on a patch. Therefore we apply the patches
first, generate the header files and in the end we create the symlinks.

Fixes #296.
2012-08-09 11:09:42 +02:00
Christian Prochaska 23772b620f libc_fs: return resulting offset in 'lseek()'
Fixes #314.
2012-08-02 15:06:35 +02:00
Christian Prochaska c708a28eff ffat_fs: don't throw exception in 'close()'
The 'close()' function is not supposed to throw any exceptions.

Fixes #304.
2012-08-01 12:47:50 +02:00
Christian Prochaska d6d45f870e ram_fs: fix recursive 'lookup_and_lock()' calls
With this patch the 'Directory::lookup_and_lock()' function passes its
'return_parent' argument to recursive calls of itself.

Fixes #306.
2012-08-01 12:45:10 +02:00
Christian Prochaska 4caaba64c3 libc: call 'genode_exit()' in '_exit()'
With this patch the libc '_exit()' function calls the 'genode_exit()'
function to get the registered exit handlers called.

Fixes #308.
2012-07-31 12:08:58 +02:00
Josef Söntgen d99edf57d8 libports: add _accept, _bind and _listen...
...and socketpair() dummy to libc.

Socketpair() is needed by OpenSSH. The actual implementation
should be done in libc_noux.

Fixes #297.
2012-07-23 14:05:58 +02:00
Josef Söntgen 0d0ebd5a7f libports: lwip change SOL_SOCKET definition
Our FreeBSD libc based libc defines SOL_SOCKET as 0xffff. We change
lwip's definition from 0xfff to match ours. This prevents us from
converting the level when we call {g,s}etsockopt.

Fixes #292.
2012-07-20 14:43:51 +02:00
Josef Söntgen ab951175c0 libports: fix openssl issues and update to 1.0.1c
libcrypto provides certain optimized assembler functions which
unfortunatly are non-pic. Therefore this asm code is removed
and libcrypto is build with -DOPENSSL_NO_ASM.
Because the asm code is not needed anymore, its generation is
also removed from openssl.mk.

import-libssl.mk was also added because it is essential for building
programs which depend on libssl.

Fixes #291.
Fixes #294.
2012-07-20 14:43:35 +02:00
Christian Prochaska dbd1c425bf libc: implement 'readv()'
This patch implements the 'readv()' function in the libc.

A lock guard prevents the parallel execution of either or both of the
'readv()' and 'writev()' functions.

Fixes #279.
2012-07-16 15:01:02 +02:00
Christian Prochaska 9124f303f7 libc: implement 'pread()' and 'pwrite()'
This patch implements the 'pread()' and 'pwrite()' functions in the libc.

A lock guard prevents the parallel execution of either or both functions.

Fixes #278.
2012-07-16 15:00:08 +02:00
Christian Prochaska 0f8f87c3fe libc_ffat: enhance 'lseek()' support
This patch adds support for the 'SEEK_CUR' and 'SEEK_END' values of the
'whence' argument of the 'lseek()' function..

Fixes #277.
2012-07-16 14:59:35 +02:00
Norman Feske b15da23052 Reduce debug output of libc_ffat plugin 2012-07-10 16:48:54 +02:00
Christian Prochaska d564003e1c Make fs test loopable 2012-07-10 16:48:54 +02:00
Norman Feske 00747ddd1f Use PLOG instead of PDBG in http_srv test
The messages are informative, not debug messages.
2012-07-10 16:48:53 +02:00
Christian Prochaska 30dc1d83da FAT file system service
This patch implements a service which provides access to files and
directories of a FAT file system via the 'File_system' interface.

Fixes #251.
2012-07-10 16:30:26 +02:00
Christian Prochaska b2a62b4b2d ffat: Release packets in block session backend
This patch adds the necessary 'release_packet()' calls in the block
session backend of the 'ffat' lib.

Fixes #272.
2012-07-09 17:40:35 +02:00
Christian Prochaska 69ec6f5dd8 ffat: Enable support for long file names
Fixes #270.
2012-07-09 15:51:55 +02:00
Christian Prochaska 7a25bf2d19 x86_64 and ARM support for libgmp
Fixes #265.
2012-07-04 14:56:48 +02:00
Alexander Boettcher ae6257dce1 Use NOVA microkernel from github, add 64bit
Use git to get recent kernels from github. Adjust NOVA patch to compile
with recent github version. Patch and use makefile of NOVA microkernel
to avoid duplicated (and outdated) makefile in Genode

Furthermore, this patch adds support for using NOVA on x86_64. The
generic part of the syscall bindings has been moved to
'base-nova/include/nova/syscall-generic.h'. The 32/64-bit specific
parts are located at 'base-nova/include/32bit/nova/syscalls.h' and
'base-nova/include/64bit/nova/syscalls.h' respectively.

On x86_64, the run environment boots qemu using the Pulsar boot loader
because GRUB legacy does not support booting 64bit ELF executables.

In addition to the NOVA-specific changes in base-nova, this patch
rectifies compile-time warnings or build errors in the 'ports' and
'libports' repositories that are related to NOVA x86_64 (i.e., Vancouver
builds for 32bit only and needed an adaptation to NOVAs changed
bindings)

Fixes #233, fixes #234
2012-06-20 19:44:07 +02:00
Christian Prochaska 4fc9383c31 libports: Expat
This patch adds the "Expat" XML parser library to libports.

Fixes #245.
2012-06-20 19:44:02 +02:00
Josef Söntgen 896d12d0b8 Add writev() to libc
This function is needed by perror(3).

Closes #239.
2012-06-08 14:33:15 +02:00
Norman Feske b86f0c8b32 Fix getdirentries in libc_ffat 2012-05-29 13:55:00 +02:00
Josef Söntgen d211007aba Add port of OpenSSL to libports
This commit contains the initial port of OpenSSL to Genode. It certainly
needs some more work to get things straight - it compiles fine but does
not work because of a NULL pointer exception.
2012-05-29 13:54:59 +02:00