diff --git a/device/testing/device-samsung-a6plte/30-gpu-firmware.files b/device/testing/device-samsung-a6plte/30-gpu-firmware.files new file mode 100644 index 000000000..3364b8f4c --- /dev/null +++ b/device/testing/device-samsung-a6plte/30-gpu-firmware.files @@ -0,0 +1,6 @@ +/lib/firmware/postmarketos/a506_zap.b00 +/lib/firmware/postmarketos/a506_zap.b01 +/lib/firmware/postmarketos/a506_zap.b02 +/lib/firmware/postmarketos/a506_zap.mdt +/lib/firmware/postmarketos/a530_pfp.fw +/lib/firmware/postmarketos/a530_pm4.fw diff --git a/device/testing/device-samsung-a6plte/APKBUILD b/device/testing/device-samsung-a6plte/APKBUILD new file mode 100644 index 000000000..30de11884 --- /dev/null +++ b/device/testing/device-samsung-a6plte/APKBUILD @@ -0,0 +1,59 @@ +# Reference: + +pkgname=device-samsung-a6plte +pkgdesc="Samsung Galaxy A6+ (2018)" +pkgver=1 +pkgrel=0 +url="https://postmarketos.org" +license="MIT" +arch="aarch64" +options="!check !archcheck" +depends=" + linux-postmarketos-qcom-msm8953 + lk2nd-msm8953 + mesa-dri-gallium + mkbootimg + postmarketos-base + soc-qcom-msm8916 +" +makedepends="devicepkg-dev" +subpackages="$pkgname-nonfree-firmware:nonfree_firmware $pkgname-phosh" +source=" + 30-gpu-firmware.files + deviceinfo + gpu-nobin.sh + phoc.ini +" + +build() { + devicepkg_build $startdir $pkgname +} + +package() { + devicepkg_package $startdir $pkgname + + install -D -m644 "$srcdir"/gpu-nobin.sh \ + "$pkgdir"/etc/profile.d/gpu-nobin.sh +} + +nonfree_firmware() { + pkgdesc="WiFi, Bluetooth, ADSP, Venus and GPU Firmware" + depends="firmware-samsung-a6plte linux-firmware-qcom" + mkdir "$subpkgdir" + + install -Dm644 "$srcdir/30-gpu-firmware.files" -t \ + "$subpkgdir/etc/postmarketos-mkinitfs/files" +} + +phosh() { + install_if="$pkgname=$pkgver-r$pkgrel phosh" + install -Dm644 "$srcdir"/phoc.ini \ + "$subpkgdir"/etc/phosh/phoc.ini +} + +sha512sums=" +302c0bec754bb79ef561c1a8d4ff34ba52b904c853bce6a15a79ba7b5b7a3d02c1c75bbe86d59be7b608a6dc744dd3e3c638eaa4539c53d20fa55fa5ea397d74 30-gpu-firmware.files +cb3ada222bb6cf51ed806f9086384659d5786717819f3993e2a643285b4f7890abc6ea53c609134b95cca2297f98963a2395e3c3b87a283ece1f1d0f2a7121e3 deviceinfo +bea40516cf51b4ad0609cc21ca56c19eb9cb2b1be45cddf486264d9c526469f1abad313a95a4f938ccbd0c023d08884aefe8d850746a97075999de11b4a2ff4c gpu-nobin.sh +38409d4ce48db4624539dbfd695d3c6e1596a29fd7c3004a41368b28cba646495d05360420ad728f82c63d6ddeeca71d09944df06ebaca120aedd9cc2b436eb3 phoc.ini +" diff --git a/device/testing/device-samsung-a6plte/deviceinfo b/device/testing/device-samsung-a6plte/deviceinfo new file mode 100644 index 000000000..aef281093 --- /dev/null +++ b/device/testing/device-samsung-a6plte/deviceinfo @@ -0,0 +1,39 @@ +# Reference: +# Please use double quotes only. You can source this file in shell +# scripts. + +deviceinfo_format_version="0" +deviceinfo_name="Samsung Galaxy A6+ (2018)" +deviceinfo_manufacturer="Samsung" +deviceinfo_codename="samsung-a6plte" +deviceinfo_year="2018" +deviceinfo_dtb="qcom/sdm450-samsung-a6plte-r4" +deviceinfo_append_dtb="true" +deviceinfo_modules_initfs="msm panel-samsung-s6e3fa7-ams604nl01 s6sy761" +deviceinfo_arch="aarch64" +deviceinfo_mesa_driver="msm" + +# Device related +deviceinfo_chassis="handset" +deviceinfo_keyboard="false" +deviceinfo_external_storage="true" +deviceinfo_screen_width="1080" +deviceinfo_screen_height="2220" +deviceinfo_gpu_accelerated="true" + +# Bootloader related +deviceinfo_flash_method="fastboot" +deviceinfo_flash_sparse="true" +deviceinfo_kernel_cmdline="console=tty0 PMOS_NO_OUTPUT_REDIRECT" +deviceinfo_generate_bootimg="true" +deviceinfo_bootimg_qcdt="false" +deviceinfo_bootimg_mtk_mkimage="false" +deviceinfo_bootimg_dtb_second="false" +deviceinfo_flash_pagesize="2048" +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_heimdall_partition_kernel="BOOT" +deviceinfo_flash_fastboot_partition_kernel="boot" diff --git a/device/testing/device-samsung-a6plte/gpu-nobin.sh b/device/testing/device-samsung-a6plte/gpu-nobin.sh new file mode 100644 index 000000000..38c3840f8 --- /dev/null +++ b/device/testing/device-samsung-a6plte/gpu-nobin.sh @@ -0,0 +1,2 @@ +# Disable GPU binning to fix GTK4 +export FD_MESA_DEBUG=nobin diff --git a/device/testing/device-samsung-a6plte/phoc.ini b/device/testing/device-samsung-a6plte/phoc.ini new file mode 100644 index 000000000..2ea1924aa --- /dev/null +++ b/device/testing/device-samsung-a6plte/phoc.ini @@ -0,0 +1,5 @@ +# /etc/phosh/phoc.ini +# Overwrites values set in /usr/share/phosh/phoc.ini + +[output:DSI-1] +scale = 2.5 diff --git a/device/testing/firmware-samsung-a6plte/APKBUILD b/device/testing/firmware-samsung-a6plte/APKBUILD new file mode 100644 index 000000000..d9e9f8aa0 --- /dev/null +++ b/device/testing/firmware-samsung-a6plte/APKBUILD @@ -0,0 +1,25 @@ +pkgname=firmware-samsung-a6plte +pkgver=1 +pkgrel=0 +pkgdesc="Firmware files for Samsung Galaxy A6+ (2018)" +url="https://gitlab.com/ungeskriptet/firmware-samsung-a6plte" +arch="aarch64" +license="proprietary" +options="!strip !check !archcheck !spdx !tracedeps pmb:cross-native" + +# Source +_commit="8b8be38058ed267ac31004358fcf0ac122e56389" +builddir="$srcdir/firmware-samsung-a6plte-$_commit" +source="$pkgname.tar.gz::$url/-/archive/$_commit/$pkgname-$_commit.tar.gz + firmware.files" + +package() { + for i in $(cat "$srcdir"/firmware.files); do + install -Dm644 "$i" "$pkgdir/$i" + done +} + +sha512sums=" +ed169d1a68c4c5d94f9ae335a085aa603a1f2a9bdafc9a99ef79f47261982c576ed339d0cd37ed599a368b3a1029971ebc96b62c10d52fcb2d030f4d4b6db981 firmware-samsung-a6plte.tar.gz +d43fae933bb12e3879588e96f604be0534be5455bb9edbea3c9cf96bcffbce44abae27de3f40a118536254ca85faeb0fecf390f8f6ae60ca9d06887ac32a7462 firmware.files +" diff --git a/device/testing/firmware-samsung-a6plte/firmware.files b/device/testing/firmware-samsung-a6plte/firmware.files new file mode 100644 index 000000000..82ab2eac5 --- /dev/null +++ b/device/testing/firmware-samsung-a6plte/firmware.files @@ -0,0 +1,60 @@ +./lib/firmware/postmarketos/a506_zap.b00 +./lib/firmware/postmarketos/a506_zap.b01 +./lib/firmware/postmarketos/a506_zap.b02 +./lib/firmware/postmarketos/a506_zap.mdt +./lib/firmware/postmarketos/a530_pfp.fw +./lib/firmware/postmarketos/a530_pm4.fw +./lib/firmware/postmarketos/adsp.b00 +./lib/firmware/postmarketos/adsp.b01 +./lib/firmware/postmarketos/adsp.b02 +./lib/firmware/postmarketos/adsp.b03 +./lib/firmware/postmarketos/adsp.b04 +./lib/firmware/postmarketos/adsp.b05 +./lib/firmware/postmarketos/adsp.b06 +./lib/firmware/postmarketos/adsp.b07 +./lib/firmware/postmarketos/adsp.b08 +./lib/firmware/postmarketos/adsp.b09 +./lib/firmware/postmarketos/adsp.b10 +./lib/firmware/postmarketos/adsp.b11 +./lib/firmware/postmarketos/adsp.b12 +./lib/firmware/postmarketos/adsp.b13 +./lib/firmware/postmarketos/adsp.b14 +./lib/firmware/postmarketos/adsp.mdt +./lib/firmware/postmarketos/mba.mbn +./lib/firmware/postmarketos/modem.b00 +./lib/firmware/postmarketos/modem.b01 +./lib/firmware/postmarketos/modem.b02 +./lib/firmware/postmarketos/modem.b04 +./lib/firmware/postmarketos/modem.b05 +./lib/firmware/postmarketos/modem.b06 +./lib/firmware/postmarketos/modem.b07 +./lib/firmware/postmarketos/modem.b08 +./lib/firmware/postmarketos/modem.b09 +./lib/firmware/postmarketos/modem.b10 +./lib/firmware/postmarketos/modem.b11 +./lib/firmware/postmarketos/modem.b12 +./lib/firmware/postmarketos/modem.b13 +./lib/firmware/postmarketos/modem.b16 +./lib/firmware/postmarketos/modem.b17 +./lib/firmware/postmarketos/modem.b18 +./lib/firmware/postmarketos/modem.b19 +./lib/firmware/postmarketos/modem.b20 +./lib/firmware/postmarketos/modem.mdt +./lib/firmware/postmarketos/qdsp6m.qdb +./lib/firmware/postmarketos/venus.b00 +./lib/firmware/postmarketos/venus.b01 +./lib/firmware/postmarketos/venus.b02 +./lib/firmware/postmarketos/venus.b03 +./lib/firmware/postmarketos/venus.b04 +./lib/firmware/postmarketos/venus.mdt +./lib/firmware/postmarketos/wcnss.b00 +./lib/firmware/postmarketos/wcnss.b01 +./lib/firmware/postmarketos/wcnss.b02 +./lib/firmware/postmarketos/wcnss.b04 +./lib/firmware/postmarketos/wcnss.b06 +./lib/firmware/postmarketos/wcnss.b09 +./lib/firmware/postmarketos/wcnss.b10 +./lib/firmware/postmarketos/wcnss.b11 +./lib/firmware/postmarketos/wcnss.b12 +./lib/firmware/postmarketos/wcnss.mdt +./lib/firmware/postmarketos/wlan/prima/WCNSS_qcom_wlan_nv.bin