Skip to content

platform: remove the XTOS linker scripts - #11529

Open
lgirdwood wants to merge 1 commit into
thesofproject:mainfrom
lgirdwood:topic/platform-headers-2
Open

lgirdwood wants to merge 1 commit into
thesofproject:mainfrom
lgirdwood:topic/platform-headers-2

Conversation

@lgirdwood

Copy link
Copy Markdown
Member

Remove the five XTOS linker scripts that are still in src/kernel/platform (2,773 lines). This is the second part of the platform header cleanup in #11517 step 1, after #11528.

Patch

platform: remove the XTOS linker scripts.

  • The XTOS build preprocessed <platform>.x.in into the firmware linker script. d07ac09 removed that step together with src/arch/xtensa/CMakeLists.txt, and Zephyr links with the SoC linker scripts.
  • So nothing uses imx8.x.in, imx8m.x.in, imx8ulp.x.in, amd/rembrandt/rembrandt.x.in or amd/acp_7_0/acp_7_0.x.in, and no CMake, Python or shell file mentions them.
  • The i.MX8M CM7 and i.MX95 linker/data-sections.ld snippets are used by zephyr/CMakeLists.txt and are kept.

These scripts were the only users of some of the XTOS memory layout macros in the platform memory.h headers:

  • IRAM_*, SDRAM0_SIZE, SRAM1_SIZE;
  • UUID_ENTRY_ELF_*, LOG_ENTRY_ELF_*, EXT_MANIFEST_ELF_*;
  • SOF_MEM_VECT_*, SOF_MEM_RESET_*, SOF_MEM_VECBASE_LIT_SIZE;
  • HEAP_BUF_ALIGNMENT.

The next part removes them together with the other unused platform macros.

Functional change

None.

Testing

Run on 05904db (current main) and at the tip.

  • Firmware builds, each from scratch at both base and tip:

    • tgl, tgl-h, mtl, lnl, ptl, wcl, nvl, nvl-s;
    • imx8, imx8x, imx8m, imx8m_cm7, imx8ulp, imx93, imx95;
    • qemu_xtensa, qemu_xtensa_mmu, native_sim;
    • PTL with the userspace overlay and with LL userspace, PTL and MTL with os_linux_overlay.conf;llext_relocatable.conf, PTL and TGL with debug_stream_overlay.conf.

    All pass.

  • Objects: about 10,750 objects, LLEXT modules and ELF files hashed in each build. The only ones that differ are those that embed the source hash or git version: init.c, ext_manifest.c, each platform.c, and the final images. A few objects appear on only one side; they are all in the acp_6_0 and acp_7_0 builds that fail anyway, where which objects get compiled before the failure varies between runs.

  • Dependencies: the set of SOF headers the builds depend on (ninja -t deps) is unchanged.

  • Platforms that already fail on main:

    • acp_6_0 and acp_7_0 fail at compile, and their full ninja -k 0 error sets are unchanged.
    • acp_7_x, mt8186, mt8188, mt8195, mt8196, mt8365 and phyboard_pollux fail at configure with the current Zephyr, and their errors are unchanged.
  • check_kernel_includes.py --sources --strict: passes.

  • Documentation: builds with no warnings.

The host builds (library, testbench, tools, cmocka, ztest) and the xt-clang builds don't use these files, so they were not re-run.

🤖 Generated with Claude Code

The XTOS build preprocessed <platform>.x.in into the firmware linker
script. Commit d07ac09 ("build: remove obvioux XTOS-only files")
removed that step with src/arch/xtensa/CMakeLists.txt, and Zephyr links
with the SoC linker scripts, so nothing uses the i.MX8, i.MX8M, i.MX8ULP,
Rembrandt and ACP 7.0 scripts any more. Remove them.

The i.MX8M CM7 and i.MX95 linker/data-sections.ld snippets are used by
zephyr/CMakeLists.txt and are kept.

No functional change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
@intel-sofci

Copy link
Copy Markdown

PR 11529: test results

Run date: 2026-11-23 22:40 UTC

Tested commit: afb59fd9b608119861ef6c7e821c79069a439802

mtl pass rate lnl pass rate ptl pass rate wcl pass rate nvl pass rate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants