Skip to content

Commit e7ab3b3

Browse files
committed
added mips64el support
1 parent 704958c commit e7ab3b3

File tree

5 files changed

+30
-6
lines changed

5 files changed

+30
-6
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# =============================================================================
99
# YABB Release Workflow
1010
# Cross-compiles static binaries for all architectures
11-
# - amd64, arm64, armv7l, ppc64le, loong64: Zig cross-compilation
11+
# - amd64, arm64, armv7l, ppc64le, loong64, mips64el: Zig cross-compilation
1212
# - riscv64: RISCstar toolchain (Zig's musl has ABI incompatibility)
1313
# - armv5l: Bootlin toolchain (Zig's musl emits NEON instructions)
1414
# Note: armv7l requires NEON (Zig's musl is compiled with NEON optimisations)
@@ -62,6 +62,11 @@ jobs:
6262
nimcpu: "--cpu:loongarch64"
6363
march: "-march=loongarch64"
6464
toolchain: zig
65+
- arch: mips64el
66+
target: mips64el-linux-muslabi64
67+
nimcpu: "--cpu:mips64"
68+
march: "-mcpu=mips64r2"
69+
toolchain: zig
6570
- arch: armv5l
6671
nimcpu: "--cpu:arm"
6772
toolchain: bootlin

Install.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Installation Guide
77
REQUIREMENTS
88
------------
99
- Linux with BTRFS filesystems (source and destination must both be BTRFS)
10-
- Supported architectures: x86_64, aarch64, armv7l, armv5l, riscv64, ppc64le, loongarch64
10+
- Supported architectures: x86_64, aarch64, armv7l, armv5l, riscv64, ppc64le, loongarch64, mips64el
1111
- Root access (sudo) for backup operations
1212
- Bash 5.2 or newer (for automatic installer)
1313
- btrfs-progs 5.14 or newer

justfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ release: && _clean-cache
159159
riscv64) nimble releaseRiscv64 && cp bin/yabb-linux-riscv64 bin/yabb ;;
160160
ppc64le) nimble releasePpc64le && cp bin/yabb-linux-ppc64le bin/yabb ;;
161161
loongarch64) nimble releaseLoong64 && cp bin/yabb-linux-loong64 bin/yabb ;;
162+
mips64el) nimble releaseMips64el && cp bin/yabb-linux-mips64el bin/yabb ;;
162163
*) echo "Unsupported architecture: $ARCH" && exit 1 ;;
163164
esac
164165
echo "Release build: bin/yabb (musl static, optimised, stripped)"
@@ -211,9 +212,14 @@ build-loong64:
211212
@echo "Cross-compiling for LoongArch64..."
212213
nimble releaseLoong64
213214

214-
# Release binaries for all Linux architectures (amd64, arm64, armv7l, riscv64, ppc64le, loong64)
215+
# Build for MIPS64EL Linux (static musl, N64 ABI - Debian mips64el)
216+
build-mips64el:
217+
@echo "Cross-compiling for MIPS64EL..."
218+
nimble releaseMips64el
219+
220+
# Release binaries for all Linux architectures
215221
# Note: armv5l is CI-only (Bootlin toolchain not available locally)
216-
release-all: build-amd64 build-arm64 build-armv7l build-riscv64 build-ppc64le build-loong64
222+
release-all: build-amd64 build-arm64 build-armv7l build-riscv64 build-ppc64le build-loong64 build-mips64el
217223
@echo ""
218224
@echo "All architectures built (armv5l is CI-only):"
219225
@ls -lh bin/yabb-linux-* 2>/dev/null || echo "No binaries found"

scripts/setup-yabb.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#
1515
# REQUIREMENTS:
1616
# Bash 5.2+
17-
# Linux (x86_64, aarch64, riscv64, ppc64le, armv7l or loongarch64)
17+
# Linux (x86_64, aarch64, riscv64, ppc64le, armv7l, loongarch64, or mips64el)
1818
# curl, tar, zstd, sha256sum, flock
1919
#
2020
# USAGE (please manually verify content first!):
@@ -171,6 +171,7 @@ declare -rA ARCH_MAP=(
171171
[riscv64]="riscv64"
172172
[ppc64le]="ppc64le"
173173
[loongarch64]="loong64"
174+
[mips64el]="mips64el"
174175
)
175176

176177
#-------------------------------------------------------------------------------

yabb.nimble

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
# Package
99

10-
version = "0.4.21"
10+
version = "0.4.22"
1111
author = "Aryan Ameri"
1212
description = "Yet Another BTRFS Backup"
1313
license = "MPL 2.0"
@@ -179,13 +179,25 @@ task releaseLoong64, "Build static binary for LoongArch64 Linux":
179179
exec "llvm-strip -s bin/yabb-linux-loong64"
180180
echo "Built: bin/yabb-linux-loong64"
181181

182+
task releaseMips64el, "Build static binary for MIPS64EL Linux":
183+
# Debian mips64el: MIPS64R2 baseline, N64 ABI, hard-float
184+
# Uses Zig cross-compilation with musl
185+
# See: https://wiki.debian.org/MIPSPort
186+
exec "nim c " & releaseFlags & " " & zigccFlags & " " & "--cpu:mips64 " &
187+
"--passC:'-target mips64el-linux-muslabi64' " &
188+
"--passL:'-target mips64el-linux-muslabi64' " & "--passC:-mcpu=mips64r2 " & ltoFlags &
189+
" -o:bin/yabb-linux-mips64el src/yabb.nim"
190+
exec "llvm-strip -s bin/yabb-linux-mips64el"
191+
echo "Built: bin/yabb-linux-mips64el"
192+
182193
task releaseAll, "Build static binaries for all Linux architectures":
183194
exec "nimble releaseAmd64"
184195
exec "nimble releaseArm64"
185196
exec "nimble releaseArmv7l"
186197
exec "nimble releaseRiscv64"
187198
exec "nimble releasePpc64le"
188199
exec "nimble releaseLoong64"
200+
exec "nimble releaseMips64el"
189201
echo ""
190202
echo "All architectures built:"
191203
exec "ls -lh bin/yabb-linux-*"

0 commit comments

Comments
 (0)