Commit Graph

1152 Commits

Author SHA1 Message Date
Christian Helmuth cccfd0719d qt5: prevent deprecated warnings
Issue #3483
2019-11-19 14:23:54 +01:00
Christian Helmuth 5a06751242 Increase input_filter RAM quotas to 1280K
Issue #3483
2019-11-19 14:23:54 +01:00
Norman Feske 222f214341 extract.run: suppress rtc warnings 2019-11-19 14:19:34 +01:00
Norman Feske 979d823d85 libc: make mtime update configurable
By specifying <libc update_mtime="no"...>, the modification-time update
on VFS-sync operations (as issued whenever a written file is closed)
can explicitly be disabled.

Issue #1784
2019-11-19 14:19:34 +01:00
Christian Helmuth b0271ae5e1 Fix hard-disk image creation in vfs server tests
The hard-disk image must be created before boot-image creation as it is
used as boot module by variants of the test (use_ram_block=true).
2019-11-19 14:17:30 +01:00
Josef Söntgen 180f9e6384 libc: handle modified files
Issue #1784.
2019-11-19 14:17:30 +01:00
Josef Söntgen d0bf6d2b52 libc: add modification time
Issue #1784.
2019-11-19 14:17:30 +01:00
Norman Feske ab5187d673 libc: resolve symlinks in execve
This patch complements the commit "libc: execve" with the ability to
execute files stored at arbitrary sub directories of the file system.

Issue #3481
Issue #3500
2019-11-19 14:17:29 +01:00
Norman Feske c8b7710e5d libc: improve dup/dup2 in vfs_plugin
This patch replaces the naive dup2 implementation (that merely
duplicated the context pointer) by the replication of the original
FD state by re-opening the same file with the same flags and seek
position. This prevents a potential double release of the VFS handle
(the FD context). It also implements 'dup'.

Fixes #3505
Fixes #3477
2019-11-19 14:10:55 +01:00
Norman Feske 59c60b8031 test-libc: test double dup2, dup
Issue #3477
Issue #3505
2019-11-19 14:10:55 +01:00
Norman Feske 9500e8b6e1 lwip: remove use of global constructor
Related to issue #3487
2019-11-19 14:10:55 +01:00
Norman Feske e0ee56275e vfs_lwip: fix switch fall-through
Pointed out by a compiler warning.
2019-11-19 14:10:55 +01:00
Norman Feske 418ac4c560 libc: remove global watch() function
This patch replaces the function with a 'Watch' interface to be
explicitly passed to the caller (currently only time.cc).

Issue #3497
2019-11-19 14:10:55 +01:00
Norman Feske 5f5d709c07 libc: remove global libc_config()
Issue #3497
2019-11-19 14:10:55 +01:00
Norman Feske 89a38723bd libc: reimplement passwd handling
- Eliminate call of global libc_config()
- Remove dynamic memory allocation, const cast
- Prepare for moving the state from compilation unit to header
- Fix run/libc_getpwent.run

Issue #3497
2019-11-19 14:10:55 +01:00
Norman Feske 648bcd1505 libc: unify use of namespaces
This patch unifies the patterns of using the 'Genode' and 'Libc'
namespaces.

Types defined in the 'internal/' headers reside in the 'Libc'
namespace. The code in the headers does not need to use the
'Libc::' prefix.

Compilation units import the 'Libc' namespace after the definition of
local types. Local types reside in the 'Libc' namespace (and should
eventually move to an 'internal/' header).

Since the 'Libc' namespace imports the 'Genode' namespace, there is
no need to use the 'Genode::' prefix. Consequently, code in the
compilation units rarely need to qualify the 'Genode' or 'Libc'
namespaces.

There are a few cases where the 'Libc', the 'Genode', and the global
(libc) namespaces are ambigious. In these cases, an explicit
clarification is needed:

- 'Genode::Allocator' differs from 'Libc::Allocator'.
- 'Genode::Env' differs from 'Libc::Env'.
- Genode's string functions (strcmp, memcpy, strcpy) conflict
  with the names of the (global) libc functions.
- There exist both 'Genode::uint64_t' and the libc'c 'uint64_t'.

Issue #3497
2019-11-19 14:10:55 +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
Norman Feske aec1178ab1 libc: simplify initialization sequence
This patch reverts the interim patch "libc: init malloc_heap before
VFS", which is no longer needed with the solved issue #3496 and
issue #3487.
2019-09-20 14:16:07 +02:00
Norman Feske 0aedabd245 libc: remove global constructors
- readv_writev: move 'rw_lock' instance into a function scope,
  constructing the instance on the first access.
- select: move 'select_cb_list' instance into function scope.
- thread: move 'key_list_lock' and 'keys' into function scope.
- rwlock, semaphore, socket_fs_plugin, thread, thread_create:
  instantiate 'Libc::Allocator' per use, alleviating the need for a
  global instance.

Issue #3496
2019-09-20 14:16:01 +02:00
Christian Helmuth 4a7b0e99a6 depot: update recipe hashes 2019-09-20 14:14:16 +02:00
Norman Feske 614f7fa56a mesa.run: omit depot content from boot modules 2019-09-17 14:38:07 +02:00
Christian Prochaska afa0e26a6a qt5: update virtual keyboard example to Qt 5.13
Fixes #3490
2019-09-09 15:08:13 +02:00
Christian Prochaska 1d3bbde70a qt5: add 'lupdate' and 'lrelease' to host tools
Fixes #1736
2019-09-09 15:05:50 +02:00
Alexander Boettcher 6f0c6501f2 acpica: catch Io_mem exceptions
Issue #2998
2019-09-09 15:04:53 +02:00
Christian Helmuth e448022f23 Fix hard-disk image creation in libc_fatfs
The hard-disk image must be created before boot-image creation as it is
used as boot module by variants of the test (use_ram_block=true).
2019-09-09 14:58:25 +02:00
Christian Helmuth 664d858e63 Fix sntp_client test for hw/muen 2019-09-09 12:15:07 +02: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 Helmuth b2c59576ae depot: update recipe hashes 2019-08-28 14:36:56 +02:00
Norman Feske 155e214a69 libc: init malloc_heap before VFS
This is an interim fix for issue #3487.
2019-08-28 14:22:33 +02:00
Christian Prochaska 65f402807f qt5: update to version 5.13.0
Fixes #3485
2019-08-28 14:22:33 +02:00
Christian Prochaska d00cfd7cff stdcxx: add missing symbol for qt5 update
Fixes #3486
2019-08-28 14:22:33 +02:00
Martin Stein cc2828cf3a sntp_client: improve README, clean source code
Fixes #3448
2019-08-28 14:21:36 +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
Alexander Senier 2a3cebdd6e libc: Allow private writable mappings
Fixes #3480
2019-08-28 14:18:45 +02:00
Norman Feske 808ff3714e rust: don't export cxx syms from libunwind-rust 2019-08-28 14:18:45 +02:00
Norman Feske 817ff6ca68 posix: improve config error diagnostics 2019-08-28 14:18: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 581785a48f Extend fork test
This patch extends the fork test with explicit checks for the cloned
content of the heap and RW segment as well as the seek position of an
open file descriptor. It adds the new libports/run/fork.run script
that exercises the fork mechanism implemented by the libc. It is based
on noux_fork.run, which tests the mechansim provided by noux. The
test program has been moved from ports to libports.

Issue #3478
2019-08-28 14:18:44 +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
Norman Feske fd8a209da2 libc: fix warning in socket_fs_plugin.cc
By using Genode::strncpy instead of the libc's strncpy, we cannot end up
in the situation where the result lacks the zero termination (where the
number of charactors equals the destination buffer size).
2019-08-21 14:01:54 +02:00
Christian Helmuth 312f801f8a depot: update recipe hashes 2019-08-21 13:25:26 +02:00
Sebastian Sumpf 8509687c8d system_rtc.run: use packages
issue #3450
2019-08-21 13:25:25 +02:00
Martin Stein ce633c0bba gems: recipes/pkg/drivers_rtc-pc
Ref #3450
2019-08-21 13:25:25 +02:00
Christian Helmuth 468270f6e9 Enable libusb-internal error login smartcard test 2019-08-21 13:25:25 +02:00
Johannes Kliemann 1bdd18a196 ada-runtime: update to 1.1 2019-08-21 13:25:25 +02:00
Josef Söntgen 9cf5da85ef libc: change time back end to re-read RTC
Issue #3450
2019-08-21 13:25:25 +02:00
Josef Söntgen 316f9e4df3 libc: add VFS watch handle accessor
Issue #3450
2019-08-21 12:37:03 +02:00
Josef Söntgen 18e586daed libc: merge RTC and time backends
Issue #3450
2019-08-21 12:37:03 +02:00
Christian Helmuth b8ed80b7dd Simple libc-based RTC test
Issue #3450
2019-08-21 12:37:02 +02:00
Martin Stein cb6377355e sntp_client: report received transmit timestamp
For now in libports because it relies on contrib sources from musl doing
the time data conversion.

Ref #3448
Ref #3450
2019-08-21 12:37:02 +02:00
Josef Söntgen 99cb585b6e libports: system RTC server and test
For now in libports because it relies on contrib sources from musl
doing the time data conversion.

Issue #3450
2019-08-21 12:37:02 +02:00
Christian Helmuth 0037edfeee libports: minimal time-type conversion from musl
These are time-type conversion functions (including leap years and
seconds) taken from musl-libc git rev
c82d3bada30cb27e14abda7859da5d2e784830ff with some adaptions. Musl is
licensed under permissive MIT license.

Issue #3450
2019-08-21 12:37:02 +02:00
Christian Prochaska 35c724512d stdcxx: revert '_ZTISt16invalid_argument' symbol type to 'V'
Issue #3458
2019-08-21 12:37:01 +02:00
Christian Helmuth 08ac64bba9 libports: download bzip2 port from sourceware.org
fossies.org removed the archive and Linux From Scratch uses
sourceware.org.

http://www.linuxfromscratch.org/lfs/view/development/chapter03/packages.html
2019-08-21 12:36:59 +02:00
Christian Helmuth ce149397ec acpica: retrieve static battery info only once
On Fujitsu S936, evaluating the _BIF method on each battery-info update
successively increased the RAM usage, while  _BST (dynamic battery
status) and _STA (generic status) did not show this behavior. Therefore
this commit retrieves only dynamic information periodically (resp. on
SCI IRQ). Now, acpica hast static RAM usage in idle state for 24+ hours.

The root cause for the increased RAM usage is still shady. While it
could just be normal that it grows until a certain yet unknown limit,
there may also be memory leak in contrib code or some strange AML on the
designated notebook.

Issue #3454
2019-08-13 12:02:27 +02:00
Christian Helmuth a7835650e8 acpica: prevent contrib code warnings 2019-08-13 12:02:27 +02:00
Christian Helmuth 83ead086a1 acpica: enable interpreter-slack mode
This mode is used on Linux (if acpi=strict is not set on boot cmdline)
and Windows. The mode ignores certain errors and/or bad AML constructs.

  1) Allow "implicit return" of last value in a control method
  2) Allow access beyond the end of an operation region
  3) Allow access to uninitialized locals/args (auto-init to integer 0)
  4) Allow ANY object type to be a source operand for the Store() operator
  5) Allow unresolved references (invalid target name) in package objects
  6) Enable warning messages for behavior that is not ACPI spec compliant
2019-08-13 12:02:27 +02:00
Christian Helmuth 17d32b3e15 depot: update recipe hashes 2019-07-09 09:06:54 +02:00
Norman Feske 0c3d3e7c8f pkg/qt5_textedit: clipboard support
Issue #3437
2019-07-09 08:58:39 +02:00
Norman Feske 1fe9b07c99 wm: forwarding of clipboard ROM/Report sessions
The labels of clipboard ROM and clipboard report sessions of WM clients
must be consistent with the client's nitpicker label. Hence, we must
route those sessions through the window manager, analogously to the
approach taken for shape reports in #3165.

Issue #3437
2019-07-09 08:58:38 +02:00
Christian Prochaska 71ce1442c8 run: enable 'imx7d_sabre' in network tests
Fixes #3434
2019-07-09 08:58:38 +02:00
Christian Helmuth 63e69d35e0 Disable unsupported autopilot tests on rpi3 2019-07-09 08:58:38 +02:00
Christian Helmuth a0c71cffd4 Solo5 tests require x86_64 2019-07-09 08:58:38 +02:00
Norman Feske 52ec4526e1 libc: discharge use of hidden symbols
Issue #3424
2019-07-09 08:58:38 +02:00
Josef Söntgen 984bddcedd libc: cleanup port preparation
- make port able to be prepared repeatedly
  Rpcgen refuses to overwrite an already existing header, so try to
  always remove it beforehand
- get rid of 'cp' warning 'cp: warning: source file
  'src/lib/libc/sys/sys/time.h' specified more than once'
- silence patch message 'patch unexpectedly ends in middle of line'

Fixes #3420.
2019-07-09 08:55:24 +02:00
Ehmry - 807f5d9af1 Use pthread_join in test/libc_pipe
Ref #2303
2019-07-09 08:55:24 +02:00
Sebastian Sumpf 3a2de0d9a3 depot_autopilot: limit dynamic to 286 MB
* also set test-libc to 256 MB (seems to be enough)
* fixes memory issues on platforms with 512 MB RAM

issue #3407
2019-07-09 08:55:23 +02:00
Sebastian Sumpf e43b848ac8 jitterentropy: ARM 64-Bit version
issue #3407
2019-07-09 08:55:23 +02:00
Sebastian Sumpf 59347d2560 stdcxx: make linkable for ARM 64-Bit
'typeinfo for std::invalid_argument' was not found when using 'V' (weak
object)

issue #3407
2019-07-09 08:55:23 +02:00
Sebastian Sumpf 2b14284e2b libc: add ARM-64 bit to recipe
issue #3407
2019-07-09 08:55:23 +02:00
Christian Helmuth 3c4c460f82 depot: update recipe hashes 2019-06-13 13:40:37 +02:00
Christian Helmuth e1e67d8330 Increase timeouts in test-libc* pkgs
These tests often fail with Qemu on aged hosts because of the tight
timeouts.
2019-06-13 12:22:50 +02:00
Johannes Kliemann b55358c535 ada-runtime: fix exception handling on ARM
ref #3395
2019-06-13 12:22:49 +02:00
Christian Helmuth 45f3ccc42a vfs: fix empty-node handling in inline fs
Now <inline></inline> as well as <inline/> are supported.
2019-06-13 12:22:49 +02:00
Ehmry - 43315444a8 Libc: wrap VFS sync's in VFS_THREAD_SAFE
Move the _vfs_sync implementation from vfs_plugin.h to vfs_plugin.cc and
wrap all VFS access in the VFS_THREAD_SAFE macro.

Syncing must be made thread safe because it often happens when closing
files and may require suspending the current thread for I/O signal
dispatching.

Ref #3409
2019-06-13 12:22:49 +02:00
Christian Helmuth 1f77f37310 qt5: handle keypad-enter key 2019-06-13 12:17:32 +02:00
Christian Helmuth 00daecf838 qt5: enable capslock/numlock in test run scripts 2019-06-13 12:17:31 +02:00
Christian Prochaska 8dd391371c libusb: show "device is plugged" message only when plugged
Fixes #3399
2019-06-13 12:17:31 +02:00
Josef Söntgen 6b48a08697 libc: silence noncritical dummy implementations
* isatty

  For the moment it is not possible to determine if the fd belongs to a
  tty. For whatever reasons, the check is done multiple times, e.g.
  'tclsh', which will spam the LOG.

* sysctl(HW_FLOATINGPT)

  FPU is enabled on all our platforms, so return true.

Fixes #3389.
2019-06-13 12:17:31 +02:00
Ehmry - dc8a2ec523 Remove libc_terminal
Fix #3378
2019-06-13 12:13:40 +02:00
Christian Prochaska 46f89d143b libports: ncurses: disable relative cursor movement
Fixes #3380
2019-06-13 12:13:40 +02:00
Ehmry - 8a4adceaf0 Add note on PCAP dump to run/fetchurl.inc
Ref #3388
2019-06-13 12:13:40 +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 Helmuth 2b183f9497 depot: update recipe hashes 2019-05-29 10:20:52 +02:00
Sebastian Sumpf 4b72bbaa57 libc: mktime signed overflow
issue #3289
2019-05-29 10:20:52 +02:00
Christian Helmuth 6c42bd4dd3 libc: use non-anonymous 'operator new' and destroy()
This removes implementations of and also references to anonymous new and
delete operators from the libc implementation. As allocators for
new/delete Libc::Allocator instances are used, which (paradoxically) map
to libc malloc/free.
2019-05-27 14:52:53 +02:00
Johannes Kliemann 35b1440c97 ada-runtime: update to GCC 8.3.0
ref #3362
fixes #3371
2019-05-27 14:52:53 +02:00
Martin Stein ba9ffc6243 nic_dump: do not depend on libports repo
Fixes #3372
2019-05-27 14:52:52 +02:00
Christian Helmuth 96b29c6f8a Update lwip_lx test (vfs plugin, ld="no") 2019-05-27 14:52:52 +02:00
Christian Prochaska b4649d84ee ada-runtime: adjustments for Genode tool chain 19.05
Issue #3307
2019-05-27 14:52:52 +02:00
Christian Prochaska eb4d431e76 stdcxx: update to version 8.3.0
Issue #3307
2019-05-27 14:52:52 +02:00
Christian Prochaska 8e2e4374f5 sanitizer: update to version 8.3.0
Issue #3307
2019-05-27 14:52:52 +02:00
Christian Prochaska 720919bc14 gcov: update to version 8.3.0
Issue #3307
2019-05-27 14:52:52 +02:00
Sebastian Sumpf a71253fa58 ieee754: adjust to libc/libm update
* Adjust expected pow(-1/1, inf/-inf/nan) output to current libm
  behavior (as in FreeBSD, glibc, and OpenLibm) and return 1 on
  x86_64/x86_32/arm

* Add 'double float' outputs for ARM which are defined to float

issue #3289
2019-05-27 14:46:54 +02:00
Ehmry - 863654d188 Libc: update port to Freebsd 12
Fix #3289
2019-05-27 14:46:53 +02:00
Ehmry - 777d92f6de Port of OpenLibm
Replace the FreeBSD libm with OpenLibm, which is easier to port.
OpenLibm is used by Mirage's freestanding Ocaml runtime (sin POSIX).

https://openlibm.org/

Ref #3289
2019-05-27 14:46:53 +02:00
Alexander Boettcher c6ec2c1dd7 libc_terminal plugin: increase stack
Issue #3111
2019-05-27 14:46:53 +02:00
Christian Helmuth 0777d16e78 Revert "ieee754: disable test for muen (fix #3305)"
This reverts commit 918b9a9fa4.

The Muen debug console buffer was increased by the recent update, which
alleviates the issue with many log messages as in the ieee754 test.
2019-05-27 14:46:53 +02:00
Josef Söntgen c8c354d1e6 fetchurl: add progress timeout handling
The component will now abort an ongoing download attempt if it stalls
for given amount of time, the default is 10 seconds.

Fixes #3346.
2019-05-27 14:46:52 +02:00