- Migrate nokia-tough to canonical nokia-coconut while keeping CLI aliases, add layered bootloader/lk2nd/nokia-coconut.patch, bootfs/bootimg validators, and offline scripts/inspect-stock-msm8905-dump.py - Complete nokia-coconut Stage 2 hardware bring-up: wire 6-column 22-key keypad (gpio0, gpio3, gpio7, gpio99, gpio6, gpio1), gpio98 KEY_POWER, and pon@800:resin KEY_DOWN (0x6c); split leds-msm8905-torch into GPIO_13 white:torch (dedicated top-edge flashlight) and GPIO_32 camera:flash (rear camera flash for camera.so and bananarchy-photo) - Restore sdhci@7864000 non-removable across all six DTS/DTB targets, remove unwired gpio38 cd-gpios/sdc2-cd-* states, and harden sxmo_sdcard.sh under flock - Register upcoming build a1120 (cocojamboo) in scripts/version.sh, scripts/check-rebuild.sh, CHANGELOG.md, AGENTS.md, README.md, and MANUAL.md with verified hashes across nokia-argon, nokia-beatles, and nokia-coconut
95 lines
3.0 KiB
Bash
Executable File
95 lines
3.0 KiB
Bash
Executable File
#!/bin/sh
|
|
# Release archive builder for Bananarchy
|
|
set -eu
|
|
|
|
RAW_TARGET="${1:-nokia-argon}"
|
|
case "$RAW_TARGET" in
|
|
nokia-argon|argon) BA_TARGET="nokia-argon" ;;
|
|
nokia-beatles|beatles) BA_TARGET="nokia-beatles" ;;
|
|
nokia-coconut|nokia-tough|coconut|tough) BA_TARGET="nokia-coconut" ;;
|
|
nokia-sparkler|sparkler) BA_TARGET="nokia-sparkler" ;;
|
|
nokia-leo|leo) BA_TARGET="nokia-leo" ;;
|
|
*)
|
|
echo "Usage: $0 [nokia-argon|nokia-beatles|nokia-coconut|nokia-sparkler|nokia-leo]" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
BA_REBUILD="${BA_REBUILD:-0}"
|
|
BA_VER="$(./scripts/version.sh --print)"
|
|
BA_CODENAME="$(./scripts/version.sh --print-codename)"
|
|
RELDIR="bananarchy-${BA_TARGET}-${BA_VER}-${BA_CODENAME}"
|
|
DISPLAY_IMAGE=""
|
|
BOOT_IMAGE=""
|
|
case "$BA_TARGET" in
|
|
nokia-beatles)
|
|
DISPLAY_IMAGE="images/boot-lk2nd-nokia-beatles-display.img"
|
|
BOOT_IMAGE="images/boot-bananarchy-nokia-beatles.img"
|
|
;;
|
|
nokia-coconut)
|
|
DISPLAY_IMAGE="images/boot-lk2nd-nokia-coconut-display.img"
|
|
BOOT_IMAGE="images/boot-bananarchy-nokia-coconut.img"
|
|
;;
|
|
esac
|
|
|
|
display_lk2nd_is_current() {
|
|
case "$BA_TARGET" in
|
|
nokia-beatles)
|
|
python3 scripts/check-lk2nd-beatles.py \
|
|
--image "$DISPLAY_IMAGE" \
|
|
--patch bootloader/lk2nd/nokia-beatles.patch \
|
|
--expect-fastboot 0 --expect-display 1 >/dev/null 2>&1
|
|
;;
|
|
nokia-coconut)
|
|
python3 scripts/check-lk2nd-coconut.py \
|
|
--image "$DISPLAY_IMAGE" \
|
|
--base-patch bootloader/lk2nd/nokia-beatles.patch \
|
|
--patch bootloader/lk2nd/nokia-coconut.patch \
|
|
--expect-fastboot 0 --expect-display 1 >/dev/null 2>&1
|
|
;;
|
|
*) return 1 ;;
|
|
esac
|
|
}
|
|
|
|
NEED_REBUILD=0
|
|
if [ ! -f "images/bananarchy-${BA_TARGET}.img" ]; then
|
|
NEED_REBUILD=1
|
|
fi
|
|
if [ -n "$BOOT_IMAGE" ] && [ ! -f "$BOOT_IMAGE" ]; then
|
|
NEED_REBUILD=1
|
|
fi
|
|
|
|
if [ "$BA_REBUILD" = "1" ] || [ "$NEED_REBUILD" = "1" ]; then
|
|
./rebuild-image.sh "$BA_TARGET" --mkinitfs
|
|
fi
|
|
|
|
# The default 2720/800 Tough lk2nd image must contain the low-bit reboot cookie,
|
|
# or "Reboot to loader" cannot return to the visible Fastboot menu. Rebuild it
|
|
# separately so a missing lk2nd binary does not invalidate a verified raw image.
|
|
if [ -n "$DISPLAY_IMAGE" ] && \
|
|
{ [ "$BA_REBUILD" = "1" ] || ! display_lk2nd_is_current; }; then
|
|
case "$BA_TARGET" in
|
|
nokia-beatles) ./scripts/build-lk2nd-beatles.sh ;;
|
|
nokia-coconut) ./scripts/build-lk2nd-coconut.sh ;;
|
|
esac
|
|
fi
|
|
|
|
if [ -n "$DISPLAY_IMAGE" ]; then
|
|
python3 scripts/check-beatles-bootimg.py --device "$BA_TARGET"
|
|
python3 scripts/sync-beatles-bootfs.py --check --device "$BA_TARGET" --raw-image "images/bananarchy-${BA_TARGET}.img"
|
|
display_lk2nd_is_current
|
|
fi
|
|
|
|
rm -rf "$RELDIR" "${RELDIR}.zip"
|
|
mkdir -p "$RELDIR"
|
|
cp "images/bananarchy-${BA_TARGET}.img" "$RELDIR/"
|
|
if [ -n "$DISPLAY_IMAGE" ]; then
|
|
cp "$BOOT_IMAGE" "$RELDIR/"
|
|
cp "$DISPLAY_IMAGE" "$RELDIR/"
|
|
else
|
|
cp bootloader/lk2nd-msm8909.img "$RELDIR/"
|
|
fi
|
|
zip -9r "${RELDIR}.zip" "$RELDIR"
|
|
rm -rf "$RELDIR"
|
|
echo "Release $BA_VER ($BA_CODENAME) for $BA_TARGET packed into ${RELDIR}.zip"
|