mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-26 00:41:08 +00:00
253097314c
This patch makes the benefit of the recently introduced unified Genode ABI available to developers by enabling the use of multiple kernels from within a single build directory. The create_builddir tool has gained a new set of kernel-agnostic platform arguments such as x86_32, or panda. Most build targets within directories are in principle compatible with all kernels that support the selected hardware platform. To execute a scenario via the run tool, one has to select the kernel to use by setting the 'KERNEL' argument in the build configuration (etc/build.conf). Alternatively, the 'KERNEL' can be specified as command-line argument of the Genode build system, e.g.: make run/log KERNEL=nova This allows us to easily switch from one kernel to another without rebuilding any Genode component except for the very few kernel-specific ones. The new version of the 'create_builddir' tool is still compatible with the old version. The old kernel-specific build directories can still be created. However, those variants will eventually be removed. Note that the commit removes the 'ports-foc' repository from the generated 'build.conf' files. As this is only meaningful for 'foc', I did not want to include it in the list of regular repositories (as visible in a 'x86_32' build directory). Hence, the repository must now be manually added in order to use L4Linux. Issue #2190
51 lines
1.4 KiB
PHP
51 lines
1.4 KiB
PHP
FOC_BUILD_DIR = $(shell pwd)/build
|
|
FOC = $(FOC_BUILD_DIR)/foc
|
|
FOC_SRC := $(call select_from_ports,foc)/src/kernel/foc/kernel/fiasco
|
|
|
|
KERNEL_BUILD_OUTPUT_FILTER = 2>&1 | sed "s/^/ [fiasco.oc] /"
|
|
|
|
MAKEOVERRIDES := $(filter-out KERNEL=%,$(MAKEOVERRIDES))
|
|
unexport KERNEL
|
|
|
|
$(FOC_BUILD_DIR):
|
|
$(VERBOSE_MK) $(MAKE) SYSTEM_TARGET="$(CROSS_DEV_PREFIX)" \
|
|
$(VERBOSE_DIR) -C $(FOC_SRC) BUILDDIR=$@ \
|
|
$(KERNEL_BUILD_OUTPUT_FILTER)
|
|
$(VERBOSE)cp $(KERNEL_CONFIG) $@/globalconfig.out
|
|
|
|
$(FOC): $(FOC_BUILD_DIR)
|
|
$(VERBOSE_MK) $(MAKE) SYSTEM_TARGET="$(CROSS_DEV_PREFIX)" \
|
|
CC="$(CC)" CXX="$(CXX)" \
|
|
$(VERBOSE_DIR) -C $(FOC_BUILD_DIR) \
|
|
$(KERNEL_BUILD_OUTPUT_FILTER)
|
|
$(VERBOSE)touch $@
|
|
|
|
#
|
|
# Sigma0 and bootstrap are provided as L4 packages
|
|
#
|
|
# We build them within the L4 build directory created by the 'syscall-fiasco'
|
|
# library.
|
|
#
|
|
|
|
LIBS += syscall-foc
|
|
|
|
PKGS := uclibc-headers \
|
|
uclibc-minimal \
|
|
l4util \
|
|
cxx \
|
|
sigma0 \
|
|
drivers-frst/include drivers-frst/of drivers-frst/uart \
|
|
bootstrap
|
|
|
|
L4_BUILD_DIR := $(LIB_CACHE_DIR)/syscall-foc/build
|
|
|
|
include $(REP_DIR)/lib/mk/l4_pkg.inc
|
|
|
|
#
|
|
# Execute the rules in this file only at the second build stage when we know
|
|
# about the complete build settings, e.g., 'CROSS_DEV_PREFIX'.
|
|
#
|
|
ifeq ($(called_from_lib_mk),yes)
|
|
all: $(FOC)
|
|
endif
|