Qualcomm SDM845 (qualcomm-sdm845)
| Manufacturer | Qualcomm |
|---|---|
| Name | SDM845 Device |
| Codename | qcom-sdm845 |
| Released | 2018 |
| Type | generic |
| Hardware | |
| Chipset | Qualcomm Snapdragon 845 (SDM845) |
| CPU |
Octa-core (4x 2.8 GHz Kryo 385 Gold 4x 1.7 GHz Kryo 385 Silver) |
| GPU | Adreno 630 |
| Display | 1080 x 2280 AMOLED |
| Storage | 64/128/256 GB |
| Memory | 4/6/8 GB |
| Architecture | aarch64 |
| Software | |
Original software The software and version the device was shipped with. |
Android 8.0 |
Extended version The most recent supported version from the manufacturer. |
Android 13 on Linux 4.9 |
| FOSS bootloader | partial |
| postmarketOS | |
| Category | testing |
Mainline Instead of a Linux kernel fork, it is possible to run (Close to) Mainline. |
yes |
pmOS kernel The kernel version that runs on the device's port. |
Mainline |
Unixbench score Unixbench Whetstone/Dhrystone score. See Unixbench. |
6029.9 |
| Device package |
|
| Kernel package |
|
Flashing Whether it is possible to flash the device with pmbootstrap flasher. |
Works
|
|---|---|
USB Networking After connecting the device with USB to your PC, you can connect to it via telnet (initramfs) or SSH (booted system). |
Works
|
Battery Whether charging and battery level reporting work. |
Works
|
Screen Whether the display works; ideally with sleep mode and brightness control. |
Works
|
Touchscreen |
Works
|
| Multimedia | |
3D Acceleration |
Works
|
Audio Audio playback, microphone, headset and buttons. |
Works
|
Camera |
Broken
|
| Connectivity | |
WiFi |
Works
|
Bluetooth |
Works
|
GPS |
Partial
|
NFC Near Field Communication |
Broken
|
| Modem | |
Calls |
Works
|
SMS |
Works
|
Mobile data |
Works
|
| Miscellaneous | |
FDE Full disk encryption and unlocking with unl0kr. |
Works
|
USB OTG USB On-The-Go or USB-C Role switching. |
Partial
|
| Sensors | |
Accelerometer Handles automatic screen rotation in many interfaces. |
Broken
|
Haptics |
Works
|
Primary Bootloader Whether it is possible to replace stock bootloader with U-Boot. |
Broken
|
|---|---|
Secondary Bootloader Whether it is possible to chainload U-Boot from stock bootloader. |
Works
|
Mainline Whether latest upstream versions of U-Boot are not broken and it is possible to use them. |
Partial
|
Internal Storage Whether it is possible to boot from internal storage (e.g. eMMC or UFS). |
Works
|
SD card Whether it is possible to boot from SD card. |
Works
|
USB Host Whether it is possible to boot from a USB storage or connect a keyboard. |
Partial
|
USB Peripheral Whether it is possible to use device as a peripheral in U-Boot, e.g. for fastboot mode. |
Works
|
Display |
Works
|
Keyboard |
Works
|
Buttons Whether it is possible to navigate in boot menu or grub with volume and power buttons. |
Works
|
| This device is based on the Snapdragon 845. See the SoC page for common tips, guides and troubleshooting steps |
| WARNING: Support for booting these devices using U-Boot and UEFI is still a work in progress and implementation details are subject to change, be careful if you plan on tinkering with this. |
Some SDM845 devices in the Community category are supported by a new generic device target where U-Boot is used as an intermediary bootloader to provide a standard UEFI environment and allow for bootloaders like systemd-boot to be used. This makes for nicer multi-booting, the potential to revert to previous kernels if an upgrade causes regressions, and a whole myriad of other benefits.
Supported Devices
| Device | Codename | Category |
|---|---|---|
| OnePlus 6 | oneplus-enchilada | community |
| OnePlus 6T | oneplus-fajita | community |
| Samsung Galaxy S9 | samsung-starqltechn | community |
| SHIFT SHIFT6mq | shift-axolotl | community |
| Xiaomi Pocophone F1 / POCO F1 | xiaomi-beryllium | community |
Installing
Follow the standard installation guide, choose qualcomm-sdm845 as the device codename.
Flashing
Follow the instructions on the wiki page for you device to enter fastboot mode.
Installing U-Boot
U-Boot is flashed to the boot partition, tricking ABL into thinking that it's running a Linux kernel, as well as letting ABL populate some useful properties in the devicetree.
Initial U-Boot binaries can be found in the Tauchgang pipeline artifacts. The older archived binaries can be found at sdm845-mainline and at Linaro for even older ones.
Download the one corresponding to your device (see the table at the top of this page), PocoPhone F1 users, see the device wiki page to determine the display variant.
How to handle upgrading U-Boot is still undecided.
Having flashed postmarketOS, you can now flash U-Boot and reboot into your new installation as follows (replacing $CODENAME) with your device codename.
fastboot erase dtbo flash boot u-boot-$CODENAME.img reboot
Interacting with U-Boot
The U-Boot build includes some nice-to-haves for mobile users, by default it will boot the first EFI binary it can find (which will be our systemd-boot usually), however by pressing the power button at the autoboot prompt you can access a boot menu with some additional utilities.
Boot first available device
This will boot into postmarketOS.
Enable USB mass storage
| U-Boot support for the 4K block size used by UFS storage was added upstream in the v2024.07 release |
This will expose the entirety of the devices internal storage to your PC via USB. Be EXTREMELY careful not to overwrite the partition table as it's extremely easy to brick your device this way (although usually it's possible to recovery using EDL mode tools).
This is also super useful to retrieve logs from a device that won't boot, to fix booting by editing some config file, or whatever else you might want to do.
While no instances of data corruption have been reported or observed, it's certainly within the realm of possibility.
Enable fastboot mode
The fastboot implementation in U-Boot doesn't currently support SCSI/UFS storage, and many other features aren't working properly. There isn't much useful stuff to do here for now.
Enable serial console gadget
The console gadget will expose a serial port to your PC from which you can access the U-Boot console, this is helpful for poking around U-Boot if you don't have access to the real serial port on your device.
Background info
There is a major difference between this generic support compared to how these devices run mainline currently. By running U-Boot, we get rid of almost all of the Android specific quirks. We run a normal UEFI bootloader (systemd-boot), and really the only odd part is the lack of a keyboard.
The requirements for a nice UEFI experience are pretty simple, we need a UEFI capable bootloader like U-Boot, and an EFI System Partition (ESP) on the device. The ESP is a special partition which the bootloader can read, systemd-boot is installed as /EFI/BOOT/BOOTAA64.efi, this well-known path is checked by U-Boot which will then run the EFI binary. The ESP also contains the kernel, initramfs, DTBs, and any bootloader configuration.
See also
- OnePlus 6 (oneplus-enchilada)/Dual Booting and Custom Partitioning - Guide to dual boot pm boot with other uefi based os
- pmaports!4599 - MR to pmaports adding Generic SDM845 device support