From c43267dbaa380400df970da6c50ed7a89c92f140 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Thu, 11 Apr 2019 16:24:33 +0200 Subject: [PATCH] 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 --- repos/base-hw/etc/specs.conf | 10 +- tool/builddir/build.conf/foc_arndale | 7 - tool/builddir/build.conf/foc_odroid_x2 | 7 - tool/builddir/build.conf/foc_panda | 7 - tool/builddir/build.conf/foc_pbxa9 | 8 - tool/builddir/build.conf/foc_rpi | 8 - tool/builddir/build.conf/foc_x86_32 | 8 - tool/builddir/build.conf/foc_x86_64 | 8 - tool/builddir/build.conf/qemu_opt_arm | 14 -- tool/builddir/build.conf/run_arm_v6 | 6 + tool/builddir/build.conf/run_arm_v7 | 28 +++ tool/builddir/build.conf/run_boot_dir | 8 +- tool/builddir/build.conf/run_kernel_fiasco | 3 - tool/builddir/build.conf/run_kernel_foc | 3 - tool/builddir/build.conf/run_kernel_hw | 3 - tool/builddir/build.conf/run_kernel_hw_foc | 3 - .../build.conf/run_kernel_hw_foc_sel4 | 3 - tool/builddir/build.conf/run_kernel_nova | 3 - tool/builddir/build.conf/run_kernel_okl4 | 3 - tool/builddir/build.conf/run_kernel_pistachio | 3 - tool/builddir/build.conf/run_kernel_sel4 | 3 - tool/builddir/build.conf/run_kernel_wand_quad | 3 - tool/builddir/build.conf/run_kernel_x86_32 | 3 - tool/builddir/build.conf/run_kernel_x86_64 | 3 - tool/builddir/build.conf/run_opt_arm_hw_foc | 4 - tool/builddir/build.conf/run_opt_hw | 3 - tool/builddir/build.conf/run_opt_muen | 57 ----- tool/builddir/build.conf/run_opt_spike | 9 - tool/builddir/build.conf/run_opt_x86_32 | 9 - tool/builddir/build.conf/run_opt_x86_64 | 7 - tool/builddir/build.conf/run_qemu | 3 - tool/builddir/build.conf/run_qemu_iso | 3 - tool/builddir/build.conf/run_riscv | 9 + .../build.conf/{qemu_opt_x86 => run_x86} | 3 + tool/builddir/build.conf/run_x86_32 | 10 + tool/builddir/build.conf/run_x86_64 | 18 ++ tool/builddir/build.mk | 4 + tool/create_builddir | 209 +++++++----------- 38 files changed, 167 insertions(+), 336 deletions(-) delete mode 100644 tool/builddir/build.conf/foc_arndale delete mode 100644 tool/builddir/build.conf/foc_odroid_x2 delete mode 100644 tool/builddir/build.conf/foc_panda delete mode 100644 tool/builddir/build.conf/foc_pbxa9 delete mode 100644 tool/builddir/build.conf/foc_rpi delete mode 100644 tool/builddir/build.conf/foc_x86_32 delete mode 100644 tool/builddir/build.conf/foc_x86_64 delete mode 100644 tool/builddir/build.conf/qemu_opt_arm create mode 100644 tool/builddir/build.conf/run_arm_v6 create mode 100644 tool/builddir/build.conf/run_arm_v7 delete mode 100644 tool/builddir/build.conf/run_kernel_fiasco delete mode 100644 tool/builddir/build.conf/run_kernel_foc delete mode 100644 tool/builddir/build.conf/run_kernel_hw delete mode 100644 tool/builddir/build.conf/run_kernel_hw_foc delete mode 100644 tool/builddir/build.conf/run_kernel_hw_foc_sel4 delete mode 100644 tool/builddir/build.conf/run_kernel_nova delete mode 100644 tool/builddir/build.conf/run_kernel_okl4 delete mode 100644 tool/builddir/build.conf/run_kernel_pistachio delete mode 100644 tool/builddir/build.conf/run_kernel_sel4 delete mode 100644 tool/builddir/build.conf/run_kernel_wand_quad delete mode 100644 tool/builddir/build.conf/run_kernel_x86_32 delete mode 100644 tool/builddir/build.conf/run_kernel_x86_64 delete mode 100644 tool/builddir/build.conf/run_opt_arm_hw_foc delete mode 100644 tool/builddir/build.conf/run_opt_hw delete mode 100644 tool/builddir/build.conf/run_opt_muen delete mode 100644 tool/builddir/build.conf/run_opt_spike delete mode 100644 tool/builddir/build.conf/run_opt_x86_32 delete mode 100644 tool/builddir/build.conf/run_opt_x86_64 delete mode 100644 tool/builddir/build.conf/run_qemu delete mode 100644 tool/builddir/build.conf/run_qemu_iso create mode 100644 tool/builddir/build.conf/run_riscv rename tool/builddir/build.conf/{qemu_opt_x86 => run_x86} (71%) create mode 100644 tool/builddir/build.conf/run_x86_32 create mode 100644 tool/builddir/build.conf/run_x86_64 diff --git a/repos/base-hw/etc/specs.conf b/repos/base-hw/etc/specs.conf index 7095ca4f55..c28739a602 100644 --- a/repos/base-hw/etc/specs.conf +++ b/repos/base-hw/etc/specs.conf @@ -6,5 +6,13 @@ SPECS += pci ps2 vesa framebuffer ifneq ($(filter-out $(SPECS),muen),) SPECS += acpi x86_pc endif - endif + +ifeq ($(filter-out $(SPECS),imx53_qsb_tz),) +SPECS += imx53_qsb trustzone +endif + +ifeq ($(filter-out $(SPECS),usb_armory),) +SPECS += trustzone +endif + diff --git a/tool/builddir/build.conf/foc_arndale b/tool/builddir/build.conf/foc_arndale deleted file mode 100644 index 42bcc1c763..0000000000 --- a/tool/builddir/build.conf/foc_arndale +++ /dev/null @@ -1,7 +0,0 @@ -REPOSITORIES = $(GENODE_DIR)/repos/base-foc - -## -## Kernel-specific run tool configuration -## - -RUN_OPT = --include boot_dir/foc diff --git a/tool/builddir/build.conf/foc_odroid_x2 b/tool/builddir/build.conf/foc_odroid_x2 deleted file mode 100644 index 42bcc1c763..0000000000 --- a/tool/builddir/build.conf/foc_odroid_x2 +++ /dev/null @@ -1,7 +0,0 @@ -REPOSITORIES = $(GENODE_DIR)/repos/base-foc - -## -## Kernel-specific run tool configuration -## - -RUN_OPT = --include boot_dir/foc diff --git a/tool/builddir/build.conf/foc_panda b/tool/builddir/build.conf/foc_panda deleted file mode 100644 index 42bcc1c763..0000000000 --- a/tool/builddir/build.conf/foc_panda +++ /dev/null @@ -1,7 +0,0 @@ -REPOSITORIES = $(GENODE_DIR)/repos/base-foc - -## -## Kernel-specific run tool configuration -## - -RUN_OPT = --include boot_dir/foc diff --git a/tool/builddir/build.conf/foc_pbxa9 b/tool/builddir/build.conf/foc_pbxa9 deleted file mode 100644 index 9a2b747203..0000000000 --- a/tool/builddir/build.conf/foc_pbxa9 +++ /dev/null @@ -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 diff --git a/tool/builddir/build.conf/foc_rpi b/tool/builddir/build.conf/foc_rpi deleted file mode 100644 index c4cdaaadc0..0000000000 --- a/tool/builddir/build.conf/foc_rpi +++ /dev/null @@ -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 diff --git a/tool/builddir/build.conf/foc_x86_32 b/tool/builddir/build.conf/foc_x86_32 deleted file mode 100644 index d9c0399406..0000000000 --- a/tool/builddir/build.conf/foc_x86_32 +++ /dev/null @@ -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 diff --git a/tool/builddir/build.conf/foc_x86_64 b/tool/builddir/build.conf/foc_x86_64 deleted file mode 100644 index d9c0399406..0000000000 --- a/tool/builddir/build.conf/foc_x86_64 +++ /dev/null @@ -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 diff --git a/tool/builddir/build.conf/qemu_opt_arm b/tool/builddir/build.conf/qemu_opt_arm deleted file mode 100644 index d984d01657..0000000000 --- a/tool/builddir/build.conf/qemu_opt_arm +++ /dev/null @@ -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})) - diff --git a/tool/builddir/build.conf/run_arm_v6 b/tool/builddir/build.conf/run_arm_v6 new file mode 100644 index 0000000000..5449f54688 --- /dev/null +++ b/tool/builddir/build.conf/run_arm_v6 @@ -0,0 +1,6 @@ +# kernel to use (hw, or foc) +KERNEL ?= hw + +# board to use +BOARD ?= rpi + diff --git a/tool/builddir/build.conf/run_arm_v7 b/tool/builddir/build.conf/run_arm_v7 new file mode 100644 index 0000000000..18b89dba44 --- /dev/null +++ b/tool/builddir/build.conf/run_arm_v7 @@ -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})) + diff --git a/tool/builddir/build.conf/run_boot_dir b/tool/builddir/build.conf/run_boot_dir index 41964376f8..9d557f6558 100644 --- a/tool/builddir/build.conf/run_boot_dir +++ b/tool/builddir/build.conf/run_boot_dir @@ -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 diff --git a/tool/builddir/build.conf/run_kernel_fiasco b/tool/builddir/build.conf/run_kernel_fiasco deleted file mode 100644 index 2c90892cb8..0000000000 --- a/tool/builddir/build.conf/run_kernel_fiasco +++ /dev/null @@ -1,3 +0,0 @@ -# kernel to use -KERNEL ?= fiasco - diff --git a/tool/builddir/build.conf/run_kernel_foc b/tool/builddir/build.conf/run_kernel_foc deleted file mode 100644 index 8fb8e38b73..0000000000 --- a/tool/builddir/build.conf/run_kernel_foc +++ /dev/null @@ -1,3 +0,0 @@ -# kernel to use -KERNEL ?= foc - diff --git a/tool/builddir/build.conf/run_kernel_hw b/tool/builddir/build.conf/run_kernel_hw deleted file mode 100644 index 3c0c84a75a..0000000000 --- a/tool/builddir/build.conf/run_kernel_hw +++ /dev/null @@ -1,3 +0,0 @@ -# kernel to use -KERNEL ?= hw - diff --git a/tool/builddir/build.conf/run_kernel_hw_foc b/tool/builddir/build.conf/run_kernel_hw_foc deleted file mode 100644 index 5b0d5b4740..0000000000 --- a/tool/builddir/build.conf/run_kernel_hw_foc +++ /dev/null @@ -1,3 +0,0 @@ -# kernel to use (hw or foc) -KERNEL ?= hw - diff --git a/tool/builddir/build.conf/run_kernel_hw_foc_sel4 b/tool/builddir/build.conf/run_kernel_hw_foc_sel4 deleted file mode 100644 index ae788b62df..0000000000 --- a/tool/builddir/build.conf/run_kernel_hw_foc_sel4 +++ /dev/null @@ -1,3 +0,0 @@ -# kernel to use (foc, hw, sel4) -KERNEL ?= hw - diff --git a/tool/builddir/build.conf/run_kernel_nova b/tool/builddir/build.conf/run_kernel_nova deleted file mode 100644 index a6f19dda8f..0000000000 --- a/tool/builddir/build.conf/run_kernel_nova +++ /dev/null @@ -1,3 +0,0 @@ -# kernel to use -KERNEL ?= nova - diff --git a/tool/builddir/build.conf/run_kernel_okl4 b/tool/builddir/build.conf/run_kernel_okl4 deleted file mode 100644 index d4e3bd71aa..0000000000 --- a/tool/builddir/build.conf/run_kernel_okl4 +++ /dev/null @@ -1,3 +0,0 @@ -# kernel to use -KERNEL ?= okl4 - diff --git a/tool/builddir/build.conf/run_kernel_pistachio b/tool/builddir/build.conf/run_kernel_pistachio deleted file mode 100644 index 0cfdb95bc3..0000000000 --- a/tool/builddir/build.conf/run_kernel_pistachio +++ /dev/null @@ -1,3 +0,0 @@ -# kernel to use -KERNEL ?= pistachio - diff --git a/tool/builddir/build.conf/run_kernel_sel4 b/tool/builddir/build.conf/run_kernel_sel4 deleted file mode 100644 index cd5b6cb5a8..0000000000 --- a/tool/builddir/build.conf/run_kernel_sel4 +++ /dev/null @@ -1,3 +0,0 @@ -# kernel to use -KERNEL ?= sel4 - diff --git a/tool/builddir/build.conf/run_kernel_wand_quad b/tool/builddir/build.conf/run_kernel_wand_quad deleted file mode 100644 index 96b6f17cf4..0000000000 --- a/tool/builddir/build.conf/run_kernel_wand_quad +++ /dev/null @@ -1,3 +0,0 @@ -# kernel to use (hw, sel4) -# KERNEL ?= hw - diff --git a/tool/builddir/build.conf/run_kernel_x86_32 b/tool/builddir/build.conf/run_kernel_x86_32 deleted file mode 100644 index 59d9c117d3..0000000000 --- a/tool/builddir/build.conf/run_kernel_x86_32 +++ /dev/null @@ -1,3 +0,0 @@ -# kernel to use (nova, linux, sel4, foc, okl4, fiasco, or pistachio) -#KERNEL ?= nova - diff --git a/tool/builddir/build.conf/run_kernel_x86_64 b/tool/builddir/build.conf/run_kernel_x86_64 deleted file mode 100644 index 7d8126e26f..0000000000 --- a/tool/builddir/build.conf/run_kernel_x86_64 +++ /dev/null @@ -1,3 +0,0 @@ -# kernel to use (nova, hw, sel4, linux, or foc) -#KERNEL ?= nova - diff --git a/tool/builddir/build.conf/run_opt_arm_hw_foc b/tool/builddir/build.conf/run_opt_arm_hw_foc deleted file mode 100644 index b3e7f55b77..0000000000 --- a/tool/builddir/build.conf/run_opt_arm_hw_foc +++ /dev/null @@ -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) - diff --git a/tool/builddir/build.conf/run_opt_hw b/tool/builddir/build.conf/run_opt_hw deleted file mode 100644 index 3a20d15804..0000000000 --- a/tool/builddir/build.conf/run_opt_hw +++ /dev/null @@ -1,3 +0,0 @@ -# local varible for run-tool arguments that depend on the used kernel -KERNEL_RUN_OPT(hw) := $(QEMU_RUN_OPT) - diff --git a/tool/builddir/build.conf/run_opt_muen b/tool/builddir/build.conf/run_opt_muen deleted file mode 100644 index cf68a6e088..0000000000 --- a/tool/builddir/build.conf/run_opt_muen +++ /dev/null @@ -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 - diff --git a/tool/builddir/build.conf/run_opt_spike b/tool/builddir/build.conf/run_opt_spike deleted file mode 100644 index 8911fd6e2c..0000000000 --- a/tool/builddir/build.conf/run_opt_spike +++ /dev/null @@ -1,9 +0,0 @@ - -## -## Run tool configuration -## - -RUN_OPT = --include image/bbl \ - --include power_on/spike \ - --include log/spike - diff --git a/tool/builddir/build.conf/run_opt_x86_32 b/tool/builddir/build.conf/run_opt_x86_32 deleted file mode 100644 index b5a3359198..0000000000 --- a/tool/builddir/build.conf/run_opt_x86_32 +++ /dev/null @@ -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 - diff --git a/tool/builddir/build.conf/run_opt_x86_64 b/tool/builddir/build.conf/run_opt_x86_64 deleted file mode 100644 index 198f5cc7a8..0000000000 --- a/tool/builddir/build.conf/run_opt_x86_64 +++ /dev/null @@ -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 - diff --git a/tool/builddir/build.conf/run_qemu b/tool/builddir/build.conf/run_qemu deleted file mode 100644 index 0289dd9ff6..0000000000 --- a/tool/builddir/build.conf/run_qemu +++ /dev/null @@ -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 - diff --git a/tool/builddir/build.conf/run_qemu_iso b/tool/builddir/build.conf/run_qemu_iso deleted file mode 100644 index 8a83db7bf8..0000000000 --- a/tool/builddir/build.conf/run_qemu_iso +++ /dev/null @@ -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 - diff --git a/tool/builddir/build.conf/run_riscv b/tool/builddir/build.conf/run_riscv new file mode 100644 index 0000000000..b8b5c5466a --- /dev/null +++ b/tool/builddir/build.conf/run_riscv @@ -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 + diff --git a/tool/builddir/build.conf/qemu_opt_x86 b/tool/builddir/build.conf/run_x86 similarity index 71% rename from tool/builddir/build.conf/qemu_opt_x86 rename to tool/builddir/build.conf/run_x86 index 294dbfef7e..39c34a694d 100644 --- a/tool/builddir/build.conf/qemu_opt_x86 +++ b/tool/builddir/build.conf/run_x86 @@ -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 diff --git a/tool/builddir/build.conf/run_x86_32 b/tool/builddir/build.conf/run_x86_32 new file mode 100644 index 0000000000..40f53d037b --- /dev/null +++ b/tool/builddir/build.conf/run_x86_32 @@ -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 + diff --git a/tool/builddir/build.conf/run_x86_64 b/tool/builddir/build.conf/run_x86_64 new file mode 100644 index 0000000000..507faacacb --- /dev/null +++ b/tool/builddir/build.conf/run_x86_64 @@ -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) + diff --git a/tool/builddir/build.mk b/tool/builddir/build.mk index 8e4a81b5d7..c5fc1c1bc8 100644 --- a/tool/builddir/build.mk +++ b/tool/builddir/build.mk @@ -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 diff --git a/tool/create_builddir b/tool/create_builddir index 44ad16ecb3..3a7351116d 100755 --- a/tool/create_builddir +++ b/tool/create_builddir @@ -10,45 +10,29 @@ MAKEOVERRIDES = PLATFORM = $(MAKECMDGOALS) -PLATFORMS = x86_32 x86_64 panda pbxa9 rpi arndale imx53_qsb imx53_qsb_tz \ - usb_armory wand_quad odroid_xu odroid_x2 zynq_qemu muen \ - imx6q_sabrelite imx7d_sabre riscv_spike linux nit6_solox +PLATFORMS = arm_v6 arm_v7a riscv x86_32 x86_64 linux -PLATFORMS_DEPR = linux_x86 linux_arm fiasco_x86 okl4_x86 pistachio_x86 \ - nova_x86_32 nova_x86_64 hw_x86_64 foc_x86_32 foc_x86_64 \ - sel4_x86_32 hw_panda foc_panda hw_pbxa9 foc_pbxa9 hw_rpi \ - foc_rpi hw_arndale foc_arndale hw_imx53_qsb \ - hw_imx53_qsb_tz hw_usb_armory hw_wand_quad hw_odroid_xu \ - hw_zynq hw_x86_64_muen hw_riscv foc_odroid_x2 +PLATFORMS_DEPR = arndale imx53_qsb imx53_qsb_tz imx6q_sabrelite imx7d_sabre \ + nit6_solox odroid_x2 odroid_xu panda pbxa9 riscv_spike rpi \ + usb_armory wand_quad zynq_qemu muen + +PLATFORM_ALT(arndale) = arm_v7a +PLATFORM_ALT(imx53_qsb) = arm_v7a +PLATFORM_ALT(imx53_qsb_tz) = arm_v7a +PLATFORM_ALT(imx6q_sabrelite) = arm_v7a +PLATFORM_ALT(imx7d_sabre) = arm_v7a +PLATFORM_ALT(muen) = x86_64 +PLATFORM_ALT(nit6_solox) = arm_v7a +PLATFORM_ALT(odroid_x2) = arm_v7a +PLATFORM_ALT(odroid_xu) = arm_v7a +PLATFORM_ALT(panda) = arm_v7a +PLATFORM_ALT(pbxa9) = arm_v7a +PLATFORM_ALT(riscv_spike) = riscv +PLATFORM_ALT(rpi) = arm_v6 +PLATFORM_ALT(usb_armory) = arm_v7a +PLATFORM_ALT(wand_quad) = arm_v7a +PLATFORM_ALT(zynq_qemu) = arm_v7a -PLATFORM_ALT(linux_x86) = linux -PLATFORM_ALT(linux_arm) = linux -PLATFORM_ALT(fiasco_x86) = x86_32 -PLATFORM_ALT(okl4_x86) = x86_32 -PLATFORM_ALT(pistachio_x86) = x86_32 -PLATFORM_ALT(nova_x86_32) = x86_32 -PLATFORM_ALT(nova_x86_64) = x86_64 -PLATFORM_ALT(hw_x86_64) = x86_64 -PLATFORM_ALT(foc_x86_32) = x86_32 -PLATFORM_ALT(foc_x86_64) = x86_64 -PLATFORM_ALT(sel4_x86_32) = x86_32 -PLATFORM_ALT(hw_panda) = panda -PLATFORM_ALT(foc_panda) = panda -PLATFORM_ALT(hw_pbxa9) = pbxa9 -PLATFORM_ALT(foc_pbxa9) = pbxa9 -PLATFORM_ALT(hw_rpi) = rpi -PLATFORM_ALT(foc_rpi) = rpi -PLATFORM_ALT(hw_arndale) = arndale -PLATFORM_ALT(foc_arndale) = arndale -PLATFORM_ALT(hw_imx53_qsb) = imx53_qsb -PLATFORM_ALT(hw_imx53_qsb_tz) = imx53_qsb_tz -PLATFORM_ALT(hw_usb_armory) = usb_armory -PLATFORM_ALT(hw_wand_quad) = wand_quad -PLATFORM_ALT(hw_odroid_xu) = odroid_xu -PLATFORM_ALT(hw_zynq) = zynq_qemu -PLATFORM_ALT(hw_x86_64_muen) = muen -PLATFORM_ALT(hw_riscv) = riscv_spike -PLATFORM_ALT(foc_odroid_x2) = odroid_x2 usage: @echo @@ -91,7 +75,7 @@ ifneq ($(PLATFORM),) # Check if platform is deprecated or unknown # ifneq ($(filter $(PLATFORM),$(PLATFORMS_DEPR)),) - $(warning Platform '$(PLATFORM)' is deprecated, use '$(PLATFORM_ALT($(PLATFORM)))' instead) + $(info Platform '$(PLATFORM)' is deprecated, use '$(PLATFORM_ALT($(PLATFORM)))' instead) else ifeq ($(filter $(PLATFORM),$(PLATFORMS)),) $(error Bad platform argument '$(PLATFORM)') endif @@ -129,66 +113,47 @@ endif $(BUILD_DIR)/etc: @mkdir -p $@ -BUILD_CONF_X86_32 := run_qemu_iso run_opt_x86_32 run_boot_dir qemu_opt_x86 repos repos_x86 -BUILD_CONF_X86_64 := run_qemu_iso run_opt_x86_64 run_boot_dir qemu_opt_x86 repos repos_x86 -BUILD_CONF_PBXA9 := run_qemu run_opt_arm_hw_foc run_boot_dir qemu_opt_arm repos - -BUILD_CONF(x86_32) := run_kernel_x86_32 $(BUILD_CONF_X86_32) -BUILD_CONF(x86_64) := run_kernel_x86_64 $(BUILD_CONF_X86_64) -BUILD_CONF(pbxa9) := run_kernel_hw_foc $(BUILD_CONF_PBXA9) -BUILD_CONF(panda) := run_kernel_hw_foc run_boot_dir repos -BUILD_CONF(rpi) := run_kernel_hw_foc run_boot_dir repos -BUILD_CONF(arndale) := run_kernel_hw_foc run_boot_dir repos -BUILD_CONF(imx53_qsb) := run_kernel_hw run_boot_dir repos -BUILD_CONF(imx53_qsb_tz) := run_kernel_hw run_boot_dir repos -BUILD_CONF(usb_armory) := run_kernel_hw run_boot_dir repos -BUILD_CONF(wand_quad) := run_kernel_wand_quad run_boot_dir repos -BUILD_CONF(imx6q_sabrelite) := run_kernel_hw_foc_sel4 run_boot_dir repos -BUILD_CONF(imx7d_sabre) := run_kernel_hw_foc_sel4 run_boot_dir repos -BUILD_CONF(odroid_xu) := run_kernel_hw run_boot_dir repos -BUILD_CONF(odroid_x2) := run_kernel_foc run_boot_dir repos -BUILD_CONF(zynq_qemu) := run_kernel_hw run_qemu run_opt_hw run_boot_dir qemu_opt_arm repos -BUILD_CONF(muen) := run_kernel_hw run_opt_muen run_boot_dir repos repos_x86 -BUILD_CONF(riscv_spike) := run_kernel_hw run_opt_spike run_boot_dir repos -BUILD_CONF(linux) := run_kernel_linux repos -BUILD_CONF(nit6_solox) := run_kernel_hw run_boot_dir repos +BUILD_CONF_X86 := run_x86 run_boot_dir repos repos_x86 +BUILD_CONF_ARM_V6 := run_arm_v6 run_boot_dir repos +BUILD_CONF_ARM_V7 := run_arm_v7 run_boot_dir repos +BUILD_CONF(arm_v6) := $(BUILD_CONF_ARM_V6) +BUILD_CONF(arm_v7a) := $(BUILD_CONF_ARM_V7) +BUILD_CONF(riscv) := run_riscv run_boot_dir repos +BUILD_CONF(x86_32) := run_x86_32 $(BUILD_CONF_X86) +BUILD_CONF(x86_64) := run_x86_64 $(BUILD_CONF_X86) +BUILD_CONF(linux) := run_kernel_linux repos # deprecated platforms, to be removed -BUILD_CONF(linux_x86) := run_kernel_linux repos -BUILD_CONF(linux_arm) := run_kernel_linux repos -BUILD_CONF(fiasco_x86) := run_kernel_fiasco $(BUILD_CONF_X86_32) -BUILD_CONF(okl4_x86) := run_kernel_okl4 $(BUILD_CONF_X86_32) -BUILD_CONF(pistachio_x86) := run_kernel_pistachio $(BUILD_CONF_X86_32) -BUILD_CONF(nova_x86_32) := run_kernel_nova $(BUILD_CONF_X86_32) -BUILD_CONF(nova_x86_64) := run_kernel_nova $(BUILD_CONF_X86_64) -BUILD_CONF(hw_x86_64) := run_kernel_hw $(BUILD_CONF_X86_64) -BUILD_CONF(foc_x86_32) := run_kernel_foc $(BUILD_CONF_X86_32) -BUILD_CONF(foc_x86_64) := run_kernel_foc $(BUILD_CONF_X86_64) -BUILD_CONF(sel4_x86_32) := run_kernel_sel4 $(BUILD_CONF_X86_32) -BUILD_CONF(sel4_x86_64) := run_kernel_sel4 $(BUILD_CONF_X86_64) -BUILD_CONF(hw_panda) := ${BUILD_CONF(panda)} -BUILD_CONF(foc_panda) := run_kernel_foc run_boot_dir repos -BUILD_CONF(hw_pbxa9) := ${BUILD_CONF(pbxa9)} -BUILD_CONF(foc_pbxa9) := run_kernel_foc $(BUILD_CONF_PBXA9) -BUILD_CONF(hw_rpi) := ${BUILD_CONF(rpi)} -BUILD_CONF(foc_rpi) := run_kernel_foc run_boot_dir repos -BUILD_CONF(hw_arndale) := ${BUILD_CONF(arndale)} -BUILD_CONF(foc_arndale) := run_kernel_foc run_boot_dir repos -BUILD_CONF(hw_imx53_qsb) := ${BUILD_CONF(imx53_qsb)} -BUILD_CONF(hw_imx53_qsb_tz) := ${BUILD_CONF(imx53_qsb_tz)} -BUILD_CONF(hw_usb_armory) := ${BUILD_CONF(usb_armory)} -BUILD_CONF(hw_wand_quad) := ${BUILD_CONF(wand_quad)} -BUILD_CONF(hw_odroid_xu) := ${BUILD_CONF(odroid_xu)} -BUILD_CONF(hw_zynq) := ${BUILD_CONF(zynq_qemu)} -BUILD_CONF(hw_x86_64_muen) := ${BUILD_CONF(muen)} -BUILD_CONF(hw_riscv) := ${BUILD_CONF(riscv_spike)} -BUILD_CONF(foc_odroid_x2) := ${BUILD_CONF(odroid_x2)} +BUILD_CONF(arndale) := $(BUILD_CONF_ARM_V7) +BUILD_CONF(imx53_qsb) := $(BUILD_CONF_ARM_V7) +BUILD_CONF(imx53_qsb_tz) := $(BUILD_CONF_ARM_V7) +BUILD_CONF(imx6q_sabrelite) := $(BUILD_CONF_ARM_V7) +BUILD_CONF(imx7d_sabre) := $(BUILD_CONF_ARM_V7) +BUILD_CONF(nit6_solox) := $(BUILD_CONF_ARM_V7) +BUILD_CONF(odroid_x2) := $(BUILD_CONF_ARM_V7) +BUILD_CONF(odroid_xu) := $(BUILD_CONF_ARM_V7) +BUILD_CONF(panda) := $(BUILD_CONF_ARM_V7) +BUILD_CONF(pbxa9) := $(BUILD_CONF_ARM_V7) +BUILD_CONF(rpi) := $(BUILD_CONF_ARM_V6) +BUILD_CONF(usb_armory) := $(BUILD_CONF_ARM_V7) +BUILD_CONF(wand_quad) := $(BUILD_CONF_ARM_V7) +BUILD_CONF(zynq_qemu) := $(BUILD_CONF_ARM_V7) +BUILD_CONF(muen) := run_x86_64 $(BUILD_CONF_X86) +BUILD_CONF(riscv_spike) := ${BUILD_CONF(riscv)} message: $(BUILD_DIR)/etc/build.conf $(BUILD_DIR)/etc/build.conf: @echo "GENODE_DIR := $(GENODE_ABS_DIR)" > $@ @echo 'BASE_DIR := $$(GENODE_DIR)/repos/base' >> $@ @echo 'CONTRIB_DIR := $(CONTRIB_ABS_DIR)' >> $@ +ifeq ($(PLATFORM),riscv_spike) + @echo "BOARD := spike" >> $@ +else ifeq ($(PLATFORM),muen) + @echo "BOARD := muen" >> $@ + @echo "KERNEL := hw" >> $@ +else ifneq ($(filter $(PLATFORM),$(PLATFORMS_DEPR)),) + @echo "BOARD := $(PLATFORM)" >> $@ +endif @echo >> $@ @for i in make_j run; do \ cat $(GENODE_DIR)/tool/builddir/build.conf/$$i; done >> $@ @@ -219,56 +184,30 @@ HOST_SPEC_ARCH := ${SPEC_ARCH(${UNAME_MACHINE})} # SPECS definitions # +SPECS(arm_v6) := arm_v6 +SPECS(arm_v7a) := arm_v7a +SPECS(riscv) := riscv SPECS(x86_32) := x86_32 SPECS(x86_64) := x86_64 -SPECS(pbxa9) := pbxa9 -SPECS(panda) := panda -SPECS(rpi) := rpi -SPECS(arndale) := arndale -SPECS(imx53_qsb) := imx53_qsb -SPECS(imx53_qsb_tz) := imx53_qsb trustzone -SPECS(usb_armory) := usb_armory trustzone -SPECS(wand_quad) := wand_quad -SPECS(imx6q_sabrelite) := imx6q_sabrelite -SPECS(imx7d_sabre) := imx7d_sabre -SPECS(odroid_xu) := odroid_xu -SPECS(odroid_x2) := odroid_x2 -SPECS(zynq_qemu) := zynq_qemu -SPECS(muen) := muen x86_64 -SPECS(riscv_spike) := riscv SPECS(linux) := $(HOST_SPEC_ARCH) -SPECS(nit6_solox) := nit6_solox # deprecated platforms -SPECS(linux_x86) := $(HOST_SPEC_ARCH) -SPECS(linux_arm) := $(HOST_SPEC_ARCH) -SPECS(fiasco_x86) := -SPECS(okl4_x86) := -SPECS(pistachio_x86) := -SPECS(nova_x86_32) := nova_x86_32 x86_32 acpi -SPECS(nova_x86_64) := nova_x86_64 x86_64 acpi -SPECS(hw_x86_64) := ${SPECS(x86_64)} -SPECS(foc_x86_32) := foc_x86_32 x86_32 acpi -SPECS(foc_x86_64) := foc_x86_64 x86_64 acpi -SPECS(sel4_x86_32) := sel4_x86_32 x86_32 acpi -SPECS(sel4_x86_64) := sel4_x86_64 x86_64 acpi -SPECS(hw_panda) := ${SPECS(panda)} -SPECS(foc_panda) := foc_panda panda -SPECS(hw_pbxa9) := ${SPECS(pbxa9)} -SPECS(foc_pbxa9) := foc_pbxa9 pbxa9 -SPECS(hw_rpi) := ${SPECS(rpi)} -SPECS(foc_rpi) := foc_rpi rpi -SPECS(hw_arndale) := ${SPECS(arndale)} -SPECS(foc_arndale) := foc_arndale arndale -SPECS(hw_imx53_qsb) := ${SPECS(imx53_qsb)} -SPECS(hw_imx53_qsb_tz) := ${SPECS(imx53_qsb_tz)} -SPECS(hw_usb_armory) := ${SPECS(usb_armory)} -SPECS(hw_wand_quad) := ${SPECS(wand_quad)} -SPECS(hw_odroid_xu) := ${SPECS(odroid_xu)} -SPECS(hw_zynq) := ${SPECS(zynq_qemu)} -SPECS(hw_x86_64_muen) := ${SPECS(muen)} -SPECS(hw_riscv) := ${SPECS(riscv_spike)} -SPECS(foc_odroid_x2) := foc_odroid_x2 odroid_x2 +SPECS(rpi) := arm_v6 +SPECS(arndale) := arm_v7a +SPECS(imx53_qsb) := arm_v7a +SPECS(imx53_qsb_tz) := arm_v7a +SPECS(imx6q_sabrelite) := arm_v7a +SPECS(imx7d_sabre) := arm_v7a +SPECS(nit6_solox) := arm_v7a +SPECS(odroid_x2) := arm_v7a +SPECS(odroid_xu) := arm_v7a +SPECS(panda) := arm_v7a +SPECS(pbxa9) := arm_v7a +SPECS(usb_armory) := arm_v7a +SPECS(wand_quad) := arm_v7a +SPECS(zynq_qemu) := arm_v7a +SPECS(riscv_spike) := riscv +SPECS(muen) := x86_64 ifneq (${SPECS(${PLATFORM})},) message: $(BUILD_DIR)/etc/specs.conf