From a5a4df38813bca9b09f26504eaa351109f5f654a Mon Sep 17 00:00:00 2001 From: Minecrell Date: Sat, 18 Jan 2020 12:40:15 +0100 Subject: [PATCH] wileyfox-crackling: add option to enable modem (!907) --- device/device-wileyfox-crackling/APKBUILD | 26 +++++++++++++++++---- device/device-wileyfox-crackling/deviceinfo | 4 ++++ 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/device/device-wileyfox-crackling/APKBUILD b/device/device-wileyfox-crackling/APKBUILD index 3c0329177..373fc4a65 100644 --- a/device/device-wileyfox-crackling/APKBUILD +++ b/device/device-wileyfox-crackling/APKBUILD @@ -1,9 +1,10 @@ # Reference: # Contributor: Nikita Travkin +# Contributor: Minecrell pkgname="device-wileyfox-crackling" pkgdesc="Wileyfox Swift" -pkgver=1 -pkgrel=4 +pkgver=2 +pkgrel=0 url="https://postmarketos.org" license="MIT" arch="aarch64" @@ -12,8 +13,10 @@ depends="postmarketos-base mkbootimg" makedepends="devicepkg-dev" subpackages=" $pkgname-kernel-mainline:kernel_mainline + $pkgname-kernel-mainline-modem:kernel_mainline_modem $pkgname-kernel-downstream:kernel_downstream $pkgname-nonfree-firmware:nonfree_firmware + $pkgname-nonfree-firmware-modem:nonfree_firmware_modem " source=" @@ -31,11 +34,17 @@ package() { } kernel_mainline() { - pkgdesc="Most features working (note: charging not working yet)" + pkgdesc="Mainline kernel (no charging, no modem, audio routed directly)" depends="linux-postmarketos-qcom-msm8916 soc-qcom-msm8916" devicepkg_subpackage_kernel $startdir $pkgname $subpkgname } +kernel_mainline_modem() { + pkgdesc="Mainline kernel (no charging, non-free modem, audio routed through ADSP)" + depends="linux-postmarketos-qcom-msm8916 soc-qcom-msm8916 soc-qcom-msm8916-modem" + devicepkg_subpackage_kernel $startdir $pkgname $subpkgname +} + kernel_downstream() { pkgdesc="For charging/debugging only (prefer mainline)" depends="linux-wileyfox-crackling mesa-dri-swrast mdss-fb-init-hack" @@ -43,10 +52,17 @@ kernel_downstream() { } nonfree_firmware() { - pkgdesc="GPU/WiFi/BT/Video firmware" + pkgdesc="GPU/WiFi/BT/Video(/Modem) firmware" depends="linux-firmware-qcom firmware-wileyfox-crackling-venus firmware-wileyfox-crackling-wcnss" mkdir "$subpkgdir" } -sha512sums="904e1080dc42bbf438b13d4cec7871425ec39c9f33700276849f43c0f4504902c4873f31be0cb027407062689ba85a1b03136d9d73b44ae392d0474378418598 deviceinfo +nonfree_firmware_modem() { + pkgdesc="Modem firmware" + depends="firmware-wileyfox-crackling-modem" + install_if="$pkgname-nonfree-firmware $pkgname-kernel-mainline-modem" + mkdir "$subpkgdir" +} + +sha512sums="11000457ae7365910ef48192c86d044f66986d44b5df207472f49cac0507d1bcc49c33471ee1d17a23861d6b2af86f5e3f920ae0cec95ea25bcdc3600a53e1ab deviceinfo 587be41a15f5738c6f55c52f760e08810185a00af886e84864f77ce38675bdf65893779a4ea88c9811023746895818ce5829a1b060e158f2cdae87d13e13f07d fb.modes" diff --git a/device/device-wileyfox-crackling/deviceinfo b/device/device-wileyfox-crackling/deviceinfo index def68e4fa..d0e675ae2 100644 --- a/device/device-wileyfox-crackling/deviceinfo +++ b/device/device-wileyfox-crackling/deviceinfo @@ -7,9 +7,12 @@ deviceinfo_manufacturer="Wileyfox" deviceinfo_codename="wileyfox-crackling" deviceinfo_date="" deviceinfo_dtb_mainline="qcom/msm8916-longcheer-l8150" +deviceinfo_dtb_mainline_modem="qcom/msm8916-longcheer-l8150-modem" deviceinfo_append_dtb_mainline="true" +deviceinfo_append_dtb_mainline_modem="true" deviceinfo_modules_initfs_downstream="" deviceinfo_modules_initfs_mainline="panel-booyi-otm1287 msm rmi_i2c qcom-spmi-vadc dumb-adc-battery" +deviceinfo_modules_initfs_mainline_modem="panel-booyi-otm1287 msm rmi_i2c qcom-spmi-vadc dumb-adc-battery" deviceinfo_arch="aarch64" # Device related @@ -24,6 +27,7 @@ deviceinfo_dev_keyboard="" # Bootloader related deviceinfo_flash_method="fastboot" deviceinfo_kernel_cmdline_mainline="earlycon=msm_serial_dm,0x78b0000 console=ttyMSM0,115200,n8 PMOS_NO_OUTPUT_REDIRECT" +deviceinfo_kernel_cmdline_mainline_modem="earlycon=msm_serial_dm,0x78b0000 console=ttyMSM0,115200,n8 PMOS_NO_OUTPUT_REDIRECT" deviceinfo_kernel_cmdline_downstream="console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci lpm_levels.sleep_disabled=1 loop.max_part=7 buildvariant=userdebug" deviceinfo_generate_bootimg="true" deviceinfo_bootimg_qcdt_downstream="true"