Commit Graph

83 Commits

Author SHA1 Message Date
Adrian-Ken Rueegsegger
94afc1a340 run: support loading images via iPXE/HTTP
iPXE is an open source network boot firmware which supports booting from
a web server via HTTP [1].

The following two parameters can be used to specify the iPXE/HTTP setup:

--load-ipxe-base-dir
  This parameter specifies the base directory of the HTTP server from
  which the target machine downloads the files.

--load-ipxe-boot-dir
  The directory relative to iPXE base dir which contains the iPXE
  chainload configuration and all necessary files.

The target machine is expected to request the following iPXE
configuration via HTTP:

http://${HOST_URL}/${ipxe-boot-dir}/boot.cfg

This can be achieved by building iPXE with the following embedded
script:

  #!ipxe
  dhcp
  chain http://${HOST_URL}/${ipxe-boot-dir}/boot.cfg

See also [2] for additional information.

[1] - http://ipxe.org/
[2] - http://ipxe.org/howto/chainloading#breaking_the_loop_with_an_embedded_script

Fixes #1708
2015-09-30 12:20:40 +02:00
Stefan Kalkowski
ed52d5a211 Introduce 'spec' subdirectories to outline aspects
Instead of holding SPEC-variable dependent files and directories inline
within the repository structure, move them into 'spec' subdirectories
at the corresponding levels, e.g.:

  repos/base/include/spec
  repos/base/mk/spec
  repos/base/lib/mk/spec
  repos/base/src/core/spec
  ...

Moreover, this commit removes the 'platform' directories. That term was
used in an overloaded sense. All SPEC-relative 'platform' directories are
now named 'spec'. Other files, like for instance those related to the
kernel/architecture specific startup library, where moved from 'platform'
directories to explicit, more meaningful places like e.g.: 'src/lib/startup'.

Fix #1673
2015-09-16 13:58:50 +02:00
Christian Helmuth
ebd0796fc0 run: plugin for Gembird EnerGenie powerplug
The plugin works just like the netio plugin and uses the following
parameters

  --power-off-energenie-host       network address of device
  --power-off-energenie-password   password for device
  --power-off-energenie-port       target port of device
2015-09-09 15:14:30 +02:00
Christian Helmuth
539e5212ab run: rename powerplug to netio
The run plugin is not generic and works for NETIO4/NETIO230 powerplugs
only. Further, this opens the path for other vendor-specific powerplug
plugins.

Note, the plugin parameter for the addressed powerplug was renamed to

  --power-on-netio-host  resp.
  --power-off-netio-host
2015-09-09 15:14:30 +02:00
Stefan Kalkowski
acc46f70b7 codezero: remove support from Genode (fix #1668) 2015-09-09 15:14:29 +02:00
Johannes Schlatow
40b31876d2 base-hw: Add basic Zynq-7000 support (QEMU)
Ref #1599
2015-09-09 15:14:28 +02:00
Stefan Kalkowski
9f1beaa036 hw_x86_64: use 'muen' SPEC to implement aspect 2015-08-31 09:09:22 +02:00
Reto Buerki
11bfbb3532 run: Use raw binary object for base-hw on Muen 2015-08-27 13:48:25 +02:00
Martin Stein
b60f28bee9 run/load/tftp: detect bad directory
If a user has e.g. /tftpboot/x86 as directory and configures
base_dir=/tftboot and offset_dir=/x86, this leads to bad behavior
as the load module creates a symlink

/tftpboot/x86/<builddir> -> <absolut_builddir>

in this case instead of the desired

/tftpboot/x86 -> <absolut_builddir>

Furthermore, the module works on

/tftpboot/x86/config-00-00-00-00-00-00

and

/tftpboot/x86/<builddir>/config-00-00-00-00-00-00

afterwards, which looks bad too. As there is no warning at all, this can
be hard to debug. The commit adds an appropriate check with error message and
exit -1 on an existing directory.

Fixes #1630
2015-07-21 09:38:10 +02:00
Christian Helmuth
ce43ed4c17 hw: load bender before kernel on grub too 2015-07-21 09:30:11 +02:00
Alexy Gallardo Segura
c14fe7e6c7 foc: Odroid-X2 basic support
Fix #1597
2015-07-21 09:28:25 +02:00
Reinier Millo Sánchez
c60d65150e base-foc: support for Raspberry Pi
Fixes #1596
2015-07-06 12:22:26 +02:00
Alexander Boettcher
e131235521 hw: support booting via tftp on x86
Fixes #1580
2015-07-01 15:04:35 +02:00
Alexander Boettcher
6f6fb69dc9 hw: keep config file in run directory
Issue #1580
2015-07-01 15:04:35 +02:00
Norman Feske
f19f454ae5 sel4: move core to a libaray, add boot_modules.s 2015-05-26 09:39:59 +02:00
Norman Feske
b8c107ceb2 sel4: let run tool support core and non-core tests 2015-05-26 09:39:57 +02:00
Norman Feske
456d81f517 New base-sel4 repository 2015-05-26 09:39:53 +02:00
Reto Buerki
f02c92598b run: Use -m 512 for hw_x86_64 on qemu
The base-hw kernel on x86_64 currently assumes 254 MiB of RAM. The RAM
region is subtracted from the I/O mem allocator and therefore this range
is not available for device I/O.

If qemu is started with -m 128, the region for (emulated) PCI config
space access lies within this region and I/O mem allocation in the
pci_drv will fail. Giving qemu more RAM moves the PCI config space out
of the 254 MiB region, making the run/libc_ffat scenario with acpi work.
2015-05-26 09:39:50 +02:00
Alexander Boettcher
1f4c8ae92d run: support specifying on/off of softreset tool
With it all relays can be geared.

Fixes #1516
2015-05-26 09:39:48 +02:00
Alexander Boettcher
93c1ef0309 run: build nova kernel on every run invocation
Compared to some other kernels checking the nova source and building is way
faster - so we can spend on each run/* invocation the extra time.
2015-05-26 09:39:48 +02:00
Norman Feske
33c2bc8ad0 Fix comment 2015-05-26 09:39:46 +02:00
Christian Helmuth
ae61e520d7 run: fail if boot_dir module was not declared 2015-05-06 10:55:17 +02:00
Martin Stein
de9d69a6d7 hw: re-enable kernel tests with the new run env
The new run env doesn't pass the "core_type" parameter at one point
which is why we have to pass it through a global HW-specific variable.

Ref #1464
2015-04-23 16:51:33 +02:00
Adrian-Ken Rueegsegger
8c9b79fab0 hw: Use properly sized asm type in boot_modules.s
The boot modules assembled by the generated boot_modules.s file is
accessed from core using struct Bm_header. Unfortunately the assembler
.long directive is synonym to .int [1] and thus has the same size as the
C++ int type and *not* long. Use the matching assembly type .quad in
boot_modules.s when generating the file for 64-bit platforms such as
x86_64.

[1] - https://sourceware.org/binutils/docs/as/Long.html
2015-03-27 11:53:16 +01:00
Norman Feske
a974726e26 hw: skeleton for building on x86_64
This patch contains the initial code needed to build and bootstrap the
base-hw kernel on x86 64-bit platforms. It gets stuck earlier
because the binary contains 64-bit instructions, but it is started in
32-bit mode. The initial setup of page tables and switch to long mode is
still missing from the crt0 code.
2015-03-27 11:53:16 +01:00
Norman Feske
cc00af85bf Add hw_x86_64 to create_builddir tool 2015-03-27 11:53:16 +01:00
Josef Söntgen
e6cf426d72 run: always append to output buffer
On each execution the output buffer is overriden when run_genode_until
is executed multiple times. Run scripts, that depend on extracting
information after several execution steps, e.g. noux_net_netcat, will
fail to do so. Therefore, we append the newly captured log output to
the old output buffer.

Issue #1327.
2015-03-27 11:53:15 +01:00
Christian Helmuth
da21a3c338 create_grub2: ext2 default parameters for image
The mkfs.ext2 heuristics select the "small" ext2 usage type, which does
not fit well with GiB-sized pen drives. For example, the block size is
just 1024 bytes compared to 4096 for "default". Therefore, we enforce
the default usage type as this fits our use case of dumping the image to
USB sticks better.
2015-03-13 12:17:26 +01:00
Sebastian Sumpf
e4194b4f44 base-foc: Remove 'modaddr' from bootstrap
Let bender relocate the boot modules. Skip relocation strep in bootstrap (only
the kernel, sigma0, and roottask will be loaded).
2015-02-27 11:48:05 +01:00
Josef Söntgen
0f47ac958b log/serial: handle spurious EOF
While booting up, some devices send garbage over the serial connection.
This can result in an unexpected EOF event within expect(1). A filter
program may be specified with '--log-serial-filter' to circumvent this
problem. Then, the output of the serial program is piped through
the filter, which may sanitize the character stream.

Fixes #1395.
2015-02-17 16:01:37 +01:00
Alexander Boettcher
467eee07a6 run: increase tcl buffer for run_genode_until
and move it close to run_genode_until implementation.
Somehow the "match_max -d" gets ignored if it is to far away and some
our run scripts fails because the buffer contains not all information
(seen for affinity.run on a 8 core machine)
2015-02-17 14:18:16 +01:00
Josef Söntgen
7617833365 run: capture kernel msg to detect boot errors
Handle boot errors like the old run tool did by checking a kernel
specific string on boot up and start the run script timeout afterwards.

Issue #1395.
2015-02-16 14:01:45 +01:00
Stefan Kalkowski
7cb4d7bf41 run: support fastboot tool to load images
Fixes #1397
2015-02-16 13:40:36 +01:00
Josef Söntgen
4caf12cd16 tool/run: decrease timeout in log/serial
Set the timeout to 60s. The original value of 210s is too long and
delays the testing process unnecessarily.

Fixes #1395.
2015-02-16 13:40:35 +01:00
Josef Söntgen
78e8e04b88 tool/run/README: fix wrong examples
Fixes #1392.
2015-02-16 13:40:34 +01:00
Josef Söntgen
55bf0bb294 run: add power_on/softreset
The softreset module resets the target system by triggering a software
reset.

Fixes #1355.
2015-01-26 12:28:41 +01:00
Josef Söntgen
c706b1c0a7 run: modularize run tool 2015-01-26 12:28:40 +01:00
Stefan Kalkowski
df8bdaaf79 run: increase JTAG load timeout (Ref #1366) 2015-01-20 11:23:50 +01:00
Christian Helmuth
6344ab94b2 run: use predefined name for wsman script
"file tempfile" is not available in tcl versions below 8.6, which are
still wide spread, for example, in Ubuntu 12.04.5 LTS.

Fixes #1328.
2014-12-19 13:58:48 +01:00
Stefan Kalkowski
3367fd27e4 run: avoid buffering of output for expect
Due to commit "run: relax IP power plug recognition + serial EOF",
when piping the serial command through 'tr', some characters might
get buffered, thereby preventing some run scripts to finish correctly.
This commit removes the 'tr' hack. Instead, to circumvent the 'expect'
problem, which kills under special conditions spawned childs used to
obtain serial line content, whenever EOF of the serial command is
recognized during the boot phase, the child process gets re-spawned.
2014-12-08 13:53:17 +01:00
Stefan Kalkowski
726c32e5f6 run: relax IP power plug recognition + serial EOF
* To communicate with IP power plug devices from Koukaam, to remote
  control power supply of test boards, don't parse minor versions, but
  support different IP power plugs
* TCL's expect may report an EOF when reading from the spawned serial
  terminal, especially when using 'socat' to stream serial over TCP/IP,
  although the spawned child is still running and delivering content.
  This problem is clearly not dependent on the characters send, but
  possibly due to strange pipe signals. When piping the serial output
  through 'tr' the problem vanishs.
2014-12-03 11:41:13 +01:00
Christian Prochaska
1e424a6fd2 run: mark ext2 partition as bootable
When building for the 'disk' run target, the ext2 partition needs to be
marked as bootable to be booted from on some hardware.

Fixes #1270
2014-10-10 13:02:46 +02:00
Alexander Boettcher
cc2f173ca3 run: support Intel AMT wsman protocol
The older SOAP EOI protocol is not supported with AMT version 9+. By default
the wsman tool will be used if installed.

RUN_OPT examples to enforce amtool or wsman:

--target amt --amt-tool wsman
--target amt --amt-tool amttool

Fixes #1251
2014-09-11 10:23:38 +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
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
Christian Helmuth
24941ffaeb run: check XML syntax of generated config files
Fixes #1005.
2014-07-09 16:26:04 +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
Alexander Boettcher
963551877f netperf: wait for output of all spawned processes 2014-06-26 10:57:25 +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
Alexander Boettcher
69bc875ac7 tool: increase amt reset timeout 2014-04-14 12:32:31 +02:00