mirror of
https://github.com/bryanthaboi/gen1recomp
synced 2026-10-25 14:38:42 -04:00
ca90a89d68
The linux-arm64 AppImage, the SBC PortMaster zip and the RG34XXSP zip shipped LuaJIT 2.1.0-beta3 (2017): Debian bullseye's libluajit-5.1-dev for the AppImage, PortMaster's love_11.5 runtime library for the zips. With the JIT enabled, beta3 segfaulted 3/3 runs on a TrimUI Brick; LuaJIT v2.1 commit c6ffc141 ran a 26-minute JIT-on soak without a crash. - Build LuaJIT c6ffc141 from a sha256-pinned tarball in a digest-pinned debian:bullseye (glibc 2.31) with the same apt sources as the AppImage builder; compile with PREFIX=/usr so no build path is baked into package.path, stage-install, and verify before use. - AppImage: compile it inside the builder instead of libluajit-5.1-dev, bundle it with jit/*.lua and its license; cache keys include the LuaJIT commit, recipe hash and Dockerfile hash. - PortMaster zips: replace libs.aarch64/libluajit-5.1.so.2 with the pinned build, pin the PortMaster runtime to commit 715f50fd with sha256 checks (rg34xxsp followed main), ship LuaJIT-COPYRIGHT, verify the finished zip. - verify_luajit.sh gates every package: version string, not beta, aarch64 ELF, /usr module path, max GLIBC <= 2.31; offline selftests cover it and the PortMaster helpers. - CI/release build LuaJIT once on an arm64 runner and pass it to the zip jobs via GEN1RECOMP_LUAJIT_LIB. The JIT stays off by default (LÖVE's jitsetup disables it on arm/arm64). POKEPORT_JIT=1 needs stability testing on H700, RK3566 and A133P devices before it can be enabled by default.
32 lines
1.8 KiB
Bash
Executable File
32 lines
1.8 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Pinned LuaJIT for the aarch64 Linux builds (PortMaster zips, AppImage).
|
|
# Source this file; it only sets variables and has no side effects.
|
|
#
|
|
# Why: PortMaster's LOVE 11.5 runtime ships LuaJIT 2.1.0-beta3 (2017), which
|
|
# segfaulted 3/3 runs with the JIT on (TrimUI Brick). This pinned v2.1-branch
|
|
# commit ran a 26-minute JIT-on soak without a crash. See docs/linux-arm-sbc.md.
|
|
#
|
|
# The commit's .relver is already expanded, so the built library contains the
|
|
# string "LuaJIT 2.1.1788856981" (beta3 contains "LuaJIT 2.1.0-beta3").
|
|
|
|
# shellcheck disable=SC2034
|
|
LUAJIT_COMMIT="c6ffc141a8762b41703f9287d63d93622a13dd8f"
|
|
LUAJIT_URL="https://github.com/LuaJIT/LuaJIT/archive/$LUAJIT_COMMIT.tar.gz"
|
|
LUAJIT_SHA256="6e5fec07750add912e7c3eae0c194d24cd6d023714e1f04a0298a5b4819e4457"
|
|
LUAJIT_TARBALL="LuaJIT-$LUAJIT_COMMIT.tar.gz"
|
|
LUAJIT_VERSION_STRING="LuaJIT 2.1.1788856981"
|
|
# Built on debian:bullseye (glibc 2.31); the library must not need newer.
|
|
# The standalone build (build_luajit.sh) pins the image by digest so a re-tag
|
|
# cannot silently change the toolchain; the digest is part of its cache key.
|
|
# To re-pin: `docker buildx imagetools inspect debian:bullseye` -> the top-level
|
|
# "Digest:" line; put it here AND in the FROM line of
|
|
# scripts/linux-arm64/Dockerfile (the selftest checks the two are equal).
|
|
LUAJIT_BUILD_IMAGE="debian:bullseye@sha256:6f519a81440354a85eb592c5f32109ab80605f6b892455983a6f618bf87fabe9"
|
|
LUAJIT_MAX_GLIBC="2.31"
|
|
# apt sources for the build container (bullseye is EOL; security comes from a
|
|
# dated snapshot). Newline-separated; must match scripts/linux-arm64/Dockerfile
|
|
# so both LuaJIT builds see the same package state.
|
|
LUAJIT_APT_SOURCES="deb http://archive.debian.org/debian bullseye main
|
|
deb http://archive.debian.org/debian bullseye-updates main
|
|
deb http://snapshot.debian.org/archive/debian-security/20260831T000000Z bullseye-security main"
|