realme-porsche: new device (Realme GT 2) (MR 4425)

[ci:skip-build]: already built successfully in CI
This commit is contained in:
saikat 2023-09-29 03:09:48 +05:30 committed by Stefan Hansson
parent 23d54f5ee4
commit edc8e01dc7
No known key found for this signature in database
GPG key ID: 8A700086A9FE41FD
7 changed files with 9178 additions and 0 deletions

View file

@ -0,0 +1,46 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-realme-porsche
pkgdesc="Realme GT 2"
pkgver=1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="
firmware-realme-porsche
linux-firmware-ath11k
linux-realme-porsche
mkbootimg
postmarketos-base
soc-qcom-sm8350
"
makedepends="
devicepkg-dev
dtc
android-tools
"
source="
deviceinfo
empty-realme-porsche.dts
"
build() {
devicepkg_build $startdir $pkgname
dtc -O dtb -o "$srcdir/empty-realme-porsche.dtbo" -b 0 -@ \
"$srcdir/empty-realme-porsche.dts"
mkdtboimg create "$srcdir/dtbo.img" --page_size=4096 \
"$srcdir/empty-realme-porsche.dtbo"
}
package() {
devicepkg_package $startdir $pkgname
install -Dm644 "$srcdir/dtbo.img" "$pkgdir/boot/dtbo.img"
}
sha512sums="
411a59509ffb217969e03f19053192270b305858fcfb1e66722bf712829c27ebad41c173de390b00d587d3e951b4559cd63b932d4bce1b692eba4832cbaae6f8 deviceinfo
bbc201f65ee01de96ecedc856e7a9aebfb0e421daa2f25a7eb57f61ac9bd7412caefb9f68ac572dfd26f0d1f9752c4033291694f51c4cb5162d7c767beb8a152 empty-realme-porsche.dts
"

View file

@ -0,0 +1,40 @@
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell
# scripts.
deviceinfo_format_version="0"
deviceinfo_name="Realme GT 2"
deviceinfo_manufacturer="Realme"
deviceinfo_codename="realme-porsche"
deviceinfo_year="2021"
deviceinfo_dtb="qcom/sm8350-realme-porsche"
deviceinfo_append_dtb="true"
deviceinfo_arch="aarch64"
# Device related
deviceinfo_chassis="handset"
deviceinfo_keyboard="false"
deviceinfo_gpu_accelerated="true"
deviceinfo_external_storage="false"
deviceinfo_screen_width="1080"
deviceinfo_screen_height="2400"
# Bootloader related
deviceinfo_header_version="2"
deviceinfo_flash_method="fastboot"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="false"
deviceinfo_bootimg_dtb_second="false"
deviceinfo_flash_sparse="true"
deviceinfo_flash_pagesize="4096"
deviceinfo_kernel_cmdline="clk_ignore_unused PMOS_NO_OUTPUT_REDIRECT"
deviceinfo_flash_offset_base="0x00000000"
deviceinfo_flash_offset_dtb="0x01f00000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x01000000"
deviceinfo_flash_offset_second="0x00000000"
deviceinfo_flash_offset_tags="0x00000100"
deviceinfo_flash_fastboot_partition_vbmeta="vbmeta"
deviceinfo_flash_fastboot_partition_dtbo="dtbo"
deviceinfo_flash_fastboot_partition_system="super"
deviceinfo_rootfs_image_sector_size="4096"

View file

@ -0,0 +1,25 @@
/dts-v1/;
/plugin/;
/ {
// if board-id 10008
model = "Qualcomm Technologies, Inc. Lahaina MTP";
// if board-id 20108
//model = "Qualcomm Technologies, Inc. Lahaina MTP v2.1";
// compatible is common for all board-id
compatible = "qcom,lahaina-mtp", "qcom,lahaina", "qcom,mtp";
qcom,board-id = <0x10008 0>;
//qcom,board-id = <0x20108 0>;
oppo,dtsi_no = <0x5093>;
oplus,dtsi_no = <21617>;
__fixups__{};
};
&apps_rsc {
compatible = "qcom,rpmh-rsc";
};

View file

@ -0,0 +1,27 @@
pkgname=firmware-realme-porsche
pkgver=1
pkgrel=0
pkgdesc="Firmware for Realme GT 2 (porsche)"
url="https://github.com/Saikatsaha1996/firmware-realme-porsche"
_repository="firmware-realme-porsche"
_commit="7774d27505c22c44d4344ce6b5747bb33fa57af4"
arch="aarch64"
license="proprietary"
options="!check !strip !archcheck !spdx !tracedeps pmb:cross-native"
source="$pkgname-$_commit.tar.gz::https://github.com/Saikatsaha1996/$_repository/archive/$_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="
1de757b703610319d343dfe138e224bff1feba3c3109b43c516575acb4795cab04f701ef838bb10bb7241b0a2f63a2a9d7bd34fb78e5adbf96bea4cafe1f6479 firmware-realme-porsche-7774d27505c22c44d4344ce6b5747bb33fa57af4.tar.gz
65a1dd20da92e599c83ea9b233b287ebd801d7ab669e176caec6d08bf4cbd1169710bf416718a876c5b07e70c0dc722fbf54e6aaf60b2d88a0709283ed22978e firmware.files
"

View file

@ -0,0 +1,46 @@
./lib/firmware/qcom/a660_gmu.bin
./lib/firmware/qcom/a660_sqe.fw
./lib/firmware/qcom/a660_zap.mbn
./lib/firmware/qcom/sm8350/porsche/FW_FT3658U_SAMSUNG.img
./lib/firmware/qcom/sm8350/porsche/FW_FT3658U_SAMSUNG_FAE.img
./lib/firmware/qcom/sm8350/porsche/LIMIT_FT3658U_SAMSUNG.img
./lib/firmware/qcom/sm8350/porsche/adsp.mbn
./lib/firmware/qcom/sm8350/porsche/adspr.jsn
./lib/firmware/qcom/sm8350/porsche/adspua.jsn
./lib/firmware/qcom/sm8350/porsche/amss.bin
./lib/firmware/qcom/sm8350/porsche/amss20.bin
./lib/firmware/qcom/sm8350/porsche/bdwlang.elf
./lib/firmware/qcom/sm8350/porsche/bdwlanw.elf
./lib/firmware/qcom/sm8350/porsche/cdsp.mbn
./lib/firmware/qcom/sm8350/porsche/cdspr.jsn
./lib/firmware/qcom/sm8350/porsche/hdcp1.mbn
./lib/firmware/qcom/sm8350/porsche/hdcp2p2.mbn
./lib/firmware/qcom/sm8350/porsche/hdcpsrm.mbn
./lib/firmware/qcom/sm8350/porsche/ipa_fws.mbn
./lib/firmware/qcom/sm8350/porsche/m3.bin
./lib/firmware/qcom/sm8350/porsche/modem.mbn
./lib/firmware/qcom/sm8350/porsche/mbn_hw.dig
./lib/firmware/qcom/sm8350/porsche/mbn_sw.dig
./lib/firmware/qcom/sm8350/porsche/modemr.jsn
./lib/firmware/qcom/sm8350/porsche/mcfg_hw.mbn
./lib/firmware/qcom/sm8350/porsche/mcfg_sw.mbn
./lib/firmware/qcom/sm8350/porsche/mdcompress.mbn
./lib/firmware/qcom/sm8350/porsche/mldapta.mbn
./lib/firmware/qcom/sm8350/porsche/qdsp6m.qdb
./lib/firmware/qcom/sm8350/porsche/regdb.bin
./lib/firmware/qcom/sm8350/porsche/rtic.mbn
./lib/firmware/qcom/sm8350/porsche/slpi.mbn
./lib/firmware/qcom/sm8350/porsche/slpir.jsn
./lib/firmware/qcom/sm8350/porsche/slpius.jsn
./lib/firmware/qcom/sm8350/porsche/sn100u.bin
./lib/firmware/qcom/sm8350/porsche/tfa98xx.cnt
./lib/firmware/qcom/sm8350/porsche/tof8801_firmware.bin
./lib/firmware/qcom/sm8350/porsche/widevine.mbn
./lib/firmware/qcom/sm8350/porsche/winsecap.mbn
./lib/firmware/qca/hpbtfw10.tlv
./lib/firmware/qca/hpbtfw10.ver
./lib/firmware/qca/hpbtfw20.tlv
./lib/firmware/qca/hpnv10.bin
./lib/firmware/qca/htbtfw21.tlv
./lib/firmware/qca/htnv21.bin
./lib/firmware/tfa98xx.cnt

View file

@ -0,0 +1,73 @@
# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm64/configs/defconfig
pkgname=linux-realme-porsche
pkgver=6.5.1
pkgrel=0
pkgdesc="Realme GT 2 kernel fork"
arch="aarch64"
_carch="arm64"
_flavor="realme-porsche"
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps pmb:cross-native"
makedepends="
bash
bc
bison
devicepkg-dev
findutils
flex
openssl-dev
perl
linux-headers
postmarketos-installkernel
xz
"
# Source
_repository="linux-sm8350"
_commit="e4d90d13d227ba9cc88e7e56b6039224290117da"
_config="config-$_flavor.$arch"
# Source
source="
$pkgname-$_commit.tar.gz::https://github.com/Saikatsaha1996/$_repository/archive/$_commit.tar.gz
$_config
"
builddir="$srcdir/$_repository-$_commit"
prepare() {
default_prepare
cp "$srcdir/config-$_flavor.$arch" .config
}
build() {
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-$_flavor"
}
package() {
mkdir -p "$pkgdir"/boot
install -Dm644 "$builddir/arch/$_carch/boot/Image.gz" \
"$pkgdir/boot/vmlinuz"
make zinstall modules_install dtbs_install \
ARCH="$_carch" \
INSTALL_PATH="$pkgdir"/boot/ \
INSTALL_MOD_PATH="$pkgdir" \
INSTALL_MOD_STRIP=1 \
INSTALL_DTBS_PATH="$pkgdir/boot/dtbs"
rm -f "$pkgdir"/lib/modules/*/build "$pkgdir"/lib/modules/*/source
install -D "$builddir"/include/config/kernel.release \
"$pkgdir"/usr/share/kernel/$_flavor/kernel.release
}
sha512sums="
d6687087317f1b51811af06f32dc424201a704f8061dba60e5de0e97f9b1fb333118d422c3e7fffd1396d1318b158a8a28858de9d600a8f95976d56fd9c5b69a linux-realme-porsche-e4d90d13d227ba9cc88e7e56b6039224290117da.tar.gz
f88e10f9075a659ec26afb28347707ef1e28f269cd607f8b8b3ff8347ab79a286dcb133e7dd71f669ab49fe4c3c0e6560d1f6ca79e35c2520782eba51381f5ff config-realme-porsche.aarch64
"

File diff suppressed because it is too large Load diff