Commit Graph

93 Commits

Author SHA1 Message Date
Christian Helmuth a3cb9d9897 lwip: prevent pointer-compare compilation warnings 2019-11-19 14:54:13 +01:00
Sebastian Sumpf 31a035a907 libports: update gmp from 4.3.2 to 6.1.2
issue #3537
2019-11-19 14:45:39 +01:00
Christian Helmuth 1782c6be79 qt5: rework keyboard handling
Fixes #3483
2019-11-19 14:23:54 +01:00
Josef Söntgen 180f9e6384 libc: handle modified files
Issue #1784.
2019-11-19 14:17:30 +01:00
Norman Feske bf92232698 libc: split task.cc into multiple files
This patch is the first step of re-organizing the internal structure of
the libc. The original version involved many direct calls of global
functions (often with side effects) across compilation units, which
made the control flow (e.g., the initialization sequence) hard to
follow.

The new version replaces those ad-hoc interactions with dedicated
interfaces (like suspend.h, resume.h, select.h, current_time.h). The
underlying facilities are provided by the central Libc::Kernel and
selectively propagated to the various compilation units. The latter is
done by a sequence of 'init_*' calls, which eventually will be replaced
by constructor calls.

The addition of new headers increases the chance for name clashes with
existing (public) headers. To disambiguate libc-internal header files
from public headers, this patch moves the former into a new 'internal/'
subdirectory. This makes the include directives easier to follow and the
libc's source-tree structure more tidy.

There are still a few legacies left, which cannot easily be removed
right now (e.g., because noux relies on them). However, the patch moves
those bad apples to legacy.h and legacy.cc, which highlights the
deprecation of those functions.

Issue #3497
2019-11-19 14:10:55 +01:00
Ehmry - 36111a2edf Libc: implement getifaddrs
Implement getifaddrs and freeifaddrs within the libc using socket
control files at the VFS. Add an "address" and "netmask" file to the
lwIP plugin.

Only a single IPv4 address is initially supported, and the broadcast
address returned will never be valid.

Fixes #3439
2019-09-02 16:36:07 +02:00
Christian Prochaska 65f402807f qt5: update to version 5.13.0
Fixes #3485
2019-08-28 14:22:33 +02:00
Norman Feske 6894ced63b libc: execve
This patch implements 'execve' in Genode's libc.

The mechanism relies on the dynamic linker's ability to replace the
loaded binary while keeping crucial libraries - in particular the libc -
intact. The state outside the libc is wiped. For this reason, all libc
internal state needed beyond the 'execve' call must be allocated on a
heap separate from the application-owned malloc heap. E.g.,
libc-internal file-descriptor objects must not be allocated or refer to
any memory object allocated from the malloc heap.

Issue #3481
2019-08-28 14:19:45 +02:00
Norman Feske bb5827b4e3 libc: fork, getpid, and wait4
This patch complements the C runtime with support for fork, getpid, and
wait4 (and its cousin 'waitpid').

Fixes #3478
2019-08-28 14:18:45 +02:00
Norman Feske 65f75589e9 libc: configurable initial FDs
The libc already supports the configuration of 'stdin', 'stdout', and
'stderr' using '<libc>' config attributes. This patch equips the libc
with the additional ability to pre-initialize any other file descriptor.
A file descriptor is configured as follows:

<config>
  ...
  <libc ...>
    <fd id="3" path="/dev/log" writeable="yes" readable="no" seek="10"/>
    ...
  </libc>
</config>

Furthermore, this patch moves the FD initialization code from the VFS
plugin to the libc kernel initialization because opening the FDs
depends on 'malloc' ('strdup'), which should not be used at early
'Libc::Kernel' initialization time.

Issue #3478
2019-08-28 14:18:44 +02:00
Norman Feske 6e38b53001 libc: use Id_space for FD allocator
This patch replaces the former use of an Allocator_avl with the Id_space
utility, which is safer to use and allows for the iteration of all
elements. The iteration over open file descriptors is needed for
implementing 'fork'.

Issue #3478
2019-08-28 14:18:44 +02:00
Ehmry - bbf7a6230e VFS lwIP: restart DHCP with link-state changes
Start and stop the DHCP state machine as the Nic link-state changes.
Invoke the link state handler during configuration rather than assume
that in the case of a downed link lwIP will defer DHCP until the link
comes up.

Additionally, support static DNS configuration via the "nameserver"
configuration attribute.

Fix #3388
2019-06-13 12:13:39 +02:00
Christian Prochaska eb4d431e76 stdcxx: update to version 8.3.0
Issue #3307
2019-05-27 14:52:52 +02:00
Ehmry - 863654d188 Libc: update port to Freebsd 12
Fix #3289
2019-05-27 14:46:53 +02:00
Christian Prochaska ee423e5bf1 qt5: remove deprecated APIs
Issue #3162
2019-02-26 14:38:03 +01:00
Norman Feske b24edc1633 Remove residual uses of deprecated APIs
Issue #1987, related also to issue #3163 and issue #3164.
2019-02-19 11:12:12 +01:00
Josef Söntgen f113460348 Move FUSE to world
Fixes #3104.
2019-01-07 12:43:37 +01:00
Norman Feske a15b825418 Move libsdl and companion libs to genode-world
Fixes #3100
2019-01-07 12:43:37 +01:00
Sebastian Sumpf 91225fbcca qt5: forward window title to nitpicker
This enables Qt5 applications to set a Genode label via 'setWindowTitle'
from within Qt5 applications, and thus, making them identifiable to
other Genode components, like a layout manager.

fixes #3046
2018-11-29 11:54:29 +01:00
Ehmry - 63b6e04dae Move GMP spec directories to standard locations
Ref #3028
2018-11-27 11:38:13 +01:00
Johannes Kliemann eb7c367e25 ada: replace local runtime implementation with port
Fixes #3044
2018-11-27 11:36:36 +01:00
Ehmry - bc539ce892 Native Solo5 bindings
A shared library implementation of the unikernel middleware.

https://github.com/Solo5/solo5

Fix #2945
2018-11-16 15:07:52 +01:00
Ehmry - 98380cebda VFS LwIP: do not free TCP PCBs on error
The VFS LwIP plugin is page-faulting on connect error because the LwIP
library frees a failed TCP protocol control block before calling the
error callback, and then the VFS plugin dereferences the PCB to free it
a second time. This problem was caused by a failure to follow
documentation during a transition from a C callback to a C++ method.

Fix #2972
2018-09-13 15:21:11 +02:00
Ehmry - fcbe060096 Remove legacy lwIP plugins
Now that the lwIP VFS plugin has become a first class IP stack it is
time to remove the lwIP 1.x library and the associated libc plugins.

Fix #2958
2018-09-05 11:04:22 +02:00
Ehmry - 67d88526b9 VFS LwIP: delay accepted connections
Ref #2335
2018-08-28 16:45:27 +02:00
Ehmry - 22ef3ed474 LwIP: manage Nic pbufs with a slab allocator
LwIP skips a packet copy by wrapping Nic stream buffer regions in LwIP
pbuf objects. Move from a fixed size array to a potentially unbounded
slab allocator for managing this buffer metadata.

Ref #2335
2018-08-28 16:45:23 +02:00
Johannes Kliemann 0ca197374e Ada: cleanup sources (license headers, beautify) 2018-08-08 10:59:03 +02:00
Johannes Kliemann ea8b7d8128 Ada: exception support 2018-08-08 10:59:02 +02:00
Ehmry - bf8b52ec3a Update LwIP to 2.1.0.rc1
This release candidate suppresses the remaining build warnings.

Ref #2335
2018-08-02 14:36:49 +02:00
Emery Hemingway d9a4773194 LwIP VFS plugin
This patch reintroduces the LwIP stack to libc as a VFS plugin
implementing the socket_fs interface. Rather than use LwIP's socket
emulation layer this plugin interfaces directly to LwIP raw API and is
single threaded.

The internal TCP parameters of the stack are untuned.

Fix #2050
Fix #2335
2018-08-02 14:36:48 +02:00
Christian Prochaska 042ff27366 libc: remove VFS header dependency in 'component.h'
Fixes #2870
2018-06-29 10:44:57 +02:00
Ehmry - e36ddaf659 Rename lwip library to lwip_legacy
Rename LwIP library in preparation for removal of LwIP libc plugin. The
current LwIP library will be replaced with a new version stripped of its
synchronous socket support. The next version will be incompatible with
the current, so removing 'lwip.lib.so' completely for a period makes it
easy to identify legacy users.

Fix #2797
2018-05-30 13:36:22 +02:00
Alexander Boettcher 0efa67893e acpica: generate report usable by platform_drv
Fixes #2816
2018-05-30 13:36:21 +02:00
Christian Helmuth a6e0fdd505 libc: support syscall(SYS_thr_self,...)
This syscall returns the thread ID / light-weight PID of the calling
thread under FreeBSD.

Issue #2791
2018-05-30 13:36:07 +02:00
Christian Prochaska f347cb90f1 depot: qt5 recipes
Fixes #2792
2018-05-30 12:26:19 +02:00
Martin Stein 9c73326bbb lwip: enable ICMP support
This switches on the LwIP opts flag for handling ICMP packets (as far as
supported).

Issue #2732
2018-04-10 11:11:52 +02:00
Ehmry - 219c2fa2e1 EGL api library
Library for EGL headers only. Useful for components that dynamically
load an EGL shared library.

Fix #2718
2018-03-27 13:44:27 +02:00
Christian Prochaska d0eacdd0d6 stdcxx: define _GLIBCXX11_USE_C99_STDLIB
Fixes #2652
2018-02-09 13:34:17 +01:00
Christian Helmuth 81ada6b4f2 lwip: tweak configuration for downloading clients
The TCP window scaling is implemented for servers (like netperf's
netserver) only. The client implementation just uses the lower 16 bits
of the TCP_WND configuration value, which we therefore maximize to ~64K.
2018-01-17 12:14:40 +01:00
Norman Feske eba9c15746 Follow practices suggested by "Effective C++"
The patch adjust the code of the base, base-<kernel>, and os repository.
To adapt existing components to fix violations of the best practices
suggested by "Effective C++" as reported by the -Weffc++ compiler
argument. The changes follow the patterns outlined below:

* A class with virtual functions can no longer publicly inherit base
  classed without a vtable. The inherited object may either be moved
  to a member variable, or inherited privately. The latter would be
  used for classes that inherit 'List::Element' or 'Avl_node'. In order
  to enable the 'List' and 'Avl_tree' to access the meta data, the
  'List' must become a friend.

* Instead of adding a virtual destructor to abstract base classes,
  we inherit the new 'Interface' class, which contains a virtual
  destructor. This way, single-line abstract base classes can stay
  as compact as they are now. The 'Interface' utility resides in
  base/include/util/interface.h.

* With the new warnings enabled, all member variables must be explicitly
  initialized. Basic types may be initialized with '='. All other types
  are initialized with braces '{ ... }' or as class initializers. If
  basic types and non-basic types appear in a row, it is nice to only
  use the brace syntax (also for basic types) and align the braces.

* If a class contains pointers as members, it must now also provide a
  copy constructor and assignment operator. In the most cases, one
  would make them private, effectively disallowing the objects to be
  copied. Unfortunately, this warning cannot be fixed be inheriting
  our existing 'Noncopyable' class (the compiler fails to detect that
  the inheriting class cannot be copied and still gives the error).
  For now, we have to manually add declarations for both the copy
  constructor and assignment operator as private class members. Those
  declarations should be prepended with a comment like this:

        /*
         * Noncopyable
         */
        Thread(Thread const &);
        Thread &operator = (Thread const &);

  In the future, we should revisit these places and try to replace
  the pointers with references. In the presence of at least one
  reference member, the compiler would no longer implicitly generate
  a copy constructor. So we could remove the manual declaration.

Issue #465
2018-01-17 12:14:35 +01:00
Christian Prochaska 3f74862666 depot: recipe for stdcxx library
Issue #2446
2017-12-22 11:43:39 +01:00
Josef Söntgen 26f3a43df0 libports: create libav recipe
Issue #2602.
2017-12-21 15:01:35 +01:00
Norman Feske 4e115a7de2 acpica: request 'Acpi' only if 'acpi_ready="yes"'
The synchronization with the ACPI driver is not needed when starting
acpica at a later stage. It could already be disabled via the
'acpi_ready="yes"' config attribute. However, acpica still
unconditionally requests the so-called "Acpi" service, which is an
alias for the platform_drv's "Platform" service. This patch disables the
use of this alias when the 'acpi_ready' synchronization is disabled.
2017-11-30 11:23:13 +01:00
Emery Hemingway 8ca63d4a6e libc: reintegrate libc_resolv library
Remove getaddrinfo and freeaddrinfo from the Libc::Plugin and get rid of
the extra libc_resolv library. Remove getaddrinfo/freeaddrinfo symbol
hiding patch for FreeBSD sources. Remove libc_resolv from Makefiles and
run scenarios.

Fix #2273
2017-10-05 17:40:04 +02:00
Josef Söntgen bc0c78708c sdl: add OpenGL support
Issue #2507.
2017-08-30 09:59:59 +02:00
Emery Hemingway 604ff9ca2c msync and Sytem V semaphore dummies
Ref #2467
2017-08-30 09:59:57 +02:00
Emery Hemingway 2c4f0e5505 port of PCG random number generator library
http://www.pcg-random.org/
http://www.pcg-random.org/using-pcg-c.html

Ref #2477
Fix #2499
2017-08-28 16:49:51 +02:00
Sebastian Sumpf 66db2ee54e libports: Mesa 11.2.2
OpenGL 4.5 with software and i965 rendering back ends.

issue #2488
2017-08-28 16:49:43 +02:00
Sebastian Sumpf 61ae2e5b80 libc-plugin: make fd allocator thread safe
issue #2488
2017-08-28 16:49:42 +02:00
Emery Hemingway f09fc4a5a2 Update FatFS port to version 0.13
- Update FatFS port from 0.07e to 0.13
- Multi-device support
- Basic test at run/fatfs
- Adaption of existing components

Note, ffat is now consistently renamed to fatfs.

Ref #2410
2017-08-17 11:04:22 +02:00