Commit Graph

91 Commits

Author SHA1 Message Date
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
Alexander Boettcher a7235d2411 NOVA: Use Genode interfaces to bootstrap Vancouver
Since no kernel objects can be created anymore outside Genode::core,
the Vancouver port must be adjusted to use solely the Genode interfaces.

The Vcpu_dispatcher creates all portals via the cpu_session interface and
uses the feature to setup a specific receive window during a IPC (the
cap_session::alloc IPC) to place to be received/to be mapped capability
(virtualization exception portal) at the designed indexes.

The actual vCPU thread extends from a normal Genode::Thread and extends it
by specific vCPU requirements, which are a larger exception base window and
the need by Vancouver to place the SM and EC cap at indexes next to each other.

Fixes #316
2012-08-09 11:09:42 +02:00
Christian Prochaska a55b883146 Noux: fix setup of child environment
Fixes #315.
2012-08-07 22:27:53 +02:00
Norman Feske d079ef51ae Adapt GDB monitor and Noux to CPU session changes 2012-08-03 12:06:31 +02:00
Norman Feske 914897cf71 Adapt noux.run to recent changes of exit handling 2012-08-01 14:45:21 +02:00
Christian Prochaska 6c68850524 Noux: add virtual '~Vfs_handle()' destructor
This patch adds a virtual destructor to the 'Vfs_handle' class to have
subclass destructors called on 'destroy()' on a base class pointer.

Fixes #305.
2012-08-01 12:48:26 +02:00
Christian Prochaska fa541b4545 libc_noux: fix 'read()' function
This patch fixes the problem that data in the read buffer would get
overwritten in cases where multiple 'read()' syscalls are necessary.

Fixes #303.
2012-08-01 12:47:15 +02:00
Christian Prochaska 5f1a66b90c Noux: handle 'not a directory' error in fchdir()
Fixes #298.
2012-07-26 11:29:08 +02:00
Christian Prochaska 55815e4a3a Noux: add support for executing shell scripts
With this patch Noux recognizes the '#!' character sequence in executable
files and executes the specified interpreter.

Fixes #255.
2012-07-26 11:22:04 +02:00
Christian Prochaska f99648f355 Noux: implement 'Fs_file_system::dataspace()'
Fixes #261.
2012-07-26 11:21:14 +02:00
Josef Söntgen 7e26c79455 Noux: add recvfrom()
Add SYSTEMCALL_RECVFROM to noux/net and the corresponding libc function.

Fixes #290.
2012-07-19 21:05:52 +02:00
Josef Söntgen d28465cb3a Noux: fix missing mode propagation
When opening a new file, a new Fs_vfs_handle is created but with the
initial mode set to 0 which is not expected by functions like fdopen()
that check if the original flags given to the open() call match the
returned ones on the used fd.

Fixes #289.
2012-07-19 21:05:52 +02:00
Josef Söntgen 976e7b4288 Noux: fix send(), set fd before each syscall
The fd has to be set before each syscall.

Fixes #288.
2012-07-19 21:05:52 +02:00
Josef Söntgen 883453c65d Noux: fix sendto(), set args before each syscall
Set addrlen and dest_addr explicitly before each system call.

Fixes #287.
2012-07-19 21:05:51 +02:00
Alexander Boettcher 33a2f54413 NOVA: Vancouver - establish recall portal
Fixes #283
2012-07-19 21:05:51 +02:00
Christian Prochaska 1b8fd4aa44 GDB for Noux
With this patch the 'GNU Project Debugger' (GDB) can be built for Noux.

The included run script connects GDB and GDB monitor via a cross-link
terminal and allows interactive source-level debugging of the GDB monitor
test application on Genode.

Fixes #280.
2012-07-19 15:42:25 +02:00
Christian Prochaska e39200d8c6 Noux: update GCC to version 4.6.1
This patch updates GCC to version 4.6.1 and enables tool chain support for
x86_64 and ARM.

Fixes #266.
2012-07-04 14:56:58 +02:00
Christian Prochaska cdb1c6f203 Disable 'time_t' type size tests in findutils
Some type size tests in the findutils source code expect the 'time_t' type
to be of the same size as the 'long' type, whereas the Genode libc defines
it as '__int64_t' for ARM. This patch disables these tests.

Fixes #262.
2012-07-02 14:15:01 +02:00
Christian Prochaska 92ce7ca909 Don't always rebuild VIM
Fixes #260.
2012-07-02 14:14:25 +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 9a8fb36b1c Catch 'File_system::Lookup_failed' exception
In 'Fs_file_system::open()' the call of '_fs.dir()' can throw a
'File_system::Lookup_failed' exception, which gets explicitly caught
with this patch.

Fixes #246.
2012-06-20 19:44:07 +02:00
Christian Prochaska 1bf7967463 Noux terminal file system
This patch adds a new "terminal" file system type to Noux, which allows to
create a "character device" file that is connected to a Genode 'Terminal'
service.

The 'Terminal' session created by the file system has the label
"noux(terminal_fs)" to distinguish it from the 'Terminal' session
created by Noux itself.

Fixes #244.
2012-06-20 10:20:35 +02:00
Christian Prochaska 54051a7bb2 Enable Noux for ARM
With this patch the existing Noux run scripts except the tool chain script
can be executed on the ARM platform.

Fixes #229.
2012-06-20 10:17:23 +02:00
Norman Feske 288fd4e56e Add support for allocating DMA memory
This patch extends the RAM session interface with the ability to
allocate DMA buffers. The client specifies the type of RAM dataspace to
allocate via the new 'cached' argument of the 'Ram_session::alloc()'
function. By default, 'cached' is true, which correponds to the common
case and the original behavior. When setting 'cached' to 'false', core
takes the precautions needed to register the memory as uncached in the
page table of each process that has the dataspace attached.

Currently, the support for allocating DMA buffers is implemented for
Fiasco.OC only. On x86 platforms, it is generally not needed. But on
platforms with more relaxed cache coherence (such as ARM), user-level
device drivers should always use uncacheable memory for DMA transactions.
2012-06-20 09:17:48 +02:00
Josef Söntgen f325f314b5 Fix libc_noux's Plugin::getpeername() method
The argument's order was wrong in the memcpy() call. In addition
the wrong sysio struct was used for the addrlen argument.

Fixes #238.
2012-06-08 14:32:20 +02:00
Josef Söntgen 7e3c303ad0 Fix bugs in libc_noux's sendto() method
The sysio's struct fields need to be properly set on each syscall. This
fixes a bug where the wrong fd is used after the first sendto syscall.

Also the minimal buffer size calculation uses the wrong size.

Fixes #235.
2012-06-06 13:57:55 +02:00
Christian Helmuth 36ae42b8ff Check for required tools on 'make prepare'
Fixes #221.
2012-05-29 13:55:00 +02:00
Josef Söntgen 8f4b3dd4f1 Add gnu-netcat as Noux package
Please find run script at 'ports/run/noux_net_netcat.run'.
2012-05-29 13:54:59 +02:00
Josef Söntgen 6d8a7c0cc4 Initial version of networking support for Noux
Noux/net adds network functionality to noux. Currently most basic
network related system calls including 'accept', 'bind', 'connect',
'listen', 'recv', 'send', 'shutdown', and 'socket' are implemented by
wrapping lwip's network functions.

At the moment noux/net is rarely usable, though it is possible to
use netcat to send a message to a netcat server which listen on a
given port in noux/net.
2012-05-29 13:54:59 +02:00
Christian Prochaska c2f23de2e7 Introduce server-role member to 'Child' class
This patch is needed to use children as services in a dynamic
way (closing and reopening sessions).
2012-05-29 13:54:59 +02:00
Josef Söntgen 4ba1669b39 Add dynamic_pointer_cast method to Shared_pointer
This methods is currently only used for casting an Io_channel
object to an Socket_io_channel object.
2012-05-29 13:54:59 +02:00
Christian Prochaska ce6fa75f7e Increase Qemu memory for Noux bash test
This patch increases the amount of RAM Qemu gets for the Noux bash test on
x86_64.

Fixes #210.
2012-05-21 17:16:41 +02:00
Christian Prochaska 171f46c770 Fix Noux x86_64 compile error
Fixes #209.
2012-05-21 17:16:23 +02:00
Norman Feske e756d49966 Quote env variables (i.e., to support ccache) 2012-05-21 17:15:13 +02:00
Christian Prochaska be36dec89e Add a run script for Arora
Fixes #207.
2012-05-21 10:06:08 +02:00
Norman Feske 483d094ad1 Run script for using binutils + gcc in Noux 2012-05-19 15:45:38 +02:00
Norman Feske 97cd7ca022 Hook for passing env pointer to main function
The new 'genode_envp' variable declared in '_main.cc' allows libc
plugins to supplying custom environment pointers to the main function.
This is needed by 3rd-party software such as GNU make, which expects the
environment pointer as third argument of the main function.
2012-05-18 19:32:44 +02:00
Norman Feske 6f12659369 Improve path handling (stripping pairs of dots) 2012-05-18 18:47:10 +02:00
Norman Feske e436d60ce7 Remove debugging output, emulate access syscall 2012-05-18 18:47:02 +02:00
Norman Feske 0f6b59097e Detect execve failure 2012-05-18 17:10:54 +02:00
Norman Feske 66290ea46d Stacked file systems for Noux
This patch introduces support for stacked file systems alongside new
glue for accessing file-system implementations provided via Genode's
new file-system-session interface.

Using stacked file systems, an arbitrary number of file systems (such
as tar archives or file systems implemented as separate Genode
components) can be composed to form one merged virtual file system.

An example is given via the 'ports/run/noux_bash.run' script. This run
script creates a virtual file system out of multiple tar archives each
containing the content of a particular GNU package. In addition, one
'ram_fs' is mounted, which enables Noux to perform write operations.
This way, the shell output can be redirected to a file, or files can
be saved in VIM.

Fixes #103.
2012-05-17 20:34:00 +02:00
Christian Prochaska beed82bb56 Enable Noux for x86_64
Fixes #199.
2012-05-09 20:56:18 +02:00
Norman Feske 5bedeef814 Simplify use of namespace Genode within Noux 2012-04-23 20:43:43 +02:00
Christian Prochaska 93faa9a36f Config option for GDB monitor RAM preservation
This patch allows to configure the amount of RAM that GDB monitor should
preserve for itself. The configuration syntax looks as follows:

<start name="gdb_monitor">
    <resource name="RAM" quantum="1G"/>
    <config>
        <target name="noux">
        <preserve name="RAM" quantum="2M"/>
        ...
    </config>
</start>

Fixes #190.
2012-04-23 15:32:22 +02:00
Christian Prochaska 7a369bc74d Add an 'executable' flag to 'Rm_session::attach()'
With this patch clients of the RM service can state if they want a mapping
to be executable or not. This allows dataspaces to be mapped as
non-executable on Linux by default and as executable only if needed.

Partially fixes #176.
2012-04-20 11:21:19 +02:00
Christian Prochaska b81bea845d GDB monitor target configuration test 2012-04-16 19:04:42 +02:00
Christian Prochaska 674e898af3 Pass config to child of GDB monitor
With this patch GDB monitor provides a 'config' file to the target. Its
content can be defined in the <config> sub node of the <target> XML node.

Fixes #179.
2012-04-16 19:01:56 +02:00