Commit Graph

29 Commits

Author SHA1 Message Date
Christian Prochaska
1720d2d86d tool_chain: update GCC to version 8.3.0
Issue #3307
2019-05-27 14:46:54 +02:00
Stefan Kalkowski
a1e70b9ba4 kernel: differentiate board-specific components
Components like kernel, core, and bootstrap that are built for a
specific board need to reside inside the same architectural dependent
build directory. For instance there are sel4, foc, and hw kernel builds
for imx6q_sabrelite and imx7d_sabre, which have to reside inside the same
arm_v7 build directory.
This commit names those components explicitely, and adapts the run-tool to it.

Fix #3316
2019-05-27 14:46:52 +02:00
Stefan Kalkowski
c43267dbaa tool: deprecate board-specific build directories
* Introduces BOARD variable to determine actual board
* Removes formerly deprecated kernel-specific build directories

The following boards are available:

arm_v6: rpi
arm_v7a: arndale, imx53_qsb, imx53_qsb_tz, imx6q_sabrelite, imx7d_sabre,
         nit6_solox, odroid_x2, odroid_xu, panda, pbxa9, usb_armory,
         wand_quad, zynq_qemu
x86_64: pc, linux, muen
x86_32: pc, linux
riscv:  spike

Ref #3316
2019-05-27 14:46:29 +02:00
Norman Feske
a3411c8e96 run: add --depot-auto-update feature
If enabled, this option triggers the automated management of depot
content according to the needs of a run script.

Fixes #3270
2019-04-09 12:30:34 +02:00
Alexander Boettcher
8199b3e685 tool: support static clang analyzer in build.mk
Issue #3022
2018-11-29 11:46:02 +01:00
Christian Helmuth
65b2e63bb9 Ensure stable sorting order in tools
This eliminates certain surprises with port contents and depot hashes.
2017-11-06 13:57:25 +01:00
Christian Prochaska
58f2088d3e gcc: update to version 6.3.0
Issue #2372
2017-05-31 13:15:49 +02:00
Norman Feske
8f27babf16 mk: strip binaries at <build-dir>/bin/
The <build-dir>/bin/ directory used to contain symbolic links to the
unstripped build results. However, since the upcoming depot tool
extracts the content of binary archives from bin/, the resulting
archives would contain overly large unstripped binaries, which is
undesired. On the other hand, always stripping the build results is not
a good option either because we rely of symbol information during
debugging.

This patch changes the installation of build results such that a new
'debug/' directory is populated besides the existing 'bin/' directory.
The debug directory contains symbolic links to the unstripped build
results whereas the bin directory contains stripped binaries that are
palatable for packaging (depot tool) and for assembling boot images (run
tool).
2017-05-02 15:29:03 +02: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
c090bf7fce mk: always consider spec files in repos/base 2016-07-15 11:38:27 +02:00
Norman Feske
a025ff9237 build.mk: don't search target.mk files w/o src dir
Let the build system skip the search for target.mk files in repositories
that don't have a src/ directory.
2016-07-15 11:38:26 +02:00
Norman Feske
a15a86b024 Build-system support for building a single library
This patch equips the build system with the feature of building an
individual library with its dependencies by specifying the library
as 'LIB' argument. E.g., 'make LIB=libc' builds the libc.
2016-07-15 11:38:25 +02:00
Norman Feske
eb4c6c0456 build.mk: suggest verbatim prepare_port command
If ports need preparation in order to execute a run script, use the
knowledge about the actual genode directory to suggest a command to the
user that can be directly copied to the command line.
2016-03-17 17:02:04 +01:00
Martin Stein
ff10687a6c toolchain: report missing ports at once
Previously, ports that were needed for a scenario and that were not
prepared or outdated, triggered one assertion each during the second
build stage. The commit slots a mechanism in ahead that gathers all
these ports during the first build stage and reports them in form of a
list before the second build stage is entered.  This list can be used
directly as argument for tool/ports/prepare_port to prepare respectively
update the ports. If, however, this mechanism is not available, for
example because a target is build without the first build stage, the old
assertion still prevents the target from running into troubles with a
missing port.

Fixes #1872
2016-03-07 12:34:43 +01: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
ae43d13b90 Remove always_hybrid spec
With always_hybrid also the lx_hybrid_x86 platform in
tool/create_builddir vanishes.

Fixes #1619
2015-09-09 15:14:27 +02:00
Christian Helmuth
5514671630 Improve error message on wrong tool chain (fix #1642)
Following the proposal of @jameysharp.
2015-08-21 10:59:45 +02:00
Christian Prochaska
197be2602f Check if the required GCC version is used
Fixes #1531
2015-05-26 09:40:03 +02:00
Josef Söntgen
e3c37f43a0 build.mk: remove RUN_ENV usage 2015-01-26 12:28:41 +01:00
Josef Söntgen
c706b1c0a7 run: modularize run tool 2015-01-26 12:28:40 +01: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
ba291bcc57 build system: Back out on error at libdep stage 2014-05-27 11:14:41 +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
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
Torsten Hilbrich
6b33757154 build.mk: Add dependency for init_libdep_file on directory
This should ensure that the directory is created before trying to
create a file within it.

This hopefully fixes errors like the following when using parallel
builds:

checking library dependencies...
/bin/bash: line 19: var/libdeps: No such file or directory
make[5]: *** [init_libdep_file] Error 1
2012-12-05 13:55:28 +01:00
Christian Prochaska
c99dd8fdf8 Use 'CURDIR' make variable in Genode make files
The bash-builtin 'pwd' command uses the 'st_dev' and 'st_ino' members of
the 'stat' struct to compare the path from the 'PWD' environment variable
with the path returned by 'getcwd()'. These members don't get set
correctly in Noux and therefore the 'pwd' command sometimes returns wrong
results when building Genode in Noux. With this patch the 'CURDIR' make
variable gets used instead of calling 'pwd'.

Fixes #454.
2012-11-03 09:54:14 +01:00
Christian Prochaska
1483f1032d Remove broken compiler check
The 'build.mk' file checks if the tool chain to be used supports the
'-static' and '-fno-stack-protector' flags, but this check always fails
for the current Genode tool chain because it cannot create executable
files without explicitly specifying the 'crt0' and library files to be
linked, which the check doesn't.

This patch removes the compiler check.

Fixes #358.
2012-09-24 09:18:00 +02:00
Norman Feske
75aba75ff8 Support proper shadowing of target.mk files
The build system overlays multiple source trees (repositories) such that
they can shadow libraries and include search paths. This patch extends
the shadowing concept to build targets. Furthermore, it streamlines the
build stage for generating library depenencies, reducing the processing
time of this stage by 10-20 percent. Fixes #165.
2012-03-28 20:14:54 +02:00
Genode Labs
da4e1feaa5 Imported Genode release 11.11 2011-12-22 16:19:25 +01:00