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
@@ -119,7 +119,7 @@ def validate_cmdline(conf, allow_debug=False):
|
||||
|
||||
|
||||
def check(raw_path, dtb_path, boot_img_path, verbose=True, allow_debug=False,
|
||||
files=None):
|
||||
files=None, dtb_name="qcom-msm8905-nokia-beatles.dtb"):
|
||||
files = files if files is not None else BOOT_FS_FILES
|
||||
raw = open(raw_path, "rb").read(1024 * 1024 + 4096)
|
||||
offset, size = mbr_first_partition(raw)
|
||||
@@ -139,8 +139,8 @@ def check(raw_path, dtb_path, boot_img_path, verbose=True, allow_debug=False,
|
||||
dst.write(chunk)
|
||||
left -= len(chunk)
|
||||
conf = cat(fs, "/extlinux/extlinux.conf").decode("utf-8", "replace")
|
||||
if "fdt /qcom-msm8905-nokia-beatles.dtb" not in conf:
|
||||
raise ValueError("extlinux.conf does not name the beatles DTB")
|
||||
if ("fdt /%s" % dtb_name) not in conf:
|
||||
raise ValueError("extlinux.conf does not name %s" % dtb_name)
|
||||
validate_cmdline(conf, allow_debug)
|
||||
for name, expected in files.items():
|
||||
got = sha(cat(fs, "/" + name))
|
||||
@@ -149,7 +149,7 @@ def check(raw_path, dtb_path, boot_img_path, verbose=True, allow_debug=False,
|
||||
raise ValueError("/%s in boot fs is stale (%s != %s)" % (name, got[:12], want[:12]))
|
||||
if verbose:
|
||||
print("[ok] pmOS_boot at %#x (%d bytes): ext2 intact, extlinux.conf, "
|
||||
"boot.img and beatles DTB all current" % (offset, size))
|
||||
"boot.img and %s all current" % (offset, size, dtb_name))
|
||||
return offset, size, fs
|
||||
finally:
|
||||
if fs and os.path.exists(fs):
|
||||
@@ -158,7 +158,9 @@ def check(raw_path, dtb_path, boot_img_path, verbose=True, allow_debug=False,
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--raw-image", default=str(BASE_DIR / "images" / "bananarchy-nokia-beatles.img"))
|
||||
parser.add_argument("--device", choices=["nokia-beatles", "nokia-coconut"],
|
||||
default="nokia-beatles")
|
||||
parser.add_argument("--raw-image", default="")
|
||||
parser.add_argument("--source-boot-fs", default="",
|
||||
help="Pristine ext2 boot-fs image to seed from when the "
|
||||
"raw image's superblock is destroyed")
|
||||
@@ -168,32 +170,37 @@ def main():
|
||||
parser.add_argument("--allow-debug", action="store_true",
|
||||
help="With --check, accept a diagnostic cmdline")
|
||||
parser.add_argument("--check", action="store_true")
|
||||
parser.add_argument("--dtb", default=str(BOOT_FS_FILES["qcom-msm8905-nokia-beatles.dtb"]),
|
||||
parser.add_argument("--dtb", default="",
|
||||
help="Override the DTB written to/checked in pmOS_boot")
|
||||
parser.add_argument("--boot-image", default=str(BOOT_FS_FILES["boot.img"]),
|
||||
parser.add_argument("--boot-image", default="",
|
||||
help="Override the boot.img written to/checked in pmOS_boot")
|
||||
args = parser.parse_args()
|
||||
|
||||
dtb = Path(args.dtb)
|
||||
boot_img = Path(args.boot_image)
|
||||
boot_files = dict(BOOT_FS_FILES)
|
||||
boot_files["qcom-msm8905-nokia-beatles.dtb"] = dtb
|
||||
boot_files["boot.img"] = boot_img
|
||||
for path in (args.raw_image, str(dtb), str(boot_img)):
|
||||
dtb_name = "qcom-msm8905-%s.dtb" % args.device
|
||||
raw_image = args.raw_image or str(BASE_DIR / "images" / ("bananarchy-%s.img" % args.device))
|
||||
dtb = Path(args.dtb) if args.dtb else (BASE_DIR / "devices" / args.device / dtb_name)
|
||||
boot_img = Path(args.boot_image) if args.boot_image else (
|
||||
BASE_DIR / "images" / ("boot-bananarchy-%s.img" % args.device)
|
||||
)
|
||||
boot_files = {
|
||||
"boot.img": boot_img,
|
||||
dtb_name: dtb,
|
||||
}
|
||||
for path in (raw_image, str(dtb), str(boot_img)):
|
||||
if not os.path.isfile(path):
|
||||
print("FAIL: missing %s" % path)
|
||||
return 1
|
||||
|
||||
if args.check:
|
||||
try:
|
||||
check(args.raw_image, dtb, boot_img, allow_debug=args.allow_debug,
|
||||
files=boot_files)
|
||||
check(raw_image, dtb, boot_img, allow_debug=args.allow_debug,
|
||||
files=boot_files, dtb_name=dtb_name)
|
||||
return 0
|
||||
except ValueError as exc:
|
||||
print("FAIL: %s" % exc)
|
||||
return 1
|
||||
|
||||
raw = open(args.raw_image, "rb").read(1024 * 1024 + 4096)
|
||||
raw = open(raw_image, "rb").read(1024 * 1024 + 4096)
|
||||
offset, size = mbr_first_partition(raw)
|
||||
with tempfile.NamedTemporaryFile(suffix=".img", delete=False) as handle:
|
||||
fs = handle.name
|
||||
@@ -206,7 +213,7 @@ def main():
|
||||
break
|
||||
dst.write(chunk)
|
||||
else:
|
||||
with open(args.raw_image, "rb") as src, open(fs, "wb") as dst:
|
||||
with open(raw_image, "rb") as src, open(fs, "wb") as dst:
|
||||
src.seek(offset)
|
||||
left = size
|
||||
while left > 0:
|
||||
@@ -245,7 +252,7 @@ def main():
|
||||
if conf_tmp:
|
||||
os.unlink(conf_tmp)
|
||||
|
||||
with open(args.raw_image, "r+b") as dst, open(fs, "rb") as src:
|
||||
with open(raw_image, "r+b") as dst, open(fs, "rb") as src:
|
||||
dst.seek(offset)
|
||||
while True:
|
||||
chunk = src.read(1 << 20)
|
||||
@@ -261,7 +268,7 @@ def main():
|
||||
os.unlink(fs)
|
||||
|
||||
try:
|
||||
check(args.raw_image, dtb, boot_img, files=boot_files)
|
||||
check(raw_image, dtb, boot_img, files=boot_files, dtb_name=dtb_name)
|
||||
except ValueError as exc:
|
||||
print("FAIL: %s" % exc)
|
||||
return 1
|
||||
|
||||
Reference in new issue
Block a user