From 422a4b1201f22230326f555aa162b5ebe77a9f13 Mon Sep 17 00:00:00 2001 From: Nikita Travkin Date: Sat, 13 Jul 2019 00:42:56 +0500 Subject: [PATCH] wileyfox-crackling: add mainline kernel (!582) [ci:skip-build]: already built successfully in CI --- device/device-wileyfox-crackling/APKBUILD | 33 ++++++++++++++++--- device/device-wileyfox-crackling/deviceinfo | 16 +++++---- firmware/firmware-wileyfox-crackling/APKBUILD | 31 +++++++++++++++++ 3 files changed, 69 insertions(+), 11 deletions(-) create mode 100644 firmware/firmware-wileyfox-crackling/APKBUILD diff --git a/device/device-wileyfox-crackling/APKBUILD b/device/device-wileyfox-crackling/APKBUILD index 9d5707663..28bea87a5 100644 --- a/device/device-wileyfox-crackling/APKBUILD +++ b/device/device-wileyfox-crackling/APKBUILD @@ -1,14 +1,20 @@ # Reference: pkgname="device-wileyfox-crackling" pkgdesc="Wileyfox Swift" -pkgver=0.1 +pkgver=1 pkgrel=0 url="https://postmarketos.org" license="MIT" arch="aarch64" options="!check !archcheck" -depends="postmarketos-base linux-wileyfox-crackling mkbootimg mesa-dri-swrast mdss-fb-init-hack" +depends="postmarketos-base mkbootimg" makedepends="devicepkg-dev" +subpackages=" + $pkgname-kernel-mainline:kernel_mainline + $pkgname-kernel-downstream:kernel_downstream + $pkgname-nonfree-firmware:nonfree_firmware +" + source=" deviceinfo fb.modes @@ -16,13 +22,30 @@ source=" build() { devicepkg_build $startdir $pkgname - install -Dm544 "$srcdir"/fb.modes \ - "$pkgdir"/etc/fb.modes } package() { devicepkg_package $startdir $pkgname + install -Dm544 "$srcdir"/fb.modes "$pkgdir"/etc/fb.modes } -sha512sums="fbac0a067856483dba9bc2a0c7d97edd8a4f471a086572800c47c22903385c98451954fe9a4489e07b7c5876f565295245c1fe6024610ed60c4d2a7f1693d062 deviceinfo +kernel_mainline() { + pkgdesc="Most features working (note: charging not working yet)" + depends="linux-postmarketos-qcom-msm8916 soc-qcom-msm8916" + 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" + devicepkg_subpackage_kernel $startdir $pkgname $subpkgname +} + +nonfree_firmware() { + pkgdesc="GPU/WiFi/BT/Video firmware" + depends="linux-firmware-qcom firmware-wileyfox-crackling-venus firmware-wileyfox-crackling-wcnss" + mkdir "$subpkgdir" +} + +sha512sums="a0891e36538c9761050991ea5b7f69f48019758ed80ebf96e4c06c9e871547e6f447126a72ffd455d36a16553750ac3cc243b3a31acf08dc478a48b190ddd337 deviceinfo 587be41a15f5738c6f55c52f760e08810185a00af886e84864f77ce38675bdf65893779a4ea88c9811023746895818ce5829a1b060e158f2cdae87d13e13f07d fb.modes" diff --git a/device/device-wileyfox-crackling/deviceinfo b/device/device-wileyfox-crackling/deviceinfo index e27c534f5..7ff85e102 100644 --- a/device/device-wileyfox-crackling/deviceinfo +++ b/device/device-wileyfox-crackling/deviceinfo @@ -15,19 +15,23 @@ deviceinfo_keyboard="false" deviceinfo_external_storage="true" deviceinfo_screen_width="720" deviceinfo_screen_height="1280" -deviceinfo_dev_touchscreen="" +deviceinfo_dev_touchscreen="/dev/input/event3" deviceinfo_dev_touchscreen_calibration="" deviceinfo_dev_keyboard="" +# MSM DRM cannot take over the framebuffer from the bootloader at the moment +deviceinfo_no_framebuffer_mainline="true" + # Bootloader related deviceinfo_flash_method="fastboot" -deviceinfo_kernel_cmdline="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_kernel_cmdline_mainline="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="true" deviceinfo_flash_offset_base="0x80000000" -deviceinfo_flash_offset_kernel="0x00008000" -deviceinfo_flash_offset_ramdisk="0x01000000" +deviceinfo_flash_offset_kernel="0x00080000" +deviceinfo_flash_offset_ramdisk="0x02000000" deviceinfo_flash_offset_second="0x00f00000" -deviceinfo_flash_offset_tags="0x00000100" +deviceinfo_flash_offset_tags="0x01e00000" deviceinfo_flash_pagesize="2048" - +deviceinfo_flash_sparse="true" diff --git a/firmware/firmware-wileyfox-crackling/APKBUILD b/firmware/firmware-wileyfox-crackling/APKBUILD new file mode 100644 index 000000000..4ba32fc37 --- /dev/null +++ b/firmware/firmware-wileyfox-crackling/APKBUILD @@ -0,0 +1,31 @@ +pkgname=firmware-wileyfox-crackling +pkgver=1 +pkgrel=0 +pkgdesc="Firmware for Wileyfox Swift" +url="https://rizzotherat.gitlab.io/firmware/" +subpackages="$pkgname-venus $pkgname-wcnss" +arch="aarch64" +license="proprietary" +options="!check !strip !archcheck" +source="https://rizzotherat.gitlab.io/firmware/crackling.tar.xz" + +_fwdir="/lib/firmware/postmarketos" + +package() { + # parent package is empty + mkdir -p "$pkgdir" +} + +venus() { + pkgdesc="Wileyfox Swift video firmware" + install -Dm644 "$srcdir"/venus.* -t "$subpkgdir/$_fwdir"/qcom/venus-1.8 +} + +wcnss() { + pkgdesc="Wileyfox Swift WiFi/BT firmware" + cd "$srcdir" + install -Dm644 wcnss.* -t "$subpkgdir/$_fwdir" + install -Dm644 WCNSS_* -t "$subpkgdir/$_fwdir"/wlan/prima +} + +sha512sums="44e5c6d2ab28576548689bf43ecf5ac0a2ee42a49e0f993a459a59f80063775a00976bfe1a7db8d82ff82b92bf502832bf1c61ab456a131696f2fa5e09af16b3 crackling.tar.xz"