Lines Matching +full:xtensa +full:- +full:build +full:- +full:all

2 # SPDX-License-Identifier: BSD-3-Clause
3 # Copyright(c) 2018 Intel Corporation. All rights reserved.
6 set -e
9 imx8 imx8x imx8m imx8ulp tgl tgl-h rn)
13 BUILD_JOBS=$(nproc --all)
19 # As CMake forks one compiler process for each source file, the XTensa
25 # The entire, purely local gcc build is so fast (~ 1s) that observing
26 # any difference between -j nproc and -j nproc*N is practically
29 if [ -n "$XTENSA_TOOLS_ROOT" ]; then
46 Re-configures and re-builds SOF using the corresponding compiler and the
53 -r Build rom if available (gcc only)
54 -a Build all platforms
55 -u Force UP ARCH
56 -d Enable debug build
57 -c Interactive menuconfig
58 -o arg, copies src/arch/xtensa/configs/override/<arg>.config
59 to the build directory after invoking CMake and before Make.
60 -k Configure rimage to use a non-default \${RIMAGE_PRIVATE_KEY}
62 -v Verbose Makefile log
63 -j n Set number of make build jobs. Jobs=#cores when no flag. \
65 -m path to MEU tool. CMake disables rimage signing which produces a
66 .uns[igned] file signed by MEU. For a non-default key use the
69 To use a non-default key you must define the right CMake parameter in the
72 PRIVATE_KEY_OPTION='-DMEU_PRIVATE_KEY=path/to/key' $0 -m /path/to/meu ...
74 PRIVATE_KEY_OPTION='-DRIMAGE_PRIVATE_KEY=path/to/key' $0 ...
82 │   ├── RD-2012.5-linux/
84 │   └── RG-2017.8-linux/
88 ├── RD-2012.5-linux/
90 └── RG-2017.8-linux/
116 shift $((OPTIND-1))
121 if [ -n "${OVERRIDE_CONFIG}" ]
123 OVERRIDE_CONFIG="${SOF_TOP}/src/arch/xtensa/configs/override/$OVERRIDE_CONFIG.config"
124 [ -f "${OVERRIDE_CONFIG}" ] || die 'Invalid override config file %s\n' "${OVERRIDE_CONFIG}"
127 if [ -n "${MEU_TOOL_PATH}" ]
129 [ -d "${MEU_TOOL_PATH}" ] || die 'Invalid MEU TOOL PATH %s\n' "${MEU_TOOL_PATH}"
130 MEU_PATH_OPTION=-DMEU_PATH="${MEU_TOOL_PATH}"
153 if [ ${#PLATFORMS[@]} -eq 0 ];
164 'WARNING: -k and RIMAGE_PRIVATE_KEY are deprecated, see usage.\n'
165 if [ -z ${RIMAGE_PRIVATE_KEY+x} ]
170 PRIVATE_KEY_OPTION="-DRIMAGE_PRIVATE_KEY=${RIMAGE_PRIVATE_KEY}"
176 # build platforms
186 HOST="xtensa-byt-elf"
187 XTENSA_TOOLS_VERSION="RD-2012.5-linux"
192 HOST="xtensa-byt-elf"
193 XTENSA_TOOLS_VERSION="RD-2012.5-linux"
198 HOST="xtensa-hsw-elf"
199 XTENSA_TOOLS_VERSION="RG-2017.8-linux"
204 HOST="xtensa-hsw-elf"
205 XTENSA_TOOLS_VERSION="RG-2017.8-linux"
212 if command -v xtensa-bxt-elf-gcc; then
213 HOST="xtensa-bxt-elf"
215 HOST="xtensa-apl-elf"
218 XTENSA_TOOLS_VERSION="RG-2017.8-linux"
226 if command -v xtensa-bxt-elf-gcc; then
227 HOST="xtensa-bxt-elf"
229 HOST="xtensa-apl-elf"
232 XTENSA_TOOLS_VERSION="RG-2017.8-linux"
240 if command -v xtensa-bxt-elf-gcc; then
241 HOST="xtensa-bxt-elf"
243 HOST="xtensa-apl-elf"
246 XTENSA_TOOLS_VERSION="RG-2017.8-linux"
252 HOST="xtensa-cnl-elf"
253 XTENSA_TOOLS_VERSION="RG-2017.8-linux"
259 HOST="xtensa-cnl-elf"
260 XTENSA_TOOLS_VERSION="RG-2017.8-linux"
266 HOST="xtensa-cnl-elf"
267 XTENSA_TOOLS_VERSION="RG-2017.8-linux"
273 HOST="xtensa-cnl-elf"
274 XTENSA_TOOLS_VERSION="RG-2017.8-linux"
277 if [ -z "$PRIVATE_KEY_OPTION" ]
279 PRIVATE_KEY_OPTION="-D${SIGNING_TOOL}_PRIVATE_KEY=$SOF_TOP/keys/otc_private_key_3k.pem"
282 tgl-h)
285 HOST="xtensa-cnl-elf"
286 XTENSA_TOOLS_VERSION="RG-2017.8-linux"
289 if [ -z "$PRIVATE_KEY_OPTION" ]
291 PRIVATE_KEY_OPTION="-D${SIGNING_TOOL}_PRIVATE_KEY=$SOF_TOP/keys/otc_private_key_3k.pem"
297 HOST="xtensa-cnl-elf"
298 XTENSA_TOOLS_VERSION="RG-2017.8-linux"
304 HOST="xtensa-imx-elf"
305 XTENSA_TOOLS_VERSION="RG-2017.8-linux"
310 HOST="xtensa-imx-elf"
311 XTENSA_TOOLS_VERSION="RG-2017.8-linux"
316 HOST="xtensa-imx8m-elf"
317 XTENSA_TOOLS_VERSION="RG-2017.8-linux"
322 HOST="xtensa-imx8ulp-elf"
323 XTENSA_TOOLS_VERSION="RG-2017.8-linux"
327 ARCH="xtensa"
329 HOST="xtensa-rn-elf"
330 XTENSA_TOOLS_VERSION="RF-2016.4-linux"
335 if [ -n "$XTENSA_TOOLS_ROOT" ]
340 # make sure the required version of xtensa tools is installed
341 if [ -d "$XTENSA_TOOLS_DIR" ]
343 XCC="xt-xcc"
352 # --sysroot would.
353 ROOT="$SOF_TOP/../xtensa-root/$HOST"
355 if [ "$XCC" == "xt-xcc" ]
358 ROOT="$XTENSA_BUILDS_DIR/$XTENSA_CORE/xtensa-elf"
375 printf "Build in %s\n" "$BUILD_DIR"
377 # only delete binary related to this build
378 rm -fr "$BUILD_DIR"
383 ( set -x # log the main commands and their parameters
384 cmake -DTOOLCHAIN="$TOOLCHAIN" \
385 -DROOT_DIR="$ROOT" \
386 -DMEU_OPENSSL="${MEU_OPENSSL}" \
389 -DINIT_CONFIG=${PLATFORM}${DEFCONFIG_PATCH}_defconfig \
393 if [ -n "$OVERRIDE_CONFIG" ]
400 cmake --build . -- menuconfig
416 echo "Force building UP(xtensa)..."
420 if [ -e override.config ]
422 cmake --build . -- overrideconfig
425 cmake --build . -- bin -j "${BUILD_JOBS}" ${BUILD_VERBOSE}
430 # list all the images
431 ls -l build_*/*.ri build_*/src/arch/xtensa/rom*.bin || true
432 ls -l build_*/sof