mvebu64: modernize EspressoBin/MacchiatoBin firmware (u-boot 2026.07 + TF-A 2.14.0 + A3720 fixes)#10213
mvebu64: modernize EspressoBin/MacchiatoBin firmware (u-boot 2026.07 + TF-A 2.14.0 + A3720 fixes)#10213igorpecovnik wants to merge 8 commits into
Conversation
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>
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe 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. Changesmvebu64 boot updates
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
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>
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>
Inspected the forum's bootloader repo — found a critical missing patchWent through the commits in
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
Other commits I reviewed and deliberately did not port
|
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>
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>
There was a problem hiding this comment.
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
mvebu64U-Boot and TF-A versions and switch to a dedicatedv2026.07-mvebu64U-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.
| declare -g BOOTBRANCH='tag:v2026.07' | ||
| declare -g BOOTPATCHDIR='v2026.07-mvebu64' |
Brings Armbian's
mvebu64EspressoBin firmware in line with the working bootloader from the forum thread (quiseleve/espressobin-bootloader, a V5/V7 fork ofbschnei/ebu-bootloader). I read that repo's submodule pins and commits and matched the whole stack.Versions (matched to the fork's exact commits)
v2025.10v2026.0488dc2788lts-v2.12.8v2.14.01d5aa939branch:mastercommit:f423ac6branch:mastercommit:7bcb9dcbranch:mastercommit:14f39ddPatches added (dedicated
patch/u-boot/v2026.04-mvebu64/)0001armada-37xx pinctrl boot-crash fix —info->devused indevm_kzalloc()before init crashes on boot withCONFIG_DEVRES=y; still unfixed upstream in v2026.04/v2026.07/master. Without it the board crashes on boot.0002enable hardware RNG —CONFIG_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.04patchdir (which is entirely rockchip patches).Why the source pins matter (build fixes)
Upstream
MarvellEmbeddedProcessors/A3700-utils-marvellis abandoned and no longer builds on a current gcc/ld — sys_init fails first on the C23boolkeyword, then on adangerous relocationinmain(). bschnei's fork fixes both (its pinned commit is literally "fix the jump instruction in main()"). mv-ddr7bcb9dccarries 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.)