From 54ad8d18d2da3794a36fbce489f1e7ef9430c5eb Mon Sep 17 00:00:00 2001 From: Laurentiu Mihalcea Date: Mon, 19 Aug 2024 13:53:58 +0300 Subject: [PATCH 1/2] platform: imx93_a55: handle linker additions at SOF level SOF requires some additions to the Zephyr linker script. This should be handled inside SOF instead of Zephyr. Since 3f2790b89ca5 ("soc: imx93: remove custom linker script") removes the custom linker script from Zephyr, this means the custom SOF linker sections will have to be handled on SOF side. This also includes a Zephyr hash bump to 3f2790b89ca5, which brings the following (potentially) relevant patches: 3f2790b89ca5 soc: imx93: remove custom linker script d389c95935c5 soc: intel_adsp: ace: Configurable SRAM retention mode and cleanup be041b14fe51 Intel: ADSP: move HPSRAM mask into assembly Signed-off-by: Laurentiu Mihalcea --- src/platform/imx93_a55/linker/data-sections.ld | 15 +++++++++++++++ src/platform/imx93_a55/linker/rwdata.ld | 3 +++ west.yml | 2 +- zephyr/CMakeLists.txt | 8 ++++++++ 4 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 src/platform/imx93_a55/linker/data-sections.ld create mode 100644 src/platform/imx93_a55/linker/rwdata.ld diff --git a/src/platform/imx93_a55/linker/data-sections.ld b/src/platform/imx93_a55/linker/data-sections.ld new file mode 100644 index 000000000000..9efabbbb2aa9 --- /dev/null +++ b/src/platform/imx93_a55/linker/data-sections.ld @@ -0,0 +1,15 @@ +SECTION_PROLOGUE(.static_uuid_entries,,) +{ + *(*.static_uuids) +} GROUP_ROM_LINK_IN(RAMABLE_REGION, ROMABLE_REGION) + +SECTION_PROLOGUE(.static_log_entries,,) +{ + *(*.static_log*) +} GROUP_ROM_LINK_IN(RAMABLE_REGION, ROMABLE_REGION) + +SECTION_PROLOGUE(.fw_metadata,,) +{ + KEEP (*(*.fw_metadata)) + . = ALIGN(16); +} GROUP_ROM_LINK_IN(RAMABLE_REGION, ROMABLE_REGION) diff --git a/src/platform/imx93_a55/linker/rwdata.ld b/src/platform/imx93_a55/linker/rwdata.ld new file mode 100644 index 000000000000..2692c40dfbf6 --- /dev/null +++ b/src/platform/imx93_a55/linker/rwdata.ld @@ -0,0 +1,3 @@ +_trace_ctx_start = ABSOLUTE(.); +*(.trace_ctx) +_trace_ctx_end = ABSOLUTE(.); diff --git a/west.yml b/west.yml index e2f9502251c8..c8800d9aad6c 100644 --- a/west.yml +++ b/west.yml @@ -43,7 +43,7 @@ manifest: - name: zephyr repo-path: zephyr - revision: 689d1edee1d57f052b1d4572d67618c0b0e2b8a4 + revision: 3f2790b89ca54ec2fb7854fd5242c2c3f04b6372 remote: zephyrproject # Import some projects listed in zephyr/west.yml@revision diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt index 80c055e90fb1..9e344fc9f4cb 100644 --- a/zephyr/CMakeLists.txt +++ b/zephyr/CMakeLists.txt @@ -393,6 +393,14 @@ if (CONFIG_SOC_MIMX9352_A55) ${SOF_SRC_PATH}/schedule/zephyr_ll.c ) + # SOF-specific linker script additions + zephyr_linker_sources(RWDATA + ${sof_top_dir}/src/platform/imx93_a55/linker/rwdata.ld + ) + zephyr_linker_sources(DATA_SECTIONS + ${sof_top_dir}/src/platform/imx93_a55/linker/data-sections.ld + ) + set(PLATFORM "imx93_a55") endif() From e598fea5f3cfb43831bcd6b164eda33818f26c8c Mon Sep 17 00:00:00 2001 From: Laurentiu Mihalcea Date: Thu, 12 Sep 2024 16:06:59 +0300 Subject: [PATCH 2/2] .github/zephyr: switch to python 3.10 on windows Zephyr commit b3b8360f3993 ("west: runners: Add `west rtt` command with pyocd implementation") adds some functionality to the west commands making use of the pipe ("|") operator for function return type hinting. As per PEP 604 [1], this operator can be used for writing union types starting from python 3.10. Since the SOF windows builds use python 3.8 this leads to the CI failing. To fix this, switch to using python 3.10. This is not a problem for Linux CI jobs as they already use python 3.10. The following is a snippet of a failed windows CI job regarding this: File "D:\a\sof\sof\workspace\zephyr\scripts/west_commands\runners\core.py", line 780, in ZephyrBinaryRunner def get_rtt_address(self) -> int | None: TypeError: unsupported operand type(s) for |: 'type' and 'NoneType' [1]: https://peps.python.org/pep-0604/ Signed-off-by: Laurentiu Mihalcea --- .github/workflows/zephyr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/zephyr.yml b/.github/workflows/zephyr.yml index 99698a9a6b17..c98d0bcda859 100644 --- a/.github/workflows/zephyr.yml +++ b/.github/workflows/zephyr.yml @@ -305,7 +305,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: '3.8' + python-version: '3.10' - name: West install run: pip3 install west @@ -329,7 +329,7 @@ jobs: uses: actions/setup-python@v5 id: cache-python with: - python-version: '3.8' + python-version: '3.10' cache: 'pip' cache-dependency-path: workspace/zephyr/scripts/requirements.txt