5.7 KiB
Installation guide
This guide covers building Geminux images and flashing a Planet Computers Gemini PDA (Wi-Fi + 4G, MT6797X) directly from Linux without MediaTek's proprietary FlashTool GUI.
Prerequisites on the Linux host
- Docker (
docker) installed and running foraarch64cross-compilation and Alpine rootfs assembly. - Python 3 (
python3),libusb-1.0, andudev/sudopermissions for USB MediaTek BROM/DA access. - Optional:
img2simgandsimg2img(android-toolsorext4sparse utilities) if you want Android sparse rootfs conversion. - A Planet Computers Gemini PDA (x27 Wi-Fi+4G) and a USB-C data cable connected directly to a host USB port (avoid unpowered hubs).
On Linux hosts running ModemManager, flash-mtk.sh automatically pauses ModemManager during flashing and restarts it on exit so /dev/ttyACM* is not claimed away from the MediaTek Preloader/BROM handshake.
Step 1: Build the Geminux images
From the repository root:
./rebuild-image.sh
./scripts/check-rebuild.sh
This generates:
images/boot-geminux.img(<= 16 MiBLK boot slot image containingImage.gz,mt6797-gemini-pda-geminux.dtb, and initramfs)images/recovery-geminux.img(initramfs recovery image with USB NCM network shell)images/geminux-rootfs.img(ext4 root filesystem labeledgeminux-root)images/SHA256SUMS
Step 2: Backup factory partitions and extract MediaTek firmware
Never wipe or overwrite MediaTek factory calibration, baseband, or bootloader partitions (proinfo, nvram, nvdata, protect1, protect2, seccfg, lk, tee1, md1img, scp1, preloader).
Power off the Gemini PDA completely and keep it unplugged. Run the backup command, then plug the USB-C cable into the left USB-C port (closest to the Esc side) while the device is powered off to enter MediaTek BROM/Preloader mode:
./flash-mtk.sh --only-backup
Backups are saved under backup/<timestamp>/ together with pgpt.bin and sgpt.bin.
Next, extract the device-owned proprietary MediaTek firmware blobs (MT6797 Wi-Fi, Bluetooth, SPM, and MD1 radio images, which are never redistributed in git) either directly from the Gemini's existing Android system partition or from a local system.img:
# From a connected Gemini in BROM mode:
./flash-mtk.sh --extract-firmware
# Or from a local stock Android system image:
./flash-mtk.sh --extract-firmware --system-img /path/to/system.img
Extracted blobs are placed in firmware-cache/mt6797/ and automatically injected into /lib/firmware/mediatek/mt6797/ the next time ./rebuild-image.sh runs. Re-run ./rebuild-image.sh after extracting firmware so geminux-rootfs.img includes the blobs:
./rebuild-image.sh
Step 3: Flash full eMMC with Geminux
Geminux claims the entire user-writable eMMC past the protected MediaTek region (LBA 0x70000, byte offset 0x0E000000, SYS0..SYS27), removing Android system, cache, and userdata in favor of boot, recovery, boot2, and a single full-disk linux ext4 partition:
./flash-mtk.sh --flash-full
What --flash-full does automatically (implemented in flash-mtk.py and scripts/geminux_gpt.py):
- Takes an initial backup into
backup/<timestamp>/(or pass--skip-backup --backup-dir backup/<timestamp>on subsequent reflashes to reuse an existing backup). - Verifies the protected factory partition layout before
0x0E000000(pass --force-gptonly if intentionally converting a non-standard partition table). - Writes updated Primary GPT (
LBA 0..33) and Backup GPT with a mandatory readback verification check. - Writes
boot-geminux.imgtobootandboot2,recovery-geminux.imgtorecovery(with readback verification), andgeminux-rootfs.imgtolinux, then sends the DA reboot handshake (--rebootdefault,--poweroffto stay powered off, or--no-rebootto remain in DA mode).
To update only the kernel and initramfs later without touching GPT or the root filesystem:
./flash-mtk.sh --flash-kernel-only
To restore a previous backup:
./flash-mtk.sh --restore-backup backup/<timestamp>
First boot and recovery notes
- Disconnect the USB-C cable and hold the Esc (power) button until the unit boots.
- On first boot, the initramfs automatically expands the ext4 filesystem (
resize2fs) to fill the entirelinuxpartition before pivoting to OpenRC. - TinyDM automatically logs into XLibre + DWM as
user(UID10000, default passwordgeminux, SSH authorized key installed fromkeys/geminux_id_ed25519.pubif generated). Change theuserandrootpasswords immediately withpasswd. - Connecting a host PC over USB-C starts the
usb0NCM Ethernet gadget on172.16.42.1/24for rescue SSH access.
Live Gemini PDA x27 hardware validation checklist
Perform these checks on physical hardware after the first boot:
- Confirm
uname -rreports7.3.5-geminuxandlsmodshowsmediatek_drm,panfrost,mt6797_ccci_cldma,mt6797_wlan_core, andbtmt6797. - Verify touch input (
novatek-nt36xxx) and physical keyboard mappings (Fn+1..0 = F1..F10,Fn+Alt = Mod4, Planet key). - Confirm Glamor 3D acceleration via
glxinfo | grep -i renderer. - Test Wi-Fi connectivity via
geminux-netornmcli, Bluetooth viageminux-net, and audio playback/recording (speaker, 3.5mm jack, internal mic). - With MD1 firmware extracted, verify
/dev/ccci_md_ctl,/dev/ttyC0, andccmni*registration for LTE data, voice calls (geminux-dialer), and SMS (geminux-sms). - Test front camera preview/JPEG/AVI capture (
geminux-camera), external HDMI output (SiI9024), lid-close S3 suspend, andgeminux-power-audit.