Commit Graph

765 Commits

Author SHA1 Message Date
Norman Feske
4cfd954e1e Remove dependency from 'which' utility
Debian declared the 'which' utility as deprecated.

Fixes #4319
2021-11-29 15:10:52 +01:00
Johannes Schlatow
2ecb09ba7e tool/run: move nic model to qemu_args file
Always instantiating a network device with id `net0`, removes the need to call
append_qemu_nic_args in run scripts unless we want to add forwarding
rules.

genodelabs/genode#4311
2021-11-29 15:10:52 +01:00
Johannes Schlatow
522a1cdc5b tool/run: read board-specific qemu args from file
Allow specifying additional qemu arguments for externally supported boards
(e.g. zynq_qemu) by adding a `qemu_args` file in the board-property directory.

The syntax of the qemu_args file is as follows:
- Arguments can appear in a single line or in multiple lines as the
  lines will be appended (separated by a whitespace) to the global
  qemu_args variable.
- If the line is prepended with a `foobar:` expression. The arguments
  are only added if the foobar spec is present.

Note, that a `-m` argument specified in the qemu_args file will
override the arguments provided by the run scripts.

genodelabs/genode#4311
2021-11-29 15:10:52 +01:00
Johannes Schlatow
c0c2ed2bf5 tool/run: make qemu RAM sanity check more robust
First, the former implementation has only considered the pure numerical
variant of the -m argument. Yet, qemu also allows specifying the amount
of memory by `-m 1G`, `-m size=1G` and more.

Second, the default amount of memory for BOARD=pc was 512M (800M in case of okl4).
Since the depot_autopilot.run also required at least 768M on all
platforms it seems reasonable to take 800M as a default value for BOARD=pc and
thereby remove the special treatment of okl4.

genodelabs/genode#4311
2021-11-29 15:10:52 +01:00
Stefan Kalkowski
b12b0ed93d imx8q_evk: remove board support from repository
Moved to separate repo at https://github.com/skalk/genode-imx/

Fix #4301
2021-11-29 15:10:51 +01:00
Johannes Schlatow
7917c5d9ec Remove zynq_qemu platform and zynq nic driver
Moved to separate repo at https://github.com/jschlatow/genode-zynq

Fixes genodelabs/genode#4280
2021-11-29 15:10:51 +01:00
Piotr Tworek
80d11ca751 tool: Add keyboard and mouse devices to virt_qemu.
Now that we have appropriate native driver for them add keyboard and
mouse devices to virt_qemu machine. Make sure qemu exposes those new
devices in modern, VirtIO 1.0 mode. At leasts qemu 5.1.0 still uses
pre 1.0 mode in default setup.

Issue #4282
2021-11-29 15:10:51 +01:00
Sebastian Sumpf
d4a6342295 tool_chain: remove Go support from bootstrap compiler
Fixes #4292
2021-11-29 15:10:50 +01:00
Stefan Kalkowski
9a80c3a618 depot: suppress error when copying empty package
Instead of failing, ignore empty packages when copying over
depot packages to a run-script environment.

Fix #4271
2021-10-13 14:46:52 +02:00
Christian Helmuth
c0a7696c71 tool/dts/extract: convert regex strings to latin1
The former encoding was UTF-8, which works quite well if LC_CTYPE is
ensured to be an UTF-8 codeset (e.g., en_US.UTF-8 or C.UTF-8 . But, if
LC_CTYPE is set to C or latin1 for example, the Tcl regex library enters
an infinite loop because of unexpected characters used as markers
n the strings (e.g., SECTION SIGN U+00A7).

Therefore, the extract tool was converted to latin1 with the following
commands and now works for LC_CTYPE C and UTF-8 codesets.

   iconv -f utf-8 -t latin1 tool/dts/extract > /tmp/e
   cp /tmp/e tool/dts/extract
2021-10-13 14:46:51 +02:00
Christian Helmuth
727fa86088 autopilot: support additional repo directories
-a <repo-dir> appends repo-dir to REPOSITORIES in build.conf
2021-10-13 14:46:51 +02:00
Christian Helmuth
32394c0733 hello: fix resource config / add to autopilot list 2021-10-13 14:46:51 +02:00
Norman Feske
e6cdaafb20 tool/ports: use current time as modification time
Fixes #4262
2021-10-13 14:02:16 +02:00
Norman Feske
82a51d8eaa build: operate ccache in preprocessor mode
This avoids consistency problems when header files are shadowed.

Fixes #4256
2021-08-30 15:00:37 +02:00
Johannes Schlatow
50cc51f132 tool: support new u-boot FIT image format
Fixes genodelabs/genode#4250
2021-08-30 15:00:36 +02:00
Martin Stein
619474bc90 nic_router: drop fragmented IPv4
The NIC router used to ignore the IPv4 header fields "More fragments" and
"Fragment offset" completely. Therefore higher-level protocols of fragmented
IPv4 were interpreted wrong because each fragment was considered a self-
standing packet, expecting, for instance UDP/TCP headers somewhere inside of
the UDP/TCP data field. Normally, such packets were dropped as soon as the
UDP/TCP checksum check failed because of the misinterpretation. However,
it was also possible for fragmented IPv4 to pass the router although normally
only partially.

IPv4 fragmentation support in the router would introduce some potential
security risks and is presumably not an easy endeavor. So, for now, we settled
on not supporting IPv4 fragmentation. With this commit, the router simply drops
all fragmented IPv4. This is reflected to the log for each fragment as "drop
packet (fragmented IPv4 not supported)" when 'verbose_packet_drop="yes"' is
configured.

The new test 'run/nic_router_ipv4_fragm' is an automated test for this
behavior. The test is added to the autopilot list.

Ref #4236
2021-08-18 15:06:12 +02:00
Martin Stein
626b2f9cf2 run/libc_vfs_fs_fat: add to autopilot
Excludes board 'virt_qemu' from the test as we don't have block device drivers
for this board.

Ref #4220
2021-08-18 15:06:12 +02:00
Norman Feske
3d36291d7f run/load/fastboot: support 64-bit ARM
This patch lifts the limitation for 32-bit ARM platforms and makes the
parameter --load-fastboot-device optional. If only one device is
present, it can be omitted.

Fixes #4232
2021-07-28 11:27:04 +02:00
Norman Feske
45f5ed173a tool/run: use [board] for naming driver packages
This patch replaces the enumeration of boards in the drivers_nic_pkg and
drivers_interactive_pkg functions by inferring the package names from
the [board] name. This eases the addition of driver packages in external
repositories.

Fixes #4221
2021-07-28 11:25:21 +02:00
Norman Feske
f3908b8283 tool: refine help text of list_dependencies
Issue #4204
2021-07-28 11:25:21 +02:00
Christian Helmuth
fdc4bd2f90 tool/run: absolute source path for load_tftp_inst_cmd 2021-07-28 11:25:21 +02:00
Martin Stein
0074a7c4ac tool/depot: fix forwarding of CCACHE
The depot tool 'build_bin_archive' used to ask only whether CCACHE is empty or
not and, if it wasn't empty, the tool added 'CCACHE := yes' to the build.conf
of the temporary build dir. This caused the sub-build processes to use ccache
even when the top-level CCACHE variable was set to a bogus value.

Also adds documentation of the CCACHE variable to the help message of the
'build' and 'build_bin_archive' tool.

Ref #4212
2021-07-28 11:24:56 +02:00
Robin Eklind
40e2aa6617 builddir/run_x86: add note regarding missing -no-kvm switch
Also, add -enable-kvm notes as commented out QEMU_OPT option.

Updates #500.
2021-06-28 11:38:20 +02:00
Sebastian Sumpf
a6fe6c90d4 tool_chain: add ENABLE_FEATURE support
default: "c c++ ada go gdb"

This allows to build a subset of the Genode tool chain

issue #4094
2021-06-25 11:55:41 +02:00
Stefan Kalkowski
ed0cc5330e tool/dde_linux: add list_dependencies utility
Fix #4204
2021-06-25 11:43:41 +02:00
Sebastian Sumpf
a58473dece autopilot: add usb_hid_reconnect run script
- Adjust script to run on Qemu x86 only

fixes #4205
2021-06-25 11:43:41 +02:00
Norman Feske
e5600fea06 dde_linux/extract_initcall_order: support v5.12
This patch adjusts the 'extract_initcall_order' utility to the changed
initcall symbol syntax introduced in Linux by the following commit:

   https://github.com/torvalds/linux/commit/a8cccdd9

It uses an additional sed step to strip away the kmod prefix,
__COUNTER__, and __LINE__ information so that the symbol names match
those of earlier kernel versions.

Issue #4188
2021-06-25 11:41:45 +02:00
Norman Feske
f541668604 dde_linux/create_dummies: show objs for variables
Issue #4188
2021-06-25 11:41:45 +02:00
Norman Feske
bf7500ad7b dde_linux/create_dummies: out-of-tree build dir
This patch enables the tool/dde_linux/create_dummies tool to operate on
a out-of-tree build directory. The Linux source tree is determined by
examining the build directory's Makefile.

Issue #4188
2021-06-25 11:41:45 +02:00
Norman Feske
29b7c5a202 dde_linux/create_dummies: show symbol details
When combining the 'show' command with a defined LINUX_KERNEL_DIR,
each symbol gets annotated with the object file where it is defined.

Issue #4188
2021-06-25 11:41:45 +02:00
Alexander Boettcher
27004e1fd5 usb: remove monolithic usb driver
+ adjust README files

Fixes #4173
2021-06-25 11:41:43 +02:00
Alexander Boettcher
0aa99648d7 run: use usb/hid driver in VM tests
Issue #4173
2021-05-28 14:16:45 +02:00
Stefan Kalkowski
28189ba77a tool: simplify initcall order extraction
The new tool `extract_initcall_order` generates a header file out of a
Linux kernel build, which provides a sorted array with the initcall function
names of the kernel build. The order states the order in which the initcall
have to be called. It gets extrated out of the Linux kernel System.map.

Fixes #4172
2021-05-28 14:16:45 +02:00
Alexander Boettcher
921a99bb9b tool/run: option to copy tftp served files (x86)
Fixes #4153
2021-05-28 14:15:28 +02:00
Norman Feske
a13dee8d19 tool/dts: for extracting content from dts files
The new tool eases the inspection and pruning of device-tree source
files.

Fixes #4165
2021-05-28 14:15:28 +02:00
Stefan Kalkowski
74d826d1ad tool: simplify Linux dummy function generation
The new tool `create_dummies` easily lists missing references,
while porting subsystems of the Linux kernel to Genode, e.g., device drivers.
Moreover it can automatically generate dummy implementations for functions
and global variables.

Fixes #4156
2021-05-28 14:15:27 +02:00
Martin Stein
139a2cfae9 tool: use local LC_ALL=C instead of LC_COLLATE=C
We used to export 'LC_COLLATE=C' for the environment of Genode tools. This was
meant to ensure that sorting is always done C-style and not dependent on the
users locale settings. This is required, for instance, to ensure that the same
archive always yields the same hash.

However, 'export LC_COLLATE=C' is not sufficient. It can be outruled by an
'LC_ALL' setting in the users environment. The manual of 'sort' recommends to
set 'LC_ALL=C' locally if you want reliable results and this is what this
commit does. Furthermore it removes the former 'export LC_COLLATE=C'
directives.

Note that I couldn't find a way to set 'LC_ALL' local to 'exec ... sort' in
TCL. This is why I set it global instead using TCLs 'env' array.

Note that the Make directive '$(sort ...)' and the TCL directive 'lsort',
unlike the Shell directive 'sort', are not affected by the users locale
settings.

Fixes #4144
2021-05-28 14:15:26 +02:00
Alexander Boettcher
1c20ed12c1 qemu: sanity check misconfigured memory for okl4
Issue #4095
2021-05-28 14:15:26 +02:00
Christian Prochaska
9a3d5dcf21 tool_chain: update ali2dep for gcc 10.3.0
Issue #4094
2021-05-28 14:15:26 +02:00
Christian Prochaska
9c05cda6e7 tool_chain: update gcc to version 10.3.0
Issue #4094
2021-05-28 14:15:26 +02:00
Christian Prochaska
6a11b78cdf tool_chain: use gcc-provided dependency libraries
Download gmp, mpc and mpfr with the download script provided by the
gcc source tree and let the gcc build system handle the build of these
libraries with the correct compile options. This fixes build issues on
armhf Linux and removes the need to maintain mpc and mpfr ports in
the Genode tree.

Issue #4094
2021-05-10 11:19:11 +02:00
Christian Prochaska
7fd598f0c1 tool_chain: build 'gprbuild' from source
The 'gprbuild' version which is provided by Ubuntu 18.04 has a bug
which prevents it from building 'ali2dep' with gcc/gnat 10. With
this commit, a newer 'gprbuild' version is built from source.

Issue #4094
2021-05-10 11:19:09 +02:00
Christian Prochaska
ff160decec gdb: fix build errors with gcc 10
Fixes #4139
2021-05-10 11:17:20 +02:00
Norman Feske
2f9d430c00 base-linux: 64-bit ARM support
This patch adds support for running Genode/Linux on the AARCH64
architecture.

- The kernel-agnostic startup code (crt0) had to be extended to
  capture the initial stack pointer, which the Linux kernel uses
  to pass the process environment. This is in line with the
  existing startup code for x86_32 and x86_64.

- The link order of the host libraries linked to lx_hybrid
  programs had to be adjusted such that libgcc appears at last
  because the other libraries depend on symbols provided by
  libgcc.

- When using AARCH64 Linux as host, one can execute run scripts
  via 'make run/<script> KERNEL=linux BOARD=linux' now.

Issue #4136
2021-05-10 11:17:20 +02:00
Jean-Adrien DOMAGE
a4727c90a8 lx_fs: add os/run/lx_fs_import.run run script
This new runscript demonstrates how a file can be overwritten by vfs
import with the flag overwrite set to false. This is due to a bug
in lx_fs that is not propagating an ernno EEXIST syscall error.

Issue genodelabs#4104
2021-05-10 11:16:24 +02:00
Norman Feske
fdb1a4dd88 base-linux: avoid legacy syscalls
Until now, Genode's Linux system call bindings were based on original
Unix system calls that were later superseded by more flexibile variants.
E.g., 'openat' is a modern version of 'open'. Even though Linux upholds
the compatiblity with the original versions for existing architectures
like x86, the legacy syscalls are absent for the recently added AARCH64
architecture. A good overview of the system calls accross the prominent
architectures can be found at

https://chromium.googlesource.com/chromiumos/docs/+/master/constants/syscalls.md

This patch updates Genode's syscall bindings to avoid legacy versions,
thereby easing the support for AARCH64. The used "modern" versions
were introduced back in Linux version 2 days. So we are fine to rely
on them.

The patch slightly changes the signature for lx_stat because this system
call is merely used to check for the existance of a file and its size.
The new name 'lx_stat_size' draws a closer connection to its use case.
That said, the stat syscall has not been updated to the modern statx
since statx is still a fairly recent addition.

Issue #4136
2021-05-05 11:35:31 +02:00
Pirmin Duss
bb6617ad03 New libc_integration test
I created a test program which stresses the interplay between libc,
pthreads and vfs_pipe and may detect regressions.

The program starts a thread that spawns a bunch of workers, sends and
receives data to them through a pipe. When all data of a worker is
collected, the worker is finished (join()) and a new worker is started.
Both the number of bytes sent to the worker and the size of its
answer are random.

Issue #3967
2021-05-05 11:35:27 +02:00
Tomasz Gajewski
f49ec5b171 tool/run: extract function to copy files
Issue #4073
2021-05-05 11:32:09 +02:00
Tomasz Gajewski
507a7789fb tool/run: avoid error if init.xsd is missing
Issue #4073
2021-05-05 11:32:09 +02:00
Tomasz Gajewski
0a849a1681 prepare_port: cache handling for files with paths
This patch is a follow-up fix for issue #4028 that fixes #4061.
2021-04-20 12:03:02 +02:00