kinsamanka /OpenStick-Builder
Debian image builder for MSM8916 based 4G modem dongles
★ 104⑂ 205👁 8⑃ 12● 20▤ 1
104
stars
205
forks
8
watchers
12
prs
20
issues
1
releases
README
OpenStick Image Builder
Image builder for MSM8916 based 4G modem dongles
This builder uses the precompiled kernel provided by postmarketOS for Qualcomm MSM8916 devices.
[!NOTE]
This branch generates a debian image, use the alpine branch for an alpine image.
Build Instructions
Build locally
This has been tested to work on Ubuntu 22.04
- clone
shell
git clone --recurse-submodules https://github.com/kinsamanka/OpenStick-Builder.git
cd OpenStick-Builder/
Quick
- build
shell
cd OpenStick-Builder/
sudo ./build.sh
Detailed
- install dependencies
shell
sudo scripts/install_deps.sh
- build hyp and lk2nd
these custom bootloader allows basic support for extlinux.conf file, similar to u-boot and depthcharge.
shell
sudo scripts/build_hyp_aboot.sh
- extract Qualcomm firmware
extracts the bootloader and creates a new partition table that utilizes the full emmc space
shell
sudo scripts/extract_fw.sh
- create rootfs using debootstrap
shell
sudo scripts/debootstrap.sh
- build gadget-tools
shell
sudo scripts/build_gt.sh
- create images
shell
sudo scripts/build_images.sh
The generated firmware files will be stored under the files directory
On the cloud using Github Actions
1. Fork this repo
2. Run the Build workflow
- click and run Run workflow
- once the workflow is done, click on the workflow summary and then download the resulting artifact
Customizations
Edit scripts/setup.sh to add/remove packages. Note that this script is running inside the chroot environment.
Firmware Installation
[!WARNING]
The following commands can potentially brick your device, making it unbootable. Proceed with caution and at your own risk!
[!IMPORTANT]
Make sure to perform a backup of the original firmware using the command edl rf orig_fw.bin
Prerequisites
- EDL
- Android fastboot tool
sudo apt install fastboot
Steps
- Enter Qualcom EDL mode using this guideHow_to_enter_flash_mode)
- Backup required partitions
The following files are required from the original firmware:
- fsc.bin
- fsg.bin
- modem.bin
- modemst1.bin
- modemst2.bin
- persist.bin
- sec.bin
Skip this step if these files are already present
shell
for n in fsc fsg modem modemst1 modemst2 persist sec; do
edl r ${n} ${n}.bin
done
- Install aboot
shell
edl w aboot aboot.mbn
- Reboot to fastboot
shell
edl e boot
edl reset
- Flash firmware
shell
fastboot flash partition gpt_both0.bin
fastboot flash aboot aboot.mbn
fastboot flash hyp hyp.mbn
fastboot flash rpm rpm.mbn
fastboot flash sbl1 sbl1.mbn
fastboot flash tz tz.mbn
fastboot flash boot boot.bin
fastboot flash rootfs rootfs.bin
- Restore original partitions
shell
for n in fsc fsg modem modemst1 modemst2 persist sec; do
fastboot flash ${n} ${n}.bin
done
- Reboot
shell
fastboot reboot
Post-Install
- Network configuration
| wlan0 | |
| ----- | ----Top issues
#9UF896 7minutes problem19 comments · 2025-02-03#21UZ801 V3.2 not detecting lte modem, wifi adapter after installing Openstick firmware.11 comments · 2026-01-27#5RAM available11 comments · 2024-10-19#16Bricked MF8008 comments · 2025-09-16#7cpu frequency6 comments · 2024-11-08#20Error: Unable to locate package libconfig94 comments · 2026-01-22#1Questions about the DTB model4 comments · 2024-09-21#13JZ02-V10 loop to fastboot after reboot2 comments · 2025-08-07