Stock firmware
No public GPL kernel source exists for the XP8800, so the stock firmware is the primary reference for facts about the hardware. A full EDL dump has all the necessary data. With it, you can extract the device tree, the kernel configuration, the vendor userspace, and the proprietary firmware blobs.
WARNING: KEEP THE EXTRACTED VENDOR TREE AND FIRMWARE BLOBS PRIVATE. THEY CONTAIN DATA FOR EACH UNIT AND SONIM-PROPRIETARY CODE THAT HAS NO REDISTRIBUTION LICENSE.
What to extract
| Source partition | What it yields |
|---|---|
boot_a |
Stock Android boot header, gzip kernel, and appended DTB catalog (the XP8 tree is dtb_101.dtb) |
system_a |
The Android system-as-root image, which includes /system/vendor/firmware (for example a508_zap.*) |
oem_a |
On stock, only the root listing (lost+found) |
modem_a |
FAT16: mba.mbn, modem.mdt + segments, wlanmdsp.mbn, 26 bdwlan.* candidates, ADSP and Venus headers/segments |
dsp_a |
ext4 ADSP runtime modules |
bluetooth_a |
FAT16: crbtfw21.tlv, crnv21.bin |
modemst1/2, fsg, fsc, persist |
NV data for each unit. Make a backup. Do not share or change it. |
Extracting the device tree
-
Decompress the kernel from
boot_a. -
Read the stream after the gzip kernel to find the DTB catalog (12 DTBs on this platform).
-
Find the XP8800 tree (
dtb_101.dtb, SHA-2561a2dced5ec5f26a89d6d46105807435ae2d75e9b94a81007ed3868af08fb2e1e). -
Decompile the tree:
Terminal window dtc -I dtb -O dts dtb_101.dtb -o stock_xp8.dts
The decompiled tree is the source of truth for these items:
- Panel timings and DCS sequences
- Touch pins
- Key GPIOs
- Regulator topology
- Memory reservations
- Legacy pin-muxing names
Recovering the kernel configuration
If the stock kernel has IKCONFIG (CONFIG_IKCONFIG and CONFIG_IKCONFIG_PROC), the configuration is in the kernel. On the reference kernel, the configuration came from the decompressed image. It shows the options that the vendor selected, for example:
| Option | Meaning |
|---|---|
CONFIG_FB_MSM |
Legacy MSM framebuffer |
CONFIG_KEYBOARD_GPIO |
GPIO keys |
CONFIG_MMC_SDHCI_MSM |
Qualcomm SDHCI storage |
CONFIG_USB_DWC3 |
USB device controller |
CONFIG_ICNSS |
Integrated connectivity (WLAN/BT) |
CONFIG_MSM_PIL |
Peripheral image loader (remoteproc) |
CONFIG_BPF_SYSCALL (disabled) |
No eBPF. The vendor selected this option. |
Extracting the vendor userspace
The system-as-root image has an ext filesystem. It contains the vendor files, which include /vendor/etc/camera/camera_config.xml, /vendor/etc/sensors/sensor_def_sonim.conf, mixer paths, and the sensor and WLAN libraries. Extract it as read-only, for example with debugfs rdump. Keep the result private.
Generating a panel driver
linux-mdss-dsi-panel-driver-generator can change the panel node of the stock DTB into a Linux DRM panel driver:
linux-mdss-dsi-panel-driver-generator dtb_101.dtb -r vddio -r lab -r ibbThe generated driver has the same timings, reset sequence, and DCS command tables as the stock tree. But it is a draft. Correct these items in it:
height_mm(the stock property name has a spelling error and gives 0)- The zero arguments that the panel does not need on sleep-out and display-on
- The compatible string
- The supply and reset-GPIO references
Staging the Linux firmware blobs
You can put the proprietary blobs in a filesystem layout that the mainline drivers use, for example:
| Component | Candidate path |
|---|---|
| Adreno 508 | lib/firmware/qcom/a508_zap.mdt + .b00–.b02 |
| Modem | lib/firmware/qcom/sdm630/Sonim/xp8/{mba.mbn,modem.mdt,modem.b*} |
| ADSP | lib/firmware/qcom/sdm630/Sonim/xp8/{adsp.mdt,adsp.b00–b21} |
| Bluetooth | lib/firmware/qca/{crbtfw21.tlv,crnv21.bin} |
| Venus | lib/firmware/qcom/venus-4.4/{venus.mdt,venus.b00–b04} |
| WLAN DSP | lib/firmware/qcom/sdm630/Sonim/xp8/wlanmdsp.mbn |
| Wi-Fi board data | One of the 26 bdwlan.* candidates (no selection made) |
The project selected the Sonim directory name. The firmware-name properties must use the same name. Compare each MDT with the sizes of its segments.
Blob verification
Before you use a blob or tool from the network, compare its SHA-256 with a recorded manifest. Keep a trust ledger. In it, write what you checked, how you checked it, and when. See Reverse-engineering notes.