From 9aaa78b2b6b9bdf9ebec98253eae9d6eefea3e4c Mon Sep 17 00:00:00 2001 From: Serhiy Katsyuba Date: Thu, 18 Jul 2024 16:02:55 +0200 Subject: [PATCH 1/3] lmdk: Fix typo in README.md Fixes typo in README.md. Signed-off-by: Serhiy Katsyuba --- lmdk/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lmdk/README.md b/lmdk/README.md index 874171826189..f38bfd69e219 100644 --- a/lmdk/README.md +++ b/lmdk/README.md @@ -5,7 +5,7 @@ To build dummy loadable library execute: cd libraries/dummy - cmake -B build -G -DRIMAGE_INSTALL_DIR="path/where/rimage/executable/is" -DSNIGNING_KEY="path/to/key" + cmake -B build -G -DRIMAGE_INSTALL_DIR="path/where/rimage/executable/is" -DSIGNING_KEY="path/to/key" cd --build build @@ -14,4 +14,4 @@ signing key for rimage. If RIMAGE_INSTALL_DIR is not provided, rimage will be se where SOF project installs it. Dummy module sets up toolchain file in the project file. However, in your library you can select toolchain file in the configure step command: - cmake -B build -G --toolchain "../../cmake/xtensa-toolchain.cmake" -DSNIGNING_KEY="path/to/key" + cmake -B build -G --toolchain "../../cmake/xtensa-toolchain.cmake" -DSIGNING_KEY="path/to/key" From e54c1ce6eac6b20a25cd6a363e9e9061b7495897 Mon Sep 17 00:00:00 2001 From: Serhiy Katsyuba Date: Thu, 18 Jul 2024 16:14:43 +0200 Subject: [PATCH 2/3] lmdk: Fix compilation of smart_amp_test example Fixes compilation error when building smart_amp_test as loadable module using LMDK. Signed-off-by: Serhiy Katsyuba --- lmdk/modules/smart_amp_test/CMakeLists.txt | 5 ++++- src/samples/audio/smart_amp_test_ipc4.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lmdk/modules/smart_amp_test/CMakeLists.txt b/lmdk/modules/smart_amp_test/CMakeLists.txt index 37fcdb87108b..4c10559fcc03 100644 --- a/lmdk/modules/smart_amp_test/CMakeLists.txt +++ b/lmdk/modules/smart_amp_test/CMakeLists.txt @@ -10,4 +10,7 @@ target_compile_definitions(smart_amp_test PRIVATE CONFIG_IPC_MAJOR_4=1 ) -target_include_directories(smart_amp_test PRIVATE "${SOF_BASE}/src/include") +target_include_directories(smart_amp_test PRIVATE + "${SOF_BASE}/src/include" + "${SOF_BASE}/posix/include" +) diff --git a/src/samples/audio/smart_amp_test_ipc4.c b/src/samples/audio/smart_amp_test_ipc4.c index e2e06db9ea6b..41d8ff2db25a 100644 --- a/src/samples/audio/smart_amp_test_ipc4.c +++ b/src/samples/audio/smart_amp_test_ipc4.c @@ -5,7 +5,6 @@ // Author: Bartosz Kokoszko #ifndef __SOF_MODULE_SERVICE_BUILD__ -#include #include #include #include @@ -38,6 +37,7 @@ DECLARE_TR_CTX(smart_amp_test_comp_tr, SOF_UUID(smart_amp_test_uuid), #include #include #endif +#include #include #include #include From 2d7761da32fb4ae16e753ff73263b694c6a325f7 Mon Sep 17 00:00:00 2001 From: Serhiy Katsyuba Date: Thu, 18 Jul 2024 16:37:28 +0200 Subject: [PATCH 3/3] lmdk: Fix linker script Specifying 0 address for .module section results in few GB binary file. Instead, put .module section near .text or .rodata. Signed-off-by: Serhiy Katsyuba --- lmdk/cmake/ldscripts/data_linker_script.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lmdk/cmake/ldscripts/data_linker_script.txt b/lmdk/cmake/ldscripts/data_linker_script.txt index 63eed21cb07a..c04a5ea3d97f 100644 --- a/lmdk/cmake/ldscripts/data_linker_script.txt +++ b/lmdk/cmake/ldscripts/data_linker_script.txt @@ -25,7 +25,7 @@ SECTIONS { } >HPSRAM_seg : rodata_phdr /* Module manifest is here */ - .module 0 : { + .module : { KEEP(*(.module)) - } + } >HPSRAM_seg : rodata_phdr }