Add ARM64 build targets and release roadmap

This commit is contained in:
root
2026-05-03 08:38:55 +00:00
parent 2dcdd26c12
commit b616e06813
8 changed files with 215 additions and 60 deletions
+9
View File
@@ -23,6 +23,12 @@ Thumbs.db
core
core.*
# Runtime node/wallet config. Examples under contrib/ stay tracked.
/agrarian.conf
/bitcoin.conf
/.agrarian/
/.bitcoin/
# -----------------------------
# Autotools / configure outputs
# -----------------------------
@@ -100,6 +106,8 @@ ninja-build/
# Qt build artifacts (if applicable)
*.qrc.depends
moc_*.cpp
*.moc
*.qm
ui_*.h
qrc_*.cpp
@@ -115,6 +123,7 @@ qrc_*.cpp
/depends/i686-w64-mingw32/
/depends/x86_64-w64-mingw32/
/depends/*-apple-darwin*/
/depends/*-linux-gnu/
/depends/*-unknown-linux-gnu*/
/depends/*-pc-linux-gnu*/
/depends/*-w64-mingw32*/
+79 -5
View File
@@ -4,6 +4,7 @@ set -euo pipefail
REPO_URL="${REPO_URL:-https://github.com/pacificao/agrarian.git}"
WORKDIR="${WORKDIR:-$HOME/agrarian}"
HOST_WIN64="${HOST_WIN64:-x86_64-w64-mingw32}"
HOST_ARM64="${HOST_ARM64:-aarch64-linux-gnu}"
MENU_CHOICE="${AGRARIAN_MENU_CHOICE:-}"
ROOT=""
@@ -291,11 +292,13 @@ select_target() {
fi
if has_cmd whiptail; then
MENU_CHOICE="$(whiptail --title "Agrarian Build Menu" --menu "Select a build target" 17 76 8 \
MENU_CHOICE="$(whiptail --title "Agrarian Build Menu" --menu "Select a build target" 20 78 10 \
"linux-daemon" "Compile Linux daemon and CLI tools" \
"linux-qt" "Compile Linux Qt GUI wallet" \
"windows-daemon" "Cross-compile Windows daemon and CLI tools" \
"windows-qt" "Cross-compile Windows Qt GUI wallet" \
"linux-arm64-daemon" "Compile Linux ARM64 daemon and CLI tools" \
"linux-arm64-qt" "Compile Linux ARM64 Qt GUI wallet" \
3>&1 1>&2 2>&3)" || exit 0
else
echo "Agrarian Build Menu"
@@ -303,13 +306,17 @@ select_target() {
echo "2) Compile Linux Qt GUI wallet"
echo "3) Cross-compile Windows daemon and CLI tools"
echo "4) Cross-compile Windows Qt GUI wallet"
echo "5) Compile Linux ARM64 daemon and CLI tools"
echo "6) Compile Linux ARM64 Qt GUI wallet"
local choice
read -r -p "Selection [1-4]: " choice
read -r -p "Selection [1-6]: " choice
case "$choice" in
1) MENU_CHOICE="linux-daemon" ;;
2) MENU_CHOICE="linux-qt" ;;
3) MENU_CHOICE="windows-daemon" ;;
4) MENU_CHOICE="windows-qt" ;;
5) MENU_CHOICE="linux-arm64-daemon" ;;
6) MENU_CHOICE="linux-arm64-qt" ;;
*) fail "Invalid selection: $choice" ;;
esac
fi
@@ -406,7 +413,7 @@ install_packages() {
)
case "$MENU_CHOICE" in
linux-qt)
linux-qt|linux-arm64-qt)
packages+=(
xvfb
libfontconfig1-dev libfreetype6-dev libharfbuzz-dev
@@ -424,6 +431,11 @@ install_packages() {
windows-daemon|windows-qt)
packages+=(mingw-w64 g++-mingw-w64-x86-64 g++-mingw-w64-x86-64-posix)
;;
linux-arm64-daemon)
if [[ "$(detect_native_host)" != aarch64-* ]]; then
packages+=(g++-aarch64-linux-gnu binutils-aarch64-linux-gnu)
fi
;;
esac
export DEBIAN_FRONTEND=noninteractive
@@ -507,9 +519,14 @@ reexec_from_checkout() {
WORKDIR="$WORKDIR" \
JOBS="$JOBS" \
HOST_WIN64="$HOST_WIN64" \
HOST_ARM64="$HOST_ARM64" \
"$repo_script"
}
detect_native_host() {
"$ROOT/depends/config.guess"
}
ensure_posix_mingw() {
local gcc_path="/usr/bin/$HOST_WIN64-gcc-posix"
local gxx_path="/usr/bin/$HOST_WIN64-g++-posix"
@@ -545,6 +562,57 @@ build_windows_daemon() {
run_step 90 "Compiling Windows daemon and CLI tools" make -j"$JOBS"
}
ensure_arm64_toolchain() {
if [[ "$(detect_native_host)" == aarch64-* ]]; then
return 0
fi
has_cmd aarch64-linux-gnu-g++ || fail "Missing aarch64-linux-gnu-g++. Install g++-aarch64-linux-gnu."
has_cmd aarch64-linux-gnu-ar || fail "Missing aarch64-linux-gnu-ar. Install binutils-aarch64-linux-gnu."
}
build_linux_arm64_daemon() {
local build_host
build_host="$(detect_native_host)"
if [[ "$build_host" == aarch64-* ]]; then
run_step 45 "Compiling native Linux ARM64 daemon and CLI tools" env JOBS="$JOBS" ./contrib/build-linux.sh
return 0
fi
ensure_arm64_toolchain
run_step 45 "Building Linux ARM64 daemon depends" make -C depends HOST="$HOST_ARM64" NO_QT=1 -j1
if [[ ! -f configure || ! -f src/secp256k1/configure || ! -f src/secp256k1/Makefile.in ]]; then
run_step 60 "Generating configure script" ./autogen.sh
fi
run_step 72 "Configuring Linux ARM64 daemon build" env CONFIG_SITE="$ROOT/depends/$HOST_ARM64/share/config.site" ./configure \
--build="$build_host" \
--host="$HOST_ARM64" \
--prefix=/ \
--without-gui \
--disable-maintainer-mode \
--disable-tests \
--disable-bench \
--disable-zmq \
--with-miniupnpc=no
run_step 82 "Cleaning stale target objects" make clean
run_step 90 "Compiling Linux ARM64 daemon and CLI tools" make -j"$JOBS"
}
build_linux_arm64_qt() {
local build_host
build_host="$(detect_native_host)"
if [[ "$build_host" != aarch64-* ]]; then
fail "Linux ARM64 Qt wallet builds are native-only for now. Run this option on an ARM64 Ubuntu machine, or use the ARM64 daemon cross-build from this host."
fi
run_step 45 "Compiling native Linux ARM64 Qt GUI wallet" env JOBS="$JOBS" ./contrib/build-linux-wallet.sh
}
build_selected() {
case "$MENU_CHOICE" in
linux-daemon)
@@ -559,6 +627,12 @@ build_selected() {
windows-qt)
run_step 45 "Compiling Windows Qt GUI wallet" env JOBS="$JOBS" ./contrib/build-win64-wallet.sh
;;
linux-arm64-daemon)
build_linux_arm64_daemon
;;
linux-arm64-qt)
build_linux_arm64_qt
;;
*)
fail "Unknown build choice: $MENU_CHOICE"
;;
@@ -637,7 +711,7 @@ show_completion() {
echo
case "$MENU_CHOICE" in
linux-daemon)
linux-daemon|linux-arm64-daemon)
echo "Linux daemon binaries:"
echo " $ROOT/src/agrariand"
echo " $ROOT/src/agrarian-cli"
@@ -650,7 +724,7 @@ show_completion() {
echo "Start manually with: $ROOT/src/agrariand -daemon"
fi
;;
linux-qt)
linux-qt|linux-arm64-qt)
echo "Linux wallet binaries:"
echo " $ROOT/src/qt/agrarian-qt"
echo " $ROOT/src/agrariand"
+87
View File
@@ -0,0 +1,87 @@
# Agrarian 2.0 Development Roadmap
This file tracks the 2.0 line before it becomes the main Agrarian codebase.
## Current Release Goal
Agrarian 2.0 should be the modern, buildable baseline for the coin:
- Ubuntu daemon builds
- Ubuntu Qt wallet builds
- Windows daemon cross-builds
- Windows Qt wallet cross-builds
- ARM64 daemon builds for server nodes
- clean enough docs and scripts for repeatable fresh-server builds
- stable network behavior with existing Agrarian nodes
## Validation Before Promoting 2.0 To Main
- Linux daemon: validated on Ubuntu with `contrib/build-linux.sh`.
- Linux Qt wallet: validated on Ubuntu with `contrib/build-linux-wallet.sh`.
- Daemon smoke test: validated with `contrib/smoke-test-daemon.sh`.
- Wallet smoke test: validated with `contrib/smoke-test-wallet.sh`.
- Qt smoke test: validated with `contrib/smoke-test-qt.sh`.
- Windows daemon: validated with the build menu on x86_64 Ubuntu.
- Windows Qt wallet: validated with the build menu on x86_64 Ubuntu.
- Linux ARM64 daemon: validated with the build menu cross-build from x86_64 Ubuntu.
- Linux ARM64 Qt wallet: native ARM64 build only for now; x86_64 menu guard validated.
## Build Script Targets
The build menu is the preferred entry point:
```bash
./contrib/agrarian-build-menu.sh
```
Supported targets:
- Linux daemon and CLI tools
- Linux Qt GUI wallet
- Windows daemon and CLI tools
- Windows Qt GUI wallet
- Linux ARM64 daemon and CLI tools
- Linux ARM64 Qt GUI wallet, native ARM64 host only
The script should:
- clone or fast-forward the selected branch
- install Ubuntu packages needed for the selected target
- refuse unsafe root execution unless explicitly overridden for controlled CI/root environments
- stop a running user daemon gracefully before replacing binaries
- refuse to force-close the GUI wallet
- restore a daemon it stopped when the build completes
## Dependency Policy
Already modernized in the 2.0 line:
- OpenSSL LTS path
- Boost current modern path
- Qt 6.8 LTS path
- expat
- freetype
- zlib
- libevent
- zeromq
- qrencode
- miniupnpc
- GMP
- protobuf
Berkeley DB stays on 4.8.30 for the 2.0 release to preserve wallet compatibility.
Do not jump to BDB 18.x in 2.0. A future wallet database migration should be a
planned project, likely toward SQLite, with explicit wallet backup and migration
tooling.
## Known Follow-Up Work
- Re-run Windows daemon and Windows Qt wallet validation after every dependency change.
- Keep ARM64 Qt wallet as native-only until a reliable cross-Qt path is designed.
- Reduce remaining compiler warning noise where it affects correctness.
- Replace deprecated `std::random_shuffle` usage.
- Audit old Boost and LevelDB warning areas without changing consensus behavior casually.
- Build a formal release packaging process for Linux and Windows artifacts.
- Add repeatable clean-machine CI once the local build menu is stable.
- Plan the SQLite wallet migration as a post-2.0 milestone.
- Continue wallet UX modernization after the 2.0 build baseline is promoted.
+20
View File
@@ -8,6 +8,8 @@ for common Agrarian targets:
- Linux Qt GUI wallet
- Windows daemon and CLI tools
- Windows Qt GUI wallet
- Linux ARM64 daemon and CLI tools
- Linux ARM64 Qt GUI wallet
The script clones the Agrarian repository if the selected checkout directory
does not exist. If the checkout already exists, it fetches, checks out the
@@ -58,6 +60,16 @@ obsolete BIP70 payment request support was removed. The helper also clears
stale Qt work directories before rebuilding, because failed CMake
feature checks can otherwise be cached between attempts.
The Linux ARM64 daemon option cross-compiles the daemon and CLI tools from an
x86_64 Ubuntu host when the `g++-aarch64-linux-gnu` and
`binutils-aarch64-linux-gnu` packages are available. On an ARM64 Ubuntu host it
uses the normal native Linux daemon path.
The Linux ARM64 Qt wallet option is native-only. Run it on an ARM64 Ubuntu
desktop/server with the Qt/XCB development packages installed. The current Qt 6
Linux wallet build depends on target-system XCB/font pkg-config metadata, so the
menu does not advertise a fragile x86_64-to-ARM64 Qt GUI cross-build path.
Defaults
--------
@@ -97,3 +109,11 @@ Windows Build Output
For Windows targets, the script prints the `.exe` artifact paths when the build
finishes. Copy the generated files from `src/` and `src/qt/` to the Windows
machine and run either `agrariand.exe` or `agrarian-qt.exe`.
ARM64 Build Output
------------------
For ARM64 daemon targets, the script prints the generated Linux binaries in
`src/`. Copy them to the ARM64 machine if the build was cross-compiled. For the
ARM64 Qt wallet target, the build should be run directly on the ARM64 machine
and the wallet binary is `src/qt/agrarian-qt`.
+10 -10
View File
@@ -20,13 +20,13 @@ The Agrarian installer is `installer/agrarian-installer.sh`. It automates the Ub
- Configuring the project with the depends `config.site` and prefix.
- Building the daemon and CLI utilities (via `--action daemon` or `--action all`).
- Building the Qt wallet on Linux hosts (via `--action qt`, or `--action all` when Qt is enabled).
- Cross-compiling Qt wallets for Windows and Linux ARM targets (via `--action qt --qt-target ...`).
- Cross-compiling Qt wallets for Windows targets (via `--action qt --qt-target ...`).
It does not:
- Install system packages (it only checks for required toolchains and prints an `apt-get` command if missing).
- Run `make install` or copy binaries into `/usr/local`.
- Package platform installers (e.g., Windows/macOS/ARM Qt wallet bundles).
- Package platform installers (e.g., Windows/macOS wallet bundles).
- Run or configure the daemon after the build.
Quick Start (Ubuntu/Debian)
@@ -56,11 +56,13 @@ Build Qt wallets for cross targets (examples):
```bash
./installer/agrarian-installer.sh --action qt --qt-target win64
./installer/agrarian-installer.sh --action qt --qt-target win32
./installer/agrarian-installer.sh --action qt --qt-target armhf
./installer/agrarian-installer.sh --action qt --qt-target aarch64
./installer/agrarian-installer.sh --action qt --qt-target all
```
Use `contrib/agrarian-build-menu.sh` for the current ARM64 daemon and native
ARM64 Qt wallet flows. The legacy installer document is kept as secondary
reference and should not be treated as the release authority for ARM builds.
Expected outputs:
- Depends prefix: `depends/<host-triplet>/`
@@ -84,14 +86,12 @@ Common Installer Options
- `qt` builds the Qt wallet (`src/qt/agrarian-qt`). If depends are missing, the installer builds them first.
- `all` builds depends and then runs top-level `make` in the repo root.
`--qt-target <native|win64|win32|armhf|aarch64|all>`
`--qt-target <native|win64|win32|all>`
- `native` uses `--host` as-is (default).
- `win64` maps to `x86_64-w64-mingw32`.
- `win32` maps to `i686-w64-mingw32`.
- `armhf` maps to `arm-linux-gnueabihf`.
- `aarch64` maps to `aarch64-unknown-linux-gnu`.
- `all` builds native + all cross targets listed above.
- `all` builds native + the Windows cross targets listed above.
`--host <triplet>`
@@ -171,7 +171,7 @@ Then install toolchains per target:
- win64: `g++-mingw-w64-x86-64` (see `doc/build-windows.md`)
- win32: `g++-mingw-w64-i686` (see `doc/build-windows.md`)
- armhf: `g++-arm-linux-gnueabihf` and `binutils-arm-linux-gnueabihf`
- aarch64: `g++-aarch64-linux-gnu` and `binutils-aarch64-linux-gnu`
- aarch64 daemon builds through `contrib/agrarian-build-menu.sh` use
`g++-aarch64-linux-gnu` and `binutils-aarch64-linux-gnu`
If any toolchain binaries are missing, the installer prints a single `apt-get install` command that includes the required packages for the selected Qt targets.
+4 -18
View File
@@ -27,7 +27,7 @@ Options:
--host <triplet> Build host triplet (default: x86_64-pc-linux-gnu)
--action <depends|daemon|qt|all>
Action to run (default: all)
--qt-target <native|win64|win32|armhf|aarch64|all>
--qt-target <native|win64|win32|all>
Qt wallet target (default: native)
--wallet <0|1> Enable wallet-related dependencies/build flags (default: 1)
--jobs <n> Parallel build jobs (default: nproc)
@@ -144,14 +144,6 @@ check_toolchains_for_host() {
i686-w64-mingw32)
add_missing_toolchain "i686-w64-mingw32-g++" "g++-mingw-w64-i686"
;;
arm-linux-gnueabihf)
add_missing_toolchain "arm-linux-gnueabihf-g++" "g++-arm-linux-gnueabihf"
add_missing_toolchain "arm-linux-gnueabihf-ar" "binutils-arm-linux-gnueabihf"
;;
aarch64-unknown-linux-gnu)
add_missing_toolchain "aarch64-linux-gnu-g++" "g++-aarch64-linux-gnu"
add_missing_toolchain "aarch64-linux-gnu-ar" "binutils-aarch64-linux-gnu"
;;
*)
;;
esac
@@ -263,7 +255,7 @@ ensure_qt_pkgconfig_prereqs() {
return 0
fi
for module in Qt5Core Qt5Gui Qt5Network Qt5Widgets; do
for module in Qt6Core Qt6Gui Qt6Network Qt6Widgets; do
found_path=""
if [[ -f "${prefix}/lib/pkgconfig/${module}.pc" ]]; then
found_path="${prefix}/lib/pkgconfig/${module}.pc"
@@ -317,12 +309,6 @@ qt_target_host() {
win32)
echo "i686-w64-mingw32"
;;
armhf)
echo "arm-linux-gnueabihf"
;;
aarch64)
echo "aarch64-unknown-linux-gnu"
;;
*)
return 1
;;
@@ -342,7 +328,7 @@ qt_target_list() {
local target="$1"
case "${target}" in
all)
echo "native win64 win32 armhf aarch64"
echo "native win64 win32"
;;
*)
echo "${target}"
@@ -479,7 +465,7 @@ case "$ACTION" in
esac
case "$QT_TARGET" in
native|win64|win32|armhf|aarch64|all) ;;
native|win64|win32|all) ;;
*) fail "Invalid --qt-target: ${QT_TARGET}" ;;
esac
+6 -8
View File
@@ -36,9 +36,7 @@ for tool in \
x86_64-w64-mingw32-g++ \
i686-w64-mingw32-g++ \
aarch64-linux-gnu-gcc \
aarch64-linux-gnu-g++ \
arm-linux-gnueabihf-gcc \
arm-linux-gnueabihf-g++; do
aarch64-linux-gnu-g++; do
cat > "${FAKE_BIN}/${tool}" <<'SH'
#!/usr/bin/env bash
exit 0
@@ -68,16 +66,16 @@ seed_fake_depends_prefix() {
: > "${prefix}/include/db_cxx.h"
: > "${prefix}/lib/libboost_thread.a"
: > "${prefix}/lib/libboost_system.a"
: > "${prefix}/lib/pkgconfig/Qt5Core.pc"
: > "${prefix}/lib/pkgconfig/Qt5Gui.pc"
: > "${prefix}/lib/pkgconfig/Qt5Network.pc"
: > "${prefix}/lib/pkgconfig/Qt5Widgets.pc"
: > "${prefix}/lib/pkgconfig/Qt6Core.pc"
: > "${prefix}/lib/pkgconfig/Qt6Gui.pc"
: > "${prefix}/lib/pkgconfig/Qt6Network.pc"
: > "${prefix}/lib/pkgconfig/Qt6Widgets.pc"
}
echo "[test 1] help output works"
bash "${WORK_REPO}/installer/agrarian-installer.sh" --help > "${LOG_DIR}/help.out"
rg -q -- "--action <depends|daemon|qt|all>" "${LOG_DIR}/help.out"
rg -q -- "--qt-target <native|win64|win32|armhf|aarch64|all>" "${LOG_DIR}/help.out"
rg -q -- "--qt-target <native|win64|win32|all>" "${LOG_DIR}/help.out"
rg -q -- "--host <triplet>" "${LOG_DIR}/help.out"
rg -q -- "--wallet <0|1>" "${LOG_DIR}/help.out"
rg -q -- "--jobs <n>" "${LOG_DIR}/help.out"
-19
View File
@@ -1,19 +0,0 @@
# Copyright (c) 2013-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# These environment variables are set by the build process and read by
# test/functional/test_runner.py and test/util/bitcoin-util-test.py
[environment]
SRCDIR=/home/nathan/agrarian
BUILDDIR=/home/nathan/agrarian
EXEEXT=
RPCAUTH=/home/nathan/agrarian/share/rpcauth/rpcauth.py
[components]
# Which components are enabled. These are commented out by `configure` if they were disabled when running config.
ENABLE_WALLET=true
ENABLE_UTILS=true
ENABLE_BITCOIND=true
#ENABLE_ZMQ=true