Y2B-230 — Package the legacy MTK BOOTIMG offline
> **Historical record.** The dates, candidate identity, "current" claims, > next steps and permissions below belong to this recorded boundary. See > [current state](../../CURRENT_PLATFORM_STATE.md) for the latest physically observed result.Depends on Y2B-225 (#13). Preserve stock preloader/LK and partition layout; no flashing commands.
Package only a validated zImage+DTB and external diagnostic initramfs. Use the FM legacy Android header with 2048-byte pages, declared 0x100... addresses, 512-byte MTK KERNEL/ROOTFS wrappers and deterministic metadata. Runtime addresses remain the independently validated LK/D08 contract.
Acceptance:
- Strict independent parser checks every header field, wrapper magic/name/length/padding, Android SHA-1 ID and actual payload bytes.
- Zero-fill file padding through LK's complete read (including its extra two pages); final file fits the 16 MiB BOOTIMG partition.
- Require successful actual artifact validation before writing; reject altered/missing evidence and do not change limits.
- Emit packaged size/hash and roundtrip checks; no signed-image/authentication claim.
Validation: BOOTIMG 1,089,536 bytes, SHA-256 8e2fdae1f90c7589073676f69c0418af25cb0671a288ad838d83077f04b6d2f5. Seven tests pass, including 25 altered/truncated/extended package cases. Stock header SHA-1 semantics independently reproduced from the FM bytes. No authentication or launch claim.