Add cmake -DINIT_CONFIG= option that can point at any initial file.
"make clean" does not delete .config any more.
Note reconfiguration does NOT causes recompilation because -imacros
hides the generated .h from CMake's dependency scan. This is not a
regression, that problems exists since -imacros was introduced. At least
it's now possible to "make clean" and rebuild without losing the .config
file.
Fix for #3617
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Lets use the same version of Xtensa toolchain as Intel in order
to avoid compilation problems.
It is difficult to support multiple toolchain versions because specific
headers needs to be updated, so lets have the same version supported
between IMX and Intel.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
The script already logs the full CMake command that is re-usable outside
this script... except for the PATH change. Expose that sneaky PATH
change.
Debugging every build issue starts with peeling the too many layers of
indirection.
Also fix some minor issue in the help message.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This makes it possible to switch to Ninja with a single line change
which can be useful to test build changes and issues.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Currently xtensa-build-all.sh has restriction to use rimage for tgl
signing, because rimage didn't support tgl. As rimage now has support
for tgl signing let's remove this limitation.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Following commit 88b69cc2e5 ("scripts: xtensa-build-all: Add support
for building TGL and signing with MEU") we now have an unified and
flexible PRIVATE_KEY_OPTION that can do anything with very little code.
The -k option was never a good idea in the first place because it
already required an environment variable anyway (RIMAGE_PRIVATE_KEY)
instead of a command line argument so the code should have just checked
whether RIMAGE_PRIVATE_KEY was defined, that would have been
enough. Requiring the user to "double-confirm" with -k has been adding
extra complication for both the user interface and the implementation.
xtensa-build-all is effectively a "CMake configuration convenience"
script, however it shouldn't become an additional layer of indirection
and complexity and its interface should expose CMake (which is already a
layer of indirection!) as directly as possible.
See longer discussion in PR #3187
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
We switch to PCH-based names instead of CPU config names for tigerlake+
platforms, because we need to support multiple variants of PCHs based
on one CPU famile - for example TGL-H & TGL-LP.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
Add support for building TGL FW and signing with MEU tool. Signing
with rimage is not supported atm.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Some platforms needs platform-specific configuration
that override the default config. For example, chrome platforms
need the LPS to be enabled by default for maximizing the
power savings for the WoV feature. Add a -o switch to allow
specifying the override config file.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
This kconfig collides with one of the same name in Zephyr. Rename it
for clarity ("MULTICORE" was picked for symmetry with the existing
"CORE_COUNT", though it's admittedly a little long...).
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
In renaming of $j -> $platform one instance of variable was missed which
has led to wrong configs being used.
Fixes: 941dfcccb0 ("use switch case")
Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
The main build script has a fairly verbose output by default but not the
most important things it does yet. These commands are useful to "peel"
the layer of indirection and debug cmake issues; either locally or when
wondering what CI does.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Copy the icl and cnl configurations.
This build with the gcc toolchain has NOT been tested on tgl. The
purpose is purely to add the gcc build to CI, avoid future gcc bitrot
and catch more warnings and bugs.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Let's stop ignoring build and test failures. Start gradually with the
scripts involved in testbench, more files later.
Follow-up to to bug #2752 "host-testbench.sh ignores errors" and commit
ab421466af ("CI: Travis: enable host testbnech again") and
ab421466aff826~1
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Currently, "set -e" is being ignored for type command using redirections
and "A && true". "A && true" is a no-op and a peculiar case where
"set -e" ignores the exit code of A.
Exit code of the "type" command is used in an if statement which is
exactly what the function of "if" command is. Also, "set -e" ignores
exit codes of commands used in if statements.
Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
Use getopts to parse the arguments instead of manual parsing to leave no
room for errors, bugs, and inconsistent conventions introduced by custom
implementation.
Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
`PLATFORMS` variable was used as an array while it is actually a string
used incorrectly making it work accidentally.
Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
CMAKE_VERBOSE_MAKE was sometimes "hardcoding" the decision in CMake's
cache. Move that decision to the make invocation.
After running xtensa-build-all.sh [-v], it's now possible to choose
again whether "make -C build_apl_gcc/" should be VERBOSE or not without
starting from scratch and with the exact same configuration.
Before this commit it was possible for make to decide again after a
non-verbose xtensa-build-all.sh but not possible to decide again after a
verbose xtensa-build-all.sh... very confusing.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Disable verbose build by default in build script.
It would be too annoying if we do not need to debug
with make systems.
Use -v option to enable verbose log if need.
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Running on 120MHz Low Power Ring Oscillator enables more
aggressive power saving. Therefore this should be a default
options for all Cannonlake configurations that may run
on a single dsp core and does not need more than 120 MCPS.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
Since xcc is the default toolchain for xtensa architecture,
the defconfigs should be customized for xcc.
gcc versions are saved for CI builds.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
Update xcc build config for all existing platforms.
xcc build with byt, cht and sue need special defconfig.
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
On specific Intel platforms, we have to use a private key which is not
shared with the rest of the world.
Extend xtensa-build-all.sh with an option, and pass the key path
explicitly to cmake if needed.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Build faster by using all available cores by default
The xtensa script claims it used infinite build threads when j was not
specified but it was actually falling back to 1.
Signed-off-by: Curtis Malainey <cujomalainey@google.com>
Add an option to modify the defconfig during fw build using the
script. Without this, modifying the default config and building
the FW is a 2 step process.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Add -u option to allow force building xtensa(up) ARCH on platforms which
usually building xtensa-smp by default.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Use different build folder for gcc and xcc build.
Will auto selected if ROM build is not supported for the platform,
thus make -a -r can work.
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Add a debug option to include build number, date and time into build.
This will be disabled b default so that all builds are reproducible.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>