diff --git a/overlays/apl/overlay.conf b/overlays/apl/overlay.conf new file mode 100644 index 000000000000..0e0b12547d86 --- /dev/null +++ b/overlays/apl/overlay.conf @@ -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 diff --git a/overlays/cnl/overlay.conf b/overlays/cnl/overlay.conf new file mode 100644 index 000000000000..a49f550c35c1 --- /dev/null +++ b/overlays/cnl/overlay.conf @@ -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 diff --git a/overlays/icl/overlay.conf b/overlays/icl/overlay.conf new file mode 100644 index 000000000000..0f3a659cbe2a --- /dev/null +++ b/overlays/icl/overlay.conf @@ -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 diff --git a/overlays/imx8/overlay.conf b/overlays/imx8/overlay.conf new file mode 100644 index 000000000000..a245738a5d80 --- /dev/null +++ b/overlays/imx8/overlay.conf @@ -0,0 +1,4 @@ +CONFIG_IMX8=y +CONFIG_HAVE_AGENT=n +CONFIG_FORMAT_CONVERT_HIFI3=n +CONFIG_KPB_FORCE_COPY_TYPE_NORMAL=n diff --git a/overlays/imx8m/overlay.conf b/overlays/imx8m/overlay.conf new file mode 100644 index 000000000000..bb9d86024498 --- /dev/null +++ b/overlays/imx8m/overlay.conf @@ -0,0 +1,4 @@ +CONFIG_IMX8M=y +CONFIG_HAVE_AGENT=n +CONFIG_FORMAT_CONVERT_HIFI3=n +CONFIG_KPB_FORCE_COPY_TYPE_NORMAL=n diff --git a/overlays/imx8x/overlay.conf b/overlays/imx8x/overlay.conf new file mode 100644 index 000000000000..a7766c19bb61 --- /dev/null +++ b/overlays/imx8x/overlay.conf @@ -0,0 +1,4 @@ +CONFIG_IMX8X=y +CONFIG_HAVE_AGENT=n +CONFIG_FORMAT_CONVERT_HIFI3=n +CONFIG_KPB_FORCE_COPY_TYPE_NORMAL=n diff --git a/overlays/jsl/overlay.conf b/overlays/jsl/overlay.conf new file mode 100644 index 000000000000..46579f49dd0f --- /dev/null +++ b/overlays/jsl/overlay.conf @@ -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 diff --git a/overlays/tgl-h/overlay.conf b/overlays/tgl-h/overlay.conf new file mode 100644 index 000000000000..7ec23d23729a --- /dev/null +++ b/overlays/tgl-h/overlay.conf @@ -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" diff --git a/platforms/tgl/ipc4_overlay.conf b/overlays/tgl/ipc4_overlay.conf similarity index 100% rename from platforms/tgl/ipc4_overlay.conf rename to overlays/tgl/ipc4_overlay.conf diff --git a/overlays/tgl/overlay.conf b/overlays/tgl/overlay.conf new file mode 100644 index 000000000000..cf017a4bc3e3 --- /dev/null +++ b/overlays/tgl/overlay.conf @@ -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" diff --git a/scripts/xtensa-build-zephyr.py b/scripts/xtensa-build-zephyr.py index c7edff3dc6c7..4645e6142dea 100755 --- a/scripts/xtensa-build-zephyr.py +++ b/scripts/xtensa-build-zephyr.py @@ -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) diff --git a/scripts/xtensa-build-zephyr.sh b/scripts/xtensa-build-zephyr.sh index 5d5fd74e06c5..d5b1caba9687 100755 --- a/scripts/xtensa-build-zephyr.sh +++ b/scripts/xtensa-build-zephyr.sh @@ -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/ 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 @@ -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