From 0b8c9035dad3935c4183ca618d6a05b50d69d9e4 Mon Sep 17 00:00:00 2001 From: Vincent Knecht Date: Fri, 3 Sep 2021 17:51:37 +0200 Subject: [PATCH] alcatel-idol3: new device (MR 2902) Add msm8939 based Alcatel Idol 3 (5.5") Signed-off-by: Vincent Knecht [ci:skip-build] already built successfully in CI --- device/testing/device-alcatel-idol3/APKBUILD | 45 +++++++++++++++++++ .../testing/device-alcatel-idol3/deviceinfo | 32 +++++++++++++ .../testing/device-alcatel-idol3/rootston.ini | 5 +++ .../testing/firmware-alcatel-idol3/APKBUILD | 43 ++++++++++++++++++ 4 files changed, 125 insertions(+) create mode 100644 device/testing/device-alcatel-idol3/APKBUILD create mode 100644 device/testing/device-alcatel-idol3/deviceinfo create mode 100644 device/testing/device-alcatel-idol3/rootston.ini create mode 100644 device/testing/firmware-alcatel-idol3/APKBUILD diff --git a/device/testing/device-alcatel-idol3/APKBUILD b/device/testing/device-alcatel-idol3/APKBUILD new file mode 100644 index 000000000..1334e8236 --- /dev/null +++ b/device/testing/device-alcatel-idol3/APKBUILD @@ -0,0 +1,45 @@ +# Maintainer: Vincent Knecht +# Reference: +pkgname=device-alcatel-idol3 +pkgdesc="Alcatel OneTouch Idol 3 (5.5)" +pkgver=0.1 +pkgrel=0 +url="https://postmarketos.org" +license="MIT" +arch="aarch64" +options="!check !archcheck" +depends="postmarketos-base mkbootimg linux-postmarketos-qcom-msm8939 + soc-qcom-msm8916 soc-qcom-msm8916-rproc" +makedepends="devicepkg-dev" +source="deviceinfo rootston.ini" +subpackages=" + $pkgname-nonfree-firmware:nonfree_firmware + $pkgname-phosh +" +_pmb_select="soc-qcom-msm8916-rproc" + +build() { + devicepkg_build $startdir $pkgname +} + +package() { + devicepkg_package $startdir $pkgname +} + +nonfree_firmware() { + pkgdesc="GPU/WiFi/BT/Modem/Video firmware" + depends="firmware-qcom-adreno-a420 msm-firmware-loader + firmware-alcatel-idol3-venus firmware-alcatel-idol3-wcnss-nv" + mkdir "$subpkgdir" +} + +phosh() { + install_if="$pkgname postmarketos-ui-phosh" + install -D -m644 "$srcdir"/rootston.ini \ + "$subpkgdir"/etc/phosh/rootston.ini +} + +sha512sums=" +59f4d65c5bb5ef53968bfd1f7d2c0175835badfc15347cedef67b240c6c54baad039beb197d7b6b49cfa379531a00f6a5d3ce615da97c3598e47091b40019c44 deviceinfo +fbaa0e0ecfc5d6debc345d4a7475687bef4c89c463df382ecb9f5577f3fbf045bbcf1d2cacedf6322b5e81e2ba7503d1bb093ff6d55c209ed79805a49408234c rootston.ini +" diff --git a/device/testing/device-alcatel-idol3/deviceinfo b/device/testing/device-alcatel-idol3/deviceinfo new file mode 100644 index 000000000..6ba86643f --- /dev/null +++ b/device/testing/device-alcatel-idol3/deviceinfo @@ -0,0 +1,32 @@ +# Reference: +# Please use double quotes only. You can source this file in shell scripts. + +deviceinfo_format_version="0" +deviceinfo_name="Alcatel OneTouch Idol 3 (5.5)" +deviceinfo_manufacturer="Alcatel" +deviceinfo_codename="alcatel-idol3" +deviceinfo_year="2015" +deviceinfo_dtb="qcom/msm8939-alcatel-idol3" +deviceinfo_append_dtb="true" +deviceinfo_modules_initfs="smb1360 panel-alcatel-idol3-nt35596 panel-alcatel-idol3-r63315 msm edt-ft5x06 rmi_core rmi_i2c" +deviceinfo_arch="aarch64" + +# Device related +deviceinfo_gpu_accelerated="true" +deviceinfo_chassis="handset" +deviceinfo_keyboard="false" +deviceinfo_external_storage="true" +deviceinfo_screen_width="1080" +deviceinfo_screen_height="1920" + +# Bootloader related +deviceinfo_flash_method="fastboot" +deviceinfo_kernel_cmdline="console=ttyMSM0,115200 PMOS_NO_OUTPUT_REDIRECT" +deviceinfo_generate_bootimg="true" +deviceinfo_flash_offset_base="0x80000000" +deviceinfo_flash_offset_kernel="0x00080000" +deviceinfo_flash_offset_ramdisk="0x02000000" +deviceinfo_flash_offset_second="0x00f00000" +deviceinfo_flash_offset_tags="0x01e00000" +deviceinfo_flash_pagesize="2048" +deviceinfo_flash_sparse="true" diff --git a/device/testing/device-alcatel-idol3/rootston.ini b/device/testing/device-alcatel-idol3/rootston.ini new file mode 100644 index 000000000..5bb3d0d27 --- /dev/null +++ b/device/testing/device-alcatel-idol3/rootston.ini @@ -0,0 +1,5 @@ +[cursor:seat0] +map-to-output:DSI-1 + +[output:DSI-1] +scale = 2.25 diff --git a/device/testing/firmware-alcatel-idol3/APKBUILD b/device/testing/firmware-alcatel-idol3/APKBUILD new file mode 100644 index 000000000..fb4c0cfe6 --- /dev/null +++ b/device/testing/firmware-alcatel-idol3/APKBUILD @@ -0,0 +1,43 @@ +pkgname=firmware-alcatel-idol3 +pkgver=1 +pkgrel=0 +pkgdesc="Firmware for Alcatel OneTouch Idol 3 (5.5)" +url="https://github.com/vknecht/" +subpackages="$pkgname-venus $pkgname-wcnss-nv:wcnss_nv" +arch="aarch64" +license="proprietary" +options="!check !strip !archcheck !tracedeps pmb:cross-native" +makedepends="pil-squasher" +_repository="firmware-alcatel-idol3" +_commit="a6d724edf0959dbbd97aa0980f149ba51f74435d" +source="$pkgname-$_commit.tar.gz::$url/$_repository/archive/$_commit.tar.gz" +builddir="$srcdir/$_repository-$_commit" + +_fwdir="/lib/firmware/postmarketos" + +build() { + # venus.mbn exists already but seems a bit different + pil-squasher venus2.mbn venus.mdt +} + +package() { + # parent package is empty + mkdir -p "$pkgdir" +} + +venus() { + pkgdesc="Alcatel OneTouch Idol 3 (5.5) video firmware" + + # Linux detects squashed (.mbn) vs non-squashed (.mdt + .b*) based on + # file contents, so it is fine to install venus.mbn to venus.mdt + install -Dm644 "$builddir"/venus2.mbn "$subpkgdir/$_fwdir"/qcom/venus-1.8/venus.mdt +} + +wcnss_nv() { + pkgdesc="Alcatel OneTouch Idol 3 (5.5) WiFi/BT firmware configuration" + install -Dm644 "$builddir"/WCNSS_qcom_wlan_nv.bin -t "$subpkgdir/$_fwdir"/wlan/prima +} + +sha512sums=" +764169837f61a3eb07ff2850c8410ff538a9f5bc0921c72fedd85185a7912a147b93a905adfdbe1e3206a8b6c71c8065cbb5f7f442f257faa399b382920335e6 firmware-alcatel-idol3-a6d724edf0959dbbd97aa0980f149ba51f74435d.tar.gz +"