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
This commit is contained in:
Stefan Kalkowski
2019-04-11 16:24:33 +02:00
committed by Christian Helmuth
parent 02afb04b7d
commit c43267dbaa
38 changed files with 167 additions and 336 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,14 +0,0 @@
##
## 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,6 @@
# kernel to use (hw, or foc)
KERNEL ?= hw
# board to use
BOARD ?= rpi

View File

@@ -0,0 +1,28 @@
# local variable for run-tool arguments used for running scenarios in Qemu
QEMU_RUN_OPT := --include power_on/qemu --include log/qemu
# kernel to use (hw, foc, or sel4)
#KERNEL ?= hw
# board to use (arndale, imx53_qsb, imx53_qsb_tz, imx6q_sabrelite, imx7d_sabre,
# nit6_solox, odroid_xu, odroid_x2, panda, pbxa9, usb_armory,
# wand_quad, or zynq_qemu)
#BOARD ?= pbxa9
# local varible for run-tool arguments that depend on the used board
BOARD_RUN_OPT(pbxa9) = $(QEMU_RUN_OPT)
BOARD_RUN_OPT(zynq_qemu) = $(QEMU_RUN_OPT)
##
## 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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,4 +0,0 @@
# 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

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

View File

@@ -1,57 +0,0 @@
##
## Kernel-specific run tool configuration
##
RUN_OPT = --include boot_dir/hw --include image/muen
#
# Muen hardware configuration
#
# The specified file must be relative to the Muen policy directory or an
# absolute path.
#
RUN_OPT += --image-muen-hardware hardware/lenovo-t430s.xml
#
# Muen platform configuration
#
# The specified file must be relative to the Muen policy directory or an
# absolute path.
#
RUN_OPT += --image-muen-platform platform/lenovo-t430s.xml
#
# Directory, where the GNAT toolchain is installed
#
RUN_OPT += --image-muen-gnat-path /opt/gnat
#
# Directory, where the SPARK toolchain is installed
#
RUN_OPT += --image-muen-spark-path /opt/spark
#
# Muen system policy
#
# 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 libmudm libmutime libxhcidbg dbgserver sm time'
#
# External Muen build
#
# 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

@@ -1,9 +0,0 @@
##
## Run tool configuration
##
RUN_OPT = --include image/bbl \
--include power_on/spike \
--include log/spike

View File

@@ -1,9 +0,0 @@
# 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

@@ -1,7 +0,0 @@
# 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(sel4) := $(QEMU_RUN_OPT)
KERNEL_RUN_OPT(foc) := $(QEMU_RUN_OPT)
KERNEL_RUN_OPT(linux) := --include power_on/linux --include log/linux

View File

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

View File

@@ -1,3 +0,0 @@
# 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

@@ -0,0 +1,9 @@
# kernel to use
KERNEL ?= hw
# board to use
BOARD ?= spike
# local varible for run-tool arguments that depend on the used board
BOARD_RUN_OPT(spike) = --include image/bbl --include power_on/spike --include log/spike

View File

@@ -1,3 +1,6 @@
# 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
##
## Qemu arguments, effective when using the run tool's 'power_on/qemu' back end

View File

@@ -0,0 +1,10 @@
# kernel to use (nova, linux, sel4, foc, okl4, fiasco, or pistachio)
#KERNEL ?= nova
# board to use (pc, or linux)
BOARD ?= pc
# local varible for run-tool arguments that depend on the used board
BOARD_RUN_OPT(pc) = $(QEMU_RUN_OPT)
BOARD_RUN_OPT(linux) = --include power_on/linux --include log/linux

View File

@@ -0,0 +1,18 @@
# kernel to use (nova, hw, sel4, linux, or foc)
#KERNEL ?= nova
# board to use (pc, linux, or muen)
BOARD ?= pc
# local varible for run-tool arguments that depend on the used board
BOARD_RUN_OPT(muen) = --include image/muen
BOARD_RUN_OPT(muen) += --image-muen-hardware hardware/lenovo-t430s.xml
BOARD_RUN_OPT(muen) += --image-muen-platform platform/lenovo-t430s.xml
BOARD_RUN_OPT(muen) += --image-muen-gnat-path /opt/gnat
BOARD_RUN_OPT(muen) += --image-muen-spark-path /opt/spark
BOARD_RUN_OPT(muen) += --image-muen-system xml/genode-base_hw.xml
BOARD_RUN_OPT(muen) += --image-muen-components 'libdebuglog libmudm libmutime libxhcidbg dbgserver sm time'
BOARD_RUN_OPT(muen) += --image-muen-external-build 0
BOARD_RUN_OPT(linux) = --include power_on/linux --include log/linux
BOARD_RUN_OPT(pc) = $(QEMU_RUN_OPT)

View File

@@ -55,6 +55,7 @@ export LIB_PROGRESS_LOG ?= $(BUILD_BASE_DIR)/progress.log
export LIB_DEP_FILE ?= var/libdeps
export ECHO ?= echo -e
export CONTRIB_DIR
export BOARD
# Force stable sorting order
export LC_COLLATE=C
@@ -79,6 +80,9 @@ export SHELL := $(shell which bash)
# Fetch SPECS configuration from all source repositories and the build directory
#
SPECS :=
ifneq ($(BOARD),)
SPECS += $(BOARD)
endif
-include $(foreach REP,$(REPOSITORIES),$(wildcard $(REP)/etc/specs.conf))
-include $(BUILD_BASE_DIR)/etc/specs.conf