Commit Graph

194 Commits

Author SHA1 Message Date
Josef Söntgen 4c017900c8 tools: strip rumpkernel based tools
Until now, the rumpkernel based tools were installed with all symbols
included. This accounts for about 200MiB used space on 64Bit system.
Stripping the binaries prior to installation brings the space
requirements down to 20MiB.

Fixes #1245.
2014-08-28 12:35:56 +02:00
Josef Söntgen 416c6579d4 tools: fix clean rule in tool_chain_rump
The clean rule is used to delete already built binaries as well as to
clean-up any left-overs from previous build attempts. If there was
no previous attempt just return true to prevent make from complaining.

Fixes #1245.
2014-08-28 12:35:55 +02:00
Christian Helmuth dc2961338d Bootable GRUB2 disk image with ext2 partition
This provides bootable disk images for x86 platforms via

! RUN_OPT="--target disk"

The resulting disk image contains one ext2 partition with binaries from
the GRUB2 boot loader and the run scenario. The default disk size fits
all binaries, but is configurable via

! --disk-size <size in MiB>

in RUN_OPT.

The feature depends on an grub2-head.img, which is part of the commit,
but may also be generated by executing tool/create_grub2. The script
generates a disk image prepared for one partition, which contains files
for GRUB2. All image preparation steps that need superuser privileges
are conducted by this script.

The final step of writing the entire image to a disk must be executed
later by

  sudo dd if=<image file> of=<device> bs=8M conv=fsync

Fixes #1203.
2014-08-18 13:25:21 +02:00
Christian Helmuth f442e64eaf prepare_port: log target when extracting archives
Fixes #1224.
2014-08-15 10:19:49 +02:00
Norman Feske 37248560d1 tool chain: disable -Werror for building GDB
Thanks to @duralog for reporting the issue!

Fixes #1214
2014-07-24 10:18:08 +02:00
Martin Stein 6cb9559feb hw: core as library
The build config for core is now provided through libraries to enable
implicit config composition through specifiers and thereby avoid
consideration of inappropriate targets.

fix #1199
2014-07-24 10:18:06 +02:00
Stefan Kalkowski b07b6666d6 run: wait some time before loading images via JTAG
When powering up the device it sometimes needs some seconds before the
bootloader prepared the board to use JTAG uploading.
2014-07-09 16:26:04 +02:00
Stefan Kalkowski 3d68125b5e create_builddir: add hw_imx53 (TrustZone) target
Until now, the HW platform support for the TrustZone features of the
i.MX53 boards could only be used, when adding a "trustzone" SPEC variable
manually. This commit adds a create_builddir target for HW i.MX53 with
TrustZone features enabled, fo convenience reasons.
2014-07-09 16:26:04 +02:00
Christian Helmuth 24941ffaeb run: check XML syntax of generated config files
Fixes #1005.
2014-07-09 16:26:04 +02:00
Christian Helmuth 2c8f814c66 autopilot: provide time information
- Log elapsed time per test in summary
- Command-line switch `--time-stamp` prefixes log output lines with
  current time stamp (requires ts utility from Debian package _moreutils_)

Fixes #1156.
2014-06-27 14:25:09 +02:00
Stefan Kalkowski 5385ada7a4 run-tool: enable image loading via openocd
By adding: "--target jtag \
            --jtag-debugger <debugger configuration> \
            --jtag-board <board configuration>" to the RUN_OPTs
this commits enables the run-tool to load and execute an ELF image
via JTAG to the target platform.

Fixes #1191
2014-06-26 12:04:53 +02:00
Stefan Kalkowski b93a58066f trustzone: automate run script for nightly tests
Ref #1182
2014-06-26 10:57:27 +02:00
Alexander Boettcher 963551877f netperf: wait for output of all spawned processes 2014-06-26 10:57:25 +02:00
Alexander Boettcher 5922617eab vbox: add test for shared folders
Issue #1176
2014-06-26 10:57:24 +02:00
Norman Feske 6d3a41a95c tool: Sort patches when generating port hashes
Issue #1082
2014-06-02 11:31:50 +02:00
Norman Feske 615830e107 Enable hash checks for ports mechanism 2014-05-27 13:45:03 +02:00
Norman Feske acf00c29c3 Add 'update_hash' and 'list' to tool/ports
Issue #1082
2014-05-27 13:45:03 +02:00
Christian Prochaska b28a551538 run: use 'upvar' instead of 'global'
Using 'upvar' instead of 'global' in the 'append_if' and 'lappend_if'
functions makes it possible to use these functions with local variables
of the calling function.

Fixes #1137.
2014-05-27 11:14:45 +02:00
Josef Söntgen aaf0454956 tool: wrapper script for rumpkernel tools
The rumpkernel based tools are intended to be used by executing
'tool/rump'. Since it covers the most common use cases for these
tools, this script is comparatively extensive, hence giving a short
tutorial seems reasonable:

* Format a disk image with Ext2:

To format a disk image with the Ext2 file system, first prepare the
actual image by executing dd:

! dd if=/dev/zero of=/path/to/disk_image bs=1M count=128

Second, use 'tool/rump' to format the disk image:

! rump -f -F ext2fs /path/to/disk_image

Afterwards the just created file system may be populated with the
content of another directory by executing

! rump -F ext2fs -p /path/to/another_dir /path/to/disk_image

The content of the file system image can be listed by executing

! rump -F ext2fs -l /path/to/disk_image

* Create a encrypted disk image:

Creating a cryptographic disk image based on cgd(4) is done by
executing the following command:
! rump -c /path/to/disk_image

This will generate a key that may be used to decrypt the image
later on. Since this command will _only_ generate a key and NOT
initialize the disk image, it is highly advised to prepare the disk
image by using '/dev/urandom' instead of '/dev/zero' (only new blocks
that will be written to the disk image are encrypted). In addition
while generating the key a temporary configuration file will be
created. Although this file has proper permissions, it may leak the
generated key if it is created on persistent storage. To specify a more
secure directory the '-t' option should be used:

! rump -c -t /path/to/secure/directory /path/to/disk_image

Decrypting the disk image requires the key generated in the previous
step:

! rump -c -k <key> /path/to/disk_image

For now this key has to specified as command line argument. This is
an issue if the shell, which is used, is maintaing a history of
executed commands.

For completness sake let us put all examples together by creating a
encrypted Ext2 image that will contain all files of Genode's _demo_
scenario:

! dd if=/dev/urandom of=/tmp/demo.img bs=1M count=16
! $(GENODE_DIR)/tool/rump -c -t /ramfs -F ext2fs /tmp/demo.img > \
!         /ramfs/key # key is printed out to stdout
! $(GENODE_DIR)/tool/rump -c -t /ramfs -F ext2fs -k <key> \
!         -p $(BUILD_DIR)/var/run/demo /tmp/demo.img

To check if the image was populated succesfully, execute the
following:

! $(GENODE_DIR)/tool/rump -c -t /ramfs -F ext2fs -k <key> -l \
!         /tmp/demo.img
2014-05-27 11:14:45 +02:00
Josef Söntgen a9e95e24fe tool: makefile for building rumpkernel tools
The rumpkernel tools are used within the Genode OS Framework tool chain
for preparing and populating disk images as well as creating cgd(4)
based cryptographic disk devices.

Execute 'tool/tool_chain_rump build' to build the tools and afterwards
'tool/tool_chain_rump install' to install the binaries. The default
install location is _/usr/local/genode-rump_.
2014-05-27 11:14:45 +02:00
Norman Feske 05a460c11f Temporarily disable hash checks
...until the transition to the new ports management is complete.
2014-05-27 11:14:44 +02:00
Norman Feske 85a2ebc1c4 libports: migrate to new ports mechanism
Issue #1082
2014-05-27 11:14:42 +02:00
Norman Feske de65c3f7cc tool/prepare.mk: Switch directories silently 2014-05-27 11:14:42 +02:00
Norman Feske 3de1423a6a Build-system support for ported 3rd-party code
The new 'select_from_ports' function allows a target description file to
query the path to an installed port. All ports are stored in a central
location specified as CONTRIB_DIR. By default, CONTRIB_DIR is defined
as '<genode-dir>/contrib'. Ports of 3rd-party source code are managed
using the tools at '<genode-dir>/tool/ports/'.

Issue #1082
2014-05-27 11:14:42 +02:00
Norman Feske a128b40f03 Tool for preparing a single 3rd-party port
Issue #1082
2014-05-27 11:14:42 +02:00
Norman Feske ba291bcc57 build system: Back out on error at libdep stage 2014-05-27 11:14:41 +02:00
Christian Prochaska f1aa137c9d tool_chain: fix GDB build with makeinfo 5
Issue #1051.
2014-05-14 16:08:01 +02:00
Christian Prochaska 776d7f947f tool_chain: fix GCC build with makeinfo 5
Issue #1051.
2014-05-14 16:08:01 +02:00
Christian Prochaska d4bf55a308 tool_chain: use real patches
Issue #1051.
2014-05-14 16:08:00 +02:00
Norman Feske b2f78cc475 Unify 'make prepare' between libports and ports 2014-05-14 16:08:00 +02:00
Norman Feske ca971bbfd8 Move repositories to 'repos/' subdirectory
This patch changes the top-level directory layout as a preparatory
step for improving the tools for managing 3rd-party source codes.
The rationale is described in the issue referenced below.

Issue #1082
2014-05-14 16:08:00 +02:00
Alexander Boettcher 8824ce8962 libc: don't take alien thread for main pthread
It covers bugs which we should detect and fix, especially depending on
the result of pthread_myself locking implementation (ours and vbox) takes
decision to take a lock or just to assume it is a reentrant locking attempt.

Fixes #1128
2014-05-07 10:37:37 +02:00
Norman Feske 8876dd057d Add libc_vfs plugin and test
Issue #999
2014-04-29 15:19:28 +02:00
Alexander Boettcher 69bc875ac7 tool: increase amt reset timeout 2014-04-14 12:32:31 +02:00
Alexander Boettcher 03ce614c23 base: add cpu_session parameter to thread creation
Fixes #1114
2014-04-14 12:32:31 +02:00
Alexander Boettcher c3b161e814 run: enable virtualbox auto test for nightly runs
With #1090 fixed the test should succeed now.
2014-03-14 13:17:36 +01:00
Alexander Boettcher e7f3e99aab tool: test result output of amtterm reset
"amtterm reset" returns 0 as exitcode even if the reset command failed.
So check explicitly the output of the command to detect the error case.
2014-03-14 13:17:35 +01:00
Sebastian Sumpf bf06b7e360 rump: Add repository to build.conf 2014-02-28 10:11:12 +01:00
Sebastian Sumpf 9251b1ede8 rump: Port of the rump kernels to Genode
For further information see: http://wiki.netbsd.org/rumpkernel/. In this version
I ported the central rump components to Genode in order to take advantage of
NetBSD file system implementation. The new 'dde_rump' repository contains the
Genode version of the rump libraries and a 'rump_fs' server that implements
Genode file-system-session interface. Currently ext2, iso9660, and fat
file-systems are supported.

Issue #1048
2014-02-28 10:11:08 +01:00
Sebastian Sumpf b7575319bf run: Add 'check_installed' command to run env
'check_installed' takes a command name as argument and tries to call 'which' in
order to find the command path. If that does not succeed, paths like '/sbin' are
'/usr/sbin' searched. On success the absolute path of the command is returned,
on failure 'exit' is called with an error message.

Issue #1048
2014-02-25 14:58:09 +01:00
Markus Partheymueller 31fc7c35e2 tool_chain: check for various autoconf installs.
There exist different default setups for a specific autoconf version:
* autoconf
* autoconf$(VERSION)
* autoconf-$(VERSION)

As of now, only the second option is recognized by the check in tool_chain.

This patch ensures that if one of those is present in the correct
version, it will be found and used in the build process.

Fixes #1053.
2014-02-25 14:58:04 +01:00
Stefan Kalkowski ca513113f6 block: cache between one client and one device
This block cache component acts as a block device for a single client.
It uses fixed 4K blocks as caching granularity, thereby implicitly reads
ahead whenever a client requests lesser amount of blocks. Currently,
it only supports a least-recently-used replacement policy.

Fixes #113
2014-02-25 14:58:02 +01:00
Bjoern Doebel 9c9f67d0d6 Check for all missing tools at once
Instead of terminating tool/tool_chain when finding the first
missing tool, this patch runs all checks to completion before
bailing out. This eases finding missing programs, because the
user has to run the script only once to get a list of all missing
software.

Fixes #1046
Fixes #1047
2014-02-06 15:20:14 +01:00
Norman Feske b6f59fb9be XML generator and test
Fixes #1019
2014-01-27 18:54:07 +01:00
Norman Feske 6efac7672f tool/fix_include_ifndef: consider license header 2014-01-27 18:54:05 +01:00
Christian Helmuth a3e30cc96c run: instruct 'exec' to ignore stderr output
Unless '-ignorestderr' is set on 'exec' in expect, any output on stderr
is interpreted as execution failure. In this case, 'create_iso' logs
some diagnostics but does not fail.

We repeatedly promote our ISOs to be bootable from USB storage.
Therefore, we have a hard dependency on 'isohybrid' and should fail in
the case that the tool is missing.
2014-01-27 18:53:52 +01:00
Stefan Kalkowski af86e33c3f part_blk: re-design to work event driven
Fix #750
2013-12-19 11:34:05 +01:00
Stefan Kalkowski 7b49dbf2f3 hw: basic support for ODROID XU board (Fix #991) 2013-12-03 11:30:07 +01:00
Martin Stein 6e90f70ec2 run: force qemu to emulate PBXA9 with -m 768
For PBXA9 qemu adjusts provided RAM chips to the -m arg. Thus we
filter user values and force value that enables all chips that Genode
expects to be available. Not doing so leads to inexplicable errors.

ref #964
2013-12-03 08:33:25 +01:00
Alexander Boettcher aca62c7180 noux: enable some arm platforms running tool_chain
ref #964
2013-12-03 08:33:24 +01:00
Christian Helmuth 31605fd85f autopilot: create only missing builddirs on --keep
This improvement prevents multiple execution of create_builddir on
existing directories.
2013-11-28 08:22:24 +01:00
Christian Helmuth 1ef8545469 autopilot: improve detection of genode dir
If the script is executed with an obscure path (e.g.,
'../tool/autopilot'), just taking the argv0 string fails. Therefore, the
file path is now normalized prior to the directory detection.
2013-11-28 08:22:24 +01:00
Sebastian Sumpf 634f4c0d8c netperf: Add separate run scripts for lwip/lxip
Also removed target 'app/netperf' and added 'app/netperf/lwip' and
'app/netperf/lxip'.
2013-11-26 14:32:06 +01:00
Alexander Boettcher 80838831d8 make dde_linux repository an optional one
Since dde_linux now contains the port of the Linux IP stack available for all
Genode base-* platforms move the repository out of drivers_arm and drivers_x86
build.conf to the optional build.conf (available to all platforms).
2013-11-26 14:32:05 +01:00
Norman Feske 4388c2a97c Do not try to start Qemu for platform_rpi 2013-11-25 09:46:28 +01:00
Norman Feske 2322ab202c Remove OKLinux
Fixes #29
Fixes #30
Fixes #889
2013-10-22 08:00:16 +02:00
Alexander Boettcher d8cf17687e run: use gdb_monitor by autopilot
Issue #478
2013-10-16 09:26:09 +02:00
Norman Feske d78ba43f64 Test for yielding resources 2013-10-16 09:26:08 +02:00
Norman Feske f80c0500af Test for 'Parent::resource_request' interface 2013-10-15 16:13:45 +02:00
Christian Prochaska 33e176312e run: make 'is_qemu_available' return false for Linux
Fixes #862.
2013-09-04 22:44:37 +02:00
Norman Feske 58b8e766d1 tool/run: Whitespace 2013-09-04 22:37:06 +02:00
Norman Feske 01c5226ef1 tool/run: Let grep_output strip colors from output 2013-09-04 12:06:35 +02:00
Martin Stein 2e087bf4a9 tool/run: cancel 'run_genode_until forever'
Enables the user to cancel run scripts in
'run_genode_until forever' via 'ctrl+c'.

fix #826
2013-08-30 13:38:49 +02:00
Martin Stein eee671233c autopilot: add test of MMIO framework
ref #853
2013-08-30 13:29:44 +02:00
Alexander Boettcher e349c29736 seoul: add test for native runs
and add to autopilot list.
2013-08-15 09:22:48 +02:00
Alexander Boettcher 2e58428b51 run: Rpc_entrypoint test running on multiple CPUs
Add run script to autopilot list

Issue #814
2013-08-13 17:08:24 +02:00
Alexander Boettcher fdaeda47bb run: extend affinity test
* read out supported number of CPUs
* start per CPU a thread
* monitor by main thread liveness of remote CPU threads
* add a round variable
* terminate run script after a specific round or after 90s
* on qemu wait 5 rounds, on native runs 40

Add run script to autopilot list

Issue #814
2013-08-13 17:08:24 +02:00
Alexander Boettcher 9b6d37649b run: restrict noux-auto to platforms known to work
* add to autopilot list

Issue #591
2013-08-05 15:16:11 +02:00
Stefan Kalkowski 5d75e6676d run-tool: be more failure tolerant in spawn_serial
Fixes #809
2013-07-15 13:06:08 +02:00
Stefan Kalkowski 09d81759ee run-tool: unify building of u-boot image (fix #807) 2013-07-15 11:13:28 +02:00
Alexander Boettcher 731493641b run: add netperf tests to autopilot list
* native Genode (using lwIP) netperf
as
* L4Linux netperf
2013-07-11 12:40:19 +02:00
Alexander Boettcher 52cf25982a run: clean pulsar config file during a clean_run
tool/autopilot complains about this left over file
2013-06-17 12:14:10 +02:00
Alexander Boettcher 1b60fd6147 run: power off only the port which was switched on 2013-06-12 15:32:26 +02:00
Christian Helmuth b355897f53 update x86emu to 1.20
+ document x86emu move from os -> libports

Fixes #456
2013-06-12 11:35:12 +02:00
Stephan Mueller 4f52e793a0 GPG signature verification of tool chain
The downloaded archives for building the tool chain are checked for its
signature before using them. In case of a signature failure, the build
is interrupted.

Issue #748
2013-06-10 10:44:09 +02:00
Stephan Mueller 4c89f4f00f Hash verification tool
This tool verifies the integrity of a given file with a hash. It uses
md5sum, sha1sum and sha256sum as needed.

Issue #748
2013-06-10 10:44:09 +02:00
Stephan Mueller 9b22983e58 GPG signature verification tool
The signature verification tool uses gpg to verify the detached
signature of the given file.

It also tries to obtain the signing key if it is not part of the local
key ring.

Signature verification implies the verification of the integrity and
authenticity of a given file.

Issue #748
2013-06-10 10:44:09 +02:00
Stefan Kalkowski 8ac5ae2248 Increase flexibility for serial devices in run-tool
Instead of using a fixed command like picocom in the run tool,
it's better to have the flexibility to set the whole command that
connects to the serial device. Therefore, it's possible for instance
to connect to a remote serial device exported via TCP/IP by using tools
like socat.
2013-05-28 11:40:56 +02:00
Stefan Kalkowski 5e321732df Make NETIO-230B power plug configureable 2013-05-28 11:33:14 +02:00
Stefan Kalkowski 6826a07133 Fix typo in run tool 2013-05-28 11:24:02 +02:00
Christian Prochaska 4a9b1c6aab base-linux: add ARM support
This patch introduces a new platform 'linux_arm' for building and running
Genode/Linux on an ARM device.

Known limitations:

- libc 'setjmp()'/'longjmp()' doesn't currently save/restore floating
  point registers

Fixes #746.
2013-05-24 14:55:37 +02:00
Alexander Boettcher 99421a2a82 run: switch off IP power_plug adapter after test
Avoid running the native machines if not used after test.
2013-05-17 15:24:50 +02:00
Alexander Boettcher b2fee4c7b1 autopilot: option to keep existing test directory 2013-05-17 12:03:57 +02:00
Alexander Boettcher da310bd726 tool: create appropriate build.conf for hw_arndale 2013-05-17 12:03:33 +02:00
Alexander Boettcher 6e1b9a823d autopilot: redirect stderr to log file 2013-05-17 11:54:01 +02:00
Norman Feske 8ac6d8c96c base-hw: Support for Raspberry Pi 2013-05-15 20:48:07 +02:00
Christian Prochaska 33bb8662a0 tool/run: fix 'interact' command invocation
Use the '-i' option to pass the spawn id to the 'interact' command.

Fixes #737.
2013-05-10 11:16:13 +02:00
Alexander Boettcher 138a37765f run: add support for IP power switch NETIO-230B 2013-05-10 11:16:12 +02:00
Alexander Boettcher 2beb851c5a run: add acpi spec as default to foc/nova 64bit 2013-05-10 11:16:11 +02:00
Alexander Boettcher 85c6640795 run: add support to specify 'serial' via RUN_OPT
If the target machine is connected locally one may specify
"serial" as target in the RUN_OPT variable to get the test output.

Used for panda and arndale on foc and hw.
2013-05-10 11:16:10 +02:00
Alexander Boettcher df985bda84 run: support RUN_OPT for all platforms
Use RUN_OPT="--target ..." to select the backend test method.

Supported values so far:

qemu     - qemu + grub bootloader (default)
qemu+pxe - qemu + pulsar bootloader (PXE)
amt      - Intel AMT (reset+serial output) + pulsar bootloader

Related to issue #598
2013-05-10 11:16:10 +02:00
Alexander Boettcher 2a761c7fea run: extend genode_until_run by a spawn id
genode_until_run can be called now with a spawn id to able to reattach to a
spawned process (amt, serial output). Run scripts can now call genode_until_run
multiple times.
2013-05-08 09:42:44 +02:00
Alexander Boettcher 267239147a run: introduce explicit wait_for_output
To be used by base-* run/env scripts
2013-05-08 09:42:44 +02:00
Alexander Boettcher 5485fe6f18 run: add support to query qemu support
To be used by the base-* specific run/env scripts to choose the appropriate
test backend.
2013-05-08 09:42:44 +02:00
Alexander Boettcher 3593c7fb4d run: move general AMT support to tool/run
Issue #679
2013-04-12 10:56:27 +02:00
Norman Feske e5c57bddcc Add ports-foc to build.conf for foc_arndale 2013-03-27 19:27:25 +01:00
Torsten Hilbrich 87f83c1cff build.mk: Fix dependency on $(LIB_DEP_FILE)
The previous fix in 6b33757154 was
invalid.
2013-03-20 10:02:34 +01:00
Christian Helmuth 6f2e36279a Use mkisofs to create ISO images
mkisofs is the original ISO creation tool from cdrtools available on
many UNIX systems. genisoimage on the other hand is part of a mostly
unmaintained fork of cdrtools very specific to Debian Linux and its
derivates (e.g., Ubuntu). Fortunately, genisoimage (as we used it) is
completely invocation-compatible to mkisofs.

Fixes #627.
2013-03-07 13:41:30 +01:00
Christian Prochaska ce075c05b9 Skip Qemu execution for the Arndale platform
Fixes #672.
2013-02-26 15:17:00 +01:00
Sebastian Sumpf 554876ceee foc_arndale: Added 'create_buildir' support 2013-02-25 16:45:47 +01:00