diff --git a/app/Kconfig b/app/Kconfig new file mode 100644 index 000000000000..b00373d89cce --- /dev/null +++ b/app/Kconfig @@ -0,0 +1,14 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2023 Meta + +menu "Compatibility" + +config SOF_COMPAT_INCLUDES + bool "Use legacy include path" + default n + help + Use legacy Zephyr include paths. + +endmenu + +source "Kconfig" diff --git a/app/prj.conf b/app/prj.conf index b3f1016620ea..9cade422657c 100644 --- a/app/prj.conf +++ b/app/prj.conf @@ -56,3 +56,6 @@ CONFIG_SCHED_CPU_MASK_PIN_ONLY=y CONFIG_SYS_CLOCK_TICKS_PER_SEC=15000 CONFIG_DAI=y CONFIG_HEAP_MEM_POOL_SIZE=2048 + +# To be able to use Zephyr legacy include paths +CONFIG_SOF_COMPAT_INCLUDES=y diff --git a/src/init/init.c b/src/init/init.c index cdfa2b6ef794..6917d73e2bd8 100644 --- a/src/init/init.c +++ b/src/init/init.c @@ -38,7 +38,11 @@ #include #include #include +#ifdef CONFIG_SOF_COMPAT_INCLUDES #include +#else +#include +#endif #endif #include diff --git a/src/trace/dma-trace.c b/src/trace/dma-trace.c index 9d4351c8e8d0..da4ff80dfd4d 100644 --- a/src/trace/dma-trace.c +++ b/src/trace/dma-trace.c @@ -29,7 +29,11 @@ #include #ifdef __ZEPHYR__ +#ifdef CONFIG_SOF_COMPAT_INCLUDES #include +#else +#include +#endif #endif #include diff --git a/zephyr/lib/alloc.c b/zephyr/lib/alloc.c index f20e125e9246..448df3c932d5 100644 --- a/zephyr/lib/alloc.c +++ b/zephyr/lib/alloc.c @@ -23,7 +23,11 @@ #include #include #include +#ifdef CONFIG_SOF_COMPAT_INCLUDES #include +#else +#include +#endif #include #include diff --git a/zephyr/lib/cpu.c b/zephyr/lib/cpu.c index d630177bdde2..6246a6c0274b 100644 --- a/zephyr/lib/cpu.c +++ b/zephyr/lib/cpu.c @@ -17,7 +17,11 @@ #include /* Zephyr includes */ +#ifdef CONFIG_SOF_COMPAT_INCLUDES #include +#else +#include +#endif #include #include #include diff --git a/zephyr/wrapper.c b/zephyr/wrapper.c index 0d4644ffdfb2..d17a5eecb43d 100644 --- a/zephyr/wrapper.c +++ b/zephyr/wrapper.c @@ -29,7 +29,11 @@ #include #include #include +#ifdef CONFIG_SOF_COMPAT_INCLUDES #include +#else +#include +#endif #include #include #include