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:
3
tool/builddir/build.conf/make_j
Normal file
3
tool/builddir/build.conf/make_j
Normal file
@@ -0,0 +1,3 @@
|
||||
# enable parallel build
|
||||
#MAKE += -j4
|
||||
|
||||
14
tool/builddir/build.conf/qemu_opt_arm
Normal file
14
tool/builddir/build.conf/qemu_opt_arm
Normal 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})}
|
||||
|
||||
20
tool/builddir/build.conf/qemu_opt_x86
Normal file
20
tool/builddir/build.conf/qemu_opt_x86
Normal 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})}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
#
|
||||
# Drivers ported from the OpenBSD
|
||||
#
|
||||
@@ -8,3 +7,4 @@
|
||||
# Drivers ported from iPXE
|
||||
#
|
||||
#REPOSITORIES += $(GENODE_DIR)/repos/dde_ipxe
|
||||
|
||||
5
tool/builddir/build.conf/run
Normal file
5
tool/builddir/build.conf/run
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
##
|
||||
## Run-tool configuration
|
||||
##
|
||||
|
||||
4
tool/builddir/build.conf/run_boot_dir
Normal file
4
tool/builddir/build.conf/run_boot_dir
Normal file
@@ -0,0 +1,4 @@
|
||||
ifdef KERNEL
|
||||
RUN_OPT += ${KERNEL_RUN_OPT(${KERNEL})} --include boot_dir/$(KERNEL)
|
||||
endif
|
||||
|
||||
3
tool/builddir/build.conf/run_kernel_fiasco
Normal file
3
tool/builddir/build.conf/run_kernel_fiasco
Normal file
@@ -0,0 +1,3 @@
|
||||
# kernel to use
|
||||
KERNEL ?= fiasco
|
||||
|
||||
3
tool/builddir/build.conf/run_kernel_foc
Normal file
3
tool/builddir/build.conf/run_kernel_foc
Normal file
@@ -0,0 +1,3 @@
|
||||
# kernel to use
|
||||
KERNEL ?= foc
|
||||
|
||||
3
tool/builddir/build.conf/run_kernel_hw
Normal file
3
tool/builddir/build.conf/run_kernel_hw
Normal file
@@ -0,0 +1,3 @@
|
||||
# kernel to use
|
||||
KERNEL ?= hw
|
||||
|
||||
3
tool/builddir/build.conf/run_kernel_hw_foc
Normal file
3
tool/builddir/build.conf/run_kernel_hw_foc
Normal file
@@ -0,0 +1,3 @@
|
||||
# kernel to use (hw or foc)
|
||||
KERNEL ?= hw
|
||||
|
||||
@@ -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
|
||||
|
||||
3
tool/builddir/build.conf/run_kernel_nova
Normal file
3
tool/builddir/build.conf/run_kernel_nova
Normal file
@@ -0,0 +1,3 @@
|
||||
# kernel to use
|
||||
KERNEL ?= nova
|
||||
|
||||
3
tool/builddir/build.conf/run_kernel_okl4
Normal file
3
tool/builddir/build.conf/run_kernel_okl4
Normal file
@@ -0,0 +1,3 @@
|
||||
# kernel to use
|
||||
KERNEL ?= okl4
|
||||
|
||||
3
tool/builddir/build.conf/run_kernel_pistachio
Normal file
3
tool/builddir/build.conf/run_kernel_pistachio
Normal file
@@ -0,0 +1,3 @@
|
||||
# kernel to use
|
||||
KERNEL ?= pistachio
|
||||
|
||||
3
tool/builddir/build.conf/run_kernel_sel4
Normal file
3
tool/builddir/build.conf/run_kernel_sel4
Normal file
@@ -0,0 +1,3 @@
|
||||
# kernel to use
|
||||
KERNEL ?= sel4
|
||||
|
||||
3
tool/builddir/build.conf/run_kernel_x86_32
Normal file
3
tool/builddir/build.conf/run_kernel_x86_32
Normal file
@@ -0,0 +1,3 @@
|
||||
# kernel to use (nova, linux, sel4, foc, okl4, fiasco, or pistachio)
|
||||
#KERNEL ?= nova
|
||||
|
||||
3
tool/builddir/build.conf/run_kernel_x86_64
Normal file
3
tool/builddir/build.conf/run_kernel_x86_64
Normal file
@@ -0,0 +1,3 @@
|
||||
# kernel to use (nova, hw, linux, or foc)
|
||||
#KERNEL ?= nova
|
||||
|
||||
4
tool/builddir/build.conf/run_opt_arm_hw_foc
Normal file
4
tool/builddir/build.conf/run_opt_arm_hw_foc
Normal 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)
|
||||
|
||||
3
tool/builddir/build.conf/run_opt_hw
Normal file
3
tool/builddir/build.conf/run_opt_hw
Normal file
@@ -0,0 +1,3 @@
|
||||
# local varible for run-tool arguments that depend on the used kernel
|
||||
KERNEL_RUN_OPT(hw) := $(QEMU_RUN_OPT)
|
||||
|
||||
@@ -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
|
||||
|
||||
7
tool/builddir/build.conf/run_opt_spike
Normal file
7
tool/builddir/build.conf/run_opt_spike
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
##
|
||||
## Run tool configuration
|
||||
##
|
||||
|
||||
RUN_OPT = --include power_on/spike --include log/spike
|
||||
|
||||
9
tool/builddir/build.conf/run_opt_x86_32
Normal file
9
tool/builddir/build.conf/run_opt_x86_32
Normal 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
|
||||
|
||||
6
tool/builddir/build.conf/run_opt_x86_64
Normal file
6
tool/builddir/build.conf/run_opt_x86_64
Normal 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
|
||||
|
||||
3
tool/builddir/build.conf/run_qemu
Normal file
3
tool/builddir/build.conf/run_qemu
Normal 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
|
||||
|
||||
3
tool/builddir/build.conf/run_qemu_iso
Normal file
3
tool/builddir/build.conf/run_qemu_iso
Normal 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
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -1,7 +0,0 @@
|
||||
REPOSITORIES += $(GENODE_DIR)/repos/base-hw
|
||||
|
||||
##
|
||||
## Kernel-specific run tool configuration
|
||||
##
|
||||
|
||||
RUN_OPT = --include boot_dir/hw
|
||||
@@ -1,7 +0,0 @@
|
||||
REPOSITORIES += $(GENODE_DIR)/repos/base-hw
|
||||
|
||||
##
|
||||
## Kernel-specific run tool configuration
|
||||
##
|
||||
|
||||
RUN_OPT = --include boot_dir/hw
|
||||
@@ -1,7 +0,0 @@
|
||||
REPOSITORIES += $(GENODE_DIR)/repos/base-hw
|
||||
|
||||
##
|
||||
## Kernel-specific run tool configuration
|
||||
##
|
||||
|
||||
RUN_OPT = --include boot_dir/hw
|
||||
@@ -1,7 +0,0 @@
|
||||
REPOSITORIES += $(GENODE_DIR)/repos/base-hw
|
||||
|
||||
##
|
||||
## Kernel-specific run tool configuration
|
||||
##
|
||||
|
||||
RUN_OPT = --include boot_dir/hw
|
||||
@@ -1,7 +0,0 @@
|
||||
REPOSITORIES += $(GENODE_DIR)/repos/base-hw
|
||||
|
||||
##
|
||||
## Kernel-specific run tool configuration
|
||||
##
|
||||
|
||||
RUN_OPT = --include boot_dir/hw
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
REPOSITORIES += $(GENODE_DIR)/repos/base-hw
|
||||
|
||||
##
|
||||
## Kernel-specific run tool configuration
|
||||
##
|
||||
|
||||
RUN_OPT = --include boot_dir/hw
|
||||
@@ -1,7 +0,0 @@
|
||||
REPOSITORIES += $(GENODE_DIR)/repos/base-hw
|
||||
|
||||
##
|
||||
## Kernel-specific run tool configuration
|
||||
##
|
||||
|
||||
RUN_OPT = --include boot_dir/hw
|
||||
@@ -1,7 +0,0 @@
|
||||
REPOSITORIES += $(GENODE_DIR)/repos/base-hw
|
||||
|
||||
##
|
||||
## Kernel-specific run tool configuration
|
||||
##
|
||||
|
||||
RUN_OPT = --include boot_dir/hw
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -1,5 +0,0 @@
|
||||
|
||||
#
|
||||
# Software ported specifically for Fiasco.OC, i.e., L4Linux
|
||||
#
|
||||
#REPOSITORIES += $(GENODE_DIR)/repos/ports-foc
|
||||
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user