Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

k3: don't copy sysfw.itb on AM62 (BeaglePlay) — it doesn't exist - #10185

#10185
Open
igorpecovnik wants to merge 1 commit into
mainarmbian/build:mainfrom
k3-sysfw-guardarmbian/build:k3-sysfw-guardCopy head branch name to clipboard
Open

k3: don't copy sysfw.itb on AM62 (BeaglePlay) — it doesn't exist#10185
igorpecovnik wants to merge 1 commit into
mainarmbian/build:mainfrom
k3-sysfw-guardarmbian/build:k3-sysfw-guardCopy head branch name to clipboard

Conversation

@igorpecovnik

@igorpecovnik igorpecovnik commented Jul 15, 2026

Copy link
Copy Markdown
Member

What

Guard the sysfw.itb copy in the k3 u-boot assembly so it only runs when the file actually exists.

Why

sysfw.itb is only produced for older K3 SoCs that set SYSFW_FILE — J721E (sk-tda4vm, beaglebone-ai64). On AM62 (BeaglePlay, etc.) the system firmware (TIFS) is folded into tiboot3.bin by binman, so there is no separate sysfw.itb, and its absence is correct.

But write_uboot_platform copied it unconditionally:

cp $1/sysfw.itb ${MOUNT}/boot || true

so every AM62 install logged a misleading error:

cp: cannot stat '/usr/lib/linux-u-boot-vendor-beagleplay/sysfw.itb': No such file or directory

Surfaced in an armbian-install BeaglePlay test report (#10176), where it read like u-boot flashing had failed.

Change

Guard both copies in config/sources/families/include/k3_common.inc:

  • build-time first-stage copy → only when SYSFW_FILE is set,
  • runtime write_uboot_platform → only when $1/sysfw.itb exists.

No behavior change for J721E boards (they still get sysfw.itb); AM62 boards just stop logging the spurious error.

Signed-off-by: Igor Pecovnik igor@armbian.com

Summary by CodeRabbit

  • Bug Fixes
    • Improved K3 bootloader preparation for platforms with system firmware bundled in tiboot3.bin.
    • Prevented unnecessary sysfw.itb creation and misleading missing-file messages during bootloader installation.

sysfw.itb is only produced for older K3 SoCs that set SYSFW_FILE (J721E:
sk-tda4vm, beaglebone-ai64). On AM62 (BeaglePlay, BeagleBone, ...) the system
firmware is folded into tiboot3.bin by binman, so there is no separate
sysfw.itb - and its absence is correct.

write_uboot_platform copied it unconditionally (`cp … || true`), which logged a
misleading "cp: cannot stat '.../sysfw.itb': No such file or directory" on every
AM62 install (seen in an armbian-install BeaglePlay test report). Guard both the
build-time and runtime copies so they only run when the file actually exists.

Signed-off-by: Igor Pecovnik <igor@armbian.com>
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

K3 bootloader preparation now copies sysfw.itb only when SYSFW_FILE is set, and installation copies it only when the file exists.

Changes

K3 system firmware handling

Layer / File(s) Summary
Conditional sysfw.itb preparation and installation
config/sources/families/include/k3_common.inc
The build path gates firmware copying on SYSFW_FILE, while boot partition installation gates copying on the file’s existence.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: jonaswood01

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: conditional handling of sysfw.itb on AM62/BeaglePlay.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch k3-sysfw-guard

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added size/small PR with less then 50 lines 08 Milestone: Third quarter release Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... labels Jul 15, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Guards K3 u-boot assembly steps so sysfw.itb is only copied when present, avoiding misleading “cannot stat” errors on AM62 platforms where firmware is bundled into tiboot3.bin.

Changes:

  • Conditionally copy sysfw.itb at build time only when SYSFW_FILE is set.
  • Conditionally copy sysfw.itb at install time only when $1/sysfw.itb exists.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -109,7 +111,10 @@ function format_partitions() {

function write_uboot_platform() {
cp $1/tiboot3.bin ${MOUNT}/boot
Comment on lines +117 to 119
[[ -f $1/sysfw.itb ]] && cp $1/sysfw.itb ${MOUNT}/boot
cp $1/tispl.bin ${MOUNT}/boot
cp $1/u-boot.img ${MOUNT}/boot
Comment on lines +83 to +85
# sysfw.itb only exists on older K3 (J721E: SYSFW_FILE set). On AM62 the
# system firmware is combined into tiboot3.bin, so there is nothing to copy.
[[ -n "${SYSFW_FILE}" ]] && cp ${SRC}/cache/sources/u-boot-worktree/${BOOTDIR}/${BOOTBRANCH##*:}/build-r5/${SYSFW_FILE} sysfw.itb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

08 Milestone: Third quarter release Hardware Hardware related like kernel, U-Boot, ... Needs review Seeking for review size/small PR with less then 50 lines

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.