Fix 2720 Flip cover init, shared backlight and flip lock
This commit is contained in:
1 parent
c939687138
commit
b389120328
24 files changed
+494
-217
No files matched your search
@@ -373,7 +373,7 @@ fi
|
||||
echo "[check] Known-good flashable image set..."
|
||||
for pair in \
|
||||
"69a44f60eb123ebddf600be927155dc4a599ec35b7a0cf80060f4ba01f599f08 images/bananarchy-nokia-argon.img" \
|
||||
"ce0542321990a8cff8ab122c0a47c0684fcc7e3d5f6fc97e74b3b0ea4c4826b5 images/bananarchy-nokia-beatles.img" \
|
||||
"e2ec6a35d1e7db698f929fa0ebdbed94ffd941a55fc50ceff7a223e82896e985 images/bananarchy-nokia-beatles.img" \
|
||||
"2b5c61aba307dbbda61f3b19a2ad5770f9854f41cba4e2c97e24efb7e20879f3 images/boot-bananarchy-nokia-beatles.img" \
|
||||
"b5549698c20f4de7603fc746d32bb5baa96ec377e41e74407823c98506fc185d images/boot-lk2nd-nokia-beatles-display.img"; do
|
||||
set -- $pair
|
||||
@@ -901,15 +901,19 @@ echo "[check] Flip lid responsiveness..."
|
||||
LID_SRC="$BASE_DIR/src/bananarchy-daemons/bananarchy-lid.c"
|
||||
for token in '#define LID_DEBOUNCE_MS 20' '#define HALL_EDGE_MS 20' \
|
||||
'#define LID_LOOP_MS 20' 'BA_EVIOCGSW' 'LID_STATE_FILE' \
|
||||
'LOCKER_FIFO' 'unlink(LOCK_FLAG)' 'hall_observed' 'fast_until' \
|
||||
'LOCKER_FIFO' 'hall_observed' 'fast_until' \
|
||||
'if(edge)' 'write_session_file(state, "screenoff")' \
|
||||
'write_session_file(state, "unlock")' 'cover_send("OPEN")' \
|
||||
'write_session_file(state, "lock")' 'cover_send("OPEN")' \
|
||||
'locker_send("LOCK\n")' 'run_sxmo_state("lock", "open")' \
|
||||
'LID_GENERATION_FILE' 'run_dpms' \
|
||||
'bananarchy-lid-state.sh'; do
|
||||
if ! grep -qF "$token" "$LID_SRC"; then
|
||||
fail "the compiled lid daemon lost the instant EV_SW/hall path ($token)"
|
||||
fi
|
||||
done
|
||||
if grep -qF 'unlink(LOCK_FLAG)' "$LID_SRC"; then
|
||||
fail "the lid daemon still auto-unlocks the desktop when the flip opens"
|
||||
fi
|
||||
if grep -qF 'closed != was_closed' "$LID_SRC" || \
|
||||
grep -qF '#define LID_STABLE_MS 600' "$LID_SRC" || \
|
||||
grep -qF '#define LID_STABLE_MS 80' "$LID_SRC" || \
|
||||
@@ -922,6 +926,11 @@ LID_GATE="$BASE_DIR/overlay/rootfs/usr/bin/bananarchy-lid-gate.sh"
|
||||
if [ ! -x "$LID_GATE" ] || ! sh -n "$LID_GATE" 2>/dev/null; then
|
||||
fail "bananarchy-lid-gate.sh is missing or has bad syntax"
|
||||
fi
|
||||
DPMS_SYNC="$BASE_DIR/overlay/rootfs/usr/bin/bananarchy-display-power-sync"
|
||||
if ! grep -qF 'COVER_MARKER=/run/bananarchy/cover-backlight' "$DPMS_SYNC" || \
|
||||
! grep -qF 'exit 0' "$DPMS_SYNC"; then
|
||||
fail "display-power-sync no longer permits the shared cover backlight"
|
||||
fi
|
||||
for f in overlay/rootfs/usr/bin/sxmo_wm.sh \
|
||||
overlay/rootfs/usr/bin/sxmo_state.sh \
|
||||
overlay/rootfs/usr/bin/bananarchy-screen-wake.sh \
|
||||
@@ -1016,7 +1025,7 @@ 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"
|
||||
fail "locker.so no longer releases a stale grab on a trusted unlock CLOSE"
|
||||
fi
|
||||
|
||||
echo "[check] Known-good keypad wake guard..."
|
||||
@@ -1512,6 +1521,10 @@ for token in 'cover_hw_release' 'cover_spi_draw' 'hw_init_panel' \
|
||||
done
|
||||
for token in 'backend = kernel' 'main_fb_device = /dev/fb0' \
|
||||
'kernel_dpms_helper = /usr/bin/bananarchy-cover-dpms.sh' \
|
||||
'kernel_command_path = /sys/kernel/debug/dri/0/command' \
|
||||
'kernel_backlight_path = /sys/class/backlight/backlight/brightness' \
|
||||
'kernel_backlight_marker = /run/bananarchy/cover-backlight' \
|
||||
'kernel_backlight_level = 14' \
|
||||
'spi_device = /dev/spidev0.1' \
|
||||
'spi_mux_gpio = 13' 'spi_dc_gpio = 21' 'spi_reset_gpio = 23' \
|
||||
'mux_closed_level = 1' 'mux_open_level = 0' \
|
||||
@@ -1523,13 +1536,19 @@ for token in 'backend = kernel' 'main_fb_device = /dev/fb0' \
|
||||
fi
|
||||
done
|
||||
if ! grep -qF 'flip_open' "$COVER_SRC" || \
|
||||
! grep -qF 'cover_hw_release(hw)' "$COVER_SRC" || \
|
||||
! grep -qF 'cover_bus_release(hw)' "$COVER_SRC" || \
|
||||
! grep -qF 'cover_draw(&hw, fb_path, &state)' "$COVER_SRC"; then
|
||||
fail "the cover daemon no longer gates the shared bus on the flip state"
|
||||
fi
|
||||
if ! grep -qF 'cover_kernel_draw' "$COVER_SRC" || \
|
||||
! grep -qF 'cover_main_backlight_is_off' "$COVER_SRC" || \
|
||||
! grep -qF 'reinit' \
|
||||
for token in 'cover_kernel_draw' 'cover_kernel_command' \
|
||||
'cover_kernel_replay_firmware' 'cover_kernel_reset' \
|
||||
'cover_kernel_backlight' 'cover_kernel_display_off' \
|
||||
'KERNEL_REDRAW_MS 1000' 'cover_main_panel_is_off'; do
|
||||
if ! grep -qF "$token" "$COVER_SRC"; then
|
||||
fail "the kernel-owned cover backend lost $token"
|
||||
fi
|
||||
done
|
||||
if ! grep -qF 'reinit' \
|
||||
"$BASE_DIR/overlay/rootfs/usr/bin/bananarchy-cover-dpms.sh" || \
|
||||
[ ! -x "$BASE_DIR/overlay/rootfs/usr/bin/bananarchy-cover-dpms.sh" ]; then
|
||||
fail "the kernel-owned cover backend or its DPMS re-init helper is missing"
|
||||
@@ -1551,7 +1570,14 @@ if command -v gcc >/dev/null 2>&1 && \
|
||||
fi
|
||||
for f in "$BASE_DIR/prebuilt/bananarchy-daemons/usr/bin/bananarchy-cover-idle" \
|
||||
"$BASE_DIR/overlay/rootfs/usr/bin/bananarchy-cover-idle"; do
|
||||
if ! strings "$f" 2>/dev/null | grep -qF 'frame lit=%d size=%zu'; then
|
||||
if ! strings "$f" 2>/dev/null | grep -qF 'kernel cmd %s' || \
|
||||
! strings "$f" 2>/dev/null | grep -qF 'kernel backlight %u'; then
|
||||
fail "${f#"$BASE_DIR/"} is stale: rebuild with scripts/build-bananarchy-daemons.sh"
|
||||
fi
|
||||
done
|
||||
for f in "$BASE_DIR/prebuilt/bananarchy-daemons/usr/bin/bananarchy-lid" \
|
||||
"$BASE_DIR/overlay/rootfs/usr/bin/bananarchy-lid"; do
|
||||
if ! strings "$f" 2>/dev/null | grep -qxF 'LOCK'; then
|
||||
fail "${f#"$BASE_DIR/"} is stale: rebuild with scripts/build-bananarchy-daemons.sh"
|
||||
fi
|
||||
done
|
||||
|
||||
Reference in new issue
Block a user