lenovo-a6010: new device (MR 1748)

This commit is contained in:
jenneron 2020-11-21 21:00:53 +02:00 committed by Bart Ribbers
parent 407911ab1a
commit 4b7706d562
No known key found for this signature in database
GPG Key ID: 699D16185DAFAE61
3 changed files with 119 additions and 0 deletions

View File

@ -0,0 +1,53 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-lenovo-a6010
pkgdesc="Lenovo A6010"
pkgver=1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="postmarketos-base mkbootimg soc-qcom-msm8916"
makedepends="devicepkg-dev"
source="deviceinfo"
subpackages="
$pkgname-kernel-mainline:kernel_mainline
$pkgname-kernel-mainline-modem:kernel_mainline_modem
$pkgname-nonfree-firmware:nonfree_firmware
$pkgname-nonfree-firmware-modem:nonfree_firmware_modem
"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
kernel_mainline() {
pkgdesc="Close to mainline kernel (no modem, audio routed directly)"
depends="linux-postmarketos-qcom-msm8916"
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}
kernel_mainline_modem() {
pkgdesc="Close to mainline kernel (non-free modem, audio routed through ADSP)"
depends="linux-postmarketos-qcom-msm8916 soc-qcom-msm8916-modem"
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}
nonfree_firmware() {
pkgdesc="GPU/WiFi/BT/Video(/Modem) firmware"
depends="linux-firmware-qcom firmware-qcom-msm8916-wcnss firmware-lenovo-a6010-wcnss-nv"
mkdir "$subpkgdir"
}
nonfree_firmware_modem() {
pkgdesc="Modem firmware"
depends="firmware-lenovo-a6010-modem"
install_if="$pkgname-nonfree-firmware $pkgname-kernel-mainline-modem"
mkdir "$subpkgdir"
}
sha512sums="8b3952f17f2abcb47007433a6ad612dc22430bc279f38587428f556c86b59441332967591d0f79afab1763abc12d84a286536736cc3914cf3c661ca5c0850831 deviceinfo"

View File

@ -0,0 +1,33 @@
# 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 A6010"
deviceinfo_manufacturer="Lenovo"
deviceinfo_codename="lenovo-a6010"
deviceinfo_year="2015"
deviceinfo_dtb_mainline="qcom/msm8916-wingtech-wt86528"
deviceinfo_dtb_mainline_modem="qcom/msm8916-wingtech-wt86528-modem"
deviceinfo_append_dtb="true"
deviceinfo_modules_initfs="pm8916-bms-vm panel-wingtech-yassy-ili9881 panel-wingtech-tianma-hx8394d msm edt-ft5x06"
deviceinfo_arch="aarch64"
# Device related
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_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_pagesize="2048"
deviceinfo_flash_sparse="true"

View File

@ -0,0 +1,33 @@
pkgname=firmware-lenovo-a6010
pkgver=1
pkgrel=0
pkgdesc="Firmware for Lenovo A6010"
url="https://github.com/jenneron/vendor_lenovo_a6010"
subpackages="$pkgname-modem $pkgname-wcnss-nv:wcnss_nv"
arch="aarch64"
license="proprietary"
options="!check !strip !archcheck !tracedeps pmb:cross-native"
_commit="bb6c522d1cb2de2ae29a5b7ff23b1f9b8f58a96a"
source="$pkgname-$_commit.tar.gz::$url/archive/$_commit.tar.gz"
_fwdir="/lib/firmware/postmarketos"
package() {
mkdir -p "$pkgdir"
}
modem() {
pkgdesc="Lenovo A6010 modem firmware"
cd "$srcdir/vendor_lenovo_a6010-$_commit"
install -Dm644 mba.mbn -t "$subpkgdir/$_fwdir"
install -Dm644 modem.* -t "$subpkgdir/$_fwdir"
}
wcnss_nv() {
pkgdesc="Lenovo A6010 WiFi/BT firmware configuration"
cd "$srcdir/vendor_lenovo_a6010-$_commit"
install -Dm644 WCNSS_qcom_wlan_nv.bin -t "$subpkgdir/$_fwdir"/wlan/prima
}
sha512sums="42d4bdcd51c112c1a2bd854ace9cc1e94bd9eaf8ffda6a92ddc92c2b9bf4f60ee088b79a529fe9bc2ecb9a6cddbebac83083dbe1265338ddcd3ebf79e903cde1 firmware-lenovo-a6010-bb6c522d1cb2de2ae29a5b7ff23b1f9b8f58a96a.tar.gz"