Skip to content

mvebu64: modernize EspressoBin/MacchiatoBin firmware (u-boot 2026.07 + TF-A 2.14.0 + A3720 fixes)#10213

Open
igorpecovnik wants to merge 8 commits into
mainfrom
espressobin-uboot-bump-v2026.04
Open

mvebu64: modernize EspressoBin/MacchiatoBin firmware (u-boot 2026.07 + TF-A 2.14.0 + A3720 fixes)#10213
igorpecovnik wants to merge 8 commits into
mainfrom
espressobin-uboot-bump-v2026.04

Conversation

@igorpecovnik

@igorpecovnik igorpecovnik commented Jul 18, 2026

Copy link
Copy Markdown
Member

Brings Armbian's mvebu64 EspressoBin firmware in line with the working bootloader from the forum thread (quiseleve/espressobin-bootloader, a V5/V7 fork of bschnei/ebu-bootloader). I read that repo's submodule pins and commits and matched the whole stack.

Versions (matched to the fork's exact commits)

component before after = fork's pin
u-boot v2025.10 v2026.04 88dc2788
TF-A (ATF) lts-v2.12.8 v2.14.0 1d5aa939
A3700-utils (WTMI) Marvell branch:master bschnei fork commit:f423ac6
mv-ddr branch:master commit:7bcb9dc
mox-boot (CZ.NIC WTMI) branch:master commit:14f39dd

Patches added (dedicated patch/u-boot/v2026.04-mvebu64/)

  • 0001 armada-37xx pinctrl boot-crash fixinfo->dev used in devm_kzalloc() before init crashes on boot with CONFIG_DEVRES=y; still unfixed upstream in v2026.04/v2026.07/master. Without it the board crashes on boot.
  • 0002 enable hardware RNGCONFIG_DM_RNG + CONFIG_RNG_TURRIS_RWTM (the A3720 rWTM mailbox TRNG, backed by the CZ.NIC firmware Armbian builds). Common to the standard EspressoBin and the Ultra.

The dedicated patchdir also isolates mvebu64 from the shared v2026.04 patchdir (which is entirely rockchip patches).

Why the source pins matter (build fixes)

Upstream MarvellEmbeddedProcessors/A3700-utils-marvell is abandoned and no longer builds on a current gcc/ld — sys_init fails first on the C23 bool keyword, then on a dangerous relocation in main(). bschnei's fork fixes both (its pinned commit is literally "fix the jump instruction in main()"). mv-ddr 7bcb9dc carries a gcc fix too. Pinning gives reproducible builds and the exact blob set the working bootloader ships.

Status

Confirmed compiling (u-boot + ATF + WTMI + flash-image). Still wants a boot test on real EspressoBin (V5/V7) — I can't validate a bootloader on hardware.

MacchiatoBin

Shares the family, so it gets the u-boot/ATF/mv-ddr bump too. It compiles OK, but is untested (no hardware on hand). Per maintainer it "can work or not" and isn't a gate here. (A3700-utils and mox-boot are EspressoBin-only, so those don't touch it.)

Forum reports mainline u-boot v2026.04 working on the EspressoBin (frequency
scaling, RNG init via the crypto mailbox, UEFI boot):
https://forum.armbian.com/topic/33715-espressobin-firmwarebootloader/page/2/#findComment-240395

mvebu64 carries no board-specific u-boot patches (espressobin/macchiatobin
build from mainline), so this is a clean tag + patchdir bump — v2026.04 already
exists as a patch dir and contains nothing that touches these boards. ATF is
left at lts-v2.12.8 (BL31/BL33 are loosely coupled); bump separately if needed.

Needs a build + boot test on real EspressoBin (and macchiatobin-doubleshot,
same family) before merge — I can't validate the bootloader on hardware.

Signed-off-by: Igor Pecovnik <igor@armbian.com>
@github-actions github-actions Bot added size/small PR with less then 50 lines 08 Milestone: Third quarter release labels Jul 18, 2026
@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The mvebu64 family selects newer U-Boot and ATF sources, applies GNU11 flags to WTMI Makefiles, initializes the Armada 37xx pinctrl device pointer, and enables EspressoBin hardware RNG support.

Changes

mvebu64 boot updates

Layer / File(s) Summary
Update source selectors
config/sources/families/mvebu64.conf
BOOTBRANCH, BOOTPATCHDIR, and ATFBRANCH now reference v2026.04-based U-Boot sources and ATF v2.14.0.
Configure WTMI compilation
config/sources/families/mvebu64.conf
WTMI Makefiles are patched to use -std=gnu11 during A3700 WTMI builds.
Fix pinctrl device initialization
patch/u-boot/v2026.04-mvebu64/0001-pinctrl-armada-37xx-init-info-dev-before-devm_kzalloc.patch
armada_37xx_pinctrl_probe() initializes info->dev before managed allocations.
Enable EspressoBin hardware RNG
patch/u-boot/v2026.04-mvebu64/0002-configs-espressobin-enable-hardware-rng-turris-rwtm.patch
The EspressoBin defconfig enables CONFIG_DM_RNG and CONFIG_RNG_TURRIS_RWTM.

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

Possibly related PRs

  • armbian/build#9786: Updates the shared U-Boot source selection to v2026.04 in another mvebu family configuration.
  • armbian/build#10144: Updates U-Boot source selectors to v2026.04 values in another family configuration.
  • armbian/build#10186: Changes exported U-Boot branch selectors in other family and board configurations.

Suggested reviewers: colorfulrhino, amazingfate, heymeco

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title is mostly relevant, but it incorrectly says U-Boot 2026.07 while the changes actually move to 2026.04. Change the version in the title to match the PR, e.g. "mvebu64: modernize EspressoBin/MacchiatoBin firmware (U-Boot 2026.04 + TF-A 2.14.0 + A3720 fixes)".
✅ Passed checks (4 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.
✨ 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 espressobin-uboot-bump-v2026.04

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 Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... labels Jul 18, 2026
The EspressoBin bootloader builds referenced in the forum thread
(quiseleve/espressobin-bootloader, bschnei/ebu-bootloader) pin TF-A to the
v2.14.0 release (commit 1d5aa939, the v2.14.0 tag) alongside u-boot v2026.04.
Align Armbian's mvebu64 ATF to the same v2.14.0.

Note: mv-ddr, mox-boot-builder (WTMI) and A3700-utils are still fetched as
branch:master by extensions/marvell-tools.sh, whereas those repos pin specific
commits (mv-ddr 7bcb9dc, mox 14f39dd, A3700-utils fork f423ac6). Can pin those
too if the ATF+u-boot bump alone doesn't boot on hardware.

Signed-off-by: Igor Pecovnik <igor@armbian.com>
@igorpecovnik igorpecovnik changed the title mvebu64: bump u-boot v2025.10 → v2026.04 (EspressoBin / MacchiatoBin) mvebu64: bump EspressoBin u-boot v2026.04 + TF-A v2.14.0 (match forum's working firmware) Jul 18, 2026
Inspecting the forum's working bootloader (quiseleve/espressobin-bootloader)
turned up a critical patch Armbian was missing: the armada-37xx pinctrl driver
uses info->dev in devm_kzalloc() before it's initialized, which crashes on boot
with CONFIG_DEVRES=y (since u-boot 217cf65). Still unfixed upstream in
v2026.04 / v2026.07 / master, so u-boot v2026.04 for EspressoBin would crash
without it.

Add the fix as a dedicated mvebu64 u-boot patchdir (v2026.04-mvebu64) and point
BOOTPATCHDIR at it. This also isolates mvebu from the shared v2026.04 patchdir,
which is entirely rockchip-specific (general-rk35xx*, ufs, etc.) — irrelevant
noise for these boards. Verified the patch applies cleanly to u-boot v2026.04.

Signed-off-by: Igor Pecovnik <igor@armbian.com>
@github-actions github-actions Bot added the Patches Patches related to kernel, U-Boot, ... label Jul 18, 2026
@igorpecovnik

Copy link
Copy Markdown
Member Author

Inspected the forum's bootloader repo — found a critical missing patch

Went through the commits in quiseleve/espressobin-bootloader. Beyond the version pins (u-boot v2026.04 = their 88dc2788, TF-A v2.14.0 = their 1d5aa939, already in this PR), they carry a devres.patch that fixes a boot crash — and Armbian didn't have it:

info->dev is uninitialized going into devm_kzalloc()crash on boot for armada_37xx with CONFIG_DEVRES=y (since u-boot commit 217cf65).

I checked upstream: the fix is still absent in v2026.04, v2026.07 and master — so our EspressoBin u-boot v2026.04 would crash on boot without it. Added it (commit ed54e7d):

  • New dedicated patchdir patch/u-boot/v2026.04-mvebu64/ with the pinctrl fix; BOOTPATCHDIR now points there.
  • Bonus: that also isolates mvebu64 from the shared v2026.04 patchdir, which is entirely rockchip-specific (general-rk35xx*, UFS, HDMI, …) — irrelevant patches these boards were pulling in.
  • Verified the patch applies cleanly to real u-boot v2026.04 (git apply --check) and lands info->dev = dev; right before the crashing devm_kzalloc(info->dev, …).

Other commits I reviewed and deliberately did not port

  • 804208e1 enable bootflow / hwrng, disable sata — that's the espressobin Ultra defconfig (armada-3720-espressobin-ultra), a different board; not our standard espressobin.
  • d975ba49 v5 CPU_1000_DDR_800 — their V5 clock preset; Armbian uses CPU_800_DDR_800. Worth revisiting for the 1 GHz V5 variants, but it's a runtime/OTP-fuse tuning call, separate from this boot-crash fix.
  • The other blobs (mv-ddr 7bcb9dc, mox/WTMI 14f39dd, A3700-utils f423ac6) are still fetched as branch:master — noted earlier; pin if hardware testing needs it.

The A3720 TRNG is reachable via the CZ.NIC secure firmware (rWTM) that Armbian
builds from mox-boot-builder. The stock mvebu_espressobin-88f3720_defconfig
doesn't enable it; add CONFIG_DM_RNG=y + CONFIG_RNG_TURRIS_RWTM=y so u-boot
seeds entropy from hardware (RNG_TURRIS_RWTM Kconfig documents EspressoBin
support; deps DM_RNG && ARMADA_3700 already met). The hardware RNG is common to
the standard EspressoBin and the Ultra. Verified the patch applies to v2026.04.

Signed-off-by: Igor Pecovnik <igor@armbian.com>
The vendor A3700-utils WTMI (sys_init) fails to compile with a modern gcc that
defaults to -std=c23: wtmi/common/types.h does 'typedef int bool', and bool is
now a reserved keyword ("'bool' cannot be defined via 'typedef'"), breaking the
a3700 flash-image (fip/mrvl_flash) build.

Force -std=gnu11 on the WTMI sub-builds (only sys_init/Makefile carries a
CFLAGS line) so the old typedef stays valid and bool remains int-sized -
behaviour-preserving vs C23's 1-byte _Bool. Pre-existing issue, not from the
u-boot/ATF bump, but it blocks building EspressoBin on current hosts.

Signed-off-by: Igor Pecovnik <igor@armbian.com>
…olchain)

Upstream MarvellEmbeddedProcessors/A3700-utils-marvell (branch:master) is
abandoned and no longer builds/links on a current gcc/ld: sys_init fails first
on the C23 'bool' keyword ('typedef int bool') and then on a "dangerous
relocation: unsupported relocation" in main() (main.c:349).

Point marvell-tools at bschnei's fork, pinned to f423ac6 - the exact commit the
working espressobin-bootloader (quiseleve fork) uses - which fixes both (its
message is literally "fix the jump instruction in main()"). This supersedes the
earlier -std=gnu11 sed workaround (dropped), since the fork fixes 'bool' at the
source. Only EspressoBin uses marvell-tools (WTP); MacchiatoBin is unaffected.

Signed-off-by: Igor Pecovnik <igor@armbian.com>
…r commits

Complete matching the forum's proven-working A3720 firmware: pin mv-ddr-marvell
to 7bcb9dc (carries a gcc build fix) and mox-boot-builder (CZ.NIC WTMI secure
firmware) to 14f39dd, instead of tracking branch:master. Reproducible builds and
the exact blob set the working espressobin-bootloader ships. mv-ddr is shared
with MacchiatoBin (best-effort); mox-boot is EspressoBin-only.

Signed-off-by: Igor Pecovnik <igor@armbian.com>
@igorpecovnik igorpecovnik changed the title mvebu64: bump EspressoBin u-boot v2026.04 + TF-A v2.14.0 (match forum's working firmware) mvebu64: modernize EspressoBin firmware (u-boot 2026.04 + TF-A 2.14.0 + A3720 fixes) Jul 18, 2026
@github-actions github-actions Bot added Framework Framework components size/medium PR with more then 50 and less then 250 lines and removed size/small PR with less then 50 lines labels Jul 18, 2026
Move to the current u-boot release. Both mvebu64 patches still apply cleanly to
v2026.07 (verified): the armada-37xx pinctrl boot-crash fix is still needed
(the bug remains unfixed upstream) and the hardware-RNG defconfig addition.
Rename the dedicated patchdir accordingly. ATF (v2.14.0) and the pinned A3720
blobs are unaffected by the u-boot version.

Signed-off-by: Igor Pecovnik <igor@armbian.com>
@igorpecovnik igorpecovnik changed the title mvebu64: modernize EspressoBin firmware (u-boot 2026.04 + TF-A 2.14.0 + A3720 fixes) mvebu64: modernize EspressoBin/MacchiatoBin firmware (u-boot 2026.07 + TF-A 2.14.0 + A3720 fixes) Jul 18, 2026
@igorpecovnik
igorpecovnik requested a review from Copilot July 18, 2026 14:37

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

Updates Armbian’s mvebu64 firmware build inputs to align EspressoBin/MacchiatoBin with a newer bootloader stack, including dedicated U-Boot patching for EspressoBin-specific fixes.

Changes:

  • Bump mvebu64 U-Boot and TF-A versions and switch to a dedicated v2026.07-mvebu64 U-Boot patch directory.
  • Pin Marvell toolchain dependencies (A3700-utils, mv-ddr, mox-boot) to specific commits for reproducible builds.
  • Add two U-Boot patches: Armada 37xx pinctrl devres crash fix and EspressoBin hardware RNG (Turris rWTM) enablement.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
config/sources/families/mvebu64.conf Moves mvebu64 to U-Boot v2026.07, TF-A v2.14.0, and switches to the dedicated mvebu64 U-Boot patchdir.
extensions/marvell-tools.sh Pins Marvell-related source repos to specific commits for build reproducibility.
patch/u-boot/v2026.07-mvebu64/0001-pinctrl-armada-37xx-init-info-dev-before-devm_kzalloc.patch Adds EspressoBin boot-crash fix for Armada 37xx pinctrl when devres is enabled.
patch/u-boot/v2026.07-mvebu64/0002-configs-espressobin-enable-hardware-rng-turris-rwtm.patch Enables DM_RNG + RNG_TURRIS_RWTM in EspressoBin defconfig to use rWTM-backed TRNG.

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

Comment on lines +30 to +31
declare -g BOOTBRANCH='tag:v2026.07'
declare -g BOOTPATCHDIR='v2026.07-mvebu64'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

08 Milestone: Third quarter release Framework Framework components Hardware Hardware related like kernel, U-Boot, ... Needs review Seeking for review Patches Patches related to kernel, U-Boot, ... size/medium PR with more then 50 and less then 250 lines

Development

Successfully merging this pull request may close these issues.

2 participants