Port Nokia 800 Tough (nokia-coconut), fix microSD detection, and stage upcoming a1120 (cocojamboo) build
- 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
This commit is contained in:
1 parent
fc5c4282f5
commit
ab53423e33
60 files changed
+2669
-453
No files matched your search
@@ -7,6 +7,7 @@ cleanly when the image has not been built yet, so check-rebuild.sh stays useful
|
||||
in a fresh clone.
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import struct
|
||||
import sys
|
||||
@@ -26,6 +27,15 @@ STOCK_BOARD_ID = struct.pack(">2I", 0x1000b, 0x100)
|
||||
STOCK_PMIC_ID = struct.pack(">4I", 0x1000d, 0, 0, 0)
|
||||
MEMORY_512M = struct.pack(">2I", 0x80000000, 0x20000000)
|
||||
|
||||
DEVICE_MODELS = {
|
||||
"nokia-beatles": "Nokia 2720 Flip",
|
||||
"nokia-coconut": "Nokia 800 Tough",
|
||||
}
|
||||
DEVICE_SHORT = {
|
||||
"nokia-beatles": "2720",
|
||||
"nokia-coconut": "800 Tough",
|
||||
}
|
||||
|
||||
|
||||
def align(value, page):
|
||||
return (value + page - 1) // page * page
|
||||
@@ -79,11 +89,33 @@ def parse_fdt(data):
|
||||
return nodes, totalsize
|
||||
|
||||
|
||||
def parse_args():
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Validate MSM8905 lk2nd-chained mainline boot.img"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--device",
|
||||
choices=tuple(DEVICE_MODELS.keys()),
|
||||
default="nokia-beatles",
|
||||
help="Target device to validate (default: nokia-beatles)",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--image",
|
||||
default="",
|
||||
help="Explicit path to boot-bananarchy-<device>.img",
|
||||
)
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def main():
|
||||
args = parse_args()
|
||||
device = args.device
|
||||
short_name = DEVICE_SHORT[device]
|
||||
expected_model = DEVICE_MODELS[device]
|
||||
base = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
boot = os.path.join(base, "images", "boot-bananarchy-nokia-beatles.img")
|
||||
boot = args.image or os.path.join(base, "images", "boot-bananarchy-%s.img" % device)
|
||||
if not os.path.isfile(boot):
|
||||
print("[skip] 2720 boot image not built yet")
|
||||
print("[skip] %s boot image not built yet" % short_name)
|
||||
return 0
|
||||
data = open(boot, "rb").read()
|
||||
problems = []
|
||||
@@ -106,7 +138,7 @@ def main():
|
||||
if flag in cmdline_parts:
|
||||
problems.append("cmdline still has kernel debug flag %s" % flag)
|
||||
if kernel_addr != 0x80008000 or ramdisk_addr != 0x81000000 or tags_addr != 0x80000100:
|
||||
problems.append("boot header load addresses do not match the stock 2720")
|
||||
problems.append("boot header load addresses do not match the stock %s" % short_name)
|
||||
kernel_off = page
|
||||
dtb_rel = struct.unpack_from("<I", data, kernel_off + DTB_OFFSET_FIELD)[0]
|
||||
dtb_abs = kernel_off + dtb_rel
|
||||
@@ -121,13 +153,13 @@ def main():
|
||||
problems.append("appended DTB is truncated")
|
||||
root = nodes.get("/", {})
|
||||
model = root.get("model", b"").rstrip(b"\0").decode("utf-8", "replace")
|
||||
if model != "Nokia 2720 Flip":
|
||||
problems.append("appended DTB model is %r" % model)
|
||||
if model != expected_model:
|
||||
problems.append("appended DTB model is %r (expected %r)" % (model, expected_model))
|
||||
for prop, expected in (("qcom,msm-id", STOCK_MSM_ID),
|
||||
("qcom,board-id", STOCK_BOARD_ID),
|
||||
("qcom,pmic-id", STOCK_PMIC_ID)):
|
||||
if root.get(prop) != expected:
|
||||
problems.append("%s does not match the stock 2720 QRD SKUB value" % prop)
|
||||
problems.append("%s does not match the stock %s QRD SKUB value" % (prop, short_name))
|
||||
mem = None
|
||||
for path, props in nodes.items():
|
||||
if props.get("device_type") == b"memory\0":
|
||||
@@ -143,7 +175,7 @@ def main():
|
||||
for problem in problems:
|
||||
print("FAIL: %s" % problem)
|
||||
return 1
|
||||
print("[ok] 2720 boot image: exact stock IDs, 512 MiB memory fallback, appended DTB pointer")
|
||||
print("[ok] %s boot image: exact stock IDs, 512 MiB memory fallback, appended DTB pointer" % short_name)
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user