Remove lk2nd screen version tag, make LK2ND_VERSION neutral, and refresh archives

- Remove LK2ND_VERSION from lk2nd/device/menu/menu.c (display_fastboot_menu and display_default_image_on_screen) in bootloader/lk2nd/nokia-beatles.patch so the BANANARCHY LINUX boot splash renders intact and boot/Fastboot-recovery screens carry no OS version tag.

- Replace -a1109-r3 / -a1114-r1 / -a1120-r1 suffixes in scripts/build-lk2nd-{beatles,coconut,sparkler}.sh with OS-version-neutral bananarchy-<target>{,-diag,-display} tags and enforce this in scripts/check-lk2nd-{beatles,coconut,sparkler}.py and scripts/check-rebuild.sh.

- Rebuild all 9 lk2nd images and refresh the a1120 (cocojamboo) display lk2nd and archive SHA-256 hashes in scripts/check-rebuild.sh, CHANGELOG.md, bootloader/lk2nd/README.md, and AGENTS.md.
This commit is contained in:
Luxferre committed 2026-11-18 08:55:44 +02:00
1 parent 1e7077e314
commit 6cedcf980c
11 files changed
+112 -18

No files matched your search

+5 -3
View File
@@ -146,9 +146,11 @@ Keep this file short. Full details live in `README.md`, `MANUAL.md`, `SDK.md`, `
elsewhere) and disables `bananarchy-{lid,cover-display,volume-keys}`, cover udev/config, and mux modprobes on
non-flip builds so `nokia-argon` keeps pure sliding-lid behaviour. Guard `scripts/test-lid-gate.py`.
- Build the lk2nd display image from pinned `bootloader/lk2nd/nokia-beatles.patch`. Exact stock IDs, 512 MiB memory
fallback, appended DTB, `quiet splash`, and the low-bit reboot cookie matter. `check-lk2nd-beatles.py`,
`test-lk2nd-beatles-port.py`, `check-beatles-bootimg.py`, `sync-beatles-bootfs.py --check`, and `check-rebuild.sh`
guard the boot chain.
fallback, appended DTB, `quiet splash`, and the low-bit reboot cookie matter; keep `lk2nd/device/menu/menu.c` free of
`LK2ND_VERSION` boot/Fastboot screen text and keep `LK2ND_VERSION` OS-version-neutral across
`scripts/build-lk2nd-{beatles,coconut,sparkler}.sh`. `check-lk2nd-{beatles,coconut,sparkler}.py`,
`test-lk2nd-{beatles,coconut,sparkler}-port.py`, `check-beatles-bootimg.py`, `sync-beatles-bootfs.py --check`, and
`check-rebuild.sh` guard the boot chain.
- Flash with `flash-edl.py`'s default `--method lk2nd`; stock `system` is wiped by default, so
recovery-mode 2720 boots need Volume Up. Keep the signed per-device Firehose programmers and do not mix them.
- Keep first-boot access intact: `keys/phone_id_ed25519.pub` for `user`/`root`, PAM/sshd configs, USB-only SSH fallback,
+4 -3
View File
@@ -25,6 +25,7 @@ Upcoming release build (`a1120` / `cocojamboo` via `scripts/version.sh`) targeti
### Nokia 8000 4G (`nokia-sparkler`) hardware-verified `lk2nd`, 4-core SMP/`cpufreq`, 157 Hz haptic audio, camera, and EDL bring-up
- **Layered `lk2nd` port (`bootloader/lk2nd/nokia-sparkler.patch`)**: added `nokia-sparkler.dtsi` (`msm8909-mtp.dts` `/lk2nd/nokia-sparkler`, matching `androidboot.hw.name=sparkler` without requiring `lk2nd,match-panel;`, GC9307 HLT 15-command and ST7789VX2 CTC 11-command 2.8" SPI init streams on BLSP1 QUP5 `0x078b9000`, `*` on `gpio90` as `KEY_VOLUMEUP` `0x115` alongside `#` `pm8941_resin` and Top Power) plus `"nokia,sparkler"` / `"nokia,leo"` support in `spi-display.c`; added `scripts/build-lk2nd-sparkler.sh`, `scripts/check-lk2nd-sparkler.py`, and `scripts/test-lk2nd-sparkler-port.py`, building `images/boot-lk2nd-nokia-sparkler{,-diagnostic,-display}.img` without altering `nokia-beatles` or `nokia-coconut` `lk2nd` images.
- **Versionless `lk2nd` boot/Fastboot screens & OS-version-neutral `LK2ND_VERSION` (`bootloader/lk2nd/nokia-beatles.patch`, `scripts/build-lk2nd-{beatles,coconut,sparkler}.sh`, `scripts/check-lk2nd-{beatles,coconut,sparkler}.py`, `scripts/check-rebuild.sh`)**: removed `LK2ND_VERSION` and the bottom `BOARD`/version overwrite from `lk2nd/device/menu/menu.c` (`display_fastboot_menu()` and `display_default_image_on_screen()`) so the branded `BANANARCHY LINUX` boot splash renders intact and boot/Fastboot-recovery screens no longer carry stale OS release numbers; made `LK2ND_VERSION` OS-version-neutral (`bananarchy-<target>{,-diag,-display}`) across all three source-built `lk2nd` ports (`nokia-beatles`, `nokia-coconut`, `nokia-sparkler`) and enforced it in `check-lk2nd-*.py` and `check-rebuild.sh`, without altering `bootloader/lk2nd-msm8909.img`.
- **4-core Cortex-A7 SMP, `cpufreq` DVFS up to `1.267 GHz`, and clean fast X11 startup (`0013`)**: added `patches/kernel/0013-msm8909-early-scm-smp-cpufreq.patch` allocating a cache-flushed `early_virt` page for 6-argument `qcom_scm_set_boot_addr_mc()` (`ARM_SMCCC_STD_CALL`) before `qcom_scm_probe()` creates its mempool, guarding `qcom-cpufreq-nvmem.c` with `cpu_present(cpu)`, and adding `clock-frequency = <1094400000>;` to `/cpus/cpu@0..3` in `qcom-msm8909.dtsi` and `nokia-{sparkler,leo}.dts`; ordered `kill-plymouth` (`after dbus elogind`) and raised `Xorg :0` readiness wait to `10 s` in `bananarchy-x11-session.sh`, verified live with `present=0-3`, `online=0-3` (`nproc=4`), `schedutil` scaling to `1.2672 GHz` (`a53pll`), zero SMP/`clock-frequency`/`cpuidle` boot errors, and instant first-pass `dwm` / `fcitx5` startup.
- **Kernel DTS, volume-independent calibrated 157 Hz speaker-LRA haptic audio, dual-GPIO torch, and upright cached-row camera (`msm8905-cam` / `camera.so`)**: set `deviceinfo_drm="true"` and `matrix_keypad`/`matrix_keymap` in `devices/nokia-sparkler/modules-initfs`; updated `qcom-msm8909-nokia-sparkler.dts` and `qcom-msm8909-nokia-sparkler.dtb` with stock MSM8909 MTP root IDs (`0xf5`/`0x8`/`0x100`/`0x1000d`), `512 MiB` `/memory`, QDSP6/Q6Voice audio (`wcd_codec: audio-codec@f000`, `apr`, `sound@7702000` with `dai-link-multimedia3` disabled, `lpass_codec: audio-codec@771c000`), Sxmo keypad codes (`0x500d4` `KEY_CAMERA`, `0x100007f` `KEY_COMPOSE`, `0x205000e` `BackSpace`, `0x301009e` `KEY_BACK`), and disabled unpopulated PM8909 `vibrator@c000` (`status = "disabled";`); added native `157.0 Hz` speaker-LRA haptic audio (`vibrate_haptic_audio()`, `libpulse` sink/input query via `pa_sw_volume_to_linear`, `RX3 Digital Volume` + PipeWire `softVolumes` gain compensation over `SND_PCM_FORMAT_FLOAT_LE`, calibrated `1950` / `2550` / `3300` reference amplitudes at `HAPTIC_REF_RX3_VOL = 84`, `10 ms` cosine fade, `HOME=/home/user` root-drop fix, `plughw:0,0` / muted-sink bypass, and non-speaker exclusion) in `src/dwm-plugins/sxmo_vibrate.c` (`links libasound` + `libpulse` + `libm`), verified live on `nokia-sparkler` across `0%`..`100%` speaker volume (`23.95`–`26.15` RMS at L2) and concurrent playback; updated `src/leds-msm8905-torch/leds-msm8905-torch.c` (`GPIO_32` `flash-en` + `GPIO_31` `flash-now` `BC847BS`); added `nokia,sparkler` and `nokia,leo` to `rotate_180` plus cached `row_buf[2][CAM_RAW_STRIDE]` burst copies in `src/msm8905-cam/msm8905-cam.c` and reduced `camera_plugin.cpp` post-frame sleep to `10 ms` (verified `/dev/video0` frame time reduced from `1.34 s` to `0.193–0.229 s/frame` with upright JPEG output); wired `nokia-sparkler` across `check-beatles-bootimg.py`, `sync-beatles-bootfs.py`, `flash-edl.py`, `prepare-release.sh`, `check-rebuild.sh`, `test-sparkler-port.py`, and docs.
- **EDL Firehose `<read>`, USB reconnect, and `30 s` USB timeout (`vendor/edl/Library/{firehose,usb,sahara}.py`, `flash-edl.py`, `MANUAL.md`)**: handled standard Qualcomm `rawmode="true"` XML ACK packets in `qualcomm_firehose` (`_begin_raw_read` / `_read_raw_sectors`) alongside FIH's immediate raw streams and capped reads to `min(bytes_to_read, max_chunk)`, fixing GPT/partition corruption on `8k.mbn` (`nokia-sparkler`, `nokia-leo`) and `2720v.mbn`; skipped redundant `set_configuration()` in `usb_class.connect()` when an active USB configuration already exists; raised per-transfer USB bulk read/write timeout to `30000 ms` (`DEFAULT_USB_TIMEOUT_MS = 30000`, `flash-edl.py --usb-timeout`, `2000 ms` Sahara connect probe, and `5–30 s` Fastboot/ADB kick timeouts); added `nokia-leo` to `UNLOCK_DEFAULT_DEVICES`, suppressed duplicate `Bootloader (boot)` output when a per-device `lk2nd` image is active, updated the EDL/Fastboot button-combo hints to **`*` + `#`** (EDL) and **`#`** (Fastboot) for `nokia-sparkler` and `nokia-leo`, added `scripts/test-edl-firehose-read.py`, and verified full live `--only-backup --dump-diagnostics` extraction from the connected `nokia-sparkler`.
@@ -75,9 +76,9 @@ Upcoming release build (`a1120` / `cocojamboo` via `scripts/version.sh`) targeti
- **Verified `a1120` / `cocojamboo` image set (`--mkinitfs`) and packaged archives**:
- `images/bananarchy-nokia-argon.img`: SHA-256 `0a6760f8ff4a4d2baa6af88ce080898a1e3aff206e15b8474efa3ea4274d6dee` (packaged in `bananarchy-nokia-argon-a1120-cocojamboo.zip`, SHA-256 `e7ccaa6baf3518896b22c60070508ab65f3938f204f0ddb2e7d0d5f2e39d271f`, alongside `bootloader/lk2nd-msm8909.img`).
- `images/bananarchy-nokia-beatles.img`: SHA-256 `7bb47f4e938d412e2e5fed5eb5b766bbbe36c71fa6e7b77d2cda346b48a82e17`, `images/boot-bananarchy-nokia-beatles.img`: SHA-256 `496890063eda83adafaf5e7796a801100795b825064cf6f7fd967e6565dca325`, and `images/boot-lk2nd-nokia-beatles-display.img`: SHA-256 `b5549698c20f4de7603fc746d32bb5baa96ec377e41e74407823c98506fc185d` (packaged in `bananarchy-nokia-beatles-a1120-cocojamboo.zip`, SHA-256 `2d94e513332137a93dcd10d6a6db6e7454c96ede2499c314660bb1ece21c7052`).
- `images/bananarchy-nokia-coconut.img`: SHA-256 `d3b385a84c6546d35edca03eac684f3d7ee6de0faab25172b9af5252137c6815`, `images/boot-bananarchy-nokia-coconut.img`: SHA-256 `0a91c165e370b35a1604d08ddb6b08c46823455e5aee9701807f78221059e26c`, and `images/boot-lk2nd-nokia-coconut-display.img`: SHA-256 `e876424b38b0782f589756b4107337b24f27f7c37d624cc7d3907a5331df050a` (packaged in `bananarchy-nokia-coconut-a1120-cocojamboo.zip`, SHA-256 `31f7e7db0aadb09284ad380008701d1d0e765a10048161f02727cc7aba6ed6f2`).
- `images/bananarchy-nokia-sparkler.img`: SHA-256 `a262cb31ddb38e222e5f4bd14d82c82bb7941839a34bb48fa120b74189d319ae`, `images/boot-bananarchy-nokia-sparkler.img`: SHA-256 `affc62ff400c082c29b0d0c11a06bdd2eefdd06e09f1d2e93e7eae6a47a5a7b1`, and `images/boot-lk2nd-nokia-sparkler-display.img`: SHA-256 `bc41c2ddd1079246a7e91a40222fcafb82b0b52965c8ee8081872767d006748f` (packaged in `bananarchy-nokia-sparkler-a1120-cocojamboo.zip`, SHA-256 `d0d44ea6e4f98b71536f7b232bc147ccf508057bbb38c3853d7b3750e5a3aaf3`).
- `images/bananarchy-nokia-beatles.img`: SHA-256 `7bb47f4e938d412e2e5fed5eb5b766bbbe36c71fa6e7b77d2cda346b48a82e17`, `images/boot-bananarchy-nokia-beatles.img`: SHA-256 `496890063eda83adafaf5e7796a801100795b825064cf6f7fd967e6565dca325`, and `images/boot-lk2nd-nokia-beatles-display.img`: SHA-256 `f13db705a714aaebd2d8fcc2e0f7266d0e40268c0a276208117dfdf9d8f45351` (packaged in `bananarchy-nokia-beatles-a1120-cocojamboo.zip`, SHA-256 `7caffc7057fa89df92e33a1915e064df1deee3c1f7e650ad8486d4a1d179d7b6`).
- `images/bananarchy-nokia-coconut.img`: SHA-256 `d3b385a84c6546d35edca03eac684f3d7ee6de0faab25172b9af5252137c6815`, `images/boot-bananarchy-nokia-coconut.img`: SHA-256 `0a91c165e370b35a1604d08ddb6b08c46823455e5aee9701807f78221059e26c`, and `images/boot-lk2nd-nokia-coconut-display.img`: SHA-256 `9a5bd2da6cfd95c745d9c1acb2e3bc61afa339824810e3d160bf079e17b23192` (packaged in `bananarchy-nokia-coconut-a1120-cocojamboo.zip`, SHA-256 `f92c2681dce97a51a98bb13f33f8b7a0a185625ab0cd85e6664074e816d1282c`).
- `images/bananarchy-nokia-sparkler.img`: SHA-256 `a262cb31ddb38e222e5f4bd14d82c82bb7941839a34bb48fa120b74189d319ae`, `images/boot-bananarchy-nokia-sparkler.img`: SHA-256 `affc62ff400c082c29b0d0c11a06bdd2eefdd06e09f1d2e93e7eae6a47a5a7b1`, and `images/boot-lk2nd-nokia-sparkler-display.img`: SHA-256 `120ade81bc5416263a1afd95a29981675358b98516e105e5ed611edf258a29f7` (packaged in `bananarchy-nokia-sparkler-a1120-cocojamboo.zip`, SHA-256 `d38201d4bd0c2d2d889a9444dbed72059594a96d56716621a437c2d753abaa47`).
---
+5
View File
@@ -75,6 +75,11 @@ Crash evidence lives in `backup/nokia-beatles-2720/crash-20261109/`
stream, and paints the Bananarchy RGB565 boot splash before the first
framebuffer flush (`DISABLE_SPLASH_PARTITION=1` plus `menu.c`'s bottom-only
text otherwise leaves a nearly black frame).
- `lk2nd/device/menu/menu.c`: removes `LK2ND_VERSION` from `display_fastboot_menu()`
and replaces `display_default_image_on_screen()`'s bottom `BOARD`/`version`
overwrite with a plain `fbcon_flush()`, keeping the branded boot splash intact
and decoupling bootloader builds from OS release bumps (`scripts/build-lk2nd-{beatles,coconut,sparkler}.sh`
likewise pass OS-version-neutral `LK2ND_VERSION` tags).
- Cmdline: `lk2nd lk2nd.compatible=nokia,beatles` — an upstream lk2nd feature
that selects the beatles node directly.
+44
View File
@@ -663,6 +663,50 @@ index 0000000..dab182c
+ };
+ };
+};
diff --git a/lk2nd/device/menu/menu.c b/lk2nd/device/menu/menu.c
index 28ab377..ac8b641 100644
--- a/lk2nd/device/menu/menu.c
+++ b/lk2nd/device/menu/menu.c
@@ -14,7 +14,6 @@
#include <lk2nd/device/keys.h>
#include <lk2nd/util/minmax.h>
-#include <lk2nd/version.h>
#include "../device.h"
@@ -191,7 +190,6 @@ void display_fastboot_menu(void)
scale_factor = old_scale;
incr = FONT_HEIGHT * scale_factor;
- fbcon_puts_ln(SILVER, y, incr, true, LK2ND_VERSION);
if (lk2nd_dev.model)
fbcon_puts_ln(SILVER, y, incr, true, lk2nd_dev.model);
else
@@ -287,19 +285,10 @@ void display_fastboot_menu(void)
void display_default_image_on_screen(void);
void display_default_image_on_screen(void)
{
- struct fbcon_config *fb = fbcon_display();
- int y, incr;
-
- /*
- * Make sure the specified line lenght fits on the screen.
- */
- scale_factor = max(1U, min(fb->width, fb->height) / (FONT_WIDTH * MIN_LINE));
- incr = FONT_HEIGHT * scale_factor;
- y = fb->height - 3 * incr;
-
- fbcon_clear_msg(y / FONT_HEIGHT, y / FONT_HEIGHT + 3 * scale_factor);
+ if (!fbcon_display())
+ return;
- fbcon_puts_ln(WHITE, y, incr, true, xstr(BOARD));
- fbcon_puts_ln(SILVER, y, incr, true, LK2ND_VERSION);
+ /* Flush the branded Bananarchy splash painted by spi_display_setup()
+ * intact without overwriting its bottom strip with BOARD/version. */
fbcon_flush();
}
diff --git a/lk2nd/fastboot/fetch.c b/lk2nd/fastboot/fetch.c
index a60173f..b961995 100644
--- a/lk2nd/fastboot/fetch.c
+3 -3
View File
@@ -137,18 +137,18 @@ build_variant() {
}
if [ "$ONLY" = all ] || [ "$ONLY" = normal ]; then
build_variant normal bananarchy-beatles-a1109-r3 "" "$CMD_BASE" "$NORMAL_IMAGE"
build_variant normal bananarchy-beatles "" "$CMD_BASE" "$NORMAL_IMAGE"
fi
if [ "$ONLY" = all ] || [ "$ONLY" = diagnostic ]; then
# Forced fastboot + no SPI display: decisive probe when lk2nd hangs before
# USB. Run "fastboot oem display-init" / "oem display-test" from here to
# bring up the GC9305 panel without reflashing; "oem screenshot" verifies
# the framebuffer and "oem scan-dtb" stages the exact kernel DTB.
build_variant diagnostic bananarchy-beatles-a1109-diag-r3 \
build_variant diagnostic bananarchy-beatles-diag \
"DEBUG=2 LK2ND_FORCE_FASTBOOT=1" "$CMD_DIAG" "$DIAG_IMAGE"
fi
if [ "$ONLY" = all ] || [ "$ONLY" = display ]; then
build_variant display bananarchy-beatles-a1109-display-r3 "" "$CMD_DISPLAY" "$DISPLAY_IMAGE"
build_variant display bananarchy-beatles-display "" "$CMD_DISPLAY" "$DISPLAY_IMAGE"
fi
check_images
+3 -3
View File
@@ -147,14 +147,14 @@ build_variant() {
}
if [ "$ONLY" = all ] || [ "$ONLY" = normal ]; then
build_variant normal bananarchy-coconut-a1114-r1 "" "$CMD_BASE" "$NORMAL_IMAGE"
build_variant normal bananarchy-coconut "" "$CMD_BASE" "$NORMAL_IMAGE"
fi
if [ "$ONLY" = all ] || [ "$ONLY" = diagnostic ]; then
build_variant diagnostic bananarchy-coconut-a1114-diag-r1 \
build_variant diagnostic bananarchy-coconut-diag \
"DEBUG=2 LK2ND_FORCE_FASTBOOT=1" "$CMD_DIAG" "$DIAG_IMAGE"
fi
if [ "$ONLY" = all ] || [ "$ONLY" = display ]; then
build_variant display bananarchy-coconut-a1114-display-r1 "" "$CMD_DISPLAY" "$DISPLAY_IMAGE"
build_variant display bananarchy-coconut-display "" "$CMD_DISPLAY" "$DISPLAY_IMAGE"
fi
check_images
+3 -3
View File
@@ -151,14 +151,14 @@ build_variant() {
}
if [ "$ONLY" = all ] || [ "$ONLY" = normal ]; then
build_variant normal bananarchy-sparkler-a1120-r1 "" "$CMD_BASE" "$NORMAL_IMAGE"
build_variant normal bananarchy-sparkler "" "$CMD_BASE" "$NORMAL_IMAGE"
fi
if [ "$ONLY" = all ] || [ "$ONLY" = diagnostic ]; then
build_variant diagnostic bananarchy-sparkler-a1120-diag-r1 \
build_variant diagnostic bananarchy-sparkler-diag \
"DEBUG=2 LK2ND_FORCE_FASTBOOT=1" "$CMD_DIAG" "$DIAG_IMAGE"
fi
if [ "$ONLY" = all ] || [ "$ONLY" = display ]; then
build_variant display bananarchy-sparkler-a1120-display-r1 "" "$CMD_DISPLAY" "$DISPLAY_IMAGE"
build_variant display bananarchy-sparkler-display "" "$CMD_DISPLAY" "$DISPLAY_IMAGE"
fi
check_images
+13
View File
@@ -27,6 +27,7 @@ bootloader/lk2nd/test_spi_panel_init.c.
import argparse
import os
import re
import struct
import sys
@@ -304,6 +305,14 @@ def main():
problems.append("binary is missing %r" % marker.decode("ascii", "replace"))
if b"beatles low-bit reboot cookie" not in data:
problems.append("binary is missing b'beatles low-bit reboot cookie'")
want_ver = (b"bananarchy-beatles-diag\x00" if args.expect_fastboot else
b"bananarchy-beatles-display\x00" if args.expect_display else
b"bananarchy-beatles\x00")
if want_ver not in data:
problems.append("binary is missing version-neutral tag %r" %
want_ver.rstrip(b"\x00").decode("ascii"))
if re.search(rb"bananarchy-beatles-[a-z][0-9]{4}", data):
problems.append("binary embeds an OS release version tag in LK2ND_VERSION")
if not data.endswith(b"SEANDROIDENFORCE"):
problems.append("missing SEANDROIDENFORCE trailer")
@@ -396,12 +405,16 @@ def main():
"lk2nd/device/dts/msm8909/nokia-beatles.dtsi",
"lk2nd/device/dts/msm8909/msm8905-qrd-skub.dts",
"lk2nd/device/2nd/spi-display.c",
"lk2nd/device/menu/menu.c",
"lk2nd/fastboot/fetch.c",
"platform/msm_shared/mdss_spi.c",
"platform/msm_shared/reboot.c",
):
if "diff --git a/%s b/%s" % (needed, needed) not in patch_text:
problems.append("patch is missing %s" % needed)
if "-#include <lk2nd/version.h>" not in patch_text or \
"-\tfbcon_puts_ln(SILVER, y, incr, true, LK2ND_VERSION);" not in patch_text:
problems.append("patch must strip LK2ND_VERSION from boot/recovery screens")
if "mdss_spi_panel_init_commands" not in patch_text or \
"lk2nd,panel-init" not in patch_text:
problems.append("patch is missing the panel initialization code")
+11
View File
@@ -14,6 +14,7 @@ Checks (all offline, pure Python):
import argparse
import os
import re
import struct
import sys
@@ -301,6 +302,14 @@ def main():
problems.append("binary is missing %r" % marker.decode("ascii", "replace"))
if b"beatles low-bit reboot cookie" not in data:
problems.append("binary is missing low-bit reboot cookie")
want_ver = (b"bananarchy-coconut-diag\x00" if args.expect_fastboot else
b"bananarchy-coconut-display\x00" if args.expect_display else
b"bananarchy-coconut\x00")
if want_ver not in data:
problems.append("binary is missing version-neutral tag %r" %
want_ver.rstrip(b"\x00").decode("ascii"))
if re.search(rb"bananarchy-coconut-[a-z][0-9]{4}", data):
problems.append("binary embeds an OS release version tag in LK2ND_VERSION")
if not data.endswith(b"SEANDROIDENFORCE"):
problems.append("missing SEANDROIDENFORCE trailer")
@@ -387,6 +396,8 @@ def main():
got = extract_patch_file(base_text, "lk2nd/include/lk2nd/spi-panel-init.h")
if got != want:
problems.append("bootloader/lk2nd/spi-panel-init.h is out of sync with base patch")
if "diff --git a/lk2nd/device/menu/menu.c b/lk2nd/device/menu/menu.c" not in base_text:
problems.append("base patch must strip LK2ND_VERSION from boot/recovery screens")
for needed in (
"lk2nd/device/2nd/spi-display.c",
"lk2nd/device/dts/msm8909/msm8905-qrd-skub.dts",
+11
View File
@@ -15,6 +15,7 @@ Checks (all offline, pure Python):
import argparse
import os
import re
import struct
import sys
@@ -337,6 +338,14 @@ def main():
b"beatles low-bit reboot cookie"):
if marker not in data:
problems.append("binary is missing %r" % marker.decode("ascii", "replace"))
want_ver = (b"bananarchy-sparkler-diag\x00" if args.expect_fastboot else
b"bananarchy-sparkler-display\x00" if args.expect_display else
b"bananarchy-sparkler\x00")
if want_ver not in data:
problems.append("binary is missing version-neutral tag %r" %
want_ver.rstrip(b"\x00").decode("ascii"))
if re.search(rb"bananarchy-sparkler-[a-z][0-9]{4}", data):
problems.append("binary embeds an OS release version tag in LK2ND_VERSION")
if not data.endswith(b"SEANDROIDENFORCE"):
problems.append("missing SEANDROIDENFORCE trailer")
@@ -415,6 +424,8 @@ def main():
got = extract_patch_file(base_text, "lk2nd/include/lk2nd/spi-panel-init.h")
if got != want:
problems.append("bootloader/lk2nd/spi-panel-init.h is out of sync with nokia-beatles.patch")
if "diff --git a/lk2nd/device/menu/menu.c b/lk2nd/device/menu/menu.c" not in base_text:
problems.append("base patch must strip LK2ND_VERSION from boot/recovery screens")
if "diff --git a/lk2nd/device/dts/msm8909/nokia-coconut.dtsi" not in coco_text:
problems.append("nokia-coconut.patch is missing nokia-coconut.dtsi")
for needed in (
+10 -3
View File
@@ -457,6 +457,13 @@ fi
if [ -f "$BASE_DIR/scripts/make-beatles-lk2nd-bootimg.py" ]; then
fail "obsolete binary-patch lk2nd script is still present"
fi
for lk_script in scripts/build-lk2nd-beatles.sh \
scripts/build-lk2nd-coconut.sh \
scripts/build-lk2nd-sparkler.sh; do
if grep -qE 'bananarchy-(beatles|coconut|sparkler)-[a-z][0-9]{4}' "$BASE_DIR/$lk_script"; then
fail "$lk_script still hardcodes an OS version tag in LK2ND_VERSION"
fi
done
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
@@ -560,13 +567,13 @@ for pair in \
"0a6760f8ff4a4d2baa6af88ce080898a1e3aff206e15b8474efa3ea4274d6dee images/bananarchy-nokia-argon.img" \
"7bb47f4e938d412e2e5fed5eb5b766bbbe36c71fa6e7b77d2cda346b48a82e17 images/bananarchy-nokia-beatles.img" \
"496890063eda83adafaf5e7796a801100795b825064cf6f7fd967e6565dca325 images/boot-bananarchy-nokia-beatles.img" \
"b5549698c20f4de7603fc746d32bb5baa96ec377e41e74407823c98506fc185d images/boot-lk2nd-nokia-beatles-display.img" \
"f13db705a714aaebd2d8fcc2e0f7266d0e40268c0a276208117dfdf9d8f45351 images/boot-lk2nd-nokia-beatles-display.img" \
"d3b385a84c6546d35edca03eac684f3d7ee6de0faab25172b9af5252137c6815 images/bananarchy-nokia-coconut.img" \
"0a91c165e370b35a1604d08ddb6b08c46823455e5aee9701807f78221059e26c images/boot-bananarchy-nokia-coconut.img" \
"e876424b38b0782f589756b4107337b24f27f7c37d624cc7d3907a5331df050a images/boot-lk2nd-nokia-coconut-display.img" \
"9a5bd2da6cfd95c745d9c1acb2e3bc61afa339824810e3d160bf079e17b23192 images/boot-lk2nd-nokia-coconut-display.img" \
"a262cb31ddb38e222e5f4bd14d82c82bb7941839a34bb48fa120b74189d319ae images/bananarchy-nokia-sparkler.img" \
"affc62ff400c082c29b0d0c11a06bdd2eefdd06e09f1d2e93e7eae6a47a5a7b1 images/boot-bananarchy-nokia-sparkler.img" \
"bc41c2ddd1079246a7e91a40222fcafb82b0b52965c8ee8081872767d006748f images/boot-lk2nd-nokia-sparkler-display.img"; do
"120ade81bc5416263a1afd95a29981675358b98516e105e5ed611edf258a29f7 images/boot-lk2nd-nokia-sparkler-display.img"; do
set -- $pair
want=$1
artifact_matches_target "$2" || continue