From b8e133555831dfd216ee2ece927f2d810766a56a Mon Sep 17 00:00:00 2001 From: Wouter Franken Date: Sat, 26 Mar 2022 23:19:39 +0100 Subject: [PATCH] sony-yuga: add support for APQ8064 mainline kernel (MR 3037) Add option for mainline kernel iso downstream kernel. Note that a lot is not working yet due to incomplete devicetree, so this is for development purposes only. --- device/testing/device-sony-yuga/APKBUILD | 22 ++++++++++++++++++---- device/testing/device-sony-yuga/deviceinfo | 17 +++++++++++------ 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/device/testing/device-sony-yuga/APKBUILD b/device/testing/device-sony-yuga/APKBUILD index 740c9eb99..06851d911 100644 --- a/device/testing/device-sony-yuga/APKBUILD +++ b/device/testing/device-sony-yuga/APKBUILD @@ -1,15 +1,17 @@ # Reference: pkgname=device-sony-yuga -pkgver=2 -pkgrel=2 +pkgver=3 +pkgrel=0 pkgdesc="Sony Xperia Z" url="https://postmarketos.org" arch="armv7" license="MIT" -depends="postmarketos-base linux-sony-yuga mkbootimg msm-fb-refresher mesa-dri-swrast" +depends="postmarketos-base mkbootimg mesa-dri-gallium" makedepends="devicepkg-dev" subpackages=" $pkgname-nonfree-firmware:nonfree_firmware + $pkgname-kernel-downstream:kernel_downstream + $pkgname-kernel-mainline:kernel_mainline " source="deviceinfo 90-android-touch-dev.rules" options="!check !archcheck" @@ -28,6 +30,18 @@ package() { ln -s /dev/null "$pkgdir"/etc/udev/rules.d/60-persistent-v4l.rules } +kernel_downstream() { + pkgdesc="LineageOS downstream kernel (recommended)" + depends="linux-sony-yuga msm-fb-refresher" + devicepkg_subpackage_kernel $startdir $pkgname $subpkgname +} + +kernel_mainline() { + pkgdesc="Close to mainline; do not use - only for development!" + depends="linux-postmarketos-qcom-apq8064" + devicepkg_subpackage_kernel $startdir $pkgname $subpkgname +} + nonfree_firmware() { pkgdesc="Wifi firmware" depends="firmware-sony-fusion3" @@ -35,6 +49,6 @@ nonfree_firmware() { } sha512sums=" -69caa7481a2055ac1184b5dc0b9578a933751f802af61196cb99ab62d6a60a6e4943b28f37f9a42f71f1a6dcb0f60c189155b3fb7ecab57ecc3c41072aa5f636 deviceinfo +ed2a1880bb0249148c7a069a6ea17f1666c41787106b308b228747bf2546fa8fe9a8fca16a6f7b0d88b9bcc91485784e6c0beb4187f85e7996fbfd259f940efa deviceinfo 8b6034c0338ab4c7d648f47983aad6da07e427e7dba47baabf85a1b3ddeeda47c8d7fbcd547a302c9a759b2943ee30d3e82c3b368d8582833a058e4671638a9e 90-android-touch-dev.rules " diff --git a/device/testing/device-sony-yuga/deviceinfo b/device/testing/device-sony-yuga/deviceinfo index e10a7b536..4d4133815 100644 --- a/device/testing/device-sony-yuga/deviceinfo +++ b/device/testing/device-sony-yuga/deviceinfo @@ -6,22 +6,27 @@ deviceinfo_name="Sony Xperia Z" deviceinfo_manufacturer="Sony" deviceinfo_codename="sony-yuga" deviceinfo_year="2013" +deviceinfo_arch="armv7" + +# Device related deviceinfo_chassis="handset" deviceinfo_keyboard="false" deviceinfo_external_storage="true" deviceinfo_flash_method="fastboot" -deviceinfo_arch="armv7" -deviceinfo_generate_bootimg="true" - -# Splash screen deviceinfo_screen_width="1080" deviceinfo_screen_height="1920" -# Fastboot related +# Mainline kernel related +deviceinfo_dtb_mainline="qcom-apq8064-sony-xperia-yuga" +deviceinfo_append_dtb_mainline="true" +deviceinfo_kernel_cmdline_mainline="console=ttyMSM0,115200,n8 fw_devlink=permissive PMOS_NO_OUTPUT_REDIRECT" + +# Boot related +deviceinfo_generate_bootimg="true" deviceinfo_flash_offset_base="0x80200000" deviceinfo_flash_offset_kernel="0x00008000" deviceinfo_flash_offset_ramdisk="0x02000000" deviceinfo_flash_offset_second="0x00f00000" deviceinfo_flash_offset_tags="0x00000100" deviceinfo_flash_pagesize="2048" -deviceinfo_kernel_cmdline="console=ttyHSL0,115200,n8 androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 maxcpus=2 androidboot.selinux=permissive" +deviceinfo_kernel_cmdline_downstream="console=ttyHSL0,115200,n8 androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 maxcpus=2 androidboot.selinux=permissive"