From aaff656e5a343d9ef161b43b1b5b6e6137642477 Mon Sep 17 00:00:00 2001 From: sbs44 <83440025+sbs44@users.noreply.github.com> Date: Mon, 12 Jan 2026 04:40:32 -0500 Subject: [PATCH 1/2] feat(build): add raspberry pi 5 (cortex-a76) support - Add pi5 CPU enum with cortex-a76+nocrypto compiler flags - Add pi5_64 target for 64-bit ARM engine builds - Update README with Pi 5 build configuration and docs --- README.md | 11 ++++++++++- workflow_tool/lib/workflow_tool.dart | 9 ++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 35667bdf..8effc4ee 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # flutter engine binaries for armv7, aarch64, x64 This repo contains flutter engine binaries (in the https://github.com/ardera/flutter-engine-binaries-for-arm filesystem layout) for armv7 and aarch64. -The binaries come in 2 variants: generic, and tuned for the Pi 4 CPU. +The binaries come in variants: generic, and tuned for the Pi 3, Pi 4, and Pi 5 CPUs. # 📦 Downloads @@ -46,6 +46,12 @@ arm_cpu = "cortex-a72+nocrypto" arm_tune = "cortex-a72" ``` +When tuning for pi 5: +``` +arm_cpu = "cortex-a76+nocrypto" +arm_tune = "cortex-a76" +``` + For both armv7 and aarch64, the engine is built against the sysroot provided by the engine build scripts, which is some debian sid sysroot from 2020. (See https://github.com/flutter/buildroot/blob/master/build/linux/sysroot_scripts/install-sysroot.py) @@ -59,6 +65,7 @@ This will result in the clang compiler being invoked with the following args: | pi3 | `--target=armv7-linux-gnueabihf -mcpu=cortex-a53+nocrypto -mtune=cortex-a53`[^3] | | aarch64-generic | `--target=aarch64-linux-gnu -mcpu=generic -mtune=generic` | | pi4-64 | `--target=aarch64-linux-gnu -mcpu=cortex-a72+nocrypto -mtune=cortex-a72`[^1] | +| pi5-64 | `--target=aarch64-linux-gnu -mcpu=cortex-a76+nocrypto -mtune=cortex-a76`[^4] | | pi3-64 | `--target=aarch64-linux-gnu -mcpu=cortex-a53+nocrypto -mtune=cortex-a53`[^3] | | x64-generic | `--target=x86_64-unknown-linux-gnu -mcpu=generic -mtune=generic` | @@ -84,4 +91,6 @@ objcopy --strip-unneeded libflutter_engine.so [^3]: Pi 3 doesn't support cryptography extensions either. +[^4]: The Raspberry Pi 5 uses a Cortex-A76. Using `+nocrypto` for consistency with Pi 3/Pi 4 builds, though the A76 in Pi 5 does support crypto extensions. + [^2]: `--arm-float-abi hard` is only specified when building for armv7, `--unoptimized` is only specified for unoptimized debug builds. diff --git a/workflow_tool/lib/workflow_tool.dart b/workflow_tool/lib/workflow_tool.dart index 475c22f6..667809ca 100644 --- a/workflow_tool/lib/workflow_tool.dart +++ b/workflow_tool/lib/workflow_tool.dart @@ -85,7 +85,8 @@ enum Arch { enum CPU { generic('generic', 'generic'), pi3('cortex-a53+nocrypto', 'cortex-a53'), - pi4('cortex-a72+nocrypto', 'cortex-a72'); + pi4('cortex-a72+nocrypto', 'cortex-a72'), + pi5('cortex-a76+nocrypto', 'cortex-a76'); const CPU(this.compilerCpu, this.cmopilerTune); @@ -136,6 +137,12 @@ enum Target { name: 'pi4-64', triple: 'aarch64-linux-gnu', ), + pi5_64( + arch: Arch.arm64, + cpu: CPU.pi5, + name: 'pi5-64', + triple: 'aarch64-linux-gnu', + ), riscv64( arch: Arch.riscv64, name: 'riscv64-generic', From b6390023e04bf8b8ad6d4e43e5b29a37a0b42d27 Mon Sep 17 00:00:00 2001 From: sbs44 <83440025+sbs44@users.noreply.github.com> Date: Mon, 12 Jan 2026 10:28:39 -0500 Subject: [PATCH 2/2] fix: remove +nocrypto from Pi5 cpu flag The Cortex-A76 in Raspberry Pi 5 supports crypto extensions, so there's no need to disable them like on Pi3/Pi4. --- README.md | 6 ++---- workflow_tool/lib/workflow_tool.dart | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8effc4ee..1d233fe0 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ arm_tune = "cortex-a72" When tuning for pi 5: ``` -arm_cpu = "cortex-a76+nocrypto" +arm_cpu = "cortex-a76" arm_tune = "cortex-a76" ``` @@ -65,7 +65,7 @@ This will result in the clang compiler being invoked with the following args: | pi3 | `--target=armv7-linux-gnueabihf -mcpu=cortex-a53+nocrypto -mtune=cortex-a53`[^3] | | aarch64-generic | `--target=aarch64-linux-gnu -mcpu=generic -mtune=generic` | | pi4-64 | `--target=aarch64-linux-gnu -mcpu=cortex-a72+nocrypto -mtune=cortex-a72`[^1] | -| pi5-64 | `--target=aarch64-linux-gnu -mcpu=cortex-a76+nocrypto -mtune=cortex-a76`[^4] | +| pi5-64 | `--target=aarch64-linux-gnu -mcpu=cortex-a76 -mtune=cortex-a76` | | pi3-64 | `--target=aarch64-linux-gnu -mcpu=cortex-a53+nocrypto -mtune=cortex-a53`[^3] | | x64-generic | `--target=x86_64-unknown-linux-gnu -mcpu=generic -mtune=generic` | @@ -91,6 +91,4 @@ objcopy --strip-unneeded libflutter_engine.so [^3]: Pi 3 doesn't support cryptography extensions either. -[^4]: The Raspberry Pi 5 uses a Cortex-A76. Using `+nocrypto` for consistency with Pi 3/Pi 4 builds, though the A76 in Pi 5 does support crypto extensions. - [^2]: `--arm-float-abi hard` is only specified when building for armv7, `--unoptimized` is only specified for unoptimized debug builds. diff --git a/workflow_tool/lib/workflow_tool.dart b/workflow_tool/lib/workflow_tool.dart index 667809ca..27aea339 100644 --- a/workflow_tool/lib/workflow_tool.dart +++ b/workflow_tool/lib/workflow_tool.dart @@ -86,7 +86,7 @@ enum CPU { generic('generic', 'generic'), pi3('cortex-a53+nocrypto', 'cortex-a53'), pi4('cortex-a72+nocrypto', 'cortex-a72'), - pi5('cortex-a76+nocrypto', 'cortex-a76'); + pi5('cortex-a76', 'cortex-a76'); const CPU(this.compilerCpu, this.cmopilerTune);