Commit Graph

260 Commits

Author SHA1 Message Date
Martin Stein
655fbbd984 base-hw: recipes for ARMv7a platforms
* To base-hw/recipes/src add base-hw-arndale, base-hw-imx53_qsb,
  base-hw-imx53_qsb_tz, base-hw-odroid_xu, base-hw-panda, base-hw-rpi,
  base-hw-wand_quad
* Ensure that the correct base-hw recipe is choosen by the run module
  'boot_dir/hw'
2018-11-16 14:37:20 +01:00
Martin Stein
ee91d7339c run: prevent duplicates in missing archive warning 2018-11-16 14:37:20 +01:00
cf7e23f0d6 Tool/run: configure power_on/amt and log/amt separately
Fix #3005
2018-10-29 09:36:21 +01:00
Christian Helmuth
240e70d989 run: configurable AMT power-on timeout
The default timeout is 5 seconds and can be changed like follows.

  RUN_OPT += --power-on-amt-timeout 11
2018-08-28 17:10:54 +02:00
Martin Stein
d2a36c5958 base: define generic config XSD types globally
The new base/xsd/config.inc defines generic XSD types such as 'Boolean' or
'Session_label'. It can be included in config XSD files by using:

! <xs:include schemaLocation="file://${GENODE_CONFIG_INC}"/>

The string ${GENODE_CONFIG_INC} is replaced by the run tool with the
above mentionened file path.

Issue #2897
2018-08-28 16:48:47 +02:00
Alexander Boettcher
a149131dc2 run: add microcode chain bootloader to nova
Fixes #2762
2018-08-28 16:48:43 +02:00
Sebastian Sumpf
b6bc44fd10 run: add support to preserve 'genode' directory
Add '--preserve-genode-dir' to RUN_OPT in order to preserve the 'genode'
directory in '<build_dir>/var/run/<run-script>'
2018-08-02 14:36:46 +02:00
Sebastian Sumpf
10485b0d39 run: rename 'check_installed' to 'installed_command'
Also remove 'requires_installation_of', while also checking sbin
directories in 'have_installed'. The run scripts have been adjusted
accordingly.

Fixes #2853
2018-07-03 09:39:31 +02:00
Roman Iten
7e126f7fb6 run: use sgdisk instead of parted in image/uefi
Issue #2862
2018-06-29 10:44:54 +02:00
Roman Iten
4067cc7962 run: use sgdisk instead of parted in image/disk
Issue #2862
2018-06-29 10:44:54 +02:00
Christian Helmuth
7d4174bceb run: disable heuristics for apple gpt in parted
Newer revisions of parted require special privileges due to use of the
dmidecode tool, which logs permission errors to standard error. In these
cases parted still succeeds with its operation, so just ignore the
jabbering and prevent expect to exit.
2018-06-12 12:11:45 +02:00
Alexander Boettcher
193e14a489 grub2: avoid switching modes
to reduce flickering during boot

Issue #2778
2018-06-12 12:11:44 +02:00
Alexander Boettcher
70028f8445 nova: export kernel messages via memory
Fixes #2207
2018-06-12 12:11:37 +02:00
Alexander Boettcher
4979221152 tool: support to use graphical grub2 2018-05-31 13:51:23 +02:00
Norman Feske
096c1e1f7f run/image/disk: omit * from GENODE partition label
This way, the boot partition is not considered as default partition by
Sculpt unless the user explicitly marks it as such.

Issue #2778
2018-05-30 13:36:22 +02:00
Alexander Boettcher
b1389416d2 run: created hybrid MBR for image/disk
Issue #2778
2018-05-30 13:36:21 +02:00
Roman Iten
874815ebf6 run: improve error handling regarding depots
Fixes #2821
2018-05-30 13:36:21 +02:00
Alexander Boettcher
501d82b99f platform_drv: skip assign device if iommu missing
Avoid red messages in the log on machines with no IOMMU, which recurring
confuse people.

Issue #2801
2018-05-30 13:36:18 +02:00
Roman Iten
5d23ef9447 run: make run script fail on unmet dependencies
Fixes #2820
2018-05-30 13:36:15 +02:00
Norman Feske
48bc69b14b run/image/disk: consider ext2 overhead
The original value of 256K does not suffice for images of the size of
sculpt.
2018-05-30 13:36:10 +02:00
Alexander Boettcher
de9d1afa99 tool/run: move binaries to boot directory
Issue #2778
2018-05-30 13:36:08 +02:00
Alexander Boettcher
25f2c44874 run: use GPT for image/disk BIOS legacy
Issue #2778

The "create_grub2" script functionality is moved to the g2fg contrib sources
and also the GRUB2 head image (tool/grub2-head.img). The head image is now
partitioned as GPT and bootable in BIOS legacy mode.
2018-05-30 13:36:08 +02:00
Christian Helmuth
169d5bc376 run: non-fatal exit on unsupported base build config
The kernel-specific boot dir scripts exit with 0 and log "Test
requires..." to inform the logger frontend of the base-archive
unavailability.
2018-04-19 12:39:20 +02:00
Christian Helmuth
49f64a0cac run: adapt qemu RAM size for okl4/x86
Our static okl4 system-integration configuration specifies a fixed RAM
range from 32 to 800 MiB, which must be satisfied by Qemu or strange
errors happen due to accesses beyond RAM. (Fixes current issues with
nic_router.run.)
2018-04-10 11:20:46 +02:00
1ca2b6fab3 run: fix depot tool regex to support '.' versions
Fix #2720
2018-04-10 11:11:50 +02:00
Reto Buerki
47724c68c2 platform_drv/x86: Switch to ECAM/MMCONF
Switch port I/O based PCI config space access to memory-mapped IO.  The
base address of the PCI configuration space is acquired by mapping the
ACPI ROM and reading the first <bdf> node. An exception is thrown if the
first <bdf> node is not for PCI domain zero or if multiple <bdf> nodes
exist. This is to reduce complexity and also because multiple PCI
domains are rare.

The PCI configuration space is accessed via I/O mem dataspace which is
created in the platform_drv root and then passed on to the PCI session,
device components and finally to the actual PCI config access instances.

The memory access code is implemented in a way to make it work with Muen
subject monitor (SM) device emulation and also general x86 targets. On
Muen, the simplified device emulation code (which works also for Linux)
always returns 0xffff in EAX to indicate a non-existing device.
Therefore, EAX is enforced in the assembly templates.

Fixes #2547
2018-03-29 14:59:04 +02:00
Norman Feske
eaa412022f tool/run: improve depot/create suggestion
When a pkg is missing, the user should create <arch>/pkg instead
of only the missing pkg. This way, all depending binaries are created in
one step. Otherwise the missing binaries are detected at the next time
the run script is executed. This patch relieves the user from iterating
manually.
2018-03-27 13:43:09 +02:00
Stefan Kalkowski
bad002acb1 hw: link core with debug symbols optionally
This commit changes the semantic of run_boot_dir to link a core
binary with debug symbols only when the designated library is in place.

Follow-up fix refering to issues #2339 and #2700
2018-03-08 12:05:06 +01:00
Adrian-Ken Rueegsegger
9cb71d0260 run: Move shared procedure to load/pxe.inc
The install_pxe_bootloader_to_run_dir procedure is required by the tftp
as well as the ipxe load script. Move it to a separate file which is
include by both.
2018-03-08 12:05:04 +01:00
Norman Feske
6d6aff0093 run: no duplicates in create_tar_from_depot
This patch ensures that depot snapshots created by the run tool
won't contain duplicated content, which would result cyclic hard
links.
2018-02-09 13:34:14 +01:00
Josef Söntgen
67869a697b run: add deport-dir argument
By specifying '--depot-dir' in the RUN_OPTS it is possible to override
the default depot ($GENODE_DIR/deport) location with the given path.
2018-01-17 12:14:40 +01:00
Christian Helmuth
f44edd407b run: fix import_from_depot for variable args
Apply the approach to join the argument list 'args' to pass a single
list argument to _collect_from_depot. Actually, this story teaches me to
shy away from {*} because of its special semantics, which are

  {*} makes each item in a list an individual argument of the current
  command (https://wiki.tcl.tk/17158)

This is a direct follow up to "run: let import_from_depot accept list
variables", which broke calling import_from_depot with a number of
individual arguments.

Issue #2619
2017-12-22 09:31:36 +01:00
Martin Stein
75df14f190 run: use XSD files from depots too
Fix #2619
2017-12-21 15:01:55 +01:00
Martin Stein
f01bdb9949 run: let import_from_depot accept list variables
When doing something like this in a run script ...

lappend arg X
lappend arg Y
lappend arg Z
import_from_depot arg

... the internals of import_from_depot do not treat $arg as list but as one
string and interprets it as malformed depot path. We can handle this by
applying {*} to $arg inside the procedure.

Issue #2619
2017-12-21 15:01:54 +01:00
Alexander Boettcher
30fd10933a okl4: support run script name containing "core"
Issue #2207
2017-12-21 15:01:46 +01:00
Norman Feske
a52541de18 depot: move versions to subdirectory
This patch changes the depot layout such that each archive is
represented as a directory that contains the versions of the archive as
subdirectories.

Issue #2610
2017-12-21 15:01:45 +01:00
Martin Stein
fb2398dbf2 run: target-specific config schemata
The run tool now by default checks configurations with target-specific
XML schemata. Each component may define a config schema file in its
target.mk via the CONFIG_XSD variable. When the run tool has checked an
configuration of an init instance, it additionally goes through the
start nodes of the config. For each start node it checks whether there
is an XSD file that matches. If so, the run tool also checks the config
of the start node (if existant). This is done recursively. I.e., also
the child configs of a sub-init of a sub-init of the top-level init
receive a config check.

Issue #2600
2017-12-21 15:01:36 +01:00
Alexander Boettcher
858f5732ba hw: add mbi2 framebuffer support
Issue #2555
2017-11-30 11:23:09 +01:00
Alexander Boettcher
e1ac124a4d hw: evaluate also ACPI RSDP v1 with MBI2
Issue #2526
2017-11-30 11:23:09 +01:00
Alexander Boettcher
2b6ae514b5 sel4: add mbi2 framebuffer support
Issue #2555
2017-11-30 11:23:09 +01:00
Martin Stein
054b8de67b tool/run/grub2: user-friendly missing message
Ref #2526
2017-11-30 11:23:03 +01:00
Alexander Boettcher
44adc3c404 tool: use grub2 instead of grub1 for iso boot
Fixes #2526
2017-11-30 11:23:01 +01:00
Alexander Boettcher
9672329772 fb_boot_drv: evaluate fb pitch
Fixes #2555
2017-11-24 09:02:04 +01:00
Stefan Kalkowski
7f5bec5c0d tool/run: link core with debug symbols optionally
If there is no debug/core-<kernel>.o library available, e.g., when
running a scenario in a fresh build directory where core is provided
via a depot package, the build_core_image step of the run tool was
canceled in the past, when trying to access the non-existing library.
This commit changes the semantic of build_core_image to link a core
binary with debug symbols only when the designated library is in place.

This fixup is related to issue #2339
2017-11-06 13:57:22 +01:00
Alexander Boettcher
0ac6f6159e tool: add unscoped_label to xml schema 2017-11-06 13:57:19 +01:00
Alexander Boettcher
1bbe34540f run: permit qemu 2.8.1 with seoul/virtualbox
Issue #1723
2017-10-19 13:46:14 +02:00
Stefan Kalkowski
ca60e24ad9 hw: run core threads in privileged mode
* introduce new syscall (core-only) to create privileged threads
* take the privilege level of the thread into account
  when doing a context switch
* map kernel segment as accessable for privileged code only

Ref #2091
2017-10-19 13:31:17 +02:00
Stefan Kalkowski
42db1e112b hw: introduce kernel/user address space split
* introduces central memory map for core/kernel
* on 32-bit platforms the kernel/core starts at 0x80000000
* on 64-bit platforms the kernel/core starts at 0xffffffc000000000
* mark kernel/core mappings as global ones (tagged TLB)
* move the exception vector to begin of core's binary,
  thereby bootstrap knows from where to map it appropriately
* do not map boot modules into core anymore
* constrain core's virtual heap memory area
* differentiate in between user's and core's main thread's UTCB,
  which now resides inside the kernel segment

Ref #2091
2017-10-19 13:31:17 +02:00
Alexander Boettcher
be753ee863 tool: add genode xml schema to xmllint check
Fixes #2513
2017-10-05 17:40:03 +02:00
Norman Feske
f04ef8ed40 run: align data after last boot module
In the image.elf file, the very last boot module is followed
by arbitrary other core-local data. Since those boot modules are
exported as page-granular dataspace to the outside of core via core's
ROM service, we need to ensure that the last page is padded with zeros.
2017-10-05 17:40:03 +02:00
Norman Feske
ab0b0ac3a0 run: compress image.elf in NOVA boot dir 2017-10-05 17:40:02 +02:00
Emery Hemingway
9bfc29e456 tool/run: Wake On Lan support
Fix #2509
2017-09-07 11:47:15 +02:00
Sebastian Sumpf
7113c17100 run: update RISC-V run script support
* fix build error for bbl upon intial build
* set memory to 128 MB in spike
* support 'forever' timeout

issue #2423
2017-08-30 09:59:59 +02:00
Christian Prochaska
ee352abc56 run: add Xen support
When building Genode on a Linux system running in a Xen Dom0, the 'xen'
run target can run a Genode scenario in a Xen DomU.

Usage: in build/x86_*/etc/build.conf, define:

RUN_OPT = --include boot_dir/$(KERNEL) --include image/iso --include power_on/xen --include log/xen --include power_off/xen

The Xen DomU runs in HVM mode and loads Genode from an ISO image. Serial
log output is printed to the console and graphical output is shown in an
SDL window.

The Xen DomU ist managed using the 'xl' command line tool and it is
possible to add configuration options in the 'xen_args' variable in a run
script. Common options are:

- disabling the graphical output:

  append xen_args { sdl="0" }

- configuring a network device:

  append xen_args { vif=\["model=e1000,mac=02:00:00:00:01:01,bridge=xenbr0"\] }

- configuring USB input devices:

  append xen_args { usbdevice=\["mouse","keyboard"\] }

Note: the 'xl' tool requires super-user permissions and interactive
password input can be troublesome in combination with 'expect' and is not
practical for automatic tests. For this reason, the current implementation
assumes that no password input is needed when running 'sudo xl', which can
be achieved by creating a file '/etc/sudoers.d/xl' with the content
'user ALL=(root) NOPASSWD: /usr/sbin/xl'
(where 'user' is the Linux user name).

Fixes #2504
2017-08-28 16:49:48 +02:00
Alexander Boettcher
4ac0bd514f sel4: add uefi boot support via mbi2
Multiboot2 provides the ACPI RSDP pointer from the GRUB2 bootloader.

Issue #2242
2017-08-28 16:49:47 +02:00
Alexander Boettcher
972031cbbc hw: add UEFI boot support
via grub2 using multiboot 2

Issue #2242
2017-08-28 16:49:44 +02:00
Norman Feske
3e8c4ebde2 run: concatenate 'install_config' args
This patch enables one to supply a list of arguments to
'install_config'. The arguments appear concatenated in the resulting
config file. This is useful for embedding dynamically generated content
into an otherwise static configuration. For example, in the following
config, the 'pkg' attribute of the '<query>' config node is defined by
the return value of the 'query_pkg' function:

  install_config {
  <config>
    ...
    <start name="depot_query">
      ...
      <config>
        <query pkg="genodelabs/pkg/} [query_pkg] {"/>
      </config>
    </start>
  </config>}
2017-08-28 16:49:38 +02:00
Norman Feske
5f4ca67cf9 run: add create_tar_from_depot_binaries function
This function can be used to mirror parts of the depot to be used at
runtime.
2017-08-28 16:49:37 +02:00
Norman Feske
3e95a42fae depot: remove bin/<arch>/<api-version> subdir
Fixes #2459
2017-08-28 16:49:37 +02:00
Alexander Senier
c1a46c29b0 run: use absolute path for symlinks in linux run dir
The relative path results in dangling symlinks if the run script
is located in a subdirectory below run/

Fixes #2478
2017-08-18 10:24:48 +02:00
Josef Söntgen
0dd9c6a018 run: add error checking to power on step 2017-08-17 11:04:24 +02:00
Alexander Boettcher
da5441292a sel4: add Wandboard Quad (iMX6) support
Issue #2451
2017-08-17 11:04:21 +02:00
Alexander Boettcher
92db5d2c4e sel4: limit max relocation memory to 256M
relocation is required, to avoid overlapping phdr in the elf binaries, but
sel4 will fail to boot if bender relocates the images at the end of physical
memory. Limit the physical relocation address to a fixed 256M value, so that
sel4 will work.

Issue #2451
2017-08-17 11:04:19 +02:00
Alexander Boettcher
95329c82e2 sel4: update to 5.2.0
Issue #2451
2017-08-17 11:04:19 +02:00
Norman Feske
19f7d11f1a tool/run: select 'arm_v7a' depot archives
The former use of 'arm_v7' as architecture was too unspecific. Depot
binary archives for Cortex-A8/A9 platforms should be generated for
the 'arm_v7a' architecture to define the required compile flags
(i.e., -march).
2017-06-29 12:00:02 +02:00
Alexander Boettcher
7673fed1f1 nova: avoid copying core.o to image file 2017-06-29 11:59:56 +02:00
Alexander Boettcher
9f9c5a3166 tool: qemu support for UEFI boot
- add UEFI firmware for Qemu

Issue #2242
2017-06-29 11:59:51 +02:00
Alexander Boettcher
3aca3256c6 tool: support image/uefi for grub2/uefi boot
- add x86_32/64 GRUB2 UEFI boot loader
- enable support for nova

Issue #2242
2017-06-29 11:59:51 +02:00
Christian Helmuth
d6e41ae7e3 foc: do not accidentally delete boot directory
This partially reverts commit 7f7f8063dd
and adds the eager creation of the expected ARM boot directory.
2017-06-19 12:35:56 +02:00
Sebastian Sumpf
c3cf7f3c3a riscv: ISA-1.9.1 and GCC-6.3.0 adaptions
Adds 1.9.1 support to base-hw

Note:
* the kernel timer is not working
* dynamic linking is currently not supported
2017-05-31 13:16:24 +02:00
Sebastian Sumpf
6c95eb9aff base-hw: RISC-V BBL
The Berkley Boot Loader handles kernel loading and machine mode
2017-05-31 13:16:24 +02:00
Adrian-Ken Rueegsegger
923fbc9e86 Update Muen port
- Adjust Muen RUN_OPTs
- Update documentation
- Checkout required submodule
2017-05-31 13:16:22 +02:00
Stefan Kalkowski
0fb672b493 run: use default Qemu memory size for x86
Fix #2428
2017-05-31 13:16:19 +02:00
Martin Stein
228dbdd527 run + noux_gdb: fix source archiving
We do not have debug symbols in the bin/ binaries anymore. Thus, use the
debug/ binaries instead.  We now have kernel specific binary names for
ld.lib.so and some others. Adapt, to this fact as well.  For doing so
without unnecessary output, provide a new parameter "silent" at the
"kernel_specific_binary" procedure.

Ref #2398
2017-05-31 13:16:16 +02:00
Stefan Kalkowski
9e3fc9414f foc: update to recent revision r72 (fix #2405) 2017-05-31 13:16:08 +02:00
Martin Stein
91a8c8975d run: provide core image with path information
Previously, the debugging version of the core image
(<build_dir>/var/run/<run_name>.core) was created by the run tool from
the common core object file
(<build_dir>/var/run/<run_name>/core-<kernel>.o). This object file,
however, was already stripped by the build system and thus didn't
contain debug info anymore. The build system also creates an unstripped
version in <build_dir>/debug/core-<kernel>.o, so we now use this one
for <build_dir>/var/run/<run_name>.core.

Ref #2254
2017-05-31 13:16:07 +02:00
Norman Feske
015d319fa7 run: link all files in [run_dir]/genode to core
This way, files copied from the depot are incorporated in addition to
the files explicitly specified as boot modules.

The patch also adds an automatic check for the validity of the XML
syntax of boot modules ending with '.config'.

Issue #2339
2017-05-31 13:15:56 +02:00
Norman Feske
a196fc171a run: support for accessing depot content
Run scripts can use the new 'import_from_depot' function to incorporate
archive content from the depot into a scenario. The function must be
called after the 'create_boot_directory' function and takes any number
of pkg, src, or raw archives as arguments. An archive is specified as
depot-relative path of the form <user>/<type>/name. Run scripts may
call 'import_from_depot' repeatedly.

An argument can refer to a specific version of an archive or just the
version-less archive name. In the latter case, the current version (as
defined by a corresponding archive recipe in the source tree) is used.

If a 'src' archive is specified, the run tool integrates the content of
the corrsponding binary archive into the scenario. The binary archives
are selected according the spec values as defined for the build directory.
As of now, only x86_32 and x86_64 are supported by the 'depot_spec'
function.

Issue #2339
2017-05-31 13:15:56 +02:00
Norman Feske
50c53a23eb foc,fiasco: symlink kernel files to bin/ 2017-05-31 13:15:54 +02:00
Norman Feske
ece67ca174 pistachio: symlink kernel files to bin/
This enables us to pick all relevant parts for assembling a binary
archive for the kernel from bin/.
2017-05-02 15:29:03 +02:00
Norman Feske
8c4a2a48ca core: install core-<kernel>.o at bin/
By installing the core object to bin/, we follow the same convention as
for regular binaries. This, in turn, enables us to ship core in a
regular binary archive. The patch also adjusts the run tool to pick up
the core object from bin/ for the final linking stage.
2017-05-02 15:29:02 +02:00
Stefan Kalkowski
62c59a56d1 tool: enable PXE loading of muen boot images
Fix #2358
2017-05-02 15:28:54 +02:00
Stefan Kalkowski
79143f6782 tool/boot: add chain_loader 'unzip'
'unzip' can uncompress and load raw multiboot images and ELF files.

Usage together with the PXE bootloader ease life running the muen hypervisor
together with a Genode/x86_64 VM, where the raw boot image is typically quite
large.

Ref #2358
2017-05-02 15:28:54 +02:00
Christian Helmuth
62e605325e run: support variable arguments in append_if
This enables to use append_if like the append command in the following
situation.

  proc optional_binary {} {...}

  append_if $optional config {
    <start name="} [optional_binary] {">
    ...
  }
2017-03-15 12:32:26 +01:00
Sebastian Sumpf
c1f4dad811 base-pistachio: use PIT in Genode timer
on x86_32

issue #2308
2017-03-15 12:32:26 +01:00
Alexander Boettcher
1ee32ac4f4 tool/log/amt: use wsman if matches --amt-tool
Fixes #2277
2017-03-15 12:24:41 +01:00
Alexander Boettcher
f272637655 tool: deny to run on qemu version with SVM broken 2017-02-28 12:59:27 +01:00
Martin Stein
ed370a8f5c Introduce gpio_drv function in run scripts
Do not use automatic alias in the run tool for the name of the
gpio-driver binary.

Ref #2268
2017-02-23 14:54:50 +01:00
Alexander Boettcher
54865fdd0f Provide copy of config file of a run scenario
Fixes #2213
2017-02-23 14:54:44 +01:00
Stefan Kalkowski
cf943dac65 hw: bootstrap into kernel
Put the initialization of the cpu cores, setup of page-tables, enabling of
MMU and caches into a separate component that is only used to bootstrap
the kernel resp. core.

Ref #2092
2017-02-23 14:54:42 +01:00
Stefan Kalkowski
bb10afa266 tool/run: define core link address explicitly
Instead of implicitly asking for core's link address when linking
core within the run tool, deliver it explicitly to the build_core
routine. Thereby we gain the freedom to use the build_core tool for
different targets like core, and bootstrap.

Ref #2092
2017-02-07 19:20:30 +01:00
Martin Stein
b26988feeb gpio_drv: get rid of specs foc_rpi and hw_rpi
Ref #2268
2017-02-07 11:12:29 +01:00
Martin Stein
7f7f8063dd run/boot_dir/foc: avoid error on link creation
In combination with run/image/uboot, run/boot_dir/foc expected a file link it
created itself to be a directory by trying to create another file link inside
it.

Ref #1987
2017-01-31 12:01:16 +01:00
Reto Buerki
eec2cb34f8 Replace have_spec hw_x86_64_muen with have_spec muen 2017-01-20 16:46:59 +01:00
Alexander Boettcher
5034acc109 tool/tftp: make bender/pulsar readable by default 2017-01-13 13:07:11 +01:00
Stefan Kalkowski
3886686b83 hw: get rid of global makefiles specific to hw
This commit mostly removes the globally visible NR_OF_CPUS define
from the global makefile specifiers defined in the base-hw repository.
Whereever necessary it adds platform specific makefiles to the base
repository when they were missing.

Ref #2190
2017-01-13 13:06:55 +01:00
Norman Feske
1e41c2dbe9 Remove redundant boot modules from boot image
Fixes #2185
2016-12-23 16:52:09 +01:00
Norman Feske
c450ddcb3d Disambiguate kernel-specific file names
This patch removes possible ambiguities with respect to the naming of
kernel-dependent binaries and libraries. It also removes the use of
kernel-specific global side effects from the build system. The reach of
kernel-specific peculiarities has thereby become limited to the actual
users of the respective 'syscall-<kernel>' libraries.

Kernel-specific build artifacts are no longer generated at magic places
within the build directory (like okl4's includes, or the L4 build
directories of L4/Fiasco and Fiasco.OC, or the build directories of
various kernels). Instead, such artifacts have been largely moved to the
libcache. E.g., the former '<build-dir>/l4/' build directory for the L4
build system resides at '<build-dir>/var/libcache/syscall-foc/build/'.
This way, the location is unique to the kernel. Note that various tools
are still generated somewhat arbitrarily under '<build-dir>/tool/' as
there is no proper formalism for building host tools yet.

As the result of this work, it has become possible to use a joint Genode
build directory that is usable with all kernels of a given hardware
platform. E.g., on x86_32, one can now seamlessly switch between linux,
nova, sel4, okl4, fiasco, foc, and pistachio without rebuilding any
components except for core, the kernel, the dynamic linker, and the timer
driver. At the current stage, such a build directory must still be
created manually. A change of the 'create_builddir' tool will follow to
make this feature easily available.

This patch also simplifies various 'run/boot_dir' plugins by removing
the option for an externally hosted kernel. This option remained unused
for many years now.

Issue #2190
2016-12-23 16:51:32 +01:00
Norman Feske
44df8db771 Disambiguate names of timer drivers
Issue #2190
2016-12-23 16:50:33 +01:00
Norman Feske
f54c85e045 Genode application binary interface (ABI)
This patch decouples the kernel-specific implementation of the dynamic
linker from its kernel-agnostic binary interface. The name of the
kernel-specific dynamic linker binary now corresponds to the kernel,
e.g., 'ld-linux.lib.so' or 'ld-nova.lib.so'. Applications are no longer
linked directly against a concrete instance of the dynamic linker but
against a shallow stub called 'ld.lib.so'. This stub contains nothing
but the symbols provided by the dynamic linker. It thereby represents
the Genode ABI.

At system-integration time, the kernel-specific run/boot_dir back ends
integrate the matching the kernel-specific variant of the dynamic linker
as 'ld.lib.so' into the boot image.

The ABI symbol file for the dynamic linker is located at
'base/lib/symbols/ld'. It contains the joint ABI of all supported
architectures. The new utility 'tool/abi_symbols' eases the creation of
such an ABI symbol file for a given shared library. Its result should be
manually inspected and edited as needed.

The patch removes the 'syscall' library from 'base_libs.mk' to avoid
polluting the kernel-agnostic ABI with kernel-specific interfaces.

Issue #2190
Issue #2195
2016-12-23 16:50:28 +01:00