device-xiaomi-gemini: new device (MR 2367)

Signed-off-by: Raffaele Tranquillini <raffaele.tranquillini@gmail.com>
This commit is contained in:
Raffaele Tranquillini 2021-07-19 23:22:30 +02:00 committed by Dylan Van Assche
parent c043ffaaa7
commit 76d9c1eda0
No known key found for this signature in database
GPG key ID: 8642571587897EA1
6 changed files with 136 additions and 0 deletions

View file

@ -0,0 +1,61 @@
# Maintainer: Raffaele Tranquillini (cunidev) <raffaele.tranquillini@gmail.com>
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-xiaomi-gemini
pkgdesc="Xiaomi Mi 5"
pkgver=1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="
linux-postmarketos-qcom-msm8996
mkbootimg
postmarketos-base
soc-qcom-msm8996
soc-qcom-msm8996-ucm
"
makedepends="devicepkg-dev"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware $pkgname-phosh"
source="
deviceinfo
pointercal
rootston.ini
"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
install -D -m644 "$srcdir"/pointercal \
"$pkgdir"/etc/pointercal
}
nonfree_firmware() {
pkgdesc="GPU/Modem/Venus/ADSP/SLPI/WiFi/Bluetooth Firmware"
depends="
firmware-xiaomi-gemini
linux-firmware-ath10k
linux-firmware-qca
soc-qcom-msm8996-nonfree-firmware
"
mkdir "$subpkgdir"
}
phosh() {
install_if="$pkgname=$pkgver-r$pkgrel phosh"
install -Dm644 "$srcdir"/rootston.ini \
"$subpkgdir"/etc/phosh/rootston.ini
}
sha512sums="
dc47aa32e6a77f55ed174721e99f591488e71e3e17cb8b592c2d973cb5788c6add44efe04b8bc984d677008a38af69ed238a91ed9cad1e830d0fc4ecfe3b24d0 deviceinfo
e9ee9c1404b41ba15eafff3f728ff6e0e78dc17e9a88483fca92db1aa3efe0e4d5bf26142e533c4ff12b1bf8ce04ccabb7ca0f93aaea586d5b30910282aad237 pointercal
035f97e328ff9f976b082e66b97f76036cdee9825f3022471c7c5d371291cc4b5bd5c18196cd49f4cd9ad6390abe691b506de3b221e3c122433d5620e3b3c4c9 rootston.ini
"

View file

@ -0,0 +1,34 @@
# 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 Mi 5"
deviceinfo_manufacturer="Xiaomi"
deviceinfo_codename="xiaomi-gemini"
deviceinfo_year="2016"
deviceinfo_dtb="qcom/msm8996-xiaomi-gemini"
deviceinfo_append_dtb="true"
deviceinfo_modules_initfs="qcom_fg"
deviceinfo_arch="aarch64"
# Device related
deviceinfo_chassis="handset"
deviceinfo_keyboard="false"
deviceinfo_external_storage="false"
deviceinfo_screen_width="1080"
deviceinfo_screen_height="1920"
deviceinfo_rootfs_image_sector_size="4096"
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_kernel_cmdline="PMOS_NO_OUTPUT_REDIRECT"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="false"
deviceinfo_bootimg_dtb_second="false"
deviceinfo_flash_offset_base="0x80000000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x01000000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x00000100"
deviceinfo_flash_pagesize="4096"
deviceinfo_flash_sparse="true"

View file

@ -0,0 +1 @@
38332 -97 -1987162 -902 117510 2078835 65536 1080 1920 0

View file

@ -0,0 +1,5 @@
# /etc/phosh/rootston.ini
# Overwrites values set in /usr/share/phosh/phoc.ini
[output:DSI-1]
scale = 2.5

View file

@ -0,0 +1,29 @@
# Maintainer: Raffaele Tranquillini (cunidev) <raffaele.tranquillini@gmail.com>
pkgname=firmware-xiaomi-gemini
pkgver=1
pkgrel=0
pkgdesc="Firmware for Xiaomi Mi 5"
url="https://gitlab.com/cunidev/firmware-xiaomi-gemini"
arch="aarch64"
license="proprietary"
options="!strip !check !archcheck"
_commit="07917ca1673f124413897d94f5660a8a379209b3"
source="
$pkgname.tar.gz::$url/-/archive/$_commit/$pkgname-$_commit.tar.gz
firmware.files
"
package() {
cd "$srcdir/$pkgname-$_commit/"
while IFS="" read -r _i || [ -n "$_i" ]; do
[ ! -d $(dirname $_i) ] && mkdir -p $(dirname $_i)
echo $_i
install -Dm644 $_i "$pkgdir/$_i"
done < "$srcdir/firmware.files"
}
sha512sums="
051cbce79879f47f653062801bc67987304382427edac0ca400ec269c49269cf21f36c49ebd7d6f67259b6c5dea7e44e9025146974e1ff9a7ffbad8a08941397 firmware-xiaomi-gemini.tar.gz
84df460f39bcdbf26c3a081e0bb8ecbd3d3e812ee634306c7d87304b0f05eae63eb11718164b798768b47490136a2943de461e3e35df25423da48fe90954e1bb firmware.files
"

View file

@ -0,0 +1,6 @@
./lib/firmware/qcom/msm8996/gemini/a530_zap.mbn
./lib/firmware/qcom/msm8996/gemini/adsp.mbn
./lib/firmware/qcom/msm8996/gemini/mba.mbn
./lib/firmware/qcom/msm8996/gemini/modem.mbn
./lib/firmware/qcom/msm8996/gemini/slpi.mbn
./lib/firmware/qcom/msm8996/gemini/venus.mbn