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>
Stop drowning and missing other warnings.
Example:
./scripts/checkpatch.pl -g eaf49e26b4bb~0
- 40 "Please update ABI..." warnings
- 2 other warnings including a spelling mistake that were missed.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
dist.cmake is (for now) the only .cmake file that uses GIT_TAG at _cmake
configure time_. This means even "make clean" is not enough for
dist.cmake to take into account some git tag or version change. It's
very confusing because on the other hand "make check_version_h" and
everything else always shows up-to-date git information.
"make rebuild_cache" addresses this situation so mention it in a
warning.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Before this fix, any random, later git tag like for instance
"releases/jsl/v3.0-rc1" would be picked up and then immediately
discarded and replaced with v0000 because it didn't start with 'v*'
Also log all the versions always and not just when there is already a
.tarball-version file.
Increase --abbrev=12 because --abbrev=4 doesn't seem to make sense.
Signed-off-by: Marc Herbert <marc.herbert@intel.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>
A "tarbomb" is an archive file that has more than one directory at the
top level, which is (fortunately) unusual for .tar files. By default,
tar extracts archive members "as is" in the current directory. If the
archive has many top level members then it becomes very hard to make the
difference between what was just extracted versus what was already
there. As extraction is recursive this gets much worse because the
problem can repeat itself in subdirectories. As the last but not least
nail in the coffin, tar silently overwrites existing files by default.
This commit is admittedly an "incompatible build API change" meaning any
higher level build or packaging script that was consuming source release
tarballs (as opposed to git cloning the source) will require a small
change. Consumers of release tarballs must be rare though because the
output of "make dist" has already been broken by commit
c00d39c71b ("Add rimage as a git submodule") anyway yet no one noticed
yet.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
More control over which tools should be built, instead of building
everything every time.
Note: All the build files will be removed every time this script is ran
since tools are not independent of each other.
Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
Fixes 428804e1c ("scripts/qemu-check.sh: add set -e") which failed to
consider the case of an empty $IPC_REG or $IPC_MSG.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Removes shellcheck warning and could allow directory names with
whitespace in a very distant future.
Silence printf "$@" shellcheck warning in die() function.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Yes, staying withing 80 columns is certainly still _preferred_. But
it's not the hard limit that the checkpatch warnings imply, and other
concerns can most certainly dominate.
Increase the default limit to 100 characters. Not because 100
characters is some hard limit either, but that's certainly a "what are
you doing" kind of value and less likely to be about the occasional
slightly longer lines.
Miscellanea:
- to avoid unnecessary whitespace changes in files, checkpatch will no
longer emit a warning about line length when scanning files unless
--strict is also used
- Add a bit to coding-style about alignment to open parenthesis
dbaluta: This patch is taken and manually applied from Linux kernel
tree. See commit, in Linux kernel tree:
bdc48fa11e46 ("checkpatch/coding-style: deprecate 80-column warning")
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.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>
- Add a simple test in cmake to download submodules only when rimage is
missing. This stops randomly changing the source code from one build
to the next and overwriting any submodule work in progress.
- Remove the GIT_SUBMODULE option which is now useless because rimage is
not optional for sof
- Add a --merge option for safety. It makes zero difference right now
but could save work in progress if we ever add more
submodules (hopefully not) and someone struggles with submodules and
ends up in a partially initialized state.
Git submodules are rarely ever the answer; these few changes make them a
bit more usable.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
qemu-check.sh can now be invoked from more places: not just the qemu
directory but also from sof/ and from their parent.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
When there's a failure like for instance SOF issue #2543, fixed in
alsa-utils commit caf77a93cef5 ("topology: add back asrc to widget_map
in dapm.c"), it's finally possible to remove all the noise around the
failure and see the failed command:
NO_PROCESSORS=1 VEBOSE=1 ./scripts/build-tools.sh
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>
This adds the necessary bits to update git submodules when
cmake is run, with the option to turn this behavior off if
needed. This is in preparation to use fw.h and manifest.h
from the rimage repo to prevent having two copies of each
file in two different repos. Obviously, the files in
the submodules must exist before building the firmware,
so run git submodule update to checkout the files.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
We don't need history for building qemu or sof. Using shallow clones
will save time spent on downloading unnecessary history which is
significant for bigger repos like qemu.
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.
The script uses no options as of now, so current implementation just
exits if any option is provided.
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>
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>
The git commands to get version strings need to run in the SOF source
directory. This is not automatically set when building for Zephyr so
fix it.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Add targets that are meant to be used after defconfig,
to apply configs from <arch>/configs/override on top of defconfigs.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
CMake regeneration condition should depend on directory to automatically
update when new defconfigs are added.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
Enable 3 simple test with host-testbench:
volume, src and eqiir
Usage:
./scripts/build-tools.sh -t
./scripts/host-build-all.sh
./scripts/host-testbench.sh
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Breakdown script to functions, use local variables, and a main function.
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>
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>
When variable length array, filled with string will be
placed in sucha manner that null terminator address will
be divisible by four, then it will be lost in output
binary file. It leads to troubles during scanning content
of such a section. Such a problem occur in firmware
and produce logger and FW debug ABI mismatch and it's why
logger output is broken.
After change length of XCC_TOOLS_VERSION to be none of
number four multiplication problem with logger disappear.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.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>
Adjust top_of_kernel_tree() function to SOF so invoking
./scripts/checkpatch.pl works out of the box and doesn't require
figuring what's going on and the existence of the --no-tree option which
sof-ci invokes "behind the scenes".
This instead of failing with:
Must be run from the top-level dir. of a kernel tree
Compared to --no-tree, this is also enables a couple extra checks like:
WARNING: use relative pathname instead of absolute in changelog text
PS: the space between check and patch is here to... defeat checkpatch
itself. It apparently doesn't expect any change to itself.
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>
Add support for compiling FW with settings acceptable for clang,
in order to let it perform static analysis on the code.
Clang works mostly on ASTs made out of C code, so there is
no need to build complete signed binary for it.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>