From b49a3e0a786a14e980e1d2ef0c7c7ad3422aa8b8 Mon Sep 17 00:00:00 2001 From: Jean THOMAS Date: Wed, 3 Nov 2021 22:00:46 +0100 Subject: [PATCH] lg-bullhead: adapt for mainline kernel support (MR 2654) Adds mainline kernel option for lg-bullhead (Nexus 5x), in a similar way to MR 2411 (Nexus 6P). --- device/testing/device-lg-bullhead/APKBUILD | 43 +++++++++++++++----- device/testing/device-lg-bullhead/deviceinfo | 9 +++- 2 files changed, 40 insertions(+), 12 deletions(-) diff --git a/device/testing/device-lg-bullhead/APKBUILD b/device/testing/device-lg-bullhead/APKBUILD index eb411fb3c..9f9a04b4c 100644 --- a/device/testing/device-lg-bullhead/APKBUILD +++ b/device/testing/device-lg-bullhead/APKBUILD @@ -1,16 +1,42 @@ # Reference: pkgname=device-lg-bullhead pkgdesc="Google Nexus 5X" -pkgver=0.1 -pkgrel=13 +pkgver=1 +pkgrel=0 url="https://postmarketos.org" license="MIT" arch="aarch64" -options="!check !archcheck" -depends="postmarketos-base linux-lg-bullhead mkbootimg mesa-dri-swrast msm-fb-refresher" +depends=" + mesa-dri-gallium + mkbootimg + msm-fb-refresher + postmarketos-base + postmarketos-update-kernel +" makedepends="devicepkg-dev" +subpackages=" + $pkgname-kernel-downstream:kernel_downstream + $pkgname-kernel-mainline:kernel_mainline + $pkgname-nonfree-firmware:nonfree_firmware +" source="deviceinfo" -subpackages="$pkgname-nonfree-firmware:nonfree_firmware" +options="!check !archcheck" + +build() { + devicepkg_build $startdir $pkgname +} + +kernel_downstream() { + pkgdesc="Downstream kernel" + depends="linux-lg-bullhead" + devicepkg_subpackage_kernel $startdir $pkgname $subpkgname +} + +kernel_mainline() { + pkgdesc="Close to mainline kernel (only basic hardware support)" + depends="linux-postmarketos-qcom-msm8994" + devicepkg_subpackage_kernel $startdir $pkgname $subpkgname +} nonfree_firmware() { pkgdesc="Proprietary WiFi, Modem, GPU and sensors firmware" @@ -18,15 +44,10 @@ nonfree_firmware() { mkdir "$subpkgdir" } - -build() { - devicepkg_build $startdir $pkgname -} - package() { devicepkg_package $startdir $pkgname } sha512sums=" -e98b8a6f31dd5ba6cad8940771a5e5c7d0ff6e236ba79f52083f012292a6becea1452f7a53d06b7a1ed7ac1bf3187e994aeae1d6315dcdb757af4578c3c41173 deviceinfo +a70681efe845eb0ca8aaaf935408e283c7a4b95adadff49327fecfc6dcdba8d0ef4cf7ca98c21580c1f3c2c4346366cd86108f0bba08a3bf923d1a02238bc2f9 deviceinfo " diff --git a/device/testing/device-lg-bullhead/deviceinfo b/device/testing/device-lg-bullhead/deviceinfo index eb1c84e4c..ec06dd8d1 100644 --- a/device/testing/device-lg-bullhead/deviceinfo +++ b/device/testing/device-lg-bullhead/deviceinfo @@ -18,7 +18,6 @@ deviceinfo_dev_touchscreen="/dev/input/event0" # Bootloader related deviceinfo_flash_method="fastboot" -deviceinfo_kernel_cmdline="console=ttyHSL0,115200,n8 androidboot.hardware=bullhead boot_cpus=0-3 maxcpus=4 lpm_levels.sleep_disabled=1 msm_poweroff.download_mode=0 buildvariant=userdebug" deviceinfo_generate_bootimg="true" deviceinfo_bootimg_qcdt="false" deviceinfo_flash_offset_base="0x00000000" @@ -28,3 +27,11 @@ deviceinfo_flash_offset_second="0x00f00000" deviceinfo_flash_offset_tags="0x01e00000" deviceinfo_flash_pagesize="4096" deviceinfo_flash_sparse=true + +# Downstream kernel options +deviceinfo_kernel_cmdline_downstream="console=ttyHSL0,115200,n8 androidboot.hardware=bullhead boot_cpus=0-3 maxcpus=4 lpm_levels.sleep_disabled=1 msm_poweroff.download_mode=0 buildvariant=userdebug" + +# Mainline kernel options +deviceinfo_append_dtb_mainline="true" +deviceinfo_dtb_mainline="qcom/msm8992-bullhead-rev-101" +deviceinfo_kernel_cmdline_mainline="console=tty0 console=ttyMSM0,115200,n8 debug ignore_loglevel PMOS_NO_OUTPUT_REDIRECT earlycon"