Existing SM7150 device packages removed in favour of generic package

March 09, 20251 min. read

Summary

The device packages for the Xiaomi SM7150 devices in the community category (xiaomi-davinci and xiaomi-surya) have been removed in favor of a generic device package. Migration requires manual intervention and, in most cases, a reinstall from scratch. This is due to the switch to U-Boot as a second stage bootloader and a new partition scheme.

Details

In the past, these devices had device-specific packages that defined which devicetree blob would be appended to the kernel and included firmware specific to the device, necessitating the packaging of firmware and device package for every supported device.

Support for Qualcomm chipsets and devices in U-Boot has been rapidly improving, to the point where it is now possible to build and boot U-Boot for SM7150 devices with very few patches.

The switch to U-Boot as the bootloader for postmarketOS comes with several advantages. Most importantly, U-Boot comes with an EFI implementation that lets us boot the Linux kernel with systemd-boot and have U-Boot pick the correct devicetree blob instead of appending it to the kernel.

This means that as long as a device is supported by the SM7150 Linux kernel fork and U-Boot, it can boot postmarketOS with no changes needed in postmarketOS!

Thanks to recent changes in msm-firmware-loader, these devices can now load their firmware from the Android partitions and don't require it to be packaged anymore.

This requires some major changes to the partition layout. A default install of postmarketOS as found in the prebuilt edge images for these devices currently looks something like this:

Going forward, it will look as follows:

These two partition setups are entirely incompatible with each other and there is no way to migrate from one to the other without performing a backup and performing a fresh install.

See the pmaports merge request for the new device package for further details.

Performing a fresh install

The steps for performing a new install of a supported SM7150 device can be found in the Wiki.

If you ran into issues or have any questions, feel free to ask in the postmarketOS chatrooms or the #sm7150-mainline chat on Matrix or OFTC.