Sanitized research log, build/reproducibility docs, DTS, kernel configs, patches, initramfs sources, bootchain migration plans and test logs. B5 direct boot PASS; B6 modem lifecycle in progress. No dumps, NV/EFS, vendor firmware or device identifiers included.
63 lines
3 KiB
Diff
63 lines
3 KiB
Diff
--- ../initramfs-emmc1/init 2026-09-30 03:50:19.123970771 +0600
|
|
+++ init 2026-09-30 04:09:50.105889892 +0600
|
|
@@ -1,5 +1,5 @@
|
|
#!/bin/busybox sh
|
|
-# Aurora RAM boot EMMC1 — USB1 + internal eMMC READ-ONLY verification.
|
|
+# Aurora RAM boot MODEM1 — EMMC1 + modem FAT RO + rmtfs -r + MPSS (started manually via /bin/modem-up).
|
|
# NEVER mounts, fsck's, formats, trims or writes any mmcblk* device.
|
|
# No block devices, no firmware, no radios. Never exits (failures leave the UART shell).
|
|
/bin/busybox mkdir -p /proc /sys /dev /tmp /usr/bin /usr/sbin /sbin
|
|
@@ -10,7 +10,7 @@
|
|
mount -t configfs configfs /sys/kernel/config
|
|
log() { echo "[init] $*"; echo "[init] $*" > /dev/kmsg 2>/dev/null; }
|
|
echo
|
|
-echo "=== AURORA RAM BOOT EMMC1 ==="
|
|
+echo "=== AURORA RAM BOOT MODEM1 ==="
|
|
uname -a
|
|
echo "--- model"; cat /proc/device-tree/model; echo
|
|
echo "--- cmdline"; cat /proc/cmdline
|
|
@@ -53,6 +53,36 @@
|
|
}
|
|
emmc_ro && EMMC_RO_OK=1 # RO FIRST, before anything else touches the disk
|
|
|
|
+nv_snapshot() { # $1 = before|after ; reads RO block devices only
|
|
+ o=/tmp/nv-$1.txt; : > $o
|
|
+ for want in modemst1 modemst2 fsg fsc persist; do
|
|
+ for p in /sys/class/block/mmcblk0p*; do
|
|
+ [ "$(sed -n 's/^PARTNAME=//p' $p/uevent)" = "$want" ] && echo "$want $(basename $p) $(sha256sum /dev/$(basename $p) | cut -d' ' -f1)" >> $o
|
|
+ done
|
|
+ done
|
|
+ echo "stat $(cat /sys/block/mmcblk0/stat)" >> $o
|
|
+}
|
|
+b1_modem_fat() {
|
|
+ mkdir -p /dev/disk/by-partlabel /firmware
|
|
+ for p in /sys/class/block/mmcblk0p*; do
|
|
+ n=$(sed -n 's/^PARTNAME=//p' $p/uevent); [ -n "$n" ] && ln -sf /dev/$(basename $p) /dev/disk/by-partlabel/$n
|
|
+ done
|
|
+ M=$(readlink /dev/disk/by-partlabel/modem); echo "B1 modem partition by PARTLABEL: modem -> $M ro=$(blockdev --getro $M)"
|
|
+ [ "$(blockdev --getro $M)" = 1 ] || { log "B1: modem partition not RO - NOT mounting"; return 1; }
|
|
+ mount -t vfat -o ro,nosuid,nodev,noexec,shortname=lower $M /firmware || { log "B1: mount failed"; return 1; }
|
|
+ grep " /firmware " /proc/mounts
|
|
+ grep " /firmware " /proc/mounts | grep -q " ro," || { log "B1: /firmware is NOT ro - unmounting"; umount /firmware; return 1; }
|
|
+ (cd /firmware && find . -type f | sort | while read f; do echo "$(sha256sum "$f" | cut -d' ' -f1) ${f#./}"; done) > /tmp/fw-sha.txt
|
|
+ echo "B1 firmware files: $(wc -l < /tmp/fw-sha.txt)"
|
|
+ echo -n /firmware/image > /sys/module/firmware_class/parameters/path
|
|
+ log "B1: modem FAT mounted RO at /firmware, firmware path /firmware/image"
|
|
+}
|
|
+if [ "$EMMC_RO_OK" = 1 ]; then
|
|
+ echo "stat-before-B1 $(cat /sys/block/mmcblk0/stat)" > /tmp/stat-before-B1.txt
|
|
+ nv_snapshot before
|
|
+ b1_modem_fat && B1_OK=1
|
|
+fi
|
|
+
|
|
usb_up() {
|
|
for i in $(seq 1 50); do
|
|
udc=$(ls /sys/class/udc 2>/dev/null | head -1)
|
|
@@ -88,6 +118,7 @@
|
|
usb_up || log "USB/NCM setup incomplete - staying on UART shell"
|
|
|
|
if [ "$EMMC_RO_OK" = 1 ]; then emmc_report; else log "EMMC: RO not confirmed or device missing - NO further disk access"; fi
|
|
+echo "B1_OK=${B1_OK:-0} (MPSS NOT started; run /bin/modem-up when ready)"
|
|
echo "=== entering shell (exit restarts it) ==="
|
|
while true; do
|
|
setsid cttyhack sh
|