- B9A: read-only audit of stock LK/DT: the panel is an ST7735S 128x128 on SPI (BLSP1 QUP4, 16 MHz, mode 3, D/C GPIO116, RESET GPIO118), backlight = PM8916 MPP4 current sink 40 mA. - B9B: upstream panel-mipi-dbi with the stock init sequence as firmware; MPP4 sink via pinctrl + gpio-backlight; first light with correct colours/orientation/offsets. - B9C: fbcon (6x8, 21x16) on tty1 + getty, UART console kept, aurora-display service; cache B9C b9ce13c9 written and verified, cold boots with LTE + Wi-Fi + display. - B9L (RAM only): lk2nd second stage with an msm8916 SPI panel port shows a picture before Linux. - Sanitizer: whitelist for b8/ and b9/.
32 lines
2.6 KiB
Bash
32 lines
2.6 KiB
Bash
#!/bin/sh
|
|
# B9B RAM test image (fastboot boot only - never flash, cache B8F untouched):
|
|
# kernel = out-b9b (b8d + DRM + DRM_PANEL_MIPI_DBI + DRM_FBDEV_EMULATION, see linux/aurora-b9b.config)
|
|
# DTB = linux/dts/msm8916-jz08-aurora-b9b.dtb (B8B + spi@78b8000 + ST7735S panel-mipi-dbi + L17 + MPP4 gpio-backlight)
|
|
# initramfs = exact B8F initramfs (LTE + time + Wi-Fi autostart) + overlay: panel firmware, test frames, b9b-test.sh
|
|
# out/ contains the B8F initramfs (Wi-Fi PSK) -> never publish b9/b9b/out.
|
|
set -e; cd "$(dirname "$0")"; O=out; KB=/home/q/aurora-kbuild/out-b9b; L=../../linux; F8=../../b8/b8f/out
|
|
G=$L/artifacts/ramboot-mm1; GEN=$L/out/usr/gen_init_cpio; TS=1790726400; FW='jz08au,aurora-st7735s.bin'
|
|
mkdir -p $O
|
|
echo "abb3bd6757e77eae90b3c9eb9d8b3f09e7a906256a53c80033853eb82b8e3f2f $F8/initramfs-b8f.cpio.gz" | sha256sum -c
|
|
grep -q '^CONFIG_DRM_PANEL_MIPI_DBI=y' $KB/.config && grep -q '^CONFIG_DRM_FBDEV_EMULATION=y' $KB/.config && grep -q '^CONFIG_LOCALVERSION="-aurora-b9b"' $KB/.config
|
|
python3 mk-panel-fw.py ../../bootchain/aboot-analysis/lk.bin ../../dt/dtb_01.dts "$O/$FW" > $O/panel-fw.txt
|
|
python3 gen-patterns.py $O/patterns > /dev/null
|
|
cp $KB/arch/arm64/boot/Image.gz $O/Image.gz; cp $KB/.config $O/config-b9b; cp $L/dts/msm8916-jz08-aurora-b9b.dtb $O/aurora-b9b.dtb
|
|
cat $O/Image.gz $O/aurora-b9b.dtb > $O/Image.gz-dtb
|
|
{
|
|
echo "dir /lib/firmware 0755 0 0"
|
|
echo "file /lib/firmware/$FW $O/$FW 0644 0 0"
|
|
echo "dir /usr/libexec/aurora 0755 0 0"
|
|
echo "dir /usr/libexec/aurora/b9b 0755 0 0"
|
|
echo "file /usr/libexec/aurora/b9b/b9b-test.sh rootfs/usr/libexec/aurora/b9b/b9b-test.sh 0755 0 0"
|
|
echo "dir /usr/libexec/aurora/b9b/patterns 0755 0 0"
|
|
for f in $O/patterns/*.565 $O/patterns/*.8888; do echo "file /usr/libexec/aurora/b9b/patterns/${f##*/} $f 0644 0 0"; done
|
|
} > $O/overlay-b9b.list
|
|
$GEN -t $TS $O/overlay-b9b.list > $O/overlay-b9b.cpio
|
|
gzip -9 -n -c $O/overlay-b9b.cpio > $O/overlay-b9b.cpio.gz
|
|
cat $F8/initramfs-b8f.cpio.gz $O/overlay-b9b.cpio.gz > $O/initramfs-b9b.cpio.gz
|
|
python3 ../../b6p/mkbootimg.py $O/Image.gz-dtb $O/initramfs-b9b.cpio.gz $G/cmdline.txt $O/aurora-b9b.img
|
|
# RAM-boot layout (lk1st fastboot boot): kernel @0x80000000 + image_size must stay below DTB @0x81e00000
|
|
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, end 0x%x (< 0x81e00000 DTB)\n' $SZ $((0x80000000 + SZ)); [ $((0x80000000 + SZ)) -lt $((0x81e00000)) ]
|
|
(cd $O && sha256sum Image.gz aurora-b9b.dtb Image.gz-dtb config-b9b "$FW" overlay-b9b.cpio.gz initramfs-b9b.cpio.gz aurora-b9b.img > SHA256SUMS; cat SHA256SUMS); ls -l $O/aurora-b9b.img
|