TCF: update defaults to use configuration fragments
Currently it plucks configuration strings in/out of the $O/.config and that is quite dirty. There is a cleaner way to do that with configuration fragments which is now enabled by being able to include them from the object directory. Change-Id: Id51881391293ace89b58153c5de7db1afe67118a Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
This commit is contained in:
parent
27482314d4
commit
462f431791
1 changed files with 42 additions and 58 deletions
100
defaults.tc
100
defaults.tc
|
@ -32,16 +32,6 @@
|
|||
# Building
|
||||
# --------
|
||||
#
|
||||
# - we always remove the configuration file to force it being
|
||||
# re-generated. Why? because otherwise, in some cases,
|
||||
# 'silentoldconfig' tries to update it with input from the user and
|
||||
# fails. When it is not needed. So before we start mucking with it,
|
||||
# remove it.
|
||||
#
|
||||
# - then we generate the init config -- why? because to filter which
|
||||
# test cases we can run, we need to see if a CONFIG option is
|
||||
# enabled or not.
|
||||
#
|
||||
# - We need to put the output of the compilation on a directory
|
||||
# specific to the target and testcase we are building for because:
|
||||
#
|
||||
|
@ -63,39 +53,38 @@
|
|||
# for a combination of the testcase name, the target and the
|
||||
# bsp_model.
|
||||
|
||||
# (1) First build step to generate the configuration:
|
||||
# (1) Remove the existing config file
|
||||
#
|
||||
# Why? because otherwise, in some cases, 'silentoldconfig' tries
|
||||
# to update it with input from the user and fails. When it is not
|
||||
# needed. So before we start mucking with it, remove it.
|
||||
#
|
||||
# ^build \
|
||||
# rm -f %(srcdir)s/outdir-%(tchash)s-%(board)s/.config; \
|
||||
# mkdir -p %(srcdir)s/outdir-%(tchash)s-%(board)s; \
|
||||
# make -j -C %(srcdir)s/ %(extra_args)s \
|
||||
# BOARD=%(board)s ARCH=%(bsp)s O=outdir-%(tchash)s-%(board)s \
|
||||
# initconfig
|
||||
#
|
||||
# Once we have the configuration generated, for Sanity Check test
|
||||
# cases (and others) evaluate if we have to run or not based on
|
||||
# configuration values. This is done by a Python function
|
||||
# (tcfl.tc_tci.action_eval_skip). This looks at CONFIG_ options
|
||||
# and decides if we are to skip for any reason.
|
||||
#
|
||||
# ^build @tcfl.tc_tci.action_eval_skip %(srcdir)s/outdir-%(tchash)s-%(board)s
|
||||
# rm -f %(srcdir)s/outdir-%(tchash)s-%(board)s/.config
|
||||
|
||||
# (2) prepare the configuration for Quark SE / ARC BSPs
|
||||
#
|
||||
# (2.1) If we are running both cores at the same time, make sure
|
||||
# ARC_INIT is set
|
||||
#
|
||||
# ^build [ quark_se_stub == 'yes' and bsp_model == 'x86+arc' ] \
|
||||
# echo "# Generated by Zephyr's TCF defaults.tc" > %(srcdir)s/outdir-%(tchash)s-%(board)s/tcf_2.1.conf; \
|
||||
# echo 'CONFIG_ARC_INIT=y' >> %(srcdir)s/outdir-%(tchash)s-%(board)s/tcf_2.1.conf
|
||||
|
||||
# (2) Support for building/running multiple core SOC/platforms (like
|
||||
# Quark SE); each core is called 'a BSP'.
|
||||
# (2.2) On Quark SE, when running the x86 core only we need to make
|
||||
# sure the kernel doesn't wait for the ARC to initialize.
|
||||
#
|
||||
# Some targets have multiple BSPs and need a stub in BSP1 for BSP2
|
||||
# to work independently, so these first @build rules take care of
|
||||
# that. How we handle this might change in the future.
|
||||
#
|
||||
# The hack for altering the configuration is dirty. Looking for
|
||||
# better ones.
|
||||
# @build [ quark_se_stub == 'yes' and bsp_model == 'x86' ] \
|
||||
# echo "# Generated by Zephyr's TCF defaults.tc" > %(srcdir)s/outdir-%(tchash)s-%(board)s/tcf_2.2.conf; \
|
||||
# echo 'CONFIG_ARC_INIT=n' >> %(srcdir)s/outdir-%(tchash)s-%(board)s/tcf_2.2.conf
|
||||
|
||||
# (2.1) For running on Quark SE ARC only, we need to make a stub for
|
||||
# the x86 core to pipe the serial from/to the ARC. It has to
|
||||
# also be deployed, so we add said kernel to @images.
|
||||
# (2.3) To run only in the ARC core in certain Quark SE platforms, we need a
|
||||
# stub in the x86 core to start the ARC CPU.
|
||||
#
|
||||
# (a) Arduino 101
|
||||
# It has to also be deployed, so we add said kernel to @images.
|
||||
#
|
||||
# (2.3.1) Arduino 101
|
||||
#
|
||||
# @build [ type == "arduino101" and quark_se_stub == 'yes' and bsp_model == 'arc' ] \
|
||||
# rm -f %(srcdir_abs)s/outdir-%(tchash)s-stub-x86-arduino_101/.config; \
|
||||
|
@ -106,7 +95,7 @@
|
|||
# @images [ type == "arduino101" and quark_se_stub == 'yes' and bsp_model == 'arc'] \
|
||||
# kernel-x86:%(srcdir)s/outdir-%(tchash)s-stub-x86-arduino_101/zephyr.bin
|
||||
#
|
||||
# (b) For Quark SE Devboard v1
|
||||
# (2.3.2) For Quark SE Devboard v1
|
||||
#
|
||||
# @build [ type == "ah" and quark_se_stub == 'yes' and bsp_model == 'arc' ] \
|
||||
# rm -f %(srcdir_abs)s/outdir-%(tchash)s-stub-x86-quark_se_devboard/.config; \
|
||||
|
@ -117,7 +106,7 @@
|
|||
# @images [ type == "ah" and quark_se_stub == 'yes' and bsp_model == 'arc'] \
|
||||
# kernel-x86:%(srcdir)s/outdir-%(tchash)s-stub-x86-quark_se_devboard/zephyr.bin
|
||||
#
|
||||
# (c) For Quark SE Devboard
|
||||
# (2.3.3) For Quark SE Devboard
|
||||
#
|
||||
# @build [ type == "ma" and quark_se_stub == 'yes' and bsp_model == 'arc' ] \
|
||||
# rm -f %(srcdir_abs)s/outdir-%(tchash)s-stub-x86-quark_se_devboard/.config; \
|
||||
|
@ -127,32 +116,27 @@
|
|||
#
|
||||
# @images [ type == "ma" and quark_se_stub == 'yes' and bsp_model == 'arc'] \
|
||||
# kernel-x86:%(srcdir)s/outdir-%(tchash)s-stub-x86-quark_se_devboard/zephyr.bin
|
||||
#
|
||||
|
||||
# (2.2) On Quark SE, when running the x86 core only we need to make
|
||||
# sure the kernel doesn't wait for the ARC to initialize. So we
|
||||
# do the initial config, pluck the CONFIG_ARC_INIT away and
|
||||
# reconfigure before compiling. UGLY, but it works
|
||||
|
||||
# (3) Generate the initial configuration
|
||||
#
|
||||
# @build [ quark_se_stub == 'yes' and bsp_model == 'x86' ] \
|
||||
# sed -i 's/^CONFIG_ARC_INIT.*//' \
|
||||
# %(srcdir)s/outdir-%(tchash)s-%(board)s/.config; \
|
||||
# Because to filter which test cases we can run, we need to see if
|
||||
# a CONFIG option is enabled or not.
|
||||
#
|
||||
# ^build \
|
||||
# make -j -C %(srcdir)s/ %(extra_args)s \
|
||||
# BOARD=%(board)s ARCH=%(bsp)s O=outdir-%(tchash)s-%(board)s \
|
||||
# olddefconfig
|
||||
|
||||
# (2.3) If we are running both cores at the same time, make sure
|
||||
# ARC_INIT is set
|
||||
# BOARD=%(board)s O=outdir-%(tchash)s-%(board)s \
|
||||
# initconfig
|
||||
#
|
||||
# @build [ quark_se_stub == 'yes' and bsp_model == 'x86+arc' ] \
|
||||
# echo CONFIG_ARC_INIT=y >> \
|
||||
# %(srcdir)s/outdir-%(tchash)s-%(board)s/.config; \
|
||||
# make -j -C %(srcdir)s %(extra_args)s \
|
||||
# BOARD=%(board)s ARCH=%(bsp)s O=outdir-%(tchash)s-%(board)s \
|
||||
# %(extra_args)s olddefconfig
|
||||
# Once we have the configuration generated, for Sanity Check test
|
||||
# cases (and others) evaluate if we have to run or not based on
|
||||
# configuration values. This is done by a Python function
|
||||
# (tcfl.tc_tci.action_eval_skip). This looks at CONFIG_ options
|
||||
# and decides if we are to skip for any reason.
|
||||
#
|
||||
# ^build @tcfl.tc_tci.action_eval_skip %(srcdir)s/outdir-%(tchash)s-%(board)s
|
||||
|
||||
# (2.4) Now the basic build and deploy commands that apply to all the
|
||||
# platforms
|
||||
# (4) General build and deploy commands that apply to all platforms
|
||||
#
|
||||
# Note: we pass a RUNID that is a compositon of the RunID passed
|
||||
# with '-i' to 'tcf run' (if passed) TCHASH (which is
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue