k3: don't copy sysfw.itb on AM62 (BeaglePlay) — it doesn't exist - #10185
#10185k3: don't copy sysfw.itb on AM62 (BeaglePlay) — it doesn't exist#10185igorpecovnik wants to merge 1 commit into
Conversation
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>
📝 WalkthroughWalkthroughK3 bootloader preparation now copies ChangesK3 system firmware handling
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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.itbat build time only whenSYSFW_FILEis set. - Conditionally copy
sysfw.itbat install time only when$1/sysfw.itbexists.
💡 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 |
| [[ -f $1/sysfw.itb ]] && cp $1/sysfw.itb ${MOUNT}/boot | ||
| cp $1/tispl.bin ${MOUNT}/boot | ||
| cp $1/u-boot.img ${MOUNT}/boot |
| # 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 |
What
Guard the
sysfw.itbcopy in the k3 u-boot assembly so it only runs when the file actually exists.Why
sysfw.itbis only produced for older K3 SoCs that setSYSFW_FILE— J721E (sk-tda4vm,beaglebone-ai64). On AM62 (BeaglePlay, etc.) the system firmware (TIFS) is folded intotiboot3.binby binman, so there is no separatesysfw.itb, and its absence is correct.But
write_uboot_platformcopied it unconditionally:so every AM62 install logged a misleading error:
Surfaced in an
armbian-installBeaglePlay test report (#10176), where it read like u-boot flashing had failed.Change
Guard both copies in
config/sources/families/include/k3_common.inc:SYSFW_FILEis set,write_uboot_platform→ only when$1/sysfw.itbexists.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
tiboot3.bin.sysfw.itbcreation and misleading missing-file messages during bootloader installation.