Commit Graph

62 Commits

Author SHA1 Message Date
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
Norman Feske 9a00ad7ae3 Support for dynamic ROM sessions, fix #170
This patch introduces support for ROM sessions that update their
provided data during the lifetime of the session. The 'Rom_session'
interface had been extended with the new 'release()' and 'sigh()'
functions, which are needed to support the new protocol. All ROM
services have been updated to the new interface.

Furthermore, the patch changes the child policy of init
with regard to the handling of configuration files. The 'Init::Child'
used to always provide the ROM dataspace with the child's config file
via a locally implemented ROM service. However, for dynamic ROM
sessions, we need to establish a session to the real supplier of the ROM
data. This is achieved by using a new 'Child_policy_redirect_rom_file'
policy to handle the 'configfile' rather than handling the 'configfile'
case entirely within 'Child_config'.

To see the new facility in action, the new 'os/run/dynamic_config.run'
script provides a simple scenario. The config file of the test program
is provided by a service, which generates and updates the config data
at regular intervals.

In addition, new support has been added to let slaves use dynamic
reconfiguration. By using the new 'Child_policy_dynamic_rom_file', the
configuration of a slave can be changed dynamically at runtime via the
new 'configure()' function.

The config is provided as plain null-terminated string (instead of a
dataspace capability) because we need to buffer the config data anyway.
So there is no benefit of using a dataspace. For buffering configuration
data, a 'Ram_session' must be supplied. If no 'Ram_session' is specified
at construction time of a 'Slave_policy', no config is supplied to the
slave (which is still a common case).

An example for dynamically reconfiguring a slave is provided by
'os/run/dynamic_config_slave.run'.
2012-04-05 11:25:26 +02:00
Norman Feske abb5a8a329 Skip building Arora if Qt4 repo is not present 2012-04-05 10:40:46 +02:00
Norman Feske 5f9fdde337 Streamlined 'noux_bash.run' for faster build 2012-03-31 16:28:22 +02:00
Norman Feske d6e30c19de Replace 'Native_capability::copy_to' by accessor
The 'copy_to' function turned out to be not flexible enough to
accommodate the Noux fork mechanism. This patch removes the function,
adds an accessor for the capability destination and a compound type
'Native_capability::Raw' to be used wherever plain capability
information must be communicated.
2012-03-28 09:58:51 +02:00
Norman Feske 8bd02a5333 Let Noux deliver EOF when pressing control-d 2012-03-26 17:00:06 +02:00
Norman Feske 08d4e68db1 Add VIM to 'noux_bash.run' 2012-03-26 17:00:06 +02:00
Norman Feske afeb54ebed Add pipe and dup2 syscalls to Noux
Fixes #133.
2012-03-21 21:37:17 +01:00
Norman Feske 1896c09a2d Fixed initial reference counter value 2012-03-21 21:37:15 +01:00
Norman Feske d0285edcb7 Fixed inconsistent include guard 2012-03-21 21:37:15 +01:00
Norman Feske 5b6de825e6 Noux: propagate environment to execve
Fixes #131.
2012-03-21 21:36:49 +01:00
Norman Feske 207abe647b Handle current working directory in Noux 2012-03-16 18:23:00 +01:00
Christian Helmuth 92171e9b86 Fiasco.OC: Reduce capability-allocator size
The old variant provided 8K capability slots to all processes on core,
which increased binaries by 180 KB for the static allocator. I reduced it
to 4K capabilities stay under 100 KB overhead for the allocator.

Anyway, pci_drv and pl11x_drv need more RAM quota now: 2M for pl11x_drv
and 1M for pci_drv.
2012-02-28 10:54:42 +01:00
Christian Prochaska 77a7207b42 Update the GDB monitor test documentation
The interactive GDB monitor test has changed recently. This patch updates
the documentation accordingly.

Fixes #126.
2012-02-26 13:52:20 +01:00
Norman Feske a9152ff412 Handle lifetime of dynamic allocations in Noux 2012-02-26 13:34:48 +01:00
Christian Prochaska e085828725 Qt4 cleanup
- Remove example application source code files which also exist in contrib
- Outsource commonly used parts from target.mk files
- Store the current Qt version only in one place
- Add run scripts for the example applications

Fixes #127.
2012-02-24 23:46:10 +01:00
Norman Feske 780507f42b Implementation of wait4 syscall
The 'noux_bash.run' script has become able to present the user with an
interactive bash shell for executing various coreutils programs. It is
still pretty limited, i.e., the environment is not correctly passed to
child processes and pipes are not supported. But bash and coreutils are
operational.
2012-02-24 23:43:35 +01:00
Norman Feske 7e7d290008 Fixed missing counter increment in assign operator 2012-02-24 23:32:08 +01:00
Norman Feske 18d0b316d4 Add wait4 syscall to Noux, just blocking for now 2012-02-24 15:19:38 +01:00
Norman Feske 7c98268901 Noux cleanup and source documentation
This patch decomposes the former 'child.h' into several header files,
unifies the naming of classes, and adds source-code documentation.
2012-02-23 10:42:12 +01:00
Norman Feske cbd4830977 Propagate new parent cap to forked process
This patch removes the hardcoded parent cap for the new child by
introducing a facility called 'poke' similar to copy-to-user. This
change makes the fork mechanism kernel-agnostic. The 'noux_fork'
test works on L4/Fiasco, OKL4, NOVA, Fiasco.OC, and L4ka::Pistachio.
Linux is not supported yet.
2012-02-23 10:42:11 +01:00
Norman Feske da5b0ff316 Remove unneeded libm from boot modules 2012-02-23 10:42:11 +01:00
Norman Feske fe2addf5b0 Noux: first functional version of fork
The resource virtualization layer has been extended to support sub RM
sessions because this feature is used by the dynamic linker. Currently,
the address space of the forking process is copied eagerly. However,
different dataspace types are treated differently. For example, only RAM
dataspaces are copied but no ROM dataspaces.

At the libc side, a setjmp/longjmp-based trampoline mechanism is used to
implement the continuation of the main thread inside the new process.
This procedure is also responsible for re-establishing the relationship
to the new process' parent as well as its Noux session.

This version is still in flux and has many rough edges. It is tied to
OKL4 for now.
2012-02-23 10:42:11 +01:00
Norman Feske 869c6e1df2 Noux: dim naming noise using the Genode namespace
Because 'Noux::Child' implements several abstract Genode interfaces, the
'Genode::' prefix became almost ubiquitous, making the code harder to
read. By importing the 'Genode' namespace into the 'Noux' namespace,
this patch remedies this inconvenience.
2012-02-22 15:56:45 +01:00
Norman Feske 5aaf04915c Intercept CPU session of Noux::Child
To implement fork semantics, we need to customize the bootstrapping of
the newly created process, in particular the startup of the main thread.
The CPU session interface provides a suitable hook. By virtualizing the
CPU connection of the process to core, we can defer (and parametrize)
the startup of the main thread. Furthermore, this enables us to detect
illegal attempts by the Noux process to create threads in addition to
the main thread.
2012-02-22 15:56:45 +01:00
Norman Feske 652a4afd51 Intercept RAM and RM of Noux processes
By letting Noux processes talk to service implementations local to the
Noux server, we can track RAM allocations and RM operations. This is
needed as a prerequisite to implement fork.
2012-02-22 15:56:45 +01:00
Norman Feske 15f0879402 Noux: skeleton for getpid and fork 2012-02-22 15:56:45 +01:00
Norman Feske b6b05a032b Simple fork test and run script
Currently the test is failing because fork is not yet implemented.
2012-02-22 15:56:45 +01:00
Julian Stecklina a6bac95fbd Fix possible NULL-pointer dereference in _stat
When given NULL pointers as buffers to _stat, return EFAULT, just as
Linux and FreeBSD. Fixes #101.
2012-02-14 16:44:42 +01:00
Christian Prochaska f72ab94853 GDB monitor test for automatic testing
The following features are tested (currently on Fiasco.OC only):

- breakpoint in 'main()'
- breakpoint in a shared library function
- stack trace when not in a syscall
- thread info
- single stepping
- handling of segmention fault exception
- stack trace when in a syscall

This patch fixes #105.
2012-02-10 18:46:41 +01:00