The Xiaomi Redmi 7A (pine) is an octa-core aarch64 node running postmarketOS edge on a mainline-near Linux 7.1.3-msm89x7 kernel via the lk2nd secondary bootloader.
Designed for headless 24/7 operation on a 2 GB RAM budget, the system has been stripped of desktop/ModemManager daemons (reducing idle memory consumption from ~234 MB to ~140 MB), hardened with Qualcomm's hardware watchdog, and patched to resolve OpenRC startup race conditions against asynchronous Qualcomm WCNSS remoteproc firmware loading.
Hardware & Software Specifications
| Component | Specification | Details |
|---|---|---|
| Model | Xiaomi Redmi 7A (pine, M1903C3EG) |
Hardware Rev 0x10000 (Foundry ID: 2) |
| SoC | Qualcomm Snapdragon 439 (SDM439, SoC ID 353) |
8× ARM Cortex-A53 (4× @ 1.95 GHz + 4× @ 1.45 GHz), aarch64 |
| GPU | Qualcomm Adreno 505 | freedreno / msm DRM |
| RAM / Storage | 2 GB LPDDR3 / 16 GB eMMC | ~1.84 GiB usable (1884 MiB), 512 MiB zram swap |
| Bootloader | lk2nd 23.1 (lk2nd-msm8952) |
Chainloaded from stock aboot; exposes fastboot & mainline DT selection |
| Kernel | 7.1.3-msm89x7 (sdm439-xiaomi-pine.dtb) |
Mainline-near msm89x7 fork (PREEMPT) |
| OS / Init | postmarketOS edge (Alpine Linux) |
OpenRC init, Dropbear/OpenSSH, wpa_supplicant |
| Wireless | Qualcomm WCN3620 (wcnss remoteproc + wcn36xx) |
2.4 GHz 802.11b/g/n (wlan0) |
Subsystem Status
| Subsystem | Driver / Service | Status | Notes |
|---|---|---|---|
Bootloader (lk2nd) |
lk2nd-msm8952 23.1 |
Working | Provides fastboot interface and boots boot.img from eMMC system (mmcblk0p48) |
| USB Gadget Networking | ci_hdrc_msm (usb0 RNDIS/NCM) |
Working | Static 172.16.42.1/24 rescue interface |
Wi-Fi (wcn36xx) |
qcom_wcnss_pil + wcn36xx |
Working | Automatic boot association via patched OpenRC wpa_supplicant + networking scripts |
| NV / Modem Filesystem | rmtfs + msm-modem-uim-selection |
Working | Required to serve shared EFS/NV partitions to wcnss and adsp remoteprocs |
| Hardware Watchdog | Qualcomm WDT (/dev/watchdog) |
Working | BusyBox watchdog -t 10 -T 30 /dev/watchdog automatically resets on kernel lockups |
| Thermal Management | qcom-tsens (10 thermal zones) |
Working | Idle die temperatures 31–33 °C |
| Cold Reboot Stability | qcom_wcnss_pil / CPR scaling |
Experimental | Warm reboots occasionally stall during remoteproc / CPR voltage init; under active investigation |
Headless RAM Optimization (~234 MB → ~140 MB)
Default postmarketOS installs pull in D-Bus, NetworkManager, ModemManager, and telephony audio daemons that consume memory on a headless node.
- Removed Services:
networkmanager,dbus,routewrangler,sleep-inhibitor,q6voiced. - Retained Critical Daemons:
rmtfs(Qualcomm Remote File System daemon) must remain enabled—even with cellular voice disabled, thewcnssandadspremote processors request NV/calibration blocks throughrmtfsduring boot. - Result: Used memory at idle dropped from ~234 MB to ~140 MB, leaving ~1.7 GB available for compute workloads.
Fixing OpenRC vs. WCNSS remoteproc Boot Races
When switching from NetworkManager to lightweight OpenRC wpa_supplicant + /etc/init.d/networking, Wi-Fi failed to come up automatically on reboot due to two asynchronous timing races with Qualcomm's qcom_wcnss_pil remoteproc driver:
Race 1: wpa_supplicant Starts Before wlan0 Exists
On SDM439, wlan0 is only created after rmtfs starts, remoteproc2 (wcnss) loads its firmware from /lib/firmware/postmarketos, and the wcn36xx SMD channel finishes probing. By default, /etc/init.d/wpa_supplicant calls find_wireless(), sees no /sys/class/net/wlan0/wireless directory yet, and exits with "wpa_supplicant: no wireless interfaces found".
Fix: Hardcoded wpa_supplicant_if="wlan0" in /etc/conf.d/wpa_supplicant and added a start_pre() wait loop in /etc/init.d/wpa_supplicant that polls for /sys/class/net/wlan0 (up to 15 seconds) before launching the daemon.
Race 2: ifup wlan0 Fires Before 802.11 Association Completes
Even after wpa_supplicant starts, OpenRC immediately transitions to /etc/init.d/networking, running udhcpc or static IP configuration before wpa_supplicant completes the 4-way WPA2 handshake (wpa_state=COMPLETED).
Fix: Added a preup() hook in /etc/network/interfaces that polls wpa_cli -i wlan0 status until wpa_state=COMPLETED (up to 20 seconds) before assigning the interface address and default route.
Ongoing Kernel & Hardware Investigation
We also extracted and compared the stock Android DTBO (dtbo.img, 12 overlays) and kernel (4.9.112+) against the mainline-near 7.1.3-msm89x7 tree (sdm439-xiaomi-pine.dtb):
- CPR (Core Power Reduction) & Voltage Rails: Investigating occasional boot hangs that occur between
lk2ndhandover andremoteprocbring-up on warm resets. - Watchdog Hardening: Configured
/etc/init.d/watchdog(-t 10 -T 30 /dev/watchdog) so that if a warm reboot or remoteproc transition hangs after rootfs mount, the hardware watchdog automatically cycles the board within 30 seconds.
Device Tags: