Implement 0011 boot ICC, OPP latency, USB PHY, Q6ASM/ALSA, and ZRAM fixes
- Add patches/kernel/0011-msm8909-boot-icc-opp-usb-audio-fixes.patch and update all six standalone device DTS files: mark XPU-restricted MSM8909 PCNOC interconnect nodes ap_owned with NOC_QOS_MODE_INVALID to clear -ENXIO errors, move clock-latency-ns onto each CPU opp child node so cpuinfo_transition_latency reports 100 us instead of CPUFREQ_ETERNAL (6.44 s schedutil rate limit), convert qcom-cpufreq-nvmem OPP deferrals to dev_err_probe, guard fixed 3.075 V pm8909_l13 in phy-qcom-usb-hs, handle async WRITE_V2/READ_V2 and synchronous EOS APR responses in q6asm, and disable unrouted dai-link-multimedia3 while setting q6voice_device=3 for shifted VoiceMMode1 (hw:0,3). - Restore /bin, /usr/bin, and /usr/sbin BusyBox applet symlinks (excluding pkill) in apply-bananarchy-overlay.sh, size /dev/zram0 from /proc/meminfo in zramstart, guard "/" D-Bus object paths in NetworkManager 50-dns-filter.sh, sync schedutil rate_limit_us in bananarchy-display-power-sync, replace remaining pkill/pgrep -f uses in X11/hook/modem scripts, and clean temporary AT response files via trap in msm-modem-uim-selection. - Verify live after reboot on nokia-argon, rebuild a1114 (carbonara) images/archives for nokia-argon and nokia-beatles with e2fsck/debugfs and check-rebuild.sh guards, and update pinned hashes in scripts/check-rebuild.sh and CHANGELOG.md.
This commit is contained in:
1 parent
a23a9b4edb
commit
786480a08f
43 files changed
+48354
-47685
No files matched your search
@@ -162,6 +162,33 @@ if [ -f "$SBIN_LIST" ]; then
|
||||
fi
|
||||
done < "$SBIN_LIST"
|
||||
fi
|
||||
# /usr/bin and /usr/sbin BusyBox applets (e.g. free for zramstart, find,
|
||||
# xargs, top, vi, wget) are also skipped by apk --no-scripts; omit pkill
|
||||
# so target scripts never depend on it.
|
||||
mkdir -p "$TARGET_ROOTFS/usr/bin" "$TARGET_ROOTFS/usr/sbin"
|
||||
USR_BIN_LIST="$BASE_DIR/scripts/busybox-usr-bin-applets.txt"
|
||||
if [ -f "$USR_BIN_LIST" ]; then
|
||||
while IFS= read -r applet; do
|
||||
[ -n "$applet" ] || continue
|
||||
if [ ! -e "$TARGET_ROOTFS/usr/bin/$applet" ]; then
|
||||
[ ! -L "$TARGET_ROOTFS/usr/bin/$applet" ] || \
|
||||
rm -f "$TARGET_ROOTFS/usr/bin/$applet"
|
||||
ln -s /bin/busybox "$TARGET_ROOTFS/usr/bin/$applet"
|
||||
fi
|
||||
done < "$USR_BIN_LIST"
|
||||
fi
|
||||
rm -f "$TARGET_ROOTFS/usr/bin/pkill"
|
||||
USR_SBIN_LIST="$BASE_DIR/scripts/busybox-usr-sbin-applets.txt"
|
||||
if [ -f "$USR_SBIN_LIST" ]; then
|
||||
while IFS= read -r applet; do
|
||||
[ -n "$applet" ] || continue
|
||||
if [ ! -e "$TARGET_ROOTFS/usr/sbin/$applet" ]; then
|
||||
[ ! -L "$TARGET_ROOTFS/usr/sbin/$applet" ] || \
|
||||
rm -f "$TARGET_ROOTFS/usr/sbin/$applet"
|
||||
ln -s /bin/busybox "$TARGET_ROOTFS/usr/sbin/$applet"
|
||||
fi
|
||||
done < "$USR_SBIN_LIST"
|
||||
fi
|
||||
if [ -x "$BASE_DIR/scripts/version.sh" ]; then
|
||||
"$BASE_DIR/scripts/version.sh" "$TARGET_ROOTFS"
|
||||
fi
|
||||
@@ -189,6 +216,8 @@ chown 0:0 "$TARGET_ROOTFS/etc/chrony/chrony.conf" \
|
||||
"$TARGET_ROOTFS/etc/NetworkManager/dispatcher.d/10-bananarchy-dpm.sh" \
|
||||
"$TARGET_ROOTFS/etc/NetworkManager/dispatcher.d/20-bananarchy-time-sync.sh" \
|
||||
"$TARGET_ROOTFS/etc/NetworkManager/dispatcher.d/30-bananarchy-network-status.sh" \
|
||||
"$TARGET_ROOTFS/usr/lib/NetworkManager/dispatcher.d/50-dns-filter.sh" \
|
||||
"$TARGET_ROOTFS/usr/bin/zramstart" \
|
||||
2>/dev/null || true
|
||||
chmod 0644 "$TARGET_ROOTFS/etc/chrony/chrony.conf" 2>/dev/null || true
|
||||
# The idle-blank lock helper is spawned directly by dwm's blank handler, so
|
||||
@@ -216,6 +245,8 @@ chmod 0755 "$TARGET_ROOTFS/usr/bin/bananarchy-idle-blank.sh" \
|
||||
"$TARGET_ROOTFS/etc/NetworkManager/dispatcher.d/10-bananarchy-dpm.sh" \
|
||||
"$TARGET_ROOTFS/etc/NetworkManager/dispatcher.d/20-bananarchy-time-sync.sh" \
|
||||
"$TARGET_ROOTFS/etc/NetworkManager/dispatcher.d/30-bananarchy-network-status.sh" \
|
||||
"$TARGET_ROOTFS/usr/lib/NetworkManager/dispatcher.d/50-dns-filter.sh" \
|
||||
"$TARGET_ROOTFS/usr/bin/zramstart" \
|
||||
2>/dev/null || true
|
||||
CHRONY_UID="$(awk -F: '/^chrony:/ {print $3}' "$TARGET_ROOTFS/etc/passwd" 2>/dev/null || true)"
|
||||
CHRONY_GID="$(awk -F: '/^chrony:/ {print $4}' "$TARGET_ROOTFS/etc/passwd" 2>/dev/null || true)"
|
||||
|
||||
@@ -94,6 +94,11 @@ EOF
|
||||
echo "[2i/5] Applying MSM8909 RPM LPM, BIMC/WCD/LDO cleanup, and UART disable patch..."
|
||||
patch -p1 < /bananarchy/patches/kernel/0010-msm8909-rpm-lpm-bimc-wcd-ldo-uart.patch
|
||||
fi
|
||||
if ! grep -q "case ASM_DATA_CMD_READ_V2:" sound/soc/qcom/qdsp6/q6asm.c 2>/dev/null || \
|
||||
! grep -q "regulator_is_supported_voltage" drivers/phy/qualcomm/phy-qcom-usb-hs.c 2>/dev/null; then
|
||||
echo "[2j/5] Applying MSM8909 boot ICC, OPP, USB PHY, and Q6ASM/MultiMedia3 fixes..."
|
||||
patch -p1 < /bananarchy/patches/kernel/0011-msm8909-boot-icc-opp-usb-audio-fixes.patch
|
||||
fi
|
||||
if [ ! -f include/config/auto.conf ] || \
|
||||
! grep -q "CONFIG_NETFILTER_XT_MATCH_OWNER=m" .config 2>/dev/null || \
|
||||
! grep -q "CONFIG_INTERCONNECT_QCOM_MSM8909=y" .config 2>/dev/null || \
|
||||
@@ -136,6 +141,8 @@ EOF
|
||||
patch -p1 < /bananarchy/patches/kernel/0009-msm8909-deep-standby-rpm-usb-wifi-ddr.patch
|
||||
echo "[2i/5] Applying MSM8909 RPM LPM, BIMC/WCD/LDO cleanup, and UART disable patch..."
|
||||
patch -p1 < /bananarchy/patches/kernel/0010-msm8909-rpm-lpm-bimc-wcd-ldo-uart.patch
|
||||
echo "[2j/5] Applying MSM8909 boot ICC, OPP, USB PHY, and Q6ASM/MultiMedia3 fixes..."
|
||||
patch -p1 < /bananarchy/patches/kernel/0011-msm8909-boot-icc-opp-usb-audio-fixes.patch
|
||||
|
||||
echo "[3/5] Preparing kernel configuration and Module.symvers..."
|
||||
cp /bananarchy/patches/kernel/config-bananarchy-msm8909.armv7 .config
|
||||
|
||||
@@ -13,6 +13,7 @@ chown
|
||||
conspy
|
||||
coreutils
|
||||
cp
|
||||
cttyhack
|
||||
date
|
||||
dd
|
||||
df
|
||||
@@ -36,6 +37,7 @@ hostname
|
||||
ionice
|
||||
iostat
|
||||
ipcalc
|
||||
kbd_mode
|
||||
kill
|
||||
kmod
|
||||
link
|
||||
@@ -90,6 +92,7 @@ udevadm
|
||||
umount
|
||||
uname
|
||||
usleep
|
||||
vmstat
|
||||
watch
|
||||
wdctl
|
||||
zcat
|
||||
@@ -0,0 +1,53 @@
|
||||
[[
|
||||
beep
|
||||
chvt
|
||||
cmp
|
||||
cpio
|
||||
crontab
|
||||
cryptpw
|
||||
deallocvt
|
||||
diff
|
||||
dos2unix
|
||||
find
|
||||
free
|
||||
fuser
|
||||
groups
|
||||
hd
|
||||
killall
|
||||
lsusb
|
||||
lzopcat
|
||||
microcom
|
||||
nc
|
||||
nmeter
|
||||
nslookup
|
||||
openvt
|
||||
pgrep
|
||||
pmap
|
||||
pscan
|
||||
pstree
|
||||
pwdx
|
||||
resize
|
||||
setkeycodes
|
||||
sha3sum
|
||||
showkey
|
||||
strings
|
||||
time
|
||||
top
|
||||
traceroute
|
||||
traceroute6
|
||||
tree
|
||||
ttysize
|
||||
udhcpc6
|
||||
unix2dos
|
||||
unlzop
|
||||
unzip
|
||||
uptime
|
||||
uudecode
|
||||
uuencode
|
||||
vi
|
||||
vlock
|
||||
volname
|
||||
wget
|
||||
which
|
||||
whois
|
||||
xargs
|
||||
@@ -0,0 +1,23 @@
|
||||
add-shell
|
||||
addgroup
|
||||
adduser
|
||||
arping
|
||||
brctl
|
||||
crond
|
||||
delgroup
|
||||
deluser
|
||||
ether-wake
|
||||
fbset
|
||||
killall5
|
||||
loadfont
|
||||
nanddump
|
||||
nandwrite
|
||||
nbd-client
|
||||
ntpd
|
||||
rdate
|
||||
rdev
|
||||
readahead
|
||||
remove-shell
|
||||
sendmail
|
||||
setfont
|
||||
setlogcons
|
||||
@@ -368,6 +368,25 @@ done
|
||||
if ! grep -q 'busybox-applets.txt' "$BASE_DIR/scripts/apply-bananarchy-overlay.sh"; then
|
||||
fail "the overlay no longer restores missing BusyBox applet symlinks"
|
||||
fi
|
||||
for applet_file in "$BASE_DIR/scripts/busybox-usr-bin-applets.txt" \
|
||||
"$BASE_DIR/scripts/busybox-usr-sbin-applets.txt"; do
|
||||
if [ ! -f "$applet_file" ]; then
|
||||
fail "missing ${applet_file#"$BASE_DIR/"}"
|
||||
fi
|
||||
done
|
||||
if [ -f "$BASE_DIR/scripts/busybox-usr-bin-applets.txt" ]; then
|
||||
if ! grep -qxF 'free' "$BASE_DIR/scripts/busybox-usr-bin-applets.txt"; then
|
||||
fail "scripts/busybox-usr-bin-applets.txt is missing free"
|
||||
fi
|
||||
if grep -qxF 'pkill' "$BASE_DIR/scripts/busybox-usr-bin-applets.txt"; then
|
||||
fail "scripts/busybox-usr-bin-applets.txt must omit pkill"
|
||||
fi
|
||||
fi
|
||||
if ! grep -qF 'busybox-usr-bin-applets.txt' "$BASE_DIR/scripts/apply-bananarchy-overlay.sh" || \
|
||||
! grep -qF 'busybox-usr-sbin-applets.txt' "$BASE_DIR/scripts/apply-bananarchy-overlay.sh" || \
|
||||
! grep -qF 'rm -f "$TARGET_ROOTFS/usr/bin/pkill"' "$BASE_DIR/scripts/apply-bananarchy-overlay.sh"; then
|
||||
fail "apply-bananarchy-overlay.sh no longer manages /usr/bin and /usr/sbin BusyBox symlinks"
|
||||
fi
|
||||
# The shipped rootfs is validated by scripts/sync-beatles-bootfs.py --check
|
||||
# and by an explicit image build; the overlay script above is the source of
|
||||
# truth for the applet symlinks, so avoid extracting a 1.3 GiB partition here.
|
||||
@@ -378,9 +397,9 @@ fi
|
||||
|
||||
echo "[check] Known-good flashable image set..."
|
||||
for pair in \
|
||||
"0d25b08a23c0f736877731ba634cec942fd8580215f6067dc3c2f63d07c58264 images/bananarchy-nokia-argon.img" \
|
||||
"e7fe1e3dde98e1be28b1593a94925c2820e4bfe35016cb3e09759a7e017a3aba images/bananarchy-nokia-beatles.img" \
|
||||
"5a7a391aff3fc8fc95b07b532eedce1ee17991574fb45ca4359c0504aeb82324 images/boot-bananarchy-nokia-beatles.img" \
|
||||
"d913b7fe328b3d8c0be242e5d2666d6f03453c565ddc1120ef59698f4445e079 images/bananarchy-nokia-argon.img" \
|
||||
"d290476ba796abc4eb36eeacb0f6312fe3e33623f7a38b2c607a609808fe4f5e images/bananarchy-nokia-beatles.img" \
|
||||
"7920fae28fa3389602be16a02ad7311b50e61c9c205be48f160307d594f65eb6 images/boot-bananarchy-nokia-beatles.img" \
|
||||
"b5549698c20f4de7603fc746d32bb5baa96ec377e41e74407823c98506fc185d images/boot-lk2nd-nokia-beatles-display.img"; do
|
||||
set -- $pair
|
||||
want=$1
|
||||
@@ -1235,9 +1254,64 @@ if ! grep -qxF 'MODEM_DRX_MODE=6' "$BASE_DIR/overlay/rootfs/etc/bananarchy-power
|
||||
! grep -qF 'WIFI_OFFLOAD_PATH=/sys/module/wcn36xx/parameters/screen_off_offload' \
|
||||
"$BASE_DIR/overlay/rootfs/usr/bin/bananarchy-display-power-sync" || \
|
||||
! grep -qF 'SPM_SCREEN_OFF_PATH=/sys/module/cpuidle_qcom_spm/parameters/screen_off' \
|
||||
"$BASE_DIR/overlay/rootfs/usr/bin/bananarchy-display-power-sync" || \
|
||||
! grep -qF 'sync_schedutil_rate_limit' \
|
||||
"$BASE_DIR/overlay/rootfs/usr/bin/bananarchy-display-power-sync"; then
|
||||
fail "userspace DSDS DRX, compiled C daemons, CPU/L2/Wi-Fi power policy, or wcn36xx screen_off_offload sync is missing"
|
||||
fi
|
||||
echo "[check] ZRAM, NetworkManager DNS filter, and target pkill cleanup..."
|
||||
ZRAMSTART="$BASE_DIR/overlay/rootfs/usr/bin/zramstart"
|
||||
NM_DNS_FILTER="$BASE_DIR/overlay/rootfs/usr/lib/NetworkManager/dispatcher.d/50-dns-filter.sh"
|
||||
if [ ! -x "$ZRAMSTART" ] || ! sh -n "$ZRAMSTART" 2>/dev/null || \
|
||||
! grep -qF 'MemTotal' "$ZRAMSTART"; then
|
||||
fail "overlay zramstart is missing, not executable, has bad syntax, or lost MemTotal sizing"
|
||||
fi
|
||||
if [ ! -x "$NM_DNS_FILTER" ] || ! sh -n "$NM_DNS_FILTER" 2>/dev/null || \
|
||||
! grep -qF '[ "$_ipcfg" = "/" ]' "$NM_DNS_FILTER"; then
|
||||
fail "overlay NM 50-dns-filter.sh is missing, not executable, has bad syntax, or lost null object path guard"
|
||||
fi
|
||||
for no_pkill in \
|
||||
"$BASE_DIR/overlay/rootfs/usr/bin/bananarchy-x11-session.sh" \
|
||||
"$BASE_DIR/overlay/rootfs/usr/share/sxmo/default_hooks/sxmo_hook_start.sh" \
|
||||
"$BASE_DIR/overlay/rootfs/etc/skel/.config/sxmo/hooks/sxmo_hook_start.sh" \
|
||||
"$BASE_DIR/overlay/rootfs/home/user/.config/sxmo/hooks/sxmo_hook_start.sh" \
|
||||
"$BASE_DIR/overlay/rootfs/usr/bin/sxmo_modemaudio.sh"; do
|
||||
if grep -q 'pkill' "$no_pkill"; then
|
||||
fail "${no_pkill#"$BASE_DIR/"} still depends on pkill"
|
||||
fi
|
||||
done
|
||||
echo "[check] Boot ICC/OPP/USB/Q6ASM kernel patch 0011 and DTS guards..."
|
||||
if [ ! -f "$BASE_DIR/patches/kernel/0011-msm8909-boot-icc-opp-usb-audio-fixes.patch" ] || \
|
||||
! grep -qF '0011-msm8909-boot-icc-opp-usb-audio-fixes.patch' "$BASE_DIR/scripts/build-kernel-audio.sh"; then
|
||||
fail "kernel patch 0011 or its build-kernel-audio.sh wiring is missing"
|
||||
fi
|
||||
for dts in \
|
||||
"$BASE_DIR/devices/nokia-argon/qcom-msm8905-nokia-argon.dts" \
|
||||
"$BASE_DIR/devices/nokia-beatles/qcom-msm8905-nokia-beatles.dts" \
|
||||
"$BASE_DIR/devices/nokia-beatles/qcom-msm8905-nokia-beatles-cover.dts" \
|
||||
"$BASE_DIR/devices/nokia-tough/qcom-msm8905-nokia-coconut.dts" \
|
||||
"$BASE_DIR/devices/nokia-sparkler/qcom-msm8909-nokia-sparkler.dts" \
|
||||
"$BASE_DIR/devices/nokia-sparkler/qcom-msm8909-nokia-leo.dts"; do
|
||||
if [ "$(grep -c 'clock-latency-ns' "$dts" 2>/dev/null || echo 0)" -ne 8 ]; then
|
||||
fail "${dts#"$BASE_DIR/"} must declare clock-latency-ns on all 8 opp nodes"
|
||||
fi
|
||||
done
|
||||
for dts in \
|
||||
"$BASE_DIR/devices/nokia-argon/qcom-msm8905-nokia-argon.dts" \
|
||||
"$BASE_DIR/devices/nokia-beatles/qcom-msm8905-nokia-beatles.dts" \
|
||||
"$BASE_DIR/devices/nokia-beatles/qcom-msm8905-nokia-beatles-cover.dts" \
|
||||
"$BASE_DIR/devices/nokia-tough/qcom-msm8905-nokia-coconut.dts"; do
|
||||
if ! grep -A 3 'dai-link-multimedia3 {' "$dts" | grep -qF 'status = "disabled";'; then
|
||||
fail "${dts#"$BASE_DIR/"} must keep dai-link-multimedia3 disabled"
|
||||
fi
|
||||
done
|
||||
for q6cfg in \
|
||||
"$BASE_DIR/overlay/rootfs/usr/share/q6voiced/q6voiced.conf" \
|
||||
"$BASE_DIR/overlay/rootfs/etc/conf.d/q6voiced"; do
|
||||
if [ ! -f "$q6cfg" ] || ! grep -qxF 'q6voice_device=3' "$q6cfg"; then
|
||||
fail "${q6cfg#"$BASE_DIR/"} must set q6voice_device=3 for VoiceMMode1 with dai-link-multimedia3 disabled"
|
||||
fi
|
||||
done
|
||||
if [ ! -f "$BASE_DIR/patches/kernel/0010-msm8909-rpm-lpm-bimc-wcd-ldo-uart.patch" ] || \
|
||||
! grep -qF '0010-msm8909-rpm-lpm-bimc-wcd-ldo-uart.patch' "$BASE_DIR/scripts/build-kernel-audio.sh" || \
|
||||
! grep -qxF 'CONFIG_QCOM_RPM_MASTER_STATS=y' "$BASE_DIR/patches/kernel/config-bananarchy-msm8909.armv7" || \
|
||||
|
||||
Reference in new issue
Block a user