From 2159ed63f308b83161d8cde254f0bcb94a62c59c Mon Sep 17 00:00:00 2001 From: Raymond Hackley Date: Mon, 6 Jun 2022 08:30:21 +0000 Subject: [PATCH] samsung-grandmax: new device (MR 3160) --- .../testing/device-samsung-grandmax/APKBUILD | 40 +++++++++++++++++++ .../device-samsung-grandmax/deviceinfo | 33 +++++++++++++++ .../firmware-samsung-grandmax/APKBUILD | 32 +++++++++++++++ 3 files changed, 105 insertions(+) create mode 100644 device/testing/device-samsung-grandmax/APKBUILD create mode 100644 device/testing/device-samsung-grandmax/deviceinfo create mode 100644 device/testing/firmware-samsung-grandmax/APKBUILD diff --git a/device/testing/device-samsung-grandmax/APKBUILD b/device/testing/device-samsung-grandmax/APKBUILD new file mode 100644 index 000000000..febe0a8d3 --- /dev/null +++ b/device/testing/device-samsung-grandmax/APKBUILD @@ -0,0 +1,40 @@ +# Reference: +pkgname=device-samsung-grandmax +pkgdesc="Samsung Galaxy Grand Max" +pkgver=1 +pkgrel=0 +url="https://postmarketos.org" +license="MIT" +arch="armv7" +options="!check !archcheck" +depends=" + postmarketos-base + mkbootimg + linux-postmarketos-qcom-msm8916 + soc-qcom-msm8916 + soc-qcom-msm8916-rproc +" +makedepends="devicepkg-dev" +source="deviceinfo" +subpackages=" + $pkgname-nonfree-firmware:nonfree_firmware +" +_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-a300 msm-firmware-loader firmware-samsung-grandmax-wcnss-nv" + mkdir "$subpkgdir" +} + +sha512sums=" +ac0b14302b9cc7db8a239eb801acf077c3c24b0226e97f9035315ebdf0e2e70fc3001a4b23381acf5732bd583e0ab4969f033537e5099c212038bcac49894fd5 deviceinfo +" diff --git a/device/testing/device-samsung-grandmax/deviceinfo b/device/testing/device-samsung-grandmax/deviceinfo new file mode 100644 index 000000000..855306f2c --- /dev/null +++ b/device/testing/device-samsung-grandmax/deviceinfo @@ -0,0 +1,33 @@ +# Reference: +# Please use double quotes only. You can source this file in shell scripts. + +deviceinfo_format_version="0" +deviceinfo_name="Samsung Galaxy Grand Max" +deviceinfo_manufacturer="Samsung" +deviceinfo_codename="samsung-grandmax" +deviceinfo_year="2015" +deviceinfo_dtb="qcom-msm8916-samsung-grandmax" +deviceinfo_append_dtb="true" +deviceinfo_modules_initfs="panel-samsung-s6d2aa0x62-lpm053a250a msm imagis" +deviceinfo_arch="armv7" + +# Device related +deviceinfo_gpu_accelerated="true" +deviceinfo_chassis="handset" +deviceinfo_keyboard="false" +deviceinfo_external_storage="true" +deviceinfo_screen_width="720" +deviceinfo_screen_height="1280" +deviceinfo_getty="ttyMSM0;115200" + +# Bootloader related +deviceinfo_flash_method="fastboot" +deviceinfo_kernel_cmdline="earlycon console=ttyMSM0,115200 PMOS_NO_OUTPUT_REDIRECT" +deviceinfo_generate_bootimg="true" +deviceinfo_flash_offset_base="0x80000000" +deviceinfo_flash_offset_kernel="0x00008000" +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/firmware-samsung-grandmax/APKBUILD b/device/testing/firmware-samsung-grandmax/APKBUILD new file mode 100644 index 000000000..133a2f8bc --- /dev/null +++ b/device/testing/firmware-samsung-grandmax/APKBUILD @@ -0,0 +1,32 @@ +pkgname=firmware-samsung-grandmax +pkgver=1 +pkgrel=0 +_name="Samsung Galaxy Grand Max" +pkgdesc="Firmware for $_name" +url="https://postmarketos.org" +subpackages="$pkgname-wcnss-nv:wcnss_nv" +arch="armv7" +license="proprietary" +options="!check !strip !archcheck !tracedeps pmb:cross-native" +source="$pkgname-WCNSS_qcom_wlan_nv.bin.base64::https://pastebin.com/raw/7Kp9JMgq" + +_fwdir="/lib/firmware/postmarketos" + +unpack() { + default_unpack + base64 -d $pkgname-WCNSS_qcom_wlan_nv.bin.base64 > WCNSS_qcom_wlan_nv.bin +} + +package() { + # parent package is empty + mkdir -p "$pkgdir" +} + +wcnss_nv() { + pkgdesc="$_name WiFi/BT firmware configuration" + install -Dm644 "$srcdir"/WCNSS_qcom_wlan_nv.bin -t "$subpkgdir/$_fwdir"/wlan/prima +} + +sha512sums=" +9c59763c49a300c75de914d13c4f99b13766f89bf7030a2d8c59bf6154febf33d11918f46b0fae314a2b42fe86438aaf8e8dcbda2ae5d58a9f52daa5c1a0c154 firmware-samsung-grandmax-WCNSS_qcom_wlan_nv.bin.base64 +"