oneplus-lemonade: new device (MR 2459)

[ci:skip-build]: Already built successfully in MR CI.
This commit is contained in:
Robbbbbb 2022-01-19 12:29:49 +00:00 committed by Newbyte
parent 0a36f367bd
commit 40109e3e75
No known key found for this signature in database
GPG key ID: 5873C171C9429CFA
5 changed files with 146 additions and 0 deletions

View file

@ -0,0 +1,56 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-oneplus-lemonade
pkgdesc="OnePlus 9 & 9 Pro"
pkgver=0.1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="
linux-postmarketos-qcom-sm8350
mesa-dri-gallium
mkbootimg
postmarketos-base
soc-qcom-sm8350
"
makedepends="
devicepkg-dev
dtc
android-mkdtimg
"
source="
deviceinfo
empty-oneplus-lemonade.dts
empty-oneplus-lemonadep.dts
"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
build() {
devicepkg_build $startdir $pkgname
dtc -O dtb -o "$srcdir/empty-oneplus-lemonade.dtbo" -b 0 -@ \
"$srcdir/empty-oneplus-lemonade.dts"
dtc -O dtb -o "$srcdir/empty-oneplus-lemonadep.dtbo" -b 0 -@ \
"$srcdir/empty-oneplus-lemonadep.dts"
mkdtimg create "$srcdir/dtbo.img" --page_size=4096 \
"$srcdir/empty-oneplus-lemonade.dtbo" \
"$srcdir/empty-oneplus-lemonadep.dtbo"
}
package() {
devicepkg_package $startdir $pkgname
install -Dm644 "$srcdir/dtbo.img" "$pkgdir/boot/dtbo.img"
}
nonfree_firmware() {
pkgdesc="Modem, WiFi, and GPU Firmware"
depends="firmware-oneplus-lemonade"
mkdir "$subpkgdir"
}
sha512sums="
bcd014961747e5ce2d09a2c69af5b80067c0b500f788d519594f548a85de61f96d7555a107d65ba3746ba69ecf1f160409f5110a33c1f10c75604a7d50df3a49 deviceinfo
cf3bde87540de9a94d253ab211ca9d6ca426e062237db3ab6ec5dfcdb35c161fdfc22837ca696dd27ee5a371157186a5e65b8de33dcc69ce49b7a9584fdce51c empty-oneplus-lemonade.dts
cd5d0daff0f156c6f8e2b987a84199cf6d6cd4190b4e91f81465230d9a39f8dba6e25b1aa995b9da829ba940fcf25c43f5c32ae0c041f16901e343dabcf332b8 empty-oneplus-lemonadep.dts
"

View file

@ -0,0 +1,39 @@
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell
# scripts.
deviceinfo_format_version="0"
deviceinfo_name="OnePlus 9"
deviceinfo_manufacturer="OnePlus"
deviceinfo_codename="oneplus-lemonade"
deviceinfo_year="2021"
deviceinfo_dtb="qcom/sm8350-oneplus-lemonade"
deviceinfo_arch="aarch64"
# Device related
deviceinfo_chassis="handset"
deviceinfo_keyboard="false"
deviceinfo_external_storage="false"
deviceinfo_screen_width="1080"
deviceinfo_screen_height="2400"
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_kernel_cmdline="rd.rootfs=super:4096 fw_devlink=permissive clk_ignore_unused PMOS_NO_OUTPUT_REDIRECT"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_custom_args="--header_version 2 --dtb_offset 0x0000000001f00000 --dtb /usr/share/dtb/qcom/sm8350-oneplus-lemonade.dtb"
deviceinfo_bootimg_qcdt="false"
deviceinfo_bootimg_mtk_mkimage="false"
deviceinfo_bootimg_dtb_second="false"
deviceinfo_flash_pagesize="4096"
deviceinfo_flash_sparse="true"
deviceinfo_flash_fastboot_partition_vbmeta="vbmeta"
deviceinfo_flash_fastboot_partition_dtbo="dtbo"
deviceinfo_flash_fastboot_partition_system="super"
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_rootfs_image_sector_size="4096"
deviceinfo_append_dtb="false"

View file

@ -0,0 +1,15 @@
/dts-v1/;
/plugin/;
/ {
model = "Qualcomm Technologies, Inc. Lahaina MTP lemonade";
compatible = "qcom,lahaina-mtp", "qcom,lahaina", "qcom,mtp";
qcom,board-id = <0x10008 0>;
oem,project-id = <0x19825>;
oem,project-codename = "lemonade";
oem,hw-id = <11 12 13 21 22 23 31 32 33>;
};
&apps_rsc {
compatible = "qcom,rpmh-rsc";
};

View file

@ -0,0 +1,15 @@
/dts-v1/;
/plugin/;
/ {
model = "Qualcomm Technologies, Inc. Lahaina MTP lemonadep";
compatible = "qcom,lahaina-mtp", "qcom,lahaina", "qcom,mtp";
qcom,board-id = <0x10008 0>;
oem,project-id = <0x19815 0x2085A>;
oem,project-codename = "lemonadep","lemonadept","lemonadepv";
oem,hw-id = <12 13 21 22 23 31 32 33>;
};
&apps_rsc {
compatible = "qcom,rpmh-rsc";
};

View file

@ -0,0 +1,21 @@
pkgname=firmware-oneplus-lemonade
pkgver=1
pkgrel=0
_commit="558e673e1b7e3adcccc1c94b296c4ee1d38927b9"
pkgdesc="Firmware files for oneplus lemonade"
url="https://gitlab.com/Robbbbbb/firmware-oneplus-lemonade"
arch="aarch64"
license="proprietary"
source="$pkgname-$_commit.tar.gz::$url/-/archive/$_commit/firmware-oneplus-lemonade.tar.gz"
options="!check !strip !archcheck !spdx !tracedeps pmb:cross-native"
builddir="$srcdir/firmware-oneplus-lemonade-$_commit"
package() {
_files="adsp.mbn cdsp.mbn ipa_fws.mbn modem.mbn slpi.mbn"
for _i in $_files; do
install -Dm644 "$_i" "$pkgdir/lib/firmware/postmarketos/$_i"
done
}
sha512sums="
783ff1cd824cc1d72329b2daf3b773c790263c88f2726837ffff0c340998f023f9e3b8f26829fef3a930dff79e7f8ddb53ebe6f23bd4864040c22d0ded98a760 firmware-oneplus-lemonade-558e673e1b7e3adcccc1c94b296c4ee1d38927b9.tar.gz
"