- Add patches/kernel/0012-msm8909-standby-wifi-wcd-panel-ldo-bms.patch, rebuild affected kernel/module artifacts and all six device DTS/DTB files (msm8916-wcd-analog s2/bias gating, wcn36xx offload_sync_work and healthy-RSSI screen_off_offload scan short-circuit, pm8916_bms_vm screen_off FORCE_S3 OCV mode, panel-mipi-dbi dc/reset low on blank, spi-qup runtime PM sleep pinctrl, PM8909 l1/l4 LDO seeding, and sdhci-msm vmmc/vqmmc set_load with regulator-allow-set-load on l8/l12), and switch msm8905-cam from direct APSS SPMI LDO6/LDO17 writes to RPM regulator consumer voting.
- Update standby power policy and compiled C daemons (WIFI_LISTEN_INTERVAL=8, WIFI_STANDBY_RAT=gsm with CS verification and fallback, 10-bananarchy-dpm.sh wifi-up/unpark-rat dispatch, 25 s boot QRTR wait and QMI DMS online recovery, pm8916_bms_vm screen_off sync, bananarchy-run-aligned dark-screen skip, bananarchy-dsds --sig-hysteresis, bananarchy-cover-idle wake_blank_timeout = 8, and scripts/test-standby-power-policy.py).
- Add overlay/rootfs/etc/boot-deploy/hooks/10-initramfs-depmod.sh to run depmod -b per staged initramfs cpio archive and eliminate Stage 2 udevd missing-module boot console errors, enforce .ko.zst-only module installs in apply-bananarchy-overlay.sh, stage Alpine 3.24 /usr/lib/{libz,libcrypto}.so* in rebuild-image.sh chroot with failure cleanup, and add initramfs cpio guards plus verified image hashes in scripts/check-rebuild.sh.
- Document all changes under Unreleased in CHANGELOG.md and synchronize AGENTS.md, MANUAL.md, and BATTERY-OPTIMIZATION-ANALYSIS.md.
59 lines
1.8 KiB
Plaintext
Executable File
59 lines
1.8 KiB
Plaintext
Executable File
#!/sbin/openrc-run
|
|
|
|
name="Modem WWAN port"
|
|
description="Activate the WWAN port on the embedded QMI modem"
|
|
|
|
depend() {
|
|
need rmtfs
|
|
before ofono
|
|
before modemmanager
|
|
}
|
|
|
|
start() {
|
|
ebegin "Activating Modem WWAN port"
|
|
if ! [ -x "$(command -v qmicli)" ]; then
|
|
eend 0
|
|
return 0
|
|
fi
|
|
|
|
QMICLI_MODEM=""
|
|
count=0
|
|
while [ -z "$QMICLI_MODEM" ] && [ "$count" -lt 25 ]; do
|
|
if timeout 3 qmicli --silent -pd qrtr://0 --uim-noop >/dev/null 2>&1; then
|
|
QMICLI_MODEM="timeout 4 qmicli --silent -pd qrtr://0"
|
|
break
|
|
elif timeout 3 qmicli --silent -d qrtr://0 --uim-noop >/dev/null 2>&1; then
|
|
QMICLI_MODEM="timeout 4 qmicli --silent -d qrtr://0"
|
|
break
|
|
fi
|
|
sleep 1
|
|
count=$((count + 1))
|
|
done
|
|
|
|
# Always open the BAM-DMUX QMI DPM port at boot so bam-dmux registers
|
|
# net/wwan0 before ModemManager starts: MMPluginQcomSoc requires a net/*
|
|
# data port to export /org/freedesktop/ModemManager1/Modem/0 (needed for
|
|
# USSD, GPS, and SMS/call D-Bus signals), while bam-dmux.c runtime-suspends
|
|
# automatically after 1000 ms (pc_state=0, DMA released) whenever idle.
|
|
if [ -n "$QMICLI_MODEM" ]; then
|
|
attempt=0
|
|
while [ "$attempt" -lt 3 ] && [ ! -d /sys/class/net/wwan0 ]; do
|
|
$QMICLI_MODEM --dpm-open-port=hw-data-ep-type=bam-dmux,hw-data-ep-iface-number=1,hw-data-rx-id=1,hw-data-tx-id=1 >/dev/null 2>&1 || true
|
|
w=0
|
|
while [ "$w" -lt 15 ] && [ ! -d /sys/class/net/wwan0 ]; do
|
|
sleep 0.1
|
|
w=$((w + 1))
|
|
done
|
|
attempt=$((attempt + 1))
|
|
done
|
|
fi
|
|
|
|
for f in /etc/NetworkManager/system-connections/*.nmconnection; do
|
|
[ -f "$f" ] || continue
|
|
if grep -q "^type=gsm" "$f" 2>/dev/null; then
|
|
sed -i '/^\[ipv6\]/,/^\[/ s/^method=auto$/method=ignore/' "$f" 2>/dev/null || true
|
|
fi
|
|
done
|
|
eend 0
|
|
}
|