lenovo-a6020a40: new device (Lenovo Vibe K5) (MR 4036)

[ci:skip-build]: already built successfully in CI
This commit is contained in:
Adam Słaboń 2023-04-24 22:03:48 +02:00
parent a5a0b54f40
commit 455368dfed
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
3 changed files with 119 additions and 0 deletions

View file

@ -0,0 +1,37 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-lenovo-a6020a40
pkgdesc="Lenovo Vibe K5"
pkgver=1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="postmarketos-base mkbootimg linux-postmarketos-qcom-msm8916
soc-qcom-msm8939 soc-qcom-msm8916-rproc"
makedepends="devicepkg-dev"
source="deviceinfo"
subpackages="
$pkgname-nonfree-firmware:nonfree_firmware
"
_pmb_select="soc-qcom-msm8916-rproc"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
nonfree_firmware() {
pkgdesc="GPU/WiFi/BT/Modem/Video firmware"
depends="firmware-qcom-adreno-a420 msm-firmware-loader
firmware-lenovo-a6020-wcnss-nv
firmware-lenovo-a6020-venus"
mkdir "$subpkgdir"
}
sha512sums="
33772a2ae535b2693f3b40483ed9ec978495050c7149384494c965123a866c65006fd5019f116e56a25c3c43d07f8d324804ce6f6a7372cec44bd9881cff14a0 deviceinfo
"

View file

@ -0,0 +1,37 @@
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell scripts.
deviceinfo_format_version="0"
deviceinfo_name="Lenovo Vibe K5"
deviceinfo_manufacturer="Lenovo"
deviceinfo_codename="lenovo-a6020a40"
deviceinfo_year="2016"
deviceinfo_dtb="qcom/msm8929-wingtech-wt82918hd"
deviceinfo_append_dtb="true"
deviceinfo_modules_initfs="pm8916-bms-vm panel-wingtech-boe-hx8394f msm edt-ft5x06"
deviceinfo_arch="aarch64"
# Device related
deviceinfo_gpu_accelerated="true"
deviceinfo_chassis="handset"
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="720"
deviceinfo_screen_height="1280"
deviceinfo_getty="ttyMSM0;115200"
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_kernel_cmdline="earlycon console=ttyMSM0,115200 PMOS_NO_OUTPUT_REDIRECT"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="false"
deviceinfo_bootimg_mtk_mkimage="false"
deviceinfo_bootimg_dtb_second="false"
deviceinfo_flash_pagesize="2048"
deviceinfo_header_version="0"
deviceinfo_flash_offset_base="0x80000000"
deviceinfo_flash_offset_kernel="0x00080000"
deviceinfo_flash_offset_ramdisk="0x02000000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x01e00000"
deviceinfo_flash_sparse="true"

View file

@ -0,0 +1,45 @@
pkgname=firmware-lenovo-a6020
pkgver=1
pkgrel=0
pkgdesc="Firmware for Lenovo Vibe K5"
url="https://github.com/ArrowOS-Devices/android_vendor_lenovo_A6020"
subpackages="$pkgname-wcnss-nv:wcnss_nv $pkgname-venus:venus"
arch="aarch64"
license="proprietary"
options="!check !strip !archcheck !tracedeps pmb:cross-native"
makedepends="pil-squasher"
_repository="android_vendor_lenovo_A6020"
_commit="66b5f6663ab52bb4ad7b38eb5a55deefb9af83f3"
source="$pkgname-$_commit.tar.gz::$url/archive/$_commit.tar.gz"
builddir="$srcdir/$_repository-$_commit/proprietary/etc/firmware"
_fwdir="/lib/firmware/postmarketos"
build() {
# venus.mbn exists already but seems a bit different
cp variant/A6020a40/venus.b01 venus.b01
cp variant/A6020a40/venus.mdt venus.mdt
pil-squasher venus2.mbn venus.mdt
}
package() {
mkdir -p "$pkgdir"
}
venus() {
pkgdesc="Lenovo Vibe K5 video firmware"
# Linux detects squashed (.mbn) vs non-squashed (.mdt + .b*) based on
# file contents, so it is fine to install venus.mbn to venus.mdt
install -Dm644 "$builddir"/venus2.mbn "$subpkgdir/$_fwdir"/qcom/venus-1.8/venus.mdt
}
wcnss_nv() {
pkgdesc="Lenovo Vibe K5 WiFi/BT firmware configuration"
cd "$builddir/wlan/prima"
install -Dm644 WCNSS_qcom_wlan_nv.bin -t "$subpkgdir/$_fwdir"/wlan/prima
}
sha512sums="
863d953663d8e070402460ddf8d4f550ce30e3e5ef3cca182cbd6770fc5269f533d81ae0c69c5254e929639dda58398f45694accb22597049ff91e0fb0ee92ca firmware-lenovo-a6020-66b5f6663ab52bb4ad7b38eb5a55deefb9af83f3.tar.gz
"