Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move platforms software configuration from Zephyr to SOF #5531

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions overlays/apl/overlay.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CONFIG_APOLLOLAKE=y
CONFIG_INTEL_DMIC=y
CONFIG_INTEL_SSP=y
CONFIG_LP_MEMORY_BANKS=2
CONFIG_HP_MEMORY_BANKS=8
CONFIG_PERFORMANCE_COUNTERS=y
CONFIG_COMP_SRC_TINY=y
7 changes: 7 additions & 0 deletions overlays/cnl/overlay.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CONFIG_CANNONLAKE=y
CONFIG_INTEL_DMIC=y
CONFIG_INTEL_SSP=y
CONFIG_INTEL_ALH=y
CONFIG_LP_MEMORY_BANKS=1
CONFIG_HP_MEMORY_BANKS=47
CONFIG_PERFORMANCE_COUNTERS=y
6 changes: 6 additions & 0 deletions overlays/icl/overlay.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CONFIG_ICELAKE=y
CONFIG_INTEL_DMIC=y
CONFIG_INTEL_SSP=y
CONFIG_INTEL_ALH=y
CONFIG_LP_MEMORY_BANKS=1
CONFIG_HP_MEMORY_BANKS=47
4 changes: 4 additions & 0 deletions overlays/imx8/overlay.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CONFIG_IMX8=y
CONFIG_HAVE_AGENT=n
CONFIG_FORMAT_CONVERT_HIFI3=n
CONFIG_KPB_FORCE_COPY_TYPE_NORMAL=n
4 changes: 4 additions & 0 deletions overlays/imx8m/overlay.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CONFIG_IMX8M=y
CONFIG_HAVE_AGENT=n
CONFIG_FORMAT_CONVERT_HIFI3=n
CONFIG_KPB_FORCE_COPY_TYPE_NORMAL=n
4 changes: 4 additions & 0 deletions overlays/imx8x/overlay.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CONFIG_IMX8X=y
CONFIG_HAVE_AGENT=n
CONFIG_FORMAT_CONVERT_HIFI3=n
CONFIG_KPB_FORCE_COPY_TYPE_NORMAL=n
5 changes: 5 additions & 0 deletions overlays/jsl/overlay.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
CONFIG_ICELAKE=y
CONFIG_INTEL_DMIC=y
CONFIG_INTEL_SSP=y
CONFIG_LP_MEMORY_BANKS=1
CONFIG_HP_MEMORY_BANKS=16
7 changes: 7 additions & 0 deletions overlays/tgl-h/overlay.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CONFIG_TIGERLAKE=y
CONFIG_INTEL_DMIC=y
CONFIG_INTEL_SSP=y
CONFIG_INTEL_ALH=y
CONFIG_LP_MEMORY_BANKS=1
CONFIG_HP_MEMORY_BANKS=30
CONFIG_RIMAGE_SIGNING_SCHEMA="tgl-h"
File renamed without changes.
7 changes: 7 additions & 0 deletions overlays/tgl/overlay.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CONFIG_TIGERLAKE=y
CONFIG_INTEL_DMIC=y
CONFIG_INTEL_SSP=y
CONFIG_INTEL_ALH=y
CONFIG_LP_MEMORY_BANKS=1
CONFIG_HP_MEMORY_BANKS=30
CONFIG_RIMAGE_SIGNING_SCHEMA="tgl"
12 changes: 10 additions & 2 deletions scripts/xtensa-build-zephyr.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,17 @@ def build_platforms():
if args.cmake_args:
build_cmd += args.cmake_args

overlays = []
# You may override default overlay.conf file name using CONFIG_OVERLAY in your platform
# dictionary
overlay_filename = platform_dict.get("CONFIG_OVERLAY", "overlay.conf")
overlays.append(str(pathlib.Path(SOF_TOP, "overlays", platform, overlay_filename)))

if args.ipc == "IPC4":
overlay = pathlib.Path(SOF_TOP, "platforms", platform, platform_dict["IPC4_CONFIG_OVERLAY"])
build_cmd.append(f"-DOVERLAY_CONFIG={overlay}")
overlays.append(str(pathlib.Path(SOF_TOP, "overlays", platform, platform_dict["IPC4_CONFIG_OVERLAY"])))

overlays = ";".join(overlays)
build_cmd.append(f"-DOVERLAY_CONFIG={overlays}")

# Build
execute_command(build_cmd, check=True, cwd=west_top)
Expand Down
18 changes: 17 additions & 1 deletion scripts/xtensa-build-zephyr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,22 @@ build_platforms()
;;
esac

# default value if undefined
local config_overlay=${CONFIG_OVERLAY:-overlay.conf}

# every platform that has CONFIG_OVERLAY file is expected to have it in:
# overlays/<platform_name> directory
local CONFIG_DIR="$SOF_TOP"/overlays/"$platform"
local OVERLAY_FILE="$CONFIG_DIR"/"$config_overlay"

test -d "$CONFIG_DIR" ||
die 'Overlay configuration directory: %s does not exist, create one.' \
"$CONFIG_DIR"

test -f "$OVERLAY_FILE" ||
die 'Platform overlay file: %s does not exist. Please create one.' \
"$OVERLAY_FILE"

if [ -n "$XTENSA_TOOLS_ROOT" ]
then
# set variables expected by zephyr/cmake/toolchain/xcc/generic.cmake
Expand Down Expand Up @@ -269,7 +285,7 @@ build_platforms()
set -x
west $verbose build --build-dir "$bdir" --board "$PLAT_CONFIG" \
zephyr/samples/subsys/audio/sof \
-- "${CMAKE_ARGS[@]}"
-- "${CMAKE_ARGS[@]}" "-DOVERLAY_CONFIG=${OVERLAY_FILE}"

# This should ideally be part of
# sof/zephyr/CMakeLists.txt but due to the way
Expand Down