Files
msm8916-openwrt/readme.md
T
2025-09-29 22:21:07 +02:00

5.2 KiB

OpenWrt logo

OpenWrt Project is a Linux operating system targeting embedded devices. Instead of trying to create a single, static firmware, OpenWrt provides a fully writable filesystem with package management. This frees you from the application selection and configuration provided by the vendor and allows you to customize the device through the use of packages to suit any application. For developers, OpenWrt is the framework to build an application without having to build a complete firmware around it; for users this means the ability for full customization, to use the device in ways never envisioned.

This repository

Modern version of OpenWrt working on UZ801v3:

  • Modem Working
    • ModemManager not showing Rx/Tx in Luci
  • Wifi Working
  • USB gadget working (NCM, RNDIS, MASS, ACM tested!)
    • No shell attached to ACM, just pure raw Serial (/dev/ttyGS0)
  • TUN installed
  • Wireguard Installed
  • GRE Protocol Installed
  • hotplug.d scripts to manage leds, only on/off if iface, no blinking:

How to build OpenWrt

Docker is required!

cd devenv
docker compose run --rm builder # This will open bash inside a build environment
cp /repo/diffconfig .config # Copies the config on to the working folder
echo "# CONFIG_SIGNED_PACKAGES is not set" >> .config # Optional: Disable APK signature verification
make defconfig
make -j$(nproc)

How to flash from OEM

The base partitions are in a folder called base_partitions on this repo:

After the succesful flash if you:

  • Want to enter fastboot, just insert the device with the button pressed.
  • Want to enter edl, boot into fastboot and execute: fastboot oem reboot-edl.

No Network/Modem Stuck at Searching

First, extract the contents of modem.bin from your firmware dump. You can do eld r modem modem.bin. In linux, its a simple image, you can mount it. Once you have it mounted, navigate to this directory: image/modem_pr/mcfg/configs/mcfg_sw/generic/ and choose the folder according to your region:

  • APAC - Asia Pacific
  • CHINA - China
  • COMMON - Use this if your region is not listed
  • EU - Europe
  • NA - North America
  • SA - South America
  • SEA - South East Asia

Once you have selected your region, you'll find folders typically representing Telcos in your area. Navigate through the appropriate folder until you locate mcfg_sw.mbn. If your telco is not listed, just grab a generic as it is done in this project for europe:

  # packages/qcom-firmware/Makefile
  define Build/Compile
      ...
  		::image/modem_pr/mcfg/configs/mcfg_sw/generic/common/default/default/mcfg_sw.mbn $(PKG_BUILD_DIR)/uz801
      ...
  endef

To apply the fix:

  1. Transfer the file to your dongle: scp -O mcfg_sw.mbn root@192.168.1.1:/lib/firmware/MCFG_SW.MBN
    • Capitalization matters! Modem expects it to be all caps.
  2. Reboot the device.

Future:

  • squashfs + overlayfs + firstboot:
    • This implies new gpt partition table with boot, system and userspace, system has ro filesystem, and userspace has overlayfs.
    • gpt table makes fastboot erase/format expand userspace to full size.
  • Investigate zram
  • Custom package server for msm89xx/msm8916
    • Any target specific module not present might require to be built from sources. This repo can be used to do that, run make menuconfig before make -j$(nproc) and select it from the menu.
  • msm-firmware-loader, to mount firmware instead of bundle to free up almost 40mb from rootfs.
  • msm-firmware-dumper, simplified aproach for loader. Instead of mounting and changing the firmware path, just dumping the modem partition to /lib/firmware on first boot.
    • Distributed image is smaller
    • It uses your specific modem/persist partitions, so maybe easier to make other platforms compatible.

Credits