diff --git a/device/testing/device-xiaomi-beryllium/APKBUILD b/device/testing/device-xiaomi-beryllium/APKBUILD index a1418c9c9..0f1c0ad45 100644 --- a/device/testing/device-xiaomi-beryllium/APKBUILD +++ b/device/testing/device-xiaomi-beryllium/APKBUILD @@ -1,23 +1,28 @@ # Maintainer: Venji10 +# Co-Maintainer: Joel Selvaraj # Reference: pkgname=device-xiaomi-beryllium pkgdesc="Xiaomi Poco F1" -pkgver=0.1 -pkgrel=1 +pkgver=2 +pkgrel=0 url="https://postmarketos.org" license="MIT" arch="aarch64" options="!check !archcheck" -depends="postmarketos-base mkbootimg" +depends="postmarketos-base mkbootimg soc-qcom-sdm845 soc-qcom-sdm845-ucm" makedepends="devicepkg-dev" subpackages=" $pkgname-nonfree-firmware:nonfree_firmware - $pkgname-kernel-downstream:kernel_downstream - $pkgname-kernel-mainline:kernel_mainline + $pkgname-kernel-tianma:kernel_tianma + $pkgname-phosh " -source="deviceinfo" +source=" + deviceinfo + rootston.ini + xiaomi,beryllium.json +" build() { devicepkg_build $startdir $pkgname @@ -33,16 +38,20 @@ nonfree_firmware() { mkdir "$subpkgdir" } -kernel_downstream() { - pkgdesc="USB, display (w/o HW acceleration) and touchscreen works (see device page in wiki for details)" - depends="linux-xiaomi-beryllium mesa-dri-swrast" +kernel_tianma() { + pkgdesc="Close to mainline; Tianma Display, Novatek Touchscreen, Audio, Wifi and USB works (see device page in wiki for details) (GPU firmware needed)" + depends="linux-postmarketos-qcom-sdm845" devicepkg_subpackage_kernel $startdir $pkgname $subpkgname } -kernel_mainline() { - pkgdesc="Close to mainline; USB and display works (see device page in wiki for details) (GPU firmware needed)" - depends="linux-xiaomi-beryllium-mainline mesa-dri-freedreno" - devicepkg_subpackage_kernel $startdir $pkgname $subpkgname +phosh() { + install_if="$pkgname=$pkgver-r$pkgrel phosh" + install -Dm644 "$srcdir"/rootston.ini \ + "$subpkgdir"/etc/phosh/rootston.ini + install -Dm644 "$srcdir"/xiaomi,beryllium.json \ + "$subpkgdir"/usr/share/feedbackd/themes/xiaomi,beryllium.json } -sha512sums="108a67ed5eb46dbac5a45fe0420b8b8f6db00ad130a6b5d8e44cbd0914bddab1bf7f1b16e5c06a4fa96dd65760269e45c2fbe5c37a3cdcd091a071e1af143458 deviceinfo" +sha512sums="3d4587810311a5422577daddfcd41aad4d29e011ffb13d3d3d7cde6e4f8eacd2458470818cca8e196fd7f9a44670cffeddde085cda74688fb4d3a7418114449e deviceinfo +e0bbe6210198ec37a0f18fb7dec5dead4ad41693ad5b3c20731e68d4f9d8fdff393dcbd110e87564030f1326e12da8af58c020e9bc14eb9ca2c54224b962df7e rootston.ini +db78af5be2a08109962fa2511d6e84efe9a425e1d45c7e0e75bf0be383cfc1c5fca5d79f3d7bd2f146e8a62460c88b214819ad522316c0c2e08783a80d8ceb05 xiaomi,beryllium.json" diff --git a/device/testing/device-xiaomi-beryllium/deviceinfo b/device/testing/device-xiaomi-beryllium/deviceinfo index 122596909..2450f1ba9 100644 --- a/device/testing/device-xiaomi-beryllium/deviceinfo +++ b/device/testing/device-xiaomi-beryllium/deviceinfo @@ -6,6 +6,8 @@ deviceinfo_name="Xiaomi Poco F1" deviceinfo_manufacturer="Xiaomi" deviceinfo_codename="xiaomi-beryllium" deviceinfo_year="2018" +deviceinfo_dtb_tianma="qcom/sdm845-xiaomi-beryllium" +deviceinfo_append_dtb="true" deviceinfo_modules_initfs_mainline="ufs_qcom" deviceinfo_arch="aarch64" @@ -15,20 +17,20 @@ deviceinfo_keyboard="false" deviceinfo_external_storage="true" deviceinfo_screen_width="1080" deviceinfo_screen_height="2246" - deviceinfo_no_framebuffer="true" deviceinfo_rootfs_image_sector_size="4096" -deviceinfo_flash_sparse="true" # Bootloader related deviceinfo_flash_method="fastboot" -deviceinfo_kernel_cmdline="console=ttyMSM0,115200n8 PMOS_NO_OUTPUT_REDIRECT" +deviceinfo_kernel_cmdline="PMOS_NO_OUTPUT_REDIRECT" 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" diff --git a/device/testing/device-xiaomi-beryllium/rootston.ini b/device/testing/device-xiaomi-beryllium/rootston.ini new file mode 100644 index 000000000..c425368aa --- /dev/null +++ b/device/testing/device-xiaomi-beryllium/rootston.ini @@ -0,0 +1,5 @@ +# /etc/phosh/rootston.ini +# Overwrites values set in /usr/share/phosh/phoc.ini + +[output:DSI-1] +scale = 2.75 diff --git a/device/testing/device-xiaomi-beryllium/xiaomi,beryllium.json b/device/testing/device-xiaomi-beryllium/xiaomi,beryllium.json new file mode 100644 index 000000000..fcc377701 --- /dev/null +++ b/device/testing/device-xiaomi-beryllium/xiaomi,beryllium.json @@ -0,0 +1,154 @@ +{ + "name": "default", + "profiles": [ + { + "name": "full", + "feedbacks": [ + { + "event-name": "alarm-clock-elapsed", + "type": "Sound", + "effect": "alarm-clock-elapsed" + }, + { + "event-name": "message-new-email", + "type": "Sound", + "effect": "message-new-email" + }, + { + "event-name": "message-new-instant", + "type": "Sound", + "effect": "message-new-instant" + }, + { + "event-name": "message-new-sms", + "type": "Sound", + "effect": "message-new-instant" + }, + { + "event-name": "phone-incoming-call", + "type": "Sound", + "effect": "phone-incoming-call" + }, + { + "event-name": "timeout-completed", + "type": "Sound", + "effect": "complete" + }, + { + "event-name": "theme-demo", + "type": "Sound", + "effect": "theme-demo" + }, + { + "event-name": "window-close", + "type": "Sound", + "effect": "theme-demo" + } + ] + }, + { + "name": "quiet", + "feedbacks": [ + { + "event-name": "alarm-clock-elapsed", + "type": "VibraPeriodic", + "magnitude": 32767, + "duration": 10000, + "fade-in-time": 10000, + "fade-in-level": 4096 + }, + { + "event-name": "bell-terminal", + "type": "VibraRumble", + "duration": 100 + }, + { + "event-name": "message-new-email", + "type": "VibraRumble", + "duration": 750, + "count": 3, + "pause": 100 + }, + { + "event-name": "message-new-instant", + "type": "VibraRumble", + "duration": 750 + }, + { + "event-name": "message-new-sms", + "type": "VibraRumble", + "duration": 1250, + "count": 2, + "pause": 250 + }, + { + "event-name": "message-sent-instant", + "type": "VibraRumble", + "duration": 250 + }, + { + "event-name": "phone-incoming-call", + "type": "VibraPeriodic", + "duration": 10000 + }, + { + "event-name": "timeout-completed", + "type": "VibraRumble", + "duration": 500 + }, + { + "event-name": "theme-demo", + "type": "VibraPeriodic", + "magnitude": 32767, + "duration": 5000 + }, + { + "event-name": "window-close", + "type": "VibraRumble", + "duration": 75 + } + ] + }, + { + "name": "silent", + "feedbacks": [ + { + "event-name": "battery-caution", + "type": "Led", + "color": "red", + "frequency": 5000 + }, + { + "event-name": "phone-missed-call", + "type": "Led", + "color": "blue", + "frequency": 3000 + }, + { + "event-name": "message-missed-email", + "type": "Led", + "color": "blue", + "frequency": 2000 + }, + { + "event-name": "message-missed-instant", + "type": "Led", + "color": "blue", + "frequency": 1000 + }, + { + "event-name": "message-missed-notification", + "type": "Led", + "color": "blue", + "frequency": 500 + }, + { + "event-name": "message-missed-sms", + "type": "Led", + "color": "blue", + "frequency": 2000 + } + ] + } + ] +} \ No newline at end of file