Finalize verified 2720 Flip release source and untrack image outputs
This commit is contained in:
1 parent
2a3078e42c
commit
1c011b360a
121 files changed
+8467
-686
No files matched your search
+625
-3
@@ -131,6 +131,545 @@ if ! grep -q '^from Library\.sahara import qualcomm_sahara$' "$BASE_DIR/flash-ed
|
||||
fail "flash-edl.py is missing the Sahara client import"
|
||||
fi
|
||||
|
||||
echo "[check] Device-specific EDL Firehose loaders..."
|
||||
if ! grep -q '^DEVICE_LOADERS = {' "$BASE_DIR/flash-edl.py"; then
|
||||
fail "flash-edl.py is missing the device-to-loader map"
|
||||
fi
|
||||
for dev in nokia-argon nokia-beatles nokia-tough nokia-sparkler nokia-leo; do
|
||||
if ! grep -q "\"$dev\":" "$BASE_DIR/flash-edl.py"; then
|
||||
fail "DEVICE_LOADERS is missing $dev"
|
||||
fi
|
||||
done
|
||||
for mbn in 8110.mbn 2720.mbn 2720v.mbn 800t.mbn 8k.mbn; do
|
||||
if [ ! -s "$BASE_DIR/bootloader/loaders/$mbn" ]; then
|
||||
fail "missing bootloader/loaders/$mbn"
|
||||
fi
|
||||
done
|
||||
for mapping in \
|
||||
'"nokia-beatles": "2720.mbn"' \
|
||||
'"nokia-tough": "800t.mbn"' \
|
||||
'"nokia-sparkler": "8k.mbn"' \
|
||||
'"nokia-leo": "8k.mbn"' \
|
||||
'"us": "2720v.mbn"'; do
|
||||
if ! grep -qF "$mapping" "$BASE_DIR/flash-edl.py"; then
|
||||
fail "flash-edl.py loader mapping lost: $mapping"
|
||||
fi
|
||||
done
|
||||
if ! grep -q '^VARIANT_LOADER_IDENTITIES' "$BASE_DIR/flash-edl.py"; then
|
||||
fail "flash-edl.py is missing the variant identity map"
|
||||
fi
|
||||
if ! grep -q '^EDL_PIDS = ' "$BASE_DIR/flash-edl.py"; then
|
||||
fail "flash-edl.py is missing the EDL PID auto-detection list"
|
||||
fi
|
||||
for edlpid in 9008 900E 9006; do
|
||||
if ! grep -qi "0x$edlpid" "$BASE_DIR/flash-edl.py"; then
|
||||
fail "EDL_PIDS is missing 0x$edlpid"
|
||||
fi
|
||||
done
|
||||
if ! grep -q '^BOOT_IMAGE_DEVICES' "$BASE_DIR/flash-edl.py"; then
|
||||
fail "flash-edl.py is missing the boot-image device list"
|
||||
fi
|
||||
if ! grep -q '^BOOT_METHOD_PARTITIONS' "$BASE_DIR/flash-edl.py"; then
|
||||
fail "flash-edl.py is missing the method-to-partition map"
|
||||
fi
|
||||
if ! grep -q '^def resolve_boot_method' "$BASE_DIR/flash-edl.py"; then
|
||||
fail "flash-edl.py is missing resolve_boot_method()"
|
||||
fi
|
||||
if ! grep -q '^def resolve_wipe_system' "$BASE_DIR/flash-edl.py"; then
|
||||
fail "flash-edl.py is missing the system wipe guard"
|
||||
fi
|
||||
if ! grep -q '^def verify_partition' "$BASE_DIR/flash-edl.py"; then
|
||||
fail "flash-edl.py is missing the partition read-back verification"
|
||||
fi
|
||||
if ! grep -q '^BOOT_METHOD_TARGETS' "$BASE_DIR/flash-edl.py"; then
|
||||
fail "flash-edl.py is missing the dual boot/recovery target map"
|
||||
fi
|
||||
if ! grep -q '^def dump_diagnostics' "$BASE_DIR/flash-edl.py"; then
|
||||
fail "flash-edl.py is missing the EDL diagnostic partition dump"
|
||||
fi
|
||||
if ! grep -q 'return "lk2nd"' "$BASE_DIR/flash-edl.py"; then
|
||||
fail "flash-edl.py no longer defaults to the lk2nd boot.img"
|
||||
fi
|
||||
if ! grep -q 'if method == "lk2nd" and device == "nokia-beatles":' "$BASE_DIR/flash-edl.py"; then
|
||||
fail "flash-edl.py no longer writes lk2nd to both slots on the 2720"
|
||||
fi
|
||||
for variant in normal diagnostic display; do
|
||||
case "$variant" in
|
||||
normal)
|
||||
image="$BASE_DIR/images/boot-lk2nd-nokia-beatles.img"
|
||||
opts="--expect-fastboot 0"
|
||||
label="source-built nokia-beatles lk2nd"
|
||||
;;
|
||||
diagnostic)
|
||||
image="$BASE_DIR/images/boot-lk2nd-nokia-beatles-diagnostic.img"
|
||||
opts="--expect-fastboot 1"
|
||||
label="nokia-beatles forced-fastboot diagnostic image"
|
||||
;;
|
||||
display)
|
||||
image="$BASE_DIR/images/boot-lk2nd-nokia-beatles-display.img"
|
||||
opts="--expect-fastboot 0 --expect-display 1 --allow-missing-cookie"
|
||||
label="nokia-beatles known-good display lk2nd image"
|
||||
;;
|
||||
esac
|
||||
if [ ! -f "$image" ]; then
|
||||
echo "[skip] local build output ${image#"$BASE_DIR/"} is absent; prepare-release.sh will rebuild it"
|
||||
continue
|
||||
fi
|
||||
# shellcheck disable=SC2086
|
||||
if ! python3 "$BASE_DIR/scripts/check-lk2nd-beatles.py" \
|
||||
--image "$image" $opts; then
|
||||
fail "$label validation failed"
|
||||
fi
|
||||
done
|
||||
if ! grep -qF 'BEATLES_LK2ND_IMAGE = "images/boot-lk2nd-nokia-beatles-display.img"' \
|
||||
"$BASE_DIR/flash-edl.py"; then
|
||||
fail "flash-edl.py no longer defaults to the display-enabled lk2nd image"
|
||||
fi
|
||||
if ! grep -qF 'target_names = ("boot", "recovery", "lk2nd")' \
|
||||
"$BASE_DIR/flash-edl.py"; then
|
||||
fail "flash-edl.py no longer refreshes the separate lk2nd partition"
|
||||
fi
|
||||
for f in bootloader/lk2nd/nokia-beatles.patch \
|
||||
bootloader/lk2nd/README.md \
|
||||
bootloader/lk2nd/spi-panel-init.h \
|
||||
bootloader/lk2nd/Dockerfile \
|
||||
scripts/build-lk2nd-beatles.sh \
|
||||
scripts/test-lk2nd-beatles-port.py; do
|
||||
if [ ! -f "$BASE_DIR/$f" ]; then
|
||||
fail "missing nokia-beatles lk2nd port file: $f"
|
||||
fi
|
||||
done
|
||||
if [ -f "$BASE_DIR/scripts/make-beatles-lk2nd-bootimg.py" ]; then
|
||||
fail "obsolete binary-patch lk2nd script is still present"
|
||||
fi
|
||||
if grep -q 'target_parts\[0\]\[1\]' "$BASE_DIR/flash-edl.py"; then
|
||||
fail "flash-edl.py still writes only the first lk2nd target slot"
|
||||
fi
|
||||
if ! grep -q 'write_partition(fh, args.lun, part, source)' "$BASE_DIR/flash-edl.py"; then
|
||||
fail "flash-edl.py lost the multi-target write loop"
|
||||
fi
|
||||
if ! grep -q 'def source_for(name):' "$BASE_DIR/flash-edl.py"; then
|
||||
fail "flash-edl.py lost the Argon-shaped hybrid per-slot source"
|
||||
fi
|
||||
if [ ! -f "$BASE_DIR/scripts/dump-edl-crash.py" ]; then
|
||||
fail "missing scripts/dump-edl-crash.py"
|
||||
fi
|
||||
if ! grep -q '^UNLOCK_DEFAULT_DEVICES' "$BASE_DIR/flash-edl.py"; then
|
||||
fail "flash-edl.py is missing the locked-bootloader unlock default"
|
||||
fi
|
||||
if ! grep -q '^def unlock_devinfo' "$BASE_DIR/flash-edl.py"; then
|
||||
fail "flash-edl.py is missing the devinfo unlock helper"
|
||||
fi
|
||||
if ! grep -q '^OEM_UNLOCK_PARTITIONS' "$BASE_DIR/flash-edl.py"; then
|
||||
fail "flash-edl.py is missing the RPMB unlock prerequisite map"
|
||||
fi
|
||||
if ! grep -q '^def enable_oem_unlock' "$BASE_DIR/flash-edl.py"; then
|
||||
fail "flash-edl.py is missing the config/frp OEM unlock helper"
|
||||
fi
|
||||
if [ ! -f "$BASE_DIR/scripts/make-oem-unlock-config.py" ]; then
|
||||
fail "missing scripts/make-oem-unlock-config.py"
|
||||
fi
|
||||
if [ ! -f "$BASE_DIR/scripts/make-unlocked-devinfo.py" ]; then
|
||||
fail "missing scripts/make-unlocked-devinfo.py"
|
||||
fi
|
||||
if ! grep -q 'boot-bananarchy-\$TARGET_DEVICE.img' "$BASE_DIR/rebuild-image.sh"; then
|
||||
fail "rebuild-image.sh no longer exports a standalone boot.img"
|
||||
fi
|
||||
if [ ! -L "$BASE_DIR/overlay/rootfs/sbin/init" ] || \
|
||||
[ "$(readlink "$BASE_DIR/overlay/rootfs/sbin/init")" != "/bin/busybox" ]; then
|
||||
fail "overlay/rootfs/sbin/init is no longer a /bin/busybox symlink"
|
||||
fi
|
||||
for cmdline_file in "$BASE_DIR"/devices/*/kernel-cmdline.conf \
|
||||
"$BASE_DIR"/overlay/rootfs/usr/lib/kernel-cmdline.d/50-device-*.conf; do
|
||||
if grep -qxF 'earlycon' "$cmdline_file"; then
|
||||
fail "$(basename "$cmdline_file") still contains earlycon"
|
||||
fi
|
||||
done
|
||||
# A pre-existing rootfs/ build tree is reused by rebuild-image.sh, so its
|
||||
# copies of the device cmdline fragments must stay in sync with the overlay.
|
||||
for cmdline_file in "$BASE_DIR"/rootfs/usr/lib/kernel-cmdline.d/50-device-*.conf; do
|
||||
[ -f "$cmdline_file" ] || continue
|
||||
if grep -qxF 'earlycon' "$cmdline_file"; then
|
||||
fail "rootfs/usr/lib/kernel-cmdline.d/$(basename "$cmdline_file") still contains earlycon"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "[check] BusyBox applet symlinks..."
|
||||
APPLET_LIST="$BASE_DIR/scripts/busybox-applets.txt"
|
||||
if [ ! -f "$APPLET_LIST" ]; then
|
||||
fail "missing scripts/busybox-applets.txt"
|
||||
fi
|
||||
for applet in ash grep sed ps; do
|
||||
if ! grep -qxF "$applet" "$APPLET_LIST"; then
|
||||
fail "scripts/busybox-applets.txt is missing $applet"
|
||||
fi
|
||||
done
|
||||
if ! grep -q 'busybox-applets.txt' "$BASE_DIR/scripts/apply-bananarchy-overlay.sh"; then
|
||||
fail "the overlay no longer restores missing BusyBox applet symlinks"
|
||||
fi
|
||||
# The shipped rootfs is validated by scripts/sync-beatles-bootfs.py --check
|
||||
# and by an explicit image build; the overlay script above is the source of
|
||||
# truth for the applet symlinks, so avoid extracting a 1.3 GiB partition here.
|
||||
RAW_IMAGE="$BASE_DIR/images/bananarchy-nokia-beatles.img"
|
||||
if [ -f "$RAW_IMAGE" ] && [ "$(stat -c %s "$RAW_IMAGE")" -lt 1000000000 ]; then
|
||||
fail "the shipped raw image is truncated"
|
||||
fi
|
||||
|
||||
echo "[check] Known-good flashable image set..."
|
||||
for pair in \
|
||||
"b4d0555f17dd1e224069641603ff3d120fd3ea5c219a34de227caf240a077558 images/bananarchy-nokia-argon.img" \
|
||||
"e2267187c58920b5c5b822d940b81e0df8f59e7788fed00e3d31dfbdb290c7fc images/bananarchy-nokia-beatles.img" \
|
||||
"6715abd414fd02fd21ca8c2cd621a8a21e78f46d079b2d185b38a1f7a4a3e659 images/boot-bananarchy-nokia-beatles.img" \
|
||||
"e1fdd8551b6393184a465638881b63ca58c04e1e8f655f092260a18379e1cbe6 images/boot-lk2nd-nokia-beatles-display.img"; do
|
||||
set -- $pair
|
||||
want=$1
|
||||
path="$BASE_DIR/$2"
|
||||
if [ ! -f "$path" ]; then
|
||||
echo "[skip] local build output $2 is absent; prepare-release.sh will rebuild it"
|
||||
continue
|
||||
elif [ "$(sha256sum "$path" | cut -d' ' -f1)" != "$want" ]; then
|
||||
fail "$2 no longer matches the physically verified known-good image"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "[check] Compiled idle daemons..."
|
||||
DAEMONS="bananarchy-lid bananarchy-cover-idle bananarchy-volume-keys"
|
||||
for daemon in $DAEMONS; do
|
||||
for artifact in "prebuilt/bananarchy-daemons/usr/bin/$daemon" \
|
||||
"overlay/rootfs/usr/bin/$daemon"; do
|
||||
path="$BASE_DIR/$artifact"
|
||||
if [ ! -x "$path" ]; then
|
||||
fail "missing compiled daemon: $artifact"
|
||||
continue
|
||||
fi
|
||||
if [ "$(head -c 4 "$path" | od -An -tx1 | tr -d ' \n')" != "7f454c46" ] || \
|
||||
! readelf -h "$path" 2>/dev/null | grep -q 'Machine:.*ARM'; then
|
||||
fail "$artifact is not an ARM ELF binary"
|
||||
fi
|
||||
done
|
||||
if ! cmp -s "$BASE_DIR/prebuilt/bananarchy-daemons/usr/bin/$daemon" \
|
||||
"$BASE_DIR/overlay/rootfs/usr/bin/$daemon"; then
|
||||
fail "compiled daemon drift: $daemon"
|
||||
fi
|
||||
done
|
||||
if ! "$BASE_DIR/scripts/build-bananarchy-daemons.sh" --check >/dev/null 2>&1; then
|
||||
fail "compiled idle daemon build check failed"
|
||||
fi
|
||||
for src in src/bananarchy-daemons/common.h \
|
||||
src/bananarchy-daemons/bananarchy-lid.c \
|
||||
src/bananarchy-daemons/bananarchy-cover-idle.c \
|
||||
src/bananarchy-daemons/bananarchy-volume-keys.c; do
|
||||
if [ ! -f "$BASE_DIR/$src" ]; then
|
||||
fail "missing C daemon source: $src"
|
||||
fi
|
||||
done
|
||||
if ! grep -q 'CLOSED_MASK' "$BASE_DIR/src/bananarchy-daemons/bananarchy-lid.c" || \
|
||||
! grep -q 'sxmo_state.sh' "$BASE_DIR/src/bananarchy-daemons/bananarchy-lid.c" || \
|
||||
! grep -q 'strcmp(level, "low")' "$BASE_DIR/src/bananarchy-daemons/bananarchy-lid.c"; then
|
||||
fail "the compiled lid daemon lost its raw hall GPIO fallback"
|
||||
fi
|
||||
if ! grep -q 'SOCK_DGRAM' "$BASE_DIR/src/bananarchy-daemons/bananarchy-cover-idle.c" || \
|
||||
! grep -q 'STATUS' "$BASE_DIR/src/bananarchy-daemons/bananarchy-cover-idle.c"; then
|
||||
fail "the compiled cover daemon lost the coverctl protocol"
|
||||
fi
|
||||
if grep -qF 'mmap(' "$BASE_DIR/src/bananarchy-daemons/bananarchy-cover-idle.c" || \
|
||||
! grep -qF 'write_all' "$BASE_DIR/src/bananarchy-daemons/bananarchy-cover-idle.c" || \
|
||||
! grep -qF 'fb_geometry' "$BASE_DIR/src/bananarchy-daemons/bananarchy-cover-idle.c"; then
|
||||
fail "the cover renderer lost the 32-bpp fbdev write() path"
|
||||
fi
|
||||
if ! grep -q 'flock' "$BASE_DIR/src/bananarchy-daemons/common.h" || \
|
||||
! grep -q 'prune_devices' "$BASE_DIR/src/bananarchy-daemons/common.h" || \
|
||||
! grep -q 'setuid(SESSION_UID)' "$BASE_DIR/src/bananarchy-daemons/common.h" || \
|
||||
! grep -q 'KEY_VOLUMEUP' "$BASE_DIR/src/bananarchy-daemons/common.h"; then
|
||||
fail "the compiled daemons lost singleton/stale-fd/privilege guards"
|
||||
fi
|
||||
if grep -RInE "bananarchy-(lid|cover-idle|volume-keys)\.py" \
|
||||
"$BASE_DIR/overlay/rootfs/etc/init.d" "$BASE_DIR/src/bananarchy-daemons" \
|
||||
>/dev/null 2>&1; then
|
||||
fail "a Python daemon reference remains in the idle service wiring"
|
||||
fi
|
||||
for stale in overlay/rootfs/usr/bin/bananarchy-lid.py \
|
||||
overlay/rootfs/usr/bin/bananarchy-cover-idle.py \
|
||||
overlay/rootfs/usr/bin/bananarchy-volume-keys.py \
|
||||
rootfs/usr/bin/bananarchy-lid.py \
|
||||
rootfs/usr/bin/bananarchy-cover-idle.py \
|
||||
rootfs/usr/bin/bananarchy-volume-keys.py; do
|
||||
if [ -e "$BASE_DIR/$stale" ] || [ -L "$BASE_DIR/$stale" ]; then
|
||||
fail "retired Python daemon still present: $stale"
|
||||
fi
|
||||
done
|
||||
for svc in bananarchy-lid bananarchy-cover-display bananarchy-volume-keys; do
|
||||
case "$svc" in
|
||||
bananarchy-lid) want='command="/usr/bin/bananarchy-lid"' ;;
|
||||
bananarchy-cover-display) want='command="/usr/bin/bananarchy-cover-idle"' ;;
|
||||
bananarchy-volume-keys) want='command="/usr/bin/bananarchy-volume-keys"' ;;
|
||||
esac
|
||||
if ! grep -qF "$want" "$BASE_DIR/overlay/rootfs/etc/init.d/$svc"; then
|
||||
fail "$svc does not start its compiled daemon"
|
||||
fi
|
||||
done
|
||||
if ! grep -qF 'xset r rate 180 30' \
|
||||
"$BASE_DIR/overlay/rootfs/usr/bin/bananarchy-x11-session.sh"; then
|
||||
fail "the X session no longer lowers keypad auto-repeat delay"
|
||||
fi
|
||||
for hook in overlay/rootfs/usr/share/sxmo/default_hooks/sxmo_hook_start.sh \
|
||||
overlay/rootfs/etc/skel/.config/sxmo/hooks/sxmo_hook_start.sh \
|
||||
overlay/rootfs/home/user/.config/sxmo/hooks/sxmo_hook_start.sh; do
|
||||
if ! grep -qF 'superctl stop sxmo_networkmonitor' "$BASE_DIR/$hook" || \
|
||||
! grep -qF 'bananarchy_kill_matches "nmcli device monitor"' "$BASE_DIR/$hook"; then
|
||||
fail "$hook no longer stops the nmcli device monitor poller"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "[check] Camera, volume keys and cover spidev wiring..."
|
||||
HW_MODULES="$BASE_DIR/overlay/rootfs/etc/modules-load.d/bananarchy-hardware.conf"
|
||||
if [ ! -f "$HW_MODULES" ] || ! grep -q '^msm8905-cam' "$HW_MODULES"; then
|
||||
fail "the camera driver is no longer loaded at boot"
|
||||
fi
|
||||
if ! grep -q 'msm8905-cam' "$BASE_DIR/overlay/rootfs/etc/local.d/10-bananarchy-hardware.start"; then
|
||||
fail "the local.d hardware fallback no longer loads the camera driver"
|
||||
fi
|
||||
if [ ! -f "$BASE_DIR/scripts/busybox-sbin-applets.txt" ] || \
|
||||
! grep -qxF 'reboot' "$BASE_DIR/scripts/busybox-sbin-applets.txt"; then
|
||||
fail "the /sbin BusyBox applet list is missing reboot (Sxmo power menu)"
|
||||
fi
|
||||
if ! grep -q 'busybox-sbin-applets.txt' "$BASE_DIR/scripts/apply-bananarchy-overlay.sh"; then
|
||||
fail "the overlay no longer restores /sbin BusyBox applets"
|
||||
fi
|
||||
if ! grep -qF 'rm -f "$TARGET_ROOTFS/bin/$applet"' \
|
||||
"$BASE_DIR/scripts/apply-bananarchy-overlay.sh" || \
|
||||
! grep -qF 'rm -f "$TARGET_ROOTFS/sbin/$applet"' \
|
||||
"$BASE_DIR/scripts/apply-bananarchy-overlay.sh"; then
|
||||
fail "the overlay no longer repairs dangling BusyBox applet symlinks"
|
||||
fi
|
||||
if ! grep -q 'bananarchy_set_sink_volume' "$BASE_DIR/overlay/rootfs/usr/bin/sxmo_audio.sh"; then
|
||||
fail "sxmo_audio.sh no longer mirrors volume into the PipeWire sink"
|
||||
fi
|
||||
if ! grep -q 'bananarchy_vol_debounce' "$BASE_DIR/overlay/rootfs/usr/bin/sxmo_audio.sh"; then
|
||||
fail "double volume steps are no longer debounced"
|
||||
fi
|
||||
if ! grep -q 'poll(fds' "$BASE_DIR/src/bananarchy-daemons/bananarchy-volume-keys.c" || \
|
||||
! grep -q 'drop_device' "$BASE_DIR/src/bananarchy-daemons/bananarchy-volume-keys.c"; then
|
||||
fail "the compiled volume daemon lost its stale-fd pruning"
|
||||
fi
|
||||
if grep -q '/usr/bin/su' "$BASE_DIR/src/bananarchy-daemons/"*.c; then
|
||||
fail "the compiled daemons still call the nonexistent /usr/bin/su"
|
||||
fi
|
||||
if ! grep -q 'proc/uptime' "$BASE_DIR/overlay/rootfs/usr/bin/sxmo_audio.sh"; then
|
||||
fail "the volume debounce is no longer timestamp based"
|
||||
fi
|
||||
if ! grep -q 'bananarchy-volume-keys' "$BASE_DIR/overlay/rootfs/etc/init.d/bananarchy-volume-keys"; then
|
||||
fail "the volume-key service is missing"
|
||||
fi
|
||||
if ! grep -q 'spidev@1' "$BASE_DIR/devices/nokia-beatles/qcom-msm8905-nokia-beatles.dts" || \
|
||||
! dtc -I dtb -O dts "$BASE_DIR/devices/nokia-beatles/qcom-msm8905-nokia-beatles.dtb" 2>/dev/null | \
|
||||
grep -q 'spidev@1'; then
|
||||
fail "the cover panel spidev@1 node is missing from the shipping DTS/DTB"
|
||||
fi
|
||||
if ! grep -q '^dc_gpio = -1' "$BASE_DIR/overlay/rootfs/etc/bananarchy/cover-display.conf"; then
|
||||
fail "the cover daemon config would collide with the internal panel DC GPIO"
|
||||
fi
|
||||
|
||||
echo "[check] USB SSH access and boot splash..."
|
||||
PAM_SSHD="$BASE_DIR/overlay/rootfs/etc/pam.d/sshd"
|
||||
SSHD_ACCESS="$BASE_DIR/overlay/rootfs/etc/ssh/sshd_config.d/90-bananarchy-access.conf"
|
||||
if [ ! -f "$PAM_SSHD" ] || ! grep -q 'pam_unix.so' "$PAM_SSHD"; then
|
||||
fail "overlay/rootfs/etc/pam.d/sshd is missing (UsePAM yes cannot authenticate)"
|
||||
fi
|
||||
if [ ! -f "$SSHD_ACCESS" ] || \
|
||||
! grep -q '^PasswordAuthentication yes' "$SSHD_ACCESS" || \
|
||||
! grep -q '^KbdInteractiveAuthentication yes' "$SSHD_ACCESS"; then
|
||||
fail "sshd access drop-in no longer enables password authentication"
|
||||
fi
|
||||
for ak in "$BASE_DIR"/overlay/rootfs/etc/skel/.ssh/authorized_keys \
|
||||
"$BASE_DIR"/overlay/rootfs/home/user/.ssh/authorized_keys \
|
||||
"$BASE_DIR"/overlay/rootfs/root/.ssh/authorized_keys; do
|
||||
if [ ! -f "$ak" ] || ! cmp -s "$ak" "$BASE_DIR/keys/phone_id_ed25519.pub"; then
|
||||
fail "${ak#$BASE_DIR/} no longer carries the phone SSH key"
|
||||
fi
|
||||
done
|
||||
if ! grep -q 'chmod 700 "$ssh_home"' "$BASE_DIR/scripts/apply-bananarchy-overlay.sh" || \
|
||||
! grep -q 'chown -R 10000:10000' "$BASE_DIR/scripts/apply-bananarchy-overlay.sh"; then
|
||||
fail "the overlay no longer fixes authorized_keys ownership/modes"
|
||||
fi
|
||||
if ! grep -q 'SSHD_BINARY="/usr/sbin/sshd.pam"' "$BASE_DIR/overlay/rootfs/etc/conf.d/sshd"; then
|
||||
fail "the PAM-enabled sshd binary is no longer pinned"
|
||||
fi
|
||||
if ! grep -q '^ListenAddress 172.16.42.1:2222' "$BASE_DIR/overlay/rootfs/etc/ssh/sshd_config_debug" || \
|
||||
grep -qE '^[[:space:]]*UsePAM' "$BASE_DIR/overlay/rootfs/etc/ssh/sshd_config_debug"; then
|
||||
fail "the USB-only fallback sshd config is no longer PAM-free and USB-only"
|
||||
fi
|
||||
if ! grep -q 'def release_cmdline' "$BASE_DIR/scripts/sync-beatles-bootfs.py" || \
|
||||
! grep -q "missing 'quiet splash'" "$BASE_DIR/scripts/sync-beatles-bootfs.py"; then
|
||||
fail "sync-beatles-bootfs.py no longer restores/guards the quiet splash cmdline"
|
||||
fi
|
||||
if ! grep -q "Plymouth never starts" "$BASE_DIR/scripts/check-beatles-bootimg.py"; then
|
||||
fail "check-beatles-bootimg.py no longer guards the splash cmdline"
|
||||
fi
|
||||
|
||||
echo "[check] 2720 Flip keypad and cover display support..."
|
||||
for f in overlay/rootfs/usr/lib/udev/rules.d/99-bananarchy-keypad.rules \
|
||||
overlay/rootfs/usr/share/X11/xorg.conf.d/60-bananarchy-keypad.conf \
|
||||
overlay/rootfs/usr/bin/bananarchy-keypad-diagnose.sh \
|
||||
overlay/rootfs/usr/bin/bananarchy-coverd \
|
||||
overlay/rootfs/usr/bin/bananarchy-cover-msg \
|
||||
overlay/rootfs/etc/init.d/bananarchy-cover-display \
|
||||
overlay/rootfs/etc/bananarchy/cover-display.conf \
|
||||
devices/nokia-beatles/cover-panel.dtsi \
|
||||
devices/nokia-beatles/nokia,beatles-gc9305-ext-panel.bin \
|
||||
devices/nokia-beatles/nokia,beatles-gc9305-ext-panel.txt; do
|
||||
if [ ! -f "$BASE_DIR/$f" ]; then
|
||||
fail "missing $f"
|
||||
fi
|
||||
done
|
||||
if ! grep -q 'MatchProduct "keypad"' \
|
||||
"$BASE_DIR/overlay/rootfs/usr/share/X11/xorg.conf.d/60-bananarchy-keypad.conf"; then
|
||||
fail "the keypad Xorg InputClass lost its explicit MatchProduct"
|
||||
fi
|
||||
if ! grep -q 'ID_INPUT_KEYBOARD' \
|
||||
"$BASE_DIR/overlay/rootfs/usr/lib/udev/rules.d/99-bananarchy-keypad.rules"; then
|
||||
fail "the keypad udev rule no longer forces ID_INPUT_KEYBOARD"
|
||||
fi
|
||||
if ! grep -q 'TAG+="seat"' \
|
||||
"$BASE_DIR/overlay/rootfs/etc/udev/rules.d/99-bananarchy-input-seat.rules"; then
|
||||
fail "the input seat udev rule no longer tags event nodes for elogind"
|
||||
fi
|
||||
if [ "$(head -c 4 "$BASE_DIR/overlay/rootfs/usr/bin/bananarchy-coverd" | od -An -tx1 | tr -d ' \n')" != "7f454c46" ]; then
|
||||
fail "bananarchy-coverd is no longer the compiled armv7 daemon"
|
||||
fi
|
||||
if ! cmp -s "$BASE_DIR/prebuilt/bananarchy-coverd/usr/bin/bananarchy-coverd" \
|
||||
"$BASE_DIR/overlay/rootfs/usr/bin/bananarchy-coverd"; then
|
||||
fail "the cover daemon binary drifted from prebuilt/"
|
||||
fi
|
||||
if ! grep -q 'lid-profile' "$BASE_DIR/overlay/rootfs/etc/init.d/bananarchy-cover-display"; then
|
||||
fail "the flip-device cover service lost its lid-profile gate"
|
||||
fi
|
||||
COVER_SCRATCH="/tmp/bantam/9064bb701d9e9f7c6412f0ea6846d88a"
|
||||
COVER_DTBO="$COVER_SCRATCH/cover-panel-check.dtbo"
|
||||
COVER_DTS="$COVER_SCRATCH/beatles-cover-check.dts"
|
||||
COVER_DTS_BUILD="$COVER_SCRATCH/beatles-dts-check.dtb"
|
||||
BEATLES_DTB="$BASE_DIR/devices/nokia-beatles/qcom-msm8905-nokia-beatles.dtb"
|
||||
BEATLES_DTS="$BASE_DIR/devices/nokia-beatles/qcom-msm8905-nokia-beatles.dts"
|
||||
mkdir -p "$COVER_SCRATCH"
|
||||
if ! dtc -@ -I dts -O dtb -o "$COVER_DTBO" \
|
||||
"$BASE_DIR/devices/nokia-beatles/cover-panel.dtsi" >/dev/null 2>&1; then
|
||||
fail "devices/nokia-beatles/cover-panel.dtsi does not compile"
|
||||
fi
|
||||
if ! dtc -I dts -O dtb -o "$COVER_DTS_BUILD" "$BEATLES_DTS" >/dev/null 2>&1; then
|
||||
fail "the shipping beatles DTS does not compile"
|
||||
fi
|
||||
if ! cmp -s "$COVER_DTS_BUILD" "$BEATLES_DTB"; then
|
||||
fail "the shipping beatles DTB drifted from its DTS source"
|
||||
fi
|
||||
if ! dtc -I dtb -O dts -o "$COVER_DTS" "$BEATLES_DTB" >/dev/null 2>&1; then
|
||||
fail "the shipping beatles DTB cannot be decompiled"
|
||||
fi
|
||||
for token in 'qcom,msm-id = <0x14b 0x00>;' \
|
||||
'qcom,board-id = <0x1000b 0x100>;' \
|
||||
'qcom,pmic-id = <0x1000d 0x00 0x00 0x00>;'; do
|
||||
if ! grep -qF "$token" "$COVER_DTS"; then
|
||||
fail "the shipping beatles DTB lost a stock Qualcomm ID ($token)"
|
||||
fi
|
||||
done
|
||||
if grep -qF 'compatible = "spi-mux"' "$COVER_DTS" || \
|
||||
grep -qF 'compatible = "gpio-mux"' "$COVER_DTS"; then
|
||||
fail "the shipping beatles DTB still applies the hardware-gated cover overlay"
|
||||
fi
|
||||
if ! grep -A4 'spidev@1 {' "$COVER_DTS" | grep -qF 'status = "okay"'; then
|
||||
fail "the shipping beatles DTB lost the spidev@1 diagnostic fallback"
|
||||
fi
|
||||
rm -f "$COVER_DTBO" "$COVER_DTS" "$COVER_DTS_BUILD"
|
||||
for opt in CONFIG_MULTIPLEXER=m CONFIG_MUX_GPIO=m CONFIG_SPI_MUX=m; do
|
||||
if ! grep -qxF "$opt" "$BASE_DIR/patches/kernel/config-bananarchy-msm8909.armv7"; then
|
||||
fail "kernel config is missing $opt (cover panel spi-mux)"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "[check] 2720 Flip appended DTB..."
|
||||
|
||||
|
||||
BEATLES_DTS="$BASE_DIR/devices/nokia-beatles/qcom-msm8905-nokia-beatles.dts"
|
||||
if ! grep -qF 'qcom,msm-id = <0x14b 0x00>;' "$BEATLES_DTS"; then
|
||||
fail "nokia-beatles DTS lost the stock MSM8905 msm-id"
|
||||
fi
|
||||
if ! grep -qF 'qcom,board-id = <0x1000b 0x100>;' "$BEATLES_DTS"; then
|
||||
fail "nokia-beatles DTS lost the exact stock QRD SKUB board-id"
|
||||
fi
|
||||
if ! grep -qF 'qcom,pmic-id = <0x1000d 0x00 0x00 0x00>;' "$BEATLES_DTS"; then
|
||||
fail "nokia-beatles DTS lost the stock pmic-id"
|
||||
fi
|
||||
if ! grep -qF 'reg = <0x80000000 0x20000000>;' "$BEATLES_DTS"; then
|
||||
fail "nokia-beatles DTS lost the 512 MiB memory fallback"
|
||||
fi
|
||||
if [ -f "$BASE_DIR/images/boot-bananarchy-nokia-beatles.img" ]; then
|
||||
if ! python3 "$BASE_DIR/scripts/check-beatles-bootimg.py"; then
|
||||
fail "2720 boot image validation failed"
|
||||
fi
|
||||
else
|
||||
echo "[skip] local build output images/boot-bananarchy-nokia-beatles.img is absent; prepare-release.sh will rebuild it"
|
||||
fi
|
||||
if [ -f "$BASE_DIR/images/bananarchy-nokia-beatles.img" ]; then
|
||||
if ! python3 "$BASE_DIR/scripts/sync-beatles-bootfs.py" --check --raw-image "$BASE_DIR/images/bananarchy-nokia-beatles.img"; then
|
||||
fail "2720 raw image pmOS_boot filesystem is damaged or stale"
|
||||
fi
|
||||
else
|
||||
echo "[skip] local build output images/bananarchy-nokia-beatles.img is absent; prepare-release.sh will rebuild it"
|
||||
fi
|
||||
|
||||
echo "[check] Release hygiene..."
|
||||
KCONFIG="$BASE_DIR/patches/kernel/config-bananarchy-msm8909.armv7"
|
||||
for cfg in "$KCONFIG" \
|
||||
"$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/kernel-config" \
|
||||
"$BASE_DIR/overlay/rootfs/boot/config"; do
|
||||
if grep -qE '^CONFIG_PSTORE_BLK(_[A-Z0-9_]+)?=' "$cfg" 2>/dev/null || \
|
||||
grep -qx 'CONFIG_PSTORE_ZONE=y' "$cfg" 2>/dev/null || \
|
||||
! grep -qxF '# CONFIG_PSTORE_BLK is not set' "$cfg"; then
|
||||
fail "${cfg#"$BASE_DIR/"} still carries the abandoned pstore_blk diagnostic config"
|
||||
fi
|
||||
done
|
||||
for sysmap in "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/System.map" \
|
||||
"$BASE_DIR/overlay/rootfs/boot/System.map"; do
|
||||
if grep -q 'pstore_blk_get_config' "$sysmap"; then
|
||||
fail "${sysmap#"$BASE_DIR/"} was built with pstore_blk"
|
||||
fi
|
||||
done
|
||||
for art in prebuilt/kernel-6.12.1-msm8916/mux/mux-core.ko.zst \
|
||||
prebuilt/kernel-6.12.1-msm8916/mux/mux-gpio.ko.zst \
|
||||
prebuilt/kernel-6.12.1-msm8916/spi/spi-mux.ko.zst; do
|
||||
if [ ! -f "$BASE_DIR/$art" ]; then
|
||||
fail "missing built spi-mux module: $art"
|
||||
fi
|
||||
done
|
||||
if ! grep -q 'M=drivers/mux modules' "$BASE_DIR/scripts/build-kernel-audio.sh" || \
|
||||
! grep -q 'M=drivers/spi modules' "$BASE_DIR/scripts/build-kernel-audio.sh"; then
|
||||
fail "build-kernel-audio.sh no longer builds the spi-mux modules"
|
||||
fi
|
||||
for mod in mux-core mux-gpio spi-mux; do
|
||||
if ! grep -qxF "$mod" "$BASE_DIR/overlay/rootfs/etc/modules-load.d/bananarchy-hardware.conf"; then
|
||||
fail "modules-load.d is missing $mod"
|
||||
fi
|
||||
done
|
||||
if ! grep -q 'PON_SOFT_RB_SPARE.*0x02U' "$BASE_DIR/src/leds-msm8905-torch/leds-msm8905-torch.c"; then
|
||||
fail "the torch reboot cookie no longer selects the lk2nd Fastboot menu"
|
||||
fi
|
||||
for stale in images/boot-bananarchy-nokia-beatles-debug.img \
|
||||
images/boot-bananarchy-nokia-beatles-ramoops.img; do
|
||||
if [ -f "$BASE_DIR/$stale" ]; then
|
||||
fail "stale diagnostic boot image is still present: $stale"
|
||||
fi
|
||||
done
|
||||
|
||||
LK2ND_PATCH="$BASE_DIR/bootloader/lk2nd/nokia-beatles.patch"
|
||||
if ! grep -qF 'platform/msm_shared/reboot.c' "$LK2ND_PATCH" || \
|
||||
! grep -qF 'beatles low-bit reboot cookie' "$LK2ND_PATCH"; then
|
||||
fail "lk2nd patch is missing the low-bit Fastboot menu reboot cookie"
|
||||
fi
|
||||
|
||||
if grep -q -- '--debug-boot' "$BASE_DIR/flash-edl.py" || \
|
||||
grep -q 'resolve_beatles_debug_boot_image' "$BASE_DIR/flash-edl.py"; then
|
||||
fail "flash-edl.py still references the abandoned debug boot image"
|
||||
fi
|
||||
|
||||
echo "[check] Plugin artifacts..."
|
||||
for source in "$BASE_DIR"/src/dwm-plugins/*_plugin.cpp; do
|
||||
name="$(basename "$source" _plugin.cpp)"
|
||||
@@ -233,6 +772,84 @@ if [ "$FOCUS_CALLS" -lt 2 ]; then
|
||||
fail "link focus and wrap toggle must both call ensureFocusedLinkVisible"
|
||||
fi
|
||||
|
||||
echo "[check] Flip lid responsiveness..."
|
||||
LID_SRC="$BASE_DIR/src/bananarchy-daemons/bananarchy-lid.c"
|
||||
for token in '#define LID_STABLE_MS 80' 'BA_EVIOCGSW' 'LID_STATE_FILE' \
|
||||
'LOCKER_FIFO' 'unlink(LOCK_FLAG)'; do
|
||||
if ! grep -qF "$token" "$LID_SRC"; then
|
||||
fail "the compiled lid daemon lost the low-latency EV_SW/unlock path ($token)"
|
||||
fi
|
||||
done
|
||||
if grep -qF 'closed != was_closed' "$LID_SRC" || \
|
||||
grep -qF '#define LID_STABLE_MS 600' "$LID_SRC"; then
|
||||
fail "the compiled lid daemon still accepts slow immediate hall transitions"
|
||||
fi
|
||||
|
||||
echo "[check] Fast X startup and boot keypad state..."
|
||||
if ! grep -q '^rc_parallel="YES"' "$BASE_DIR/overlay/rootfs/etc/rc.conf"; then
|
||||
fail "OpenRC parallel startup is disabled"
|
||||
fi
|
||||
if grep -qF 'after *' "$BASE_DIR/overlay/rootfs/etc/init.d/local"; then
|
||||
fail "the local service still deadlocks with parallel startup via 'after *'"
|
||||
fi
|
||||
if ! grep -q '^udev_settle_timeout=2' \
|
||||
"$BASE_DIR/overlay/rootfs/etc/conf.d/udev-settle"; then
|
||||
fail "udev-settle can still hold X startup behind missing modem firmware"
|
||||
fi
|
||||
if ! grep -qF '/run/bananarchy/lid-state' \
|
||||
"$BASE_DIR/overlay/rootfs/usr/bin/bananarchy-x11-session.sh"; then
|
||||
fail "X no longer uses the debounced lid state at boot"
|
||||
fi
|
||||
if ! grep -qF 'Keep the first 10 s of an open-lid boot unlocked' \
|
||||
"$BASE_DIR/overlay/rootfs/usr/bin/bananarchy-x11-session.sh"; then
|
||||
fail "X lost the open-lid boot unlock guard against transient xlocker state"
|
||||
fi
|
||||
if ! grep -qF 'dwm-plugin dmenu close' \
|
||||
"$BASE_DIR/overlay/rootfs/usr/bin/bananarchy-x11-session.sh" || \
|
||||
! grep -qF 'xdotool key --clearmodifiers Escape' \
|
||||
"$BASE_DIR/overlay/rootfs/usr/bin/bananarchy-x11-session.sh"; then
|
||||
fail "X lost the one-shot stale startup keyboard grab cleanup"
|
||||
fi
|
||||
if ! grep -qF 'before bananarchy-cover-display tinydm' \
|
||||
"$BASE_DIR/overlay/rootfs/etc/init.d/bananarchy-lid"; then
|
||||
fail "the lid daemon no longer starts before tinydm"
|
||||
fi
|
||||
for f in etc/rc.conf etc/conf.d/udev-settle \
|
||||
usr/bin/bananarchy-x11-session.sh etc/init.d/bananarchy-lid \
|
||||
etc/init.d/bananarchy-sshd-debug etc/init.d/local \
|
||||
etc/local.d/20-bananarchy-sshd-debug.start; do
|
||||
if ! cmp -s "$BASE_DIR/overlay/rootfs/$f" "$BASE_DIR/rootfs/$f"; then
|
||||
fail "live rootfs copy drifted from overlay: $f"
|
||||
fi
|
||||
done
|
||||
if [ ! -L "$BASE_DIR/overlay/rootfs/etc/runlevels/default/bananarchy-sshd-debug" ]; then
|
||||
fail "the USB diagnostic sshd is missing from the default runlevel"
|
||||
fi
|
||||
if ! grep -qF 'rc-service bananarchy-sshd-debug status' \
|
||||
"$BASE_DIR/overlay/rootfs/etc/local.d/20-bananarchy-sshd-debug.start" || \
|
||||
! grep -qF 'ln -sf /etc/init.d/bananarchy-sshd-debug' \
|
||||
"$BASE_DIR/scripts/apply-bananarchy-overlay.sh"; then
|
||||
fail "the USB diagnostic sshd fallback is not independently started"
|
||||
fi
|
||||
if ! grep -qF 'cmd == "CLOSE" || cmd == "UNLOCK"' \
|
||||
"$BASE_DIR/src/dwm-plugins/locker_plugin.cpp" || \
|
||||
! grep -qF 'unlockPhone(false);' \
|
||||
"$BASE_DIR/src/dwm-plugins/locker_plugin.cpp"; then
|
||||
fail "locker.so no longer releases a stale grab on a trusted lid-open CLOSE"
|
||||
fi
|
||||
|
||||
echo "[check] Known-good keypad wake guard..."
|
||||
if ! grep -qF 'last_wake_ms) < 350' "$BASE_DIR/src/sxmo-dwm/dwm.c" || \
|
||||
grep -qF 'WAKE_KEY_DEBOUNCE_MS' "$BASE_DIR/src/sxmo-dwm/dwm.c"; then
|
||||
fail "dwm no longer uses the known-good 350 ms wake guard"
|
||||
fi
|
||||
if ! grep -qF 'writeSoftkeySuppress(nowMs() + 120)' \
|
||||
"$BASE_DIR/src/dwm-plugins/locker_plugin.cpp" || \
|
||||
grep -qF 'lockActivatedMs < 80' \
|
||||
"$BASE_DIR/src/dwm-plugins/locker_plugin.cpp"; then
|
||||
fail "locker still suppresses unlock keypad input too long"
|
||||
fi
|
||||
|
||||
echo "[check] Status bar clock freshness..."
|
||||
DMENU_SRC="$BASE_DIR/src/sxmo-dmenu/dmenu.c"
|
||||
UNLOCK_HOOK="$BASE_DIR/overlay/rootfs/usr/share/sxmo/default_hooks/sxmo_hook_unlock.sh"
|
||||
@@ -265,7 +882,8 @@ for f in "$NET_EVENT" "$NET_DISPATCH"; do
|
||||
fi
|
||||
done
|
||||
for hook in "$BASE_DIR/overlay/rootfs/usr/share/sxmo/default_hooks/sxmo_hook_start.sh" \
|
||||
"$BASE_DIR/overlay/rootfs/etc/skel/.config/sxmo/hooks/sxmo_hook_start.sh"; do
|
||||
"$BASE_DIR/overlay/rootfs/etc/skel/.config/sxmo/hooks/sxmo_hook_start.sh" \
|
||||
"$BASE_DIR/overlay/rootfs/home/user/.config/sxmo/hooks/sxmo_hook_start.sh"; do
|
||||
if grep -q 'superctl start sxmo_networkmonitor' "$hook"; then
|
||||
fail "${hook#$BASE_DIR/} still starts the nmcli device monitor poller"
|
||||
fi
|
||||
@@ -369,8 +987,12 @@ if ! command -v docker >/dev/null 2>&1; then
|
||||
fi
|
||||
|
||||
echo "[check] Version helper..."
|
||||
VERSION="$("$BASE_DIR/scripts/version.sh" --print 2>/dev/null || true)"
|
||||
CODENAME="$("$BASE_DIR/scripts/version.sh" --print-codename 2>/dev/null || true)"
|
||||
# Pin the release under test so the check does not break when the wall clock
|
||||
# rolls past the release date (version.sh otherwise derives it from today).
|
||||
VERSION="$(BANANARCHY_VERSION=a1108 BANANARCHY_CODENAME=dejavu \
|
||||
"$BASE_DIR/scripts/version.sh" --print 2>/dev/null || true)"
|
||||
CODENAME="$(BANANARCHY_VERSION=a1108 BANANARCHY_CODENAME=dejavu \
|
||||
"$BASE_DIR/scripts/version.sh" --print-codename 2>/dev/null || true)"
|
||||
if [ "$VERSION" != "a1108" ]; then
|
||||
fail "scripts/version.sh --print must return a1108"
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user