Unify calls for compiler version and name for XCC and GCC.
Separate conversion of optimization level from Kconfig settings
to compiler flags to separate cmake function, because of usage
in two places.
Read XCC_TOOLS_VERSION from compiler.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@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>
Add helper function sof_append_relative_path_definitions that
defines RELATIVE_PATH per source file for given target.
__FILE is not always suitable as C standard states that __FILE__ expands to
input file name, that usually is absolute path what will cause f.e. .rodata
size to be dependent on where project is physically located on the disk.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
When there are changes made to Kconfig files it's better
to run olddefconfig automatically to prevent undesired behaviour,
like for example depending on added config that has some default value
that is not present because developer didn't run olddefconfig
after pulling changes.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
Traces in SOF are used like trace("<func>() info"),
in that case __func__ is not convenient, because it is not literal
and it would be needed to use %s everywhere and change
all current traces.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
checkpatch is currently checking for changes that need ABI updates
and actual ABI changes in the same loop in process(). So if some
file that needs an ABI change comes first, a WARNING will be issued.
Look for an actual ABI change before starting to crunch the entire
patch line by line.
Signed-off-by: Dragos Tarcatu <dragos_tarcatu@mentor.com>
Do not check for u/s* vs u/sint*_t in SOF,
because there is only the longer variant.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
It was previously removed from SOF, but it's better to just disable
it for SOF to make delta with original checkpatch as small as possible.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
Introduce constant that enables SOF-specific behaviour of checkpatch.
Changes made to original checkpatch should be easily visible
to make merging updates easier.
If code that is not applicable to SOF is just removed, then
while updating it's hard to distinguish if it is new feature
in checkpatch or was removed for SOF. It's better to just disable
parts of code that do not work for SOF.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
The cavs platform IPC shm file name in QEMU is changed
from ipc-io to ipc-dsp-io.
Use regular expression to find the right SHM IPC register file,
so that we can smoothly pass the transition of the QEMU update.
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Merge kernel's checkpatch with custom features added for SOF.
SOF follows kernel code style, so checkpatch should be also up-to-date.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
Merged hp buffer heap with normal buffer heap.
Since current buffer heap was actually using hp memory and it served
no purpose to have two heaps.
Removed extern capabilities and merged other capabiliteis to
buffer heap. Currently none of those buffer heaps supports extern.
Signed-off-by: Jakub Dabek <jakub.dabek@intel.com>
The qemu for BDW and HSW removed shm mbox and moved it into dram.
Change the scripts to the new version.
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Increases HP Buffer Heap and Runtime System Heap sizes in order to
fit all the pipeline buffers.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Adding static libraries properly may be troublesome for developers
that are not familiar with CMake, so function that makes it easier
should be useful.
Usually developer will just add sources directly to the target.
Using static libraries should be limited just to closed / precompiled
3rd party components.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
Process of documentation building and publishing requires
3 repositories. It is troublesome for people that are responsible
f.e. only for documentation publishing. It makes the process
easier by turning some easy to break steps from publisher instructions
into a script.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
CMake has convention of changing relative paths to absolute
for CMAKE_* variables. It does it automatically f.e. CMAKE_C_COMPILER.
However for our tools like objcopy we have to do it manually.
It also helps with integration of CMake in some IDEs.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
Some of interface headers are not needed by kernel,
but are needed by user-space applications, so we can split them
into multiple directories that indicate their purpose.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
This change gathers some of the information inside of the DAI drivers,
which was previously inferred using external logic.
Signed-off-by: Slawomir Blauciak <slawomir.blauciak@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>
Use local version that still in review stage that we can have test
before final merge in upstream.
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Install all FW and all TPLG files into
root@hostname/ip:/lib/firmware/intel folder.
install sof-logger and LDC files into root@hostname/ip:~/
Signed-off-by: Pan Xiuli <xiuli.pan@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>
Enable checks to all supported platforms of QEMU now.
Check both IPC header regs and memory window IPC message header.
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>
t flag is used to allocate a pseudo-TTY, but in some cases pseudo-tty is
not support. Removed for more useage.
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
make[1]: Leaving directory '/home/lrg/source/reef/sof.git'
./scripts/xtensa-build-all.sh: line 123: [: ==: unary operator expected
Fix, set variable to "none" if xcc not found.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Check ENV XTENSA_TOOLS_ROOT to determain which compiler to use, and set
the PATH and other ENV needed for xt-xcc.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Add a flag "-l" to make rimage install only in pdw/local.
Also add parse for args, then simplify platform build for loop since in
parse the args will be all legal
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Modify Dockerfile to copy apt.conf from host and set host proxy to
environment. Also modify some git url to http url in order to use the
proxy.
Also add a docker-build.sh to help docker build
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
This ensures that the ubuntu version we use has the right
versions of Open SSL. Without this, the rimage compilation will
fail with the following error:
pkcs1_5.c: In function 'pkcs_sign':
pkcs1_5.c:117:20: error: dereferencing pointer to incomplete type 'RSA
{aka struct rsa_st}'
Signed-off-by: Prashant Malani <pmalani@google.com>
Acked-by: Dylan Reid <dgreid@chromium.org>
Make it easier to build the topology when working in sof.git. This
script automates the change of directory to and from soft.git.
It also makes building in a container easier because all scripts can
execute from the same working directory.
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Having a docker container that contains the cross compiler and host
dependencies eases setup and maintenance of local builds.
The container setup procedure is based of the wiki instruction. A few
more dependencies were added.
In addition to the ct-ng and xtensa-newlib steps, this container builds
top of tree alsa-lib and alsa-utils as distros seem to be slow to update
them with the needed topology features.
The docker-run.sh script is used to automatically bind mount local
soft.git and sof.git directories in to the container. This provides
build artifacts in the same place as a local "make" would.
Use it like the following:
./scripts/docker-run.sh make
./scripts/docker-run.sh ./scripts/xtensa-build-all.sh
etc...
The container only needs to be re-built when the toolchain or alsa
dependencies are modified.
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Use /bin/sh by default. The lists used in xtensa-build-all.sh are a
bash feature, use bash for that script.
Signed-off-by: Dylan Reid <dgreid@chromium.org>
rimage is not built by default, which can lead to disconnects and
awful bugs when the memory layout changes.
Add rimage build+install as default for xtensa scripts
The BKM should be to rely on executing
./scripts/xtensa-build-all.sh [byt|cht|apl|cnl]
instead of manual commands...
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
The ROOT is already assumed to be as $pwd/../xtensa-root/$ROOT,
set the PATH as well
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
This patch modifies the build-all script for xtensa platforms
to make it easier to choose platforms
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Use Linux checkpatch.pl to check for style problems on each commit
rather than waste time on mailing lists.
The hooks are installed by default with autogen.sh if there are
no pre-existing hooks, e.g. if a global template is used.
Commits can still be forced by using git commit -n (or --no-verify) if
you absolutely need to bypass checkpatch.pl in a work branch.
Note that both checkpatch.pl and spelling.txt are provided under
a GPL v2 license.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>