Add unified build directories to create_builddir

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
This commit is contained in:
Norman Feske
2016-12-21 08:16:12 +01:00
parent 9ea4a491d6
commit 253097314c
71 changed files with 339 additions and 412 deletions

View File

@@ -0,0 +1,3 @@
# enable parallel build
#MAKE += -j4

View File

@@ -0,0 +1,14 @@
##
## Qemu arguments, effective when using the run tool's 'power_on/qemu' back end
##
# enable GDB stub
#QEMU_OPT += -s
# use time-tested graphics backend
QEMU_OPT += -display sdl
# add kernel-specific Qemu arguments
QEMU_OPT += $(QEMU_OPT(${KERNEL})}

View File

@@ -0,0 +1,20 @@
##
## Qemu arguments, effective when using the run tool's 'power_on/qemu' back end
##
# enable GDB stub
#QEMU_OPT += -s
# prevent Qemu from using KVM
QEMU_OPT += -no-kvm
# use time-tested graphics backend
QEMU_OPT += -display sdl
# use machine model that supports nested virtualization
QEMU_OPT(nova) += -cpu core2duo
# add kernel-specific Qemu arguments
QEMU_OPT += $(QEMU_OPT(${KERNEL})}

View File

@@ -1,4 +1,22 @@
##
## Kernel-specific repository
##
ifdef KERNEL
REPOSITORIES += $(GENODE_DIR)/repos/base-$(KERNEL)
endif
##
## Repositories needed for the default demo scenario
##
REPOSITORIES += $(GENODE_DIR)/repos/base
REPOSITORIES += $(GENODE_DIR)/repos/os
REPOSITORIES += $(GENODE_DIR)/repos/demo
##
## Optional repositories
##
@@ -36,9 +54,11 @@
#REPOSITORIES += $(GENODE_DIR)/repos/gems
#
# Genode world repository
# Collection of community-maintained components
#
# Collection of community-maintained components available at
# https://github.com/genodelabs/genode-world.git
# Please follow the instructions provided at:
#
# https://github.com/genodelabs/genode-world
#
#REPOSITORIES += $(GENODE_DIR)/repos/world

View File

@@ -1,4 +1,3 @@
#
# Drivers ported from the OpenBSD
#
@@ -8,3 +7,4 @@
# Drivers ported from iPXE
#
#REPOSITORIES += $(GENODE_DIR)/repos/dde_ipxe

View File

@@ -0,0 +1,5 @@
##
## Run-tool configuration
##

View File

@@ -0,0 +1,4 @@
ifdef KERNEL
RUN_OPT += ${KERNEL_RUN_OPT(${KERNEL})} --include boot_dir/$(KERNEL)
endif

View File

@@ -0,0 +1,3 @@
# kernel to use
KERNEL ?= fiasco

View File

@@ -0,0 +1,3 @@
# kernel to use
KERNEL ?= foc

View File

@@ -0,0 +1,3 @@
# kernel to use
KERNEL ?= hw

View File

@@ -0,0 +1,3 @@
# kernel to use (hw or foc)
KERNEL ?= hw

View File

@@ -1,4 +1,6 @@
REPOSITORIES = $(GENODE_DIR)/repos/base-linux
# kernel to use
KERNEL ?= linux
##
## Kernel-specific run tool configuration
@@ -6,3 +8,4 @@ REPOSITORIES = $(GENODE_DIR)/repos/base-linux
RUN_OPT = --include boot_dir/linux \
--include power_on/linux --include log/linux

View File

@@ -0,0 +1,3 @@
# kernel to use
KERNEL ?= nova

View File

@@ -0,0 +1,3 @@
# kernel to use
KERNEL ?= okl4

View File

@@ -0,0 +1,3 @@
# kernel to use
KERNEL ?= pistachio

View File

@@ -0,0 +1,3 @@
# kernel to use
KERNEL ?= sel4

View File

@@ -0,0 +1,3 @@
# kernel to use (nova, linux, sel4, foc, okl4, fiasco, or pistachio)
#KERNEL ?= nova

View File

@@ -0,0 +1,3 @@
# kernel to use (nova, hw, linux, or foc)
#KERNEL ?= nova

View File

@@ -0,0 +1,4 @@
# local varible for run-tool arguments that depend on the used kernel
KERNEL_RUN_OPT(hw) := $(QEMU_RUN_OPT)
KERNEL_RUN_OPT(foc) := $(QEMU_RUN_OPT)

View File

@@ -0,0 +1,3 @@
# local varible for run-tool arguments that depend on the used kernel
KERNEL_RUN_OPT(hw) := $(QEMU_RUN_OPT)

View File

@@ -1,4 +1,3 @@
REPOSITORIES += $(GENODE_DIR)/repos/base-hw
##
## Kernel-specific run tool configuration
@@ -11,6 +10,7 @@ RUN_OPT = --include boot_dir/hw --include image/muen
#
# The specified file must be relative to the Muen policy directory or an
# absolute path.
#
RUN_OPT += --image-muen-hardware platform/lenovo-t430s.xml
#
@@ -28,13 +28,15 @@ RUN_OPT += --image-muen-spark-path /opt/spark
#
# The specified file must be relative to the Muen policy directory or an
# absolute path.
#
RUN_OPT += --image-muen-system xml/genode-base_hw.xml
#
# Muen system components
#
# Available components are located in the Muen project directory 'components/'.
RUN_OPT += --image-muen-components 'libdebuglog libmutime dbgserver sm tau0 time'
#
RUN_OPT += --image-muen-components 'dbgserver sm tau0 time'
#
# External Muen build
@@ -42,4 +44,6 @@ RUN_OPT += --image-muen-components 'libdebuglog libmutime dbgserver sm tau0 time
# Specifies if the Muen kernel should be built automatically.
# If the Muen system is built and integrated externally, i.e. outside
# of the Genode build system, set this parameter to 1.
#
RUN_OPT += --image-muen-external-build 0

View File

@@ -0,0 +1,7 @@
##
## Run tool configuration
##
RUN_OPT = --include power_on/spike --include log/spike

View File

@@ -0,0 +1,9 @@
# local varible for run-tool arguments that depend on the used kernel
KERNEL_RUN_OPT(nova) := $(QEMU_RUN_OPT)
KERNEL_RUN_OPT(sel4) := $(QEMU_RUN_OPT)
KERNEL_RUN_OPT(foc) := $(QEMU_RUN_OPT)
KERNEL_RUN_OPT(okl4) := $(QEMU_RUN_OPT)
KERNEL_RUN_OPT(fiasco) := $(QEMU_RUN_OPT)
KERNEL_RUN_OPT(pistachio) := $(QEMU_RUN_OPT)
KERNEL_RUN_OPT(linux) := --include power_on/linux --include log/linux

View File

@@ -0,0 +1,6 @@
# local varible for run-tool arguments that depend on the used kernel
KERNEL_RUN_OPT(nova) := $(QEMU_RUN_OPT)
KERNEL_RUN_OPT(hw) := $(QEMU_RUN_OPT)
KERNEL_RUN_OPT(foc) := $(QEMU_RUN_OPT)
KERNEL_RUN_OPT(linux) := --include power_on/linux --include log/linux

View File

@@ -0,0 +1,3 @@
# local variable for run-tool arguments used for running scenarios in Qemu
QEMU_RUN_OPT := --include power_on/qemu --include log/qemu

View File

@@ -0,0 +1,3 @@
# local variable for run-tool arguments used for running scenarios in Qemu
QEMU_RUN_OPT := --include power_on/qemu --include log/qemu --include image/iso

View File

@@ -1 +0,0 @@

View File

@@ -1,7 +0,0 @@
REPOSITORIES = $(GENODE_DIR)/repos/base-fiasco
##
## Kernel-specific run tool configuration
##
RUN_OPT = --include boot_dir/fiasco \
--include power_on/qemu --include log/qemu --include image/iso

View File

@@ -1,8 +0,0 @@
##
## Repositories needed for the default demo scenario
##
REPOSITORIES += $(GENODE_DIR)/repos/base
REPOSITORIES += $(GENODE_DIR)/repos/os
REPOSITORIES += $(GENODE_DIR)/repos/demo

View File

@@ -1,7 +0,0 @@
REPOSITORIES += $(GENODE_DIR)/repos/base-hw
##
## Kernel-specific run tool configuration
##
RUN_OPT = --include boot_dir/hw

View File

@@ -1,7 +0,0 @@
REPOSITORIES += $(GENODE_DIR)/repos/base-hw
##
## Kernel-specific run tool configuration
##
RUN_OPT = --include boot_dir/hw

View File

@@ -1,7 +0,0 @@
REPOSITORIES += $(GENODE_DIR)/repos/base-hw
##
## Kernel-specific run tool configuration
##
RUN_OPT = --include boot_dir/hw

View File

@@ -1,7 +0,0 @@
REPOSITORIES += $(GENODE_DIR)/repos/base-hw
##
## Kernel-specific run tool configuration
##
RUN_OPT = --include boot_dir/hw

View File

@@ -1,7 +0,0 @@
REPOSITORIES += $(GENODE_DIR)/repos/base-hw
##
## Kernel-specific run tool configuration
##
RUN_OPT = --include boot_dir/hw

View File

@@ -1,8 +0,0 @@
REPOSITORIES += $(GENODE_DIR)/repos/base-hw
##
## Kernel-specific run tool configuration
##
RUN_OPT = --include boot_dir/hw \
--include power_on/qemu --include log/qemu

View File

@@ -1,9 +0,0 @@
REPOSITORIES += $(GENODE_DIR)/repos/base-hw
##
## Kernel-specific run tool configuration
##
RUN_OPT = --include boot_dir/hw \
--include power_on/spike --include log/spike

View File

@@ -1,7 +0,0 @@
REPOSITORIES += $(GENODE_DIR)/repos/base-hw
##
## Kernel-specific run tool configuration
##
RUN_OPT = --include boot_dir/hw

View File

@@ -1,7 +0,0 @@
REPOSITORIES += $(GENODE_DIR)/repos/base-hw
##
## Kernel-specific run tool configuration
##
RUN_OPT = --include boot_dir/hw

View File

@@ -1,7 +0,0 @@
REPOSITORIES += $(GENODE_DIR)/repos/base-hw
##
## Kernel-specific run tool configuration
##
RUN_OPT = --include boot_dir/hw

View File

@@ -1,9 +0,0 @@
REPOSITORIES += $(GENODE_DIR)/repos/base-hw
##
## Kernel-specific run tool configuration
##
RUN_OPT = --include boot_dir/hw \
--include power_on/qemu --include log/qemu --include image/iso

View File

@@ -1,13 +0,0 @@
REPOSITORIES += $(GENODE_DIR)/repos/base-hw
##
## Kernel-specific run tool configuration
##
RUN_OPT = --include boot_dir/hw
## Set RUN_OPT to exectute this on Qemu
RUN_OPT += --include power_on/qemu --include log/qemu
## Set RUN_OPT to execute this on actual hardware.
#RUN_OPT += --include image/uboot

View File

@@ -1,8 +0,0 @@
REPOSITORIES = $(GENODE_DIR)/repos/base-linux
##
## Kernel-specific run tool configuration
##
RUN_OPT = --include boot_dir/linux \
--include power_on/linux --include log/linux

View File

@@ -1,13 +0,0 @@
REPOSITORIES = $(GENODE_DIR)/repos/base-nova
##
## Kernel-specific run tool configuration
##
RUN_OPT = --include boot_dir/nova \
--include power_on/qemu --include log/qemu --include image/iso
#
# The current NOVA kernel build is optimized for Intel Core2 Duo.
#
QEMU_OPT += -cpu core2duo

View File

@@ -1,13 +0,0 @@
REPOSITORIES = $(GENODE_DIR)/repos/base-nova
##
## Kernel-specific run tool configuration
##
RUN_OPT = --include boot_dir/nova \
--include power_on/qemu --include log/qemu --include image/iso
#
# The current NOVA kernel build is optimized for Intel Core2 Duo.
#
QEMU_OPT += -cpu core2duo

View File

@@ -1,8 +0,0 @@
REPOSITORIES = $(GENODE_DIR)/repos/base-okl4
##
## Kernel-specific run tool configuration
##
RUN_OPT = --include boot_dir/okl4 \
--include power_on/qemu --include log/qemu --include image/iso

View File

@@ -1,8 +0,0 @@
REPOSITORIES = $(GENODE_DIR)/repos/base-pistachio
##
## Kernel-specific run tool configuration
##
RUN_OPT = --include boot_dir/pistachio \
--include power_on/qemu --include log/qemu --include image/iso

View File

@@ -1,5 +0,0 @@
#
# Software ported specifically for Fiasco.OC, i.e., L4Linux
#
#REPOSITORIES += $(GENODE_DIR)/repos/ports-foc

View File

@@ -1,10 +0,0 @@
#
# Prevent Qemu from using KVM
#
# Qemu version that come with major Linux distributions (i.e., Ubuntu) enable
# KVM by default. To use Qemu without KVM, Qemu must be started with the
# '-no-kvm' argument. However, if your Qemu version does not support this
# argument, comment-out this line.
#
QEMU_OPT += -no-kvm

View File

@@ -1,7 +0,0 @@
REPOSITORIES = $(GENODE_DIR)/repos/base-sel4
##
## Kernel-specific run tool configuration
##
RUN_OPT = --include boot_dir/sel4 \
--include power_on/qemu --include log/qemu --include image/iso