- kernel/patches 0007-0012: the DTS of the baseline moves into the tree (0007, with the PON modes), the ABL framebuffer is reserved memory (0008), msm's fbdev marks its memory virtual (0009), the MDSS no longer resets the Ethernet MAC (0010; the real dispcc reset leaves the panel white, measured), u_serial closes a hung-up port once (0011, the gs_close WARN), USB dual role with the pm8150b Type-C port (0012). - KERNEL_DTB in device.conf: tools/build-kernel.sh builds the DTB in the tree, mkbootimg takes it from there; the binary DTB and its pin are gone. - kernel.config: BTF (pahole 1.32 on the host). - rtc-offset: the wall clock across reboots on the read-only PMIC RTC; tools/phone-time.sh sets it from the host. Measured: kernel 7.0.0-sm8150-g3c5fa409ca54, 10 of 10 warm reboots, no WARNING in dmesg, display good, Type-C data role device on the laptop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1.9 KiB
1.9 KiB
Adding a phone
Nothing in tools/ changes. You add data.
- SoC. If
soc/<soc>/soc.confexists, use it. If not, copysoc/sm8150/soc.confand setARCH,CROSS_COMPILE,KERNEL_IMAGE, the boot image addresses and header version,FASTBOOT_PRODUCTand the slot names. The boot image addresses are in the stock boot image (unpackbootimg); do not guess them.PKG_ARCHthere names the platform lists of the root (packages.aarch64.list); a new CPU architecture needs those lists, not a copy of the package set. - Device directory
devices/<codename>/withdevice.conf--SOC,DEVICE_NAME,KERNEL_CONFIG,CMDLINE, andKERNEL_DTB(the DTS is a patch inkernel/patches/, the DTB is built with the kernel) or, for a first boot with a stock DTB,DTB(a binary here, pinned byDTB_SHA256_PREFIX); optionalINITRAMFS_SHA256_PREFIX, andBOOT_PADif the bootloader wants a partition-sized image;kernel.config,cmdline;AGENTS.md-- what makes this phone different, and what has been measured on it.
- Check it is the right phone. Read
fastboot getvar productand the model string from a running system; put the former inFASTBOOT_PRODUCT. Sibling phones (7T and 7T Pro) share a SoC and differ in panel and firmware: name them separately and never share a panel sequence. - Build and compare.
make bootimg DEVICE=<codename>. If you have the stock boot image, compare the header (unpackbootimg) before flashing. - First flash to the test slot only; the fallback slot stays untouched until the new image has booted and been confirmed.
- Record what you measured (display, touch, USB, what is off) in the
device's
AGENTS.md.
Tool limits today: boot header v2 only (mkbootimg.sh refuses others),
FLASH_METHOD=fastboot only. A phone that needs another format adds it to
the tool and to this list, once.