debian: Separate build config items to acrn-hypervisor.conf.mk

Tracked-On: #6688
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
This commit is contained in:
Helmut Buchsbaum 2022-05-05 14:05:33 +02:00 committed by acrnsi-robot
parent be262a1b71
commit fe85273ae4
2 changed files with 28 additions and 22 deletions

20
debian/acrn-hypervisor.conf.mk vendored Executable file
View File

@ -0,0 +1,20 @@
# set these variables to define build of certain boards/scenarios, e.g.
ACRN_BOARDLIST := whl-ipc-i5 nuc11tnbi5 cfl-k700-i7 tgl-vecow-spc-7100-Corei7 nuc7i7dnh kontron-COMe-mAL10 simatic-ipc227g
ACRN_SCENARIOLIST := partitioned shared hybrid hybrid_rt shared+initrd
# alternatively, unset ACRN_BOARDLIST to build for all boards,
# ACRN_SCENARIOLIST must be set explicitly: scenario configs must be located
# in the same directory as the board config, since there are no board and
# scenario attributes any more in the scenario configs since
# commit c25de24a92c26faa59e7d5e23966dd54215b66e4
#
# undefine ACRN_BOARDLIST
# add builtin and eventually explicitely provided config directories
# misc/config_tools/data: contains ACRN supported configuration
# debian/configs: add additional configurations here!
CONFIGDIRS = misc/config_tools/data debian/configs
# for now build the debug versions
# set to 1 for RELEASE build
export RELEASE ?= 0

30
debian/rules vendored
View File

@ -12,17 +12,6 @@ export PYBUILD_DISABLE=test
export MAKEFLAGS = --no-print-directory
# set these variables to restrict build to certain boards/scenarios, e.g.
ACRN_BOARDLIST := whl-ipc-i5 nuc11tnbi5 cfl-k700-i7 tgl-vecow-spc-7100-Corei7 nuc7i7dnh kontron-COMe-mAL10 simatic-ipc227g
ACRN_SCENARIOLIST := partitioned shared hybrid hybrid_rt shared+initrd
# alternatively, unset ACRN_BOARDLIST to build for all boards,
# ACRN_SCENARIOLIST must be set explicitly: scenario configs must be located
# in the same directory as the board config, since there are no board and
# scenario attributes any more in the scenario configs since
# commit c25de24a92c26faa59e7d5e23966dd54215b66e4
#
# undefine ACRN_BOARDLIST
# helper to compare strings
strequ=$(if $(subst x$1,,x$2)$(subst x$2,,x$1),,1)
@ -39,15 +28,17 @@ commasep = $(subst $(space),$(comma)$(space),$1)
# recursive wildcard
rwildcard=$(foreach d,$(wildcard $(1:=/*)),$(call rwildcard,$d,$2) $(filter $(subst *,%,$2),$d))
# add builtin and eventually explicitely provided config directories
# misc/config_tools/data: contains ACRN supported configuration
# debian/configs: add additional configurations here!
CONFIGDIRS = misc/config_tools/data debian/configs
CONFIGXMLS := $(call rwildcard,$(CONFIGDIRS),*.xml)
# remove double quotes
unquote = $(subst $\",,$1)
include debian/acrn-hypervisor.conf.mk
ifeq ($(ACRN_SCENARIOLIST),)
$(error No scenarios defined. Please set ACRN_SCENARIOLIST)
endif
# defaults to config_tools provided data
CONFIGDIRS ?= misc/config_tools/data
CONFIGXMLS := $(call rwildcard,$(CONFIGDIRS),*.xml)
# get relevant data from acrn-config attributes of an XML
#
# This evaluates the attributes of acn-config tag got from xmllint (after unquoting).
@ -82,9 +73,7 @@ boardlist := $(sort $(ACRN_BOARDLIST))
endif
# honor variable ACRN_SCENARIOLIST
ifneq ($(ACRN_SCENARIOLIST),)
$(foreach b,$(boardlist),$(eval scenariolist_$(b) := $(filter $(scenariolist_$(b)),$(ACRN_SCENARIOLIST))))
endif
# board config name -> board config file
bfile = $(abspath $(config_$1))
@ -101,9 +90,6 @@ sfile = $(abspath $(config_$1_$2))
include VERSION
export ACRNVERSION := $(MAJOR_VERSION).$(MINOR_VERSION)
# for now build the debug versions
export RELEASE ?= 0
# set paths (see also paths.make)
export prefix = /usr
export bindir = $(prefix)/bin