Skip to content

fix(firmware): restore omi/sysbuild/mcuboot.conf as regular file (#6350)#6845

Merged
TuEmb merged 1 commit intoBasedHardware:mainfrom
mvanhorn:fix/6350-mcuboot-conf-symlink
Apr 20, 2026
Merged

fix(firmware): restore omi/sysbuild/mcuboot.conf as regular file (#6350)#6845
TuEmb merged 1 commit intoBasedHardware:mainfrom
mvanhorn:fix/6350-mcuboot-conf-symlink

Conversation

@mvanhorn
Copy link
Copy Markdown
Contributor

Summary

omi/firmware/omi/sysbuild/mcuboot.conf was stored as a symlink whose "target" is the intended Kconfig content rather than a path. Git reports mode lrwxr-xr-x and file(1) calls it a broken symbolic link, so the MCUboot build fails with undefined reference to __device_dts_ord_149 because the Kconfig it needs cannot be resolved. This PR replaces the broken symlink with a regular file carrying the same 717 bytes of Kconfig.

Why this matters

The firmware build is gated on this file. Anyone who clones the repo and runs the MCUboot sysbuild today hits the linker error. Commit 32ccac5aac89 ("change from fatFs to littleFs to adapt to hardware") intended to swap the symlink for a regular file, but the commit was saved with mode 120000 and the new content stored as the symlink target string, which is why the file appears to resolve to its own contents.

Changes

One file, one type change. git ls-files --stage omi/firmware/omi/sysbuild/mcuboot.conf goes from 120000 (symlink) to 100644 (regular file). The body matches omi/firmware/bootloader/mcuboot/mcuboot.conf byte-for-byte, so this is what a correct symlink would have resolved to anyway.

After:

$ file omi/firmware/omi/sysbuild/mcuboot.conf
omi/firmware/omi/sysbuild/mcuboot.conf: ASCII text
$ diff omi/firmware/omi/sysbuild/mcuboot.conf omi/firmware/bootloader/mcuboot/mcuboot.conf
(no output, files are identical)

Testing

The fix is a file-mode change. I could not run the nRF Connect SDK MCUboot build locally. Please trigger CI or confirm on a workstation with the SDK that undefined reference to __device_dts_ord_149 no longer reproduces.

Alternative

If the original intent was a live symlink rather than a regular copy, happy to swap this to ln -s ../../bootloader/mcuboot/mcuboot.conf instead. Either resolves the build break. I picked the regular file because that matches what the introducing commit's message says it was trying to do.

Fixes #6350

This contribution was developed with AI assistance (Codex).

…edHardware#6350)

Commit 32ccac5 intended to replace a symlink with a regular
Kconfig file, but git saved the new content as the symlink's target
string, producing a broken symlink. ls reports mode lrwxr-xr-x and
the "target" is the 717-byte Kconfig body, so the path is
unresolvable and the MCUboot build fails with
'undefined reference to __device_dts_ord_149'.

Replace the broken symlink with a regular file holding the same
content. The body is byte-identical to
omi/firmware/bootloader/mcuboot/mcuboot.conf, so this matches what a
correct symlink would have resolved to.

Fixes BasedHardware#6350
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 19, 2026

Greptile Summary

This PR fixes a broken symlink — omi/firmware/omi/sysbuild/mcuboot.conf was stored with git mode 120000 (symlink) whose "target" string was the Kconfig content itself rather than a valid path, causing the MCUboot sysbuild to fail with an undefined reference to __device_dts_ord_149 linker error. The change simply re-registers the file at mode 100644 (regular file) with the same 27 lines of Kconfig, matching omi/firmware/bootloader/mcuboot/mcuboot.conf byte-for-byte.

Confidence Score: 5/5

Safe to merge — single-file mode fix with no content changes; all remaining findings are P2 style suggestions.

The only change is the git file-mode bit flipping from symlink to regular file. Content is unchanged and verified identical to the bootloader reference. The two P2 comments (duplicate Kconfig keys and symlink-vs-copy tradeoff) do not block correctness.

No files require special attention.

Important Files Changed

Filename Overview
omi/firmware/omi/sysbuild/mcuboot.conf File mode corrected from symlink (120000) to regular file (100644); content is unchanged and matches the bootloader reference. Pre-existing duplicate Kconfig keys noted as P2.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["git ls-files --stage\nomi/firmware/omi/sysbuild/mcuboot.conf"] -->|Before PR\nmode 120000 symlink| B["Broken symlink\n(target = Kconfig text, not a path)"]
    A -->|After PR\nmode 100644 regular file| C["Regular ASCII file\n(27 lines of Kconfig)"]
    B --> D["MCUboot sysbuild FAILS\nundefined reference to\n__device_dts_ord_149"]
    C --> E["MCUboot sysbuild SUCCEEDS\nKconfig resolved correctly"]
    F["omi/firmware/bootloader/mcuboot/mcuboot.conf"] -.->|byte-for-byte identical| C
Loading

Comments Outside Diff (2)

  1. omi/firmware/omi/sysbuild/mcuboot.conf, line 18-27 (link)

    P2 Pre-existing duplicate Kconfig entries

    The file (copied verbatim from the bootloader source) contains several duplicated keys: CONFIG_DISK_DRIVER_SDMMC=y is set on lines 18 and 20, CONFIG_BOOT_UPGRADE_ONLY=y on lines 5 and 25, CONFIG_BOOT_MAX_IMG_SECTORS=256 on lines 10 and 26, and CONFIG_MCUBOOT_DOWNGRADE_PREVENTION=y on lines 6 and 27. Zephyr's Kconfig parser takes the last value, so behavior is correct today, but the redundancy is misleading and will confuse future editors. Since this PR is already touching the file, it would be a good opportunity to deduplicate.

  2. omi/firmware/omi/sysbuild/mcuboot.conf, line 1 (link)

    P2 Duplicate copy vs. a live symlink

    This file is now an exact byte-for-byte copy of omi/firmware/bootloader/mcuboot/mcuboot.conf. With a regular file, the two can silently diverge the next time either is edited. As the PR description itself notes, a proper symlink (ln -s ../../bootloader/mcuboot/mcuboot.conf) would guarantee a single source of truth. If the intent is "one canonical config", the symlink alternative is worth considering before merging to avoid a future config drift issue.

Reviews (1): Last reviewed commit: "fix(firmware): restore omi/sysbuild/mcub..." | Re-trigger Greptile

@beastoin
Copy link
Copy Markdown
Collaborator

@TuEmb can u help

Copy link
Copy Markdown
Contributor

@TuEmb TuEmb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! It makes sense. We should change to regular file instead of symlink. I built it on Windows environment, it may checkout that file to regular file automaticially.

@TuEmb TuEmb merged commit 5b0d0d5 into BasedHardware:main Apr 20, 2026
1 check passed
@mvanhorn
Copy link
Copy Markdown
Contributor Author

Thanks for landing the mcuboot.conf restore, @TuEmb.

Glucksberg pushed a commit to Glucksberg/omi-local that referenced this pull request Apr 28, 2026
…edHardware#6350) (BasedHardware#6845)

Commit 32ccac5 intended to replace a symlink with a regular
Kconfig file, but git saved the new content as the symlink's target
string, producing a broken symlink. ls reports mode lrwxr-xr-x and
the "target" is the 717-byte Kconfig body, so the path is
unresolvable and the MCUboot build fails with
'undefined reference to __device_dts_ord_149'.

Replace the broken symlink with a regular file holding the same
content. The body is byte-identical to
omi/firmware/bootloader/mcuboot/mcuboot.conf, so this matches what a
correct symlink would have resolved to.

Fixes BasedHardware#6350

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
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.

Bug: mcuboot.conf is a broken symlink, breaks firmware build

3 participants