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-10 00:30:38 +00:00
|
|
|
#
|
|
|
|
# Create prerequisites for building Genode for Fiasco.OC
|
|
|
|
#
|
|
|
|
# Prior building Genode programs for Fiasco.OC, the kernel bindings must be
|
|
|
|
# generated. This is done by building a minimalistic subset of the original
|
|
|
|
# userland (L4re) that comes with Fiasco.OC.
|
|
|
|
#
|
|
|
|
|
|
|
|
L4_SRC_DIR := $(call select_from_ports,foc)/src/kernel/foc
|
2021-01-13 09:15:10 +00:00
|
|
|
L4_BUILD_DIR := $(shell pwd)/build
|
|
|
|
L4_BIN_DIR := $(LIB_CACHE_DIR)/syscall-foc-$(BOARD)/build/bin/$(L4_ARCH)
|
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-10 00:30:38 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Create mirror for architecture-specific L4sys header files
|
|
|
|
#
|
|
|
|
L4_INC_TARGETS += l4/sys \
|
|
|
|
l4f/l4/sys \
|
|
|
|
l4/sigma0 \
|
2018-06-26 09:23:33 +00:00
|
|
|
l4/cxx
|
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-10 00:30:38 +00:00
|
|
|
|
|
|
|
CC_OPT += -Iinclude
|
|
|
|
|
|
|
|
include/%:
|
|
|
|
$(VERBOSE)mkdir -p $(dir $@)
|
|
|
|
$(VERBOSE)ln -sf $(L4_BUILD_DIR)/include/$* $@
|
|
|
|
|
|
|
|
#
|
|
|
|
# Use 'regparm=0' call instead of an inline function, when accessing
|
|
|
|
# the utcb. This is needed to stay compatible with L4linux
|
|
|
|
#
|
2018-06-26 09:23:33 +00:00
|
|
|
CC_OPT += -DL4SYS_USE_UTCB_WRAP=1 -Wno-unused-function
|
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-10 00:30:38 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Create L4 build directory
|
|
|
|
#
|
|
|
|
# Resetting the 'MAKEFLAGS' is important because otherwise, the L4
|
|
|
|
# build system will stuble over predefined variables, i.e., 'LIB'
|
|
|
|
#
|
|
|
|
$(L4_BUILD_DIR)/.kconfig:
|
2022-03-10 14:25:50 +00:00
|
|
|
$(VERBOSE_MK) \
|
2017-04-21 13:38:41 +00:00
|
|
|
MAKEFLAGS= $(MAKE) $(VERBOSE_DIR) -C $(L4_SRC_DIR)/l4 \
|
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-10 00:30:38 +00:00
|
|
|
B=$(L4_BUILD_DIR) DROPSCONF_DEFCONFIG="$(L4_CONFIG)" \
|
2015-01-20 09:51:32 +00:00
|
|
|
VERBOSE="$(VERBOSE)" CROSS_COMPILE="$(CROSS_DEV_PREFIX)" \
|
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-10 00:30:38 +00:00
|
|
|
2>&1 | sed "s/^/ [l4build] /"
|
|
|
|
|
2015-01-20 09:51:32 +00:00
|
|
|
PKGS := l4re-core/ldscripts \
|
|
|
|
l4re-core/libgcc-pure \
|
|
|
|
l4re-core/l4sys \
|
|
|
|
l4re-core/libgcc \
|
2018-06-26 09:23:33 +00:00
|
|
|
l4re-core/libsigma0 \
|
|
|
|
l4re-core/crtn \
|
|
|
|
l4re-core/uclibc-headers \
|
|
|
|
l4re-core/l4util \
|
|
|
|
l4re-core/cxx
|
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-10 00:30:38 +00:00
|
|
|
|
|
|
|
include $(REP_DIR)/lib/mk/l4_pkg.inc
|
|
|
|
|
|
|
|
$(PKG_TAGS): $(L4_BUILD_DIR)/.kconfig
|
|
|
|
$(PKG_TAGS): $(addprefix include/,$(L4_INC_TARGETS))
|
|
|
|
|
|
|
|
#
|
|
|
|
# Compile 'syscall-foc.lib.a' not before the 'PKGS' are completely built
|
|
|
|
#
|
|
|
|
$(SRC_S) $(SRC_C) : $(PKG_TAGS)
|
2017-04-18 12:24:31 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Install sigma0 and bootstap to <build-dir>/bin such that the binaries will be
|
|
|
|
# included in the depot's base-foc binary archives.
|
|
|
|
#
|
|
|
|
ifneq ($(INSTALL_DIR),)
|
2019-05-09 12:04:03 +00:00
|
|
|
all: $(INSTALL_DIR)/sigma0-foc-$(BOARD) $(INSTALL_DIR)/bootstrap-foc-$(BOARD)
|
2017-04-18 12:24:31 +00:00
|
|
|
|
2019-05-09 12:04:03 +00:00
|
|
|
$(INSTALL_DIR)/sigma0-foc-$(BOARD) $(INSTALL_DIR)/bootstrap-foc-$(BOARD): $(PKG_TAGS)
|
2017-04-18 12:24:31 +00:00
|
|
|
|
2019-05-09 12:04:03 +00:00
|
|
|
$(INSTALL_DIR)/sigma0-foc-$(BOARD):
|
2017-04-18 12:24:31 +00:00
|
|
|
$(VERBOSE)ln -sf $(L4_BIN_DIR)/l4f/sigma0 $@
|
|
|
|
|
2019-05-09 12:04:03 +00:00
|
|
|
$(INSTALL_DIR)/bootstrap-foc-$(BOARD):
|
2017-04-18 12:24:31 +00:00
|
|
|
$(VERBOSE)ln -sf $(L4_BIN_DIR)/bootstrap $@
|
|
|
|
endif
|
|
|
|
|
|
|
|
|