lenovo-q706f: new device (Lenovo Xiaoxin Pad Pro 12.6) (MR 5398)

[ci:skip-build]: already built successfully in CI
This commit is contained in:
chalkin 2024-07-30 12:06:16 +08:00 committed by Stefan Hansson
parent bb96fdc480
commit 218f8d1251
No known key found for this signature in database
GPG key ID: 8A700086A9FE41FD
10 changed files with 8467 additions and 0 deletions

View file

@ -0,0 +1,60 @@
# Reference: <https://postmarketos.org/devicepkg>
# Maintainer: chalkin Deng <chalkin@yeah.net>
pkgname=device-lenovo-q706f
pkgdesc="Lenovo Xiaoxin Pad Pro 12.6 (Lenovo Tab P12 Pro)"
pkgver=1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="
bootmac
linux-lenovo-q706f
make-dynpart-mappings
mesa-vulkan-freedreno
mkbootimg
postmarketos-base
qbootctl
swclock-offset
"
makedepends="devicepkg-dev"
install="$pkgname.post-install $pkgname.post-upgrade"
source="
deviceinfo
modules-initfs
"
subpackages="
$pkgname-nonfree-firmware:nonfree_firmware
"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
nonfree_firmware() {
pkgdesc="Firmware for GPU, WiFi, etc."
depends="
firmware-lenovo-q706f-adreno
firmware-lenovo-q706f-adsp
firmware-lenovo-q706f-cdsp
firmware-lenovo-q706f-slpi
firmware-lenovo-q706f-venus
linux-firmware-ath11k
linux-firmware-qca
pd-mapper
tqftpserv
"
install="$subpkgname.post-install $subpkgname.post-upgrade"
mkdir "$subpkgdir"
}
sha512sums="
455f97c6186858dcb1760c8734c0cc5d913f115abd994c468610194c6f507502c9f91a1ced5f1195e519d305efd118e2e028df2fd2429d6d06155e74c7d1437e deviceinfo
c0634ddd66ecfe4b39e8bff0b17ea141303d8827d7d498c2a9f19729566f0d5a3900c78ac8c71e8ef5d68e67c625d551e67c790ea01b103fcf38848e8aebfdf1 modules-initfs
"

View file

@ -0,0 +1,3 @@
#!/bin/sh
rc-update add tqftpserv boot
rc-update add pd-mapper boot

View file

@ -0,0 +1 @@
device-lenovo-q706f-nonfree-firmware.post-install

View file

@ -0,0 +1,2 @@
#!/bin/sh
rc-update add qbootctl default

View file

@ -0,0 +1 @@
device-lenovo-q706f.post-install

View file

@ -0,0 +1,45 @@
# 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 Xiaoxin Pad Pro 12.6"
deviceinfo_manufacturer="Lenovo"
deviceinfo_codename="lenovo-q706f"
deviceinfo_year="2021"
deviceinfo_arch="aarch64"
# Device related
deviceinfo_gpu_accelerated="true"
deviceinfo_chassis="tablet"
deviceinfo_keyboard="false"
deviceinfo_external_storage="false"
deviceinfo_screen_width="1600"
deviceinfo_screen_height="2560"
# Kernel options
deviceinfo_dtb="qcom/sm8250-lenovo-q706f"
deviceinfo_append_dtb="true"
deviceinfo_flash_kernel_on_update="true"
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_kernel_cmdline="quiet"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="false"
deviceinfo_bootimg_mtk_mkimage="false"
deviceinfo_bootimg_dtb_second="false"
deviceinfo_flash_offset_base="0x00000000"
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"
# Required for devices using UFS as storage (instead of e.g. eMMC)
deviceinfo_rootfs_image_sector_size="4096"
# Support super partition flashing
deviceinfo_super_partitions="/dev/sda17 /dev/sda17"

View file

@ -0,0 +1,3 @@
spi-geni-qcom
goodix_berlin_core
goodix_berlin_spi

View file

@ -0,0 +1,64 @@
pkgname=firmware-lenovo-q706f
pkgver=20240726
pkgrel=0
pkgdesc="Firmware for Lenovo Xiaoxin Pad Pro 12.6 (Lenovo Tab P12 Pro)"
subpackages="
$pkgname-adreno
$pkgname-adsp
$pkgname-cdsp
$pkgname-slpi
$pkgname-venus
"
url="https://github.com/silime/lenovo-sm8250-q706f-firmware"
arch="aarch64"
license="proprietary"
options="!check !strip !archcheck !tracedeps pmb:cross-native"
_commit="cec1c1d8b4105caa661cf3212a5894981c1c8954"
source="https://github.com/silime/lenovo-sm8250-q706f-firmware/archive/$_commit.zip"
builddir="$srcdir/lenovo-sm8250-q706f-firmware-$_commit"
package() {
# parent package is empty
mkdir -p "$pkgdir"
}
# lenovo q706f boots with secure boot, it can only load signed firmwares.
adreno() {
pkgdesc="lenovo q706f adreno firmware"
depends="firmware-qcom-adreno-a650"
ls "$builddir"
install -Dm644 "$builddir"/sm8250/q706f/a650_zap.mbn -t \
"$subpkgdir/lib/firmware/qcom/sm8250/q706f/"
}
adsp() {
pkgdesc="lenovo q706f adsp firmware"
install -Dm644 "$builddir"/sm8250/q706f/adsp* -t \
"$subpkgdir/lib/firmware/qcom/sm8250/q706f/"
}
cdsp() {
pkgdesc="lenovo q706f cdsp firmware"
install -Dm644 "$builddir"/sm8250/q706f/cdsp* -t \
"$subpkgdir/lib/firmware/qcom/sm8250/q706f/"
}
slpi() {
pkgdesc="lenovo q706f slpi firmware"
install -Dm644 "$builddir"/sm8250/q706f/slpi* -t \
"$subpkgdir/lib/firmware/qcom/sm8250/q706f/"
}
venus() {
pkgdesc="lenovo q706f venus firmware"
install -Dm644 "$builddir"/sm8250/q706f/venus.mbn -t \
"$subpkgdir/lib/firmware/qcom/sm8250/q706f/"
}
sha512sums="
6b5cf73808c2a7cd480d3fa008564cf9b69c4c3303761173adcf094c9a70b08c295890b7d5fa5f685a983949443d757749a71080077a3da27758309a6cd5534a cec1c1d8b4105caa661cf3212a5894981c1c8954.zip
"

View file

@ -0,0 +1,65 @@
# Kernel config based on: arch/arm64/configs/defconfig
# Maintainer: chalkin Deng <chalkin@yeah.net>
_flavor="lenovo-q706f"
pkgname=linux-$_flavor
pkgver=6.10.0
pkgrel=0
pkgdesc="Mainline kernel fork for Lenovo SM8250"
arch="aarch64"
_carch="arm64"
url="https://github.com/silime/linux"
license="GPL-2.0-only"
options="!strip !check !tracedeps
pmb:cross-native
pmb:kconfigcheck-community
"
makedepends="
bash
bison
findutils
flex
openssl-dev
perl
postmarketos-installkernel
python3
"
_tag="sm8250-$pkgver"
_config="config-$_flavor.$arch"
_commit="d0ee36285ee039b9e0bfc854761d475bdef1a23b"
source="
$pkgname-$_tag.tar.gz::https://github.com/silime/linux/archive/refs/tags/$_tag.tar.gz
$_config
"
builddir="$srcdir/linux-$_tag"
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
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="
13fd93a34bc6c76a8570661aa5aca77e00e348ea790997191d72469da79f64ae9e170ad39095b8b7bd570d57740f636cd4f9e018addc4f26e880b41cd1122d80 linux-lenovo-q706f-sm8250-6.10.0.tar.gz
e16347f8ab87704ae629dfbb57649705746d83f8ab41b21331d4d7843e67f4ee92b862c967b5404e30d5681925331ee6b161db20a4f7c52776fb942205d3d009 config-lenovo-q706f.aarch64
"

File diff suppressed because it is too large Load diff