Skip to content

Commit

Permalink
set_xtensa_params.sh: add missing LNL, ACP_6_3 and vangogh
Browse files Browse the repository at this point in the history
This adds support for:

   ./scripts/rebuild-testbench.sh -p lnl

Also clean-up, re-order and add comments to set_xtensa_params.sh

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
  • Loading branch information
marc-hb committed Dec 5, 2023
1 parent e720567 commit 61a7078
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 8 deletions.
65 changes: 57 additions & 8 deletions scripts/set_xtensa_params.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,33 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2023 Intel Corporation. All rights reserved.

# Sourced script argument is a non-standard bash extension
platform=$1
### XTENSA_ toolchain configuration shared across projects ###

# These variables are currently used in/by:
#
# - xtensa-build-all.sh (XTOS)
# - script/rebuild-testbench.sh
# - before Zephyr's `twister` or `west build`
#
# Not all variables are used in all use cases. Some are.
#
# The variables used by Zephyr are duplicated in
# xtensa-build-zephyr.py, please keep in sync!

# To maximize reuse, keep this script very basic and minimal and don't
# `export`: leave which the decision for each variable to the caller.

# Note: This duplicates xtensa-build-zephyr.py

# Sourced script argument $1 is a non-standard bash extension
[ -n "$1" ] || {
>&2 printf 'Missing platform argument\n'
return 1 # Not exit!
}
platform=$1

case "$platform" in

# Intel
tgl)
PLATFORM="tgplp"
XTENSA_CORE="cavs2x_LX6HiFi3_2017_8"
Expand All @@ -26,6 +47,17 @@ case "$platform" in
# default key for TGL
PLATFORM_PRIVATE_KEY="-D${SIGNING_TOOL}_PRIVATE_KEY=$SOF_TOP/keys/otc_private_key_3k.pem"
;;
mtl|lnl)
PLATFORM="$platform"
XTENSA_CORE="ace10_LX7HiFi4_2022_10"
XTENSA_TOOLS_VERSION="RI-2022.10-linux"
# TODO: to reduce duplication, make rebuild-testbench "smarter"
# and able to decode ZEPHYR_TOOLCHAIN_VARIANT (even when it does
# not care about Zephyr)
COMPILER="xt-clang"
;;

# NXP
imx8)
PLATFORM="imx8"
XTENSA_CORE="hifi4_nxp_v3_3_1_2_2017"
Expand All @@ -50,6 +82,8 @@ case "$platform" in
HOST="xtensa-imx8ulp-elf"
XTENSA_TOOLS_VERSION="RG-2017.8-linux"
;;

# AMD
rn)
PLATFORM="renoir"
XTENSA_CORE="ACP_3_1_001_PROD_2019_1"
Expand All @@ -63,6 +97,22 @@ case "$platform" in
HOST="xtensa-rmb-elf"
XTENSA_TOOLS_VERSION="RI-2019.1-linux"
;;
vangogh)
PLATFORM="vangogh"
ARCH="xtensa"
XTENSA_CORE="ACP_5_0_001_PROD"
HOST="xtensa-vangogh-elf"
XTENSA_TOOLS_VERSION="RI-2019.1-linux"
;;
acp_6_3)
PLATFORM="acp_6_3"
ARCH="xtensa"
XTENSA_CORE="ACP_6_3_HiFi5_PROD_Linux"
HOST="xtensa-acp_6_3-elf"
XTENSA_TOOLS_VERSION="RI-2021.6-linux"
;;

# Mediatek
mt8186)
PLATFORM="mt8186"
XTENSA_CORE="hifi5_7stg_I64D128"
Expand All @@ -81,10 +131,9 @@ case "$platform" in
HOST="xtensa-mt8195-elf"
XTENSA_TOOLS_VERSION="RI-2019.1-linux"
;;
mtl)
PLATFORM="mtl"
XTENSA_CORE="ace10_LX7HiFi4_2022_10"
XTENSA_TOOLS_VERSION="RI-2022.10-linux"
COMPILER="xt-clang"

*)
>&2 printf 'Unknown xtensa platform=%s\n' "$platform"
return 1
;;
esac
1 change: 1 addition & 0 deletions scripts/xtensa-build-zephyr.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ class PlatformConfig:
aliases: list = dataclasses.field(default_factory=list)

# These can all be built out of the box. --all builds all these.
# Some of these values are duplicated in sof/scripts/set_xtensa_param.sh: keep them in sync.
platform_configs_all = {
# Intel platforms
"tgl" : PlatformConfig(
Expand Down

0 comments on commit 61a7078

Please sign in to comment.