xiaomi-miatoll: new device (MR 5177)

Add support for the Xiaomi Miatoll phones. There are currently two
device trees in the upstream kernel.

Signed-off-by: David Wronek <david@mainlining.org>
This commit is contained in:
David Wronek 2024-05-26 15:21:54 +02:00 committed by Robert Eckelmann
parent 9c22892b09
commit e65dc71f05
No known key found for this signature in database
GPG key ID: 30C0D50BEF63BF54
2 changed files with 92 additions and 0 deletions

View file

@ -0,0 +1,47 @@
# Reference: <https://postmarketos.org/devicepkg>
# Maintainer: David Wronek <david@mainlining.org>
pkgname=device-xiaomi-miatoll
pkgdesc="Xiaomi Redmi Note 9 Pro / Redmi Note 9S"
pkgver=1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="
make-dynpart-mappings
mkbootimg
postmarketos-base
swclock-offset
"
makedepends="devicepkg-dev"
source="deviceinfo"
subpackages="
$pkgname-kernel-curtana:kernel_curtana
$pkgname-kernel-joyeuse:kernel_joyeuse
"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
kernel_curtana() {
pkgdesc="Xiaomi Redmi Note 9S. To know which model you have, visit https://wiki.postmarketos.org/wiki/Xiaomi-miatoll-variants"
depends="linux-postmarketos-qcom-sm7125"
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}
kernel_joyeuse() {
pkgdesc="Xiaomi Redmi Note 9 Pro (Global). To know which model you have, visit https://wiki.postmarketos.org/wiki/Xiaomi-miatoll-variants"
depends="linux-postmarketos-qcom-sm7125"
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}
sha512sums="
8127f706f04c9e57902c3287ef088441fa3efd3d922805ef4957897f4b193e6c1b022b933834684b3db3d0d9739769dcb5084a556ef3cda77e80e8443401bccf deviceinfo
"

View file

@ -0,0 +1,45 @@
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell
# scripts.
deviceinfo_format_version="0"
deviceinfo_name="Xiaomi Redmi Note 9 Pro / Redmi Note 9S"
deviceinfo_manufacturer="Xiaomi"
deviceinfo_codename="xiaomi-miatoll"
deviceinfo_year="2020"
deviceinfo_arch="aarch64"
deviceinfo_flash_kernel_on_update="true"
# Device related
deviceinfo_gpu_accelerated="true"
deviceinfo_chassis="handset"
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="1080"
deviceinfo_screen_height="2400"
# Kernel options
deviceinfo_dtb_curtana="qcom/sm7125-xiaomi-curtana"
deviceinfo_dtb_joyeuse="qcom/sm7125-xiaomi-joyeuse"
deviceinfo_append_dtb="true"
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_kernel_cmdline="console=null"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="false"
deviceinfo_bootimg_mtk_mkimage="false"
deviceinfo_bootimg_dtb_second="false"
deviceinfo_flash_offset_base="0x00000000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x01000000"
deviceinfo_flash_offset_second="0x00000000"
deviceinfo_flash_offset_tags="0x00000100"
deviceinfo_flash_pagesize="4096"
deviceinfo_flash_sparse="true"
# Required for devices using UFS as storage (instead of e.g. eMMC)
deviceinfo_rootfs_image_sector_size="4096"
# Support super partition flashing
deviceinfo_super_partitions="/dev/sda17"