uzbek-plus/b10/b10b2/build-b10b2.sh
q 58dcb3d121 B10: battery charging — PM8916 LBC supervisor v4 (CHARGE/HOLD, FAULT safe clamp to 4.00 V) and persistent B10B-5 cache
- LBC supervisor v1..v4 (linux/patches/b10b3-lbc-supervisor-v3.patch + b10/b10b3/lbc-v3-to-v4-fault-clamp.diff):
  CHARGING 4.20 V/450 mA -> HOLD 4.05 V after 60 min CV -> battery -> new cycle on USB insert; FAULT = VDD_MAX 4.00 V clamp
- RAM tests C/B/D/D2/D3/D4 (safety timer only ends fast charge), B10B-4 actuator audit (VDD_MAX works, USB_SUSP does not),
  B10B-5 FAULT clamp regression, production run, warm reboot via PON reboot reason
- cache = B10B-5 c3732515 (HW EDL write, readback + full partition verify), class-A persistent validation
- test-only hooks/images are not part of the production kernel; images with the AP PSK are not published
2026-10-04 19:00:27 +03:00

19 lines
1.8 KiB
Bash
Executable file

#!/bin/sh
# B10B-2 RAM test image (fastboot boot only - never flash; cache B9C / aboot untouched):
# kernel = out-b10b2 (b10b2 + CHARGER_PM8916_LBC; linux/aurora-b10b2.config).
# DTB = linux/dts/msm8916-jz08-aurora-b10b2.dtb (B10B-1 DTB + pm8916_charger okay 4.2 V/500 mA, usbin off, usb extcon -> charger)
# initramfs + cmdline = exact B9C (b9/b9c/out). out/ contains the B8F initramfs (Wi-Fi PSK): never publish.
set -e; cd "$(dirname "$0")"; O=out; KB=/home/q/aurora-kbuild/out-b10b2; L=../../linux; B9C=../../b9/b9c/out
mkdir -p $O
echo "7ca9cc794a3b85d3b7240f6311ad03bee9e1a4a59aae2ed9438318e853f7c3dc $L/dts/msm8916-jz08-aurora-b9b.dtb" | sha256sum -c
grep " initramfs-b9c.cpio.gz\$" $B9C/SHA256SUMS | sed "s| | $B9C/|" | sha256sum -c
grep " cmdline.txt\$" $B9C/SHA256SUMS | sed "s| | $B9C/|" | sha256sum -c
for s in IIO=y QCOM_SPMI_VADC=y BATTERY_PM8916_BMS_VM=y CHARGER_PM8916_LBC=y QCOM_SPMI_TEMP_ALARM=y 'LOCALVERSION="-aurora-b10b2"'; do grep -q "^CONFIG_$s\$" $KB/.config || { echo "STOP: CONFIG_$s"; exit 1; }; done
cp $KB/arch/arm64/boot/Image.gz $O/Image.gz; cp $KB/.config $O/config-b10b2; cp $L/dts/msm8916-jz08-aurora-b10b2.dtb $O/aurora-b10b2.dtb
cp $B9C/initramfs-b9c.cpio.gz $O/initramfs.cpio.gz; cp $B9C/cmdline.txt $O/cmdline.txt
cat $O/Image.gz $O/aurora-b10b2.dtb > $O/Image.gz-dtb
python3 ../../b6p/mkbootimg.py $O/Image.gz-dtb $O/initramfs.cpio.gz $O/cmdline.txt $O/aurora-b10b2.img
SZ=$(python3 -c "import struct;print(struct.unpack_from('<Q',open('$KB/arch/arm64/boot/Image','rb').read(24),16)[0])")
printf 'kernel image_size 0x%x, RAM-boot end 0x%x (< 0x81e00000 DTB)\n' $SZ $((0x80000000 + SZ)); [ $((0x80000000 + SZ)) -lt $((0x81e00000)) ]
(cd $O && sha256sum Image.gz aurora-b10b2.dtb Image.gz-dtb config-b10b2 cmdline.txt initramfs.cpio.gz aurora-b10b2.img > SHA256SUMS; cat SHA256SUMS); ls -l $O/aurora-b10b2.img