From 440638512e086f03620bb27ccdd9672a4b96a5a3 Mon Sep 17 00:00:00 2001 From: methanal <13671494-methanal@users.noreply.gitlab.com> Date: Sat, 30 Mar 2024 21:46:31 +0000 Subject: [PATCH] samsung-a2corelte: new device (MR 4981) --- .../testing/device-samsung-a2corelte/APKBUILD | 37 ++++++++++++++++++ .../device-samsung-a2corelte/deviceinfo | 38 +++++++++++++++++++ .../firmware-samsung-a2corelte/APKBUILD | 30 +++++++++++++++ 3 files changed, 105 insertions(+) create mode 100644 device/testing/device-samsung-a2corelte/APKBUILD create mode 100644 device/testing/device-samsung-a2corelte/deviceinfo create mode 100644 device/testing/firmware-samsung-a2corelte/APKBUILD diff --git a/device/testing/device-samsung-a2corelte/APKBUILD b/device/testing/device-samsung-a2corelte/APKBUILD new file mode 100644 index 000000000..0a287bc0f --- /dev/null +++ b/device/testing/device-samsung-a2corelte/APKBUILD @@ -0,0 +1,37 @@ +# Reference: +pkgname=device-samsung-a2corelte +pkgdesc="Samsung Galaxy A2 Core" +pkgver=1 +pkgrel=0 +url="https://postmarketos.org" +license="MIT" +arch="aarch64" +options="!check !archcheck" +depends=" + dtbtool-exynos + linux-postmarketos-exynos7870 + mesa-dri-simpledrm + mkbootimg + postmarketos-base +" +makedepends="devicepkg-dev" +source="deviceinfo" +subpackages="$pkgname-nonfree-firmware:nonfree_firmware" + +build() { + devicepkg_build $startdir $pkgname +} + +package() { + devicepkg_package $startdir $pkgname +} + +nonfree_firmware() { + pkgdesc="Proprietary firmware blobs for $pkgdesc" + depends="firmware-samsung-a2corelte" + mkdir "$subpkgdir" +} + +sha512sums=" +ba75ed1b002e28dee895183e91cb66d86886b04f2e9c07bd15d196fbd8435f284a05bd10385a1c50b79e8b76b99128da9b4b87622f64b146b9885460b083f355 deviceinfo +" diff --git a/device/testing/device-samsung-a2corelte/deviceinfo b/device/testing/device-samsung-a2corelte/deviceinfo new file mode 100644 index 000000000..e5734cb8e --- /dev/null +++ b/device/testing/device-samsung-a2corelte/deviceinfo @@ -0,0 +1,38 @@ +# Reference: +# Please use double quotes only. You can source this file in shell +# scripts. + +deviceinfo_format_version="0" +deviceinfo_name="Samsung Galaxy A2 Core" +deviceinfo_manufacturer="Samsung" +deviceinfo_codename="samsung-a2corelte" +deviceinfo_year="2019" +deviceinfo_arch="aarch64" + +# Device related +deviceinfo_chassis="handset" +deviceinfo_keyboard="false" +deviceinfo_external_storage="true" +deviceinfo_screen_width="540" +deviceinfo_screen_height="960" +deviceinfo_gpu_accelerated="true" + +# Bootloader related +deviceinfo_flash_method="heimdall-bootimg" +deviceinfo_generate_bootimg="true" +deviceinfo_bootimg_qcdt="true" +deviceinfo_bootimg_qcdt_type="exynos" +deviceinfo_bootimg_mtk_mkimage="false" +deviceinfo_bootimg_dtb_second="false" +deviceinfo_flash_sparse="true" +deviceinfo_flash_pagesize="2048" +deviceinfo_flash_offset_base="0x10000000" +deviceinfo_flash_offset_kernel="0x00008000" +deviceinfo_flash_offset_ramdisk="0x01000000" +deviceinfo_flash_offset_second="0x00f00000" +deviceinfo_flash_offset_tags="0x00000100" +deviceinfo_flash_heimdall_partition_kernel="BOOT" +deviceinfo_flash_heimdall_partition_system="USERDATA" + +# Kernel related +deviceinfo_dtb="exynos/exynos7870-a2corelte" diff --git a/device/testing/firmware-samsung-a2corelte/APKBUILD b/device/testing/firmware-samsung-a2corelte/APKBUILD new file mode 100644 index 000000000..568146e8a --- /dev/null +++ b/device/testing/firmware-samsung-a2corelte/APKBUILD @@ -0,0 +1,30 @@ +pkgname=firmware-samsung-a2corelte +pkgver=1 +pkgrel=0 +pkgdesc="Proprietary firmware blobs for Samsung Galaxy A2 Core" +url="https://gitlab.com/exynos7870-mainline/firmware" +arch="aarch64" +license="proprietary" +options="!check !strip !archcheck !spdx !tracedeps pmb:cross-native" + +_device="a2corelte" +_commit="b89cec942fe297ff8623dd87e92f1a2380ed68f8" + +source="$url/-/archive/$_commit/firmware-$_commit.tar.gz" + +package() { + # Bluetooth firmware (Broadcom BCM43430B0) + install -Dm644 "$srcdir/firmware-$_commit/$_device/bluetooth_bcm.hcd" \ + "$pkgdir"/lib/firmware/postmarketos/brcm/"BCM43430B0.hcd" + + # Wi-Fi SDIO firmware (Broadcom BCM43430B0) + install -Dm644 "$srcdir/firmware-$_commit/$_device/wlansdio_bcm.bin" \ + "$pkgdir"/lib/firmware/postmarketos/brcm/"brcmfmac43430b0-sdio.bin" + install -Dm644 "$srcdir/firmware-$_commit/$_device/wlansdio_bcm.clm_blob" \ + "$pkgdir"/lib/firmware/postmarketos/brcm/"brcmfmac43430b0-sdio.clm_blob" + install -Dm644 "$srcdir/firmware-$_commit/$_device/wlansdio_bcm.txt" \ + "$pkgdir"/lib/firmware/postmarketos/brcm/"brcmfmac43430b0-sdio.txt" +} +sha512sums=" +ea9b18d5f1a7020fe59878191f30dcdeda17e9853066b94247443c55fc15801fc818a1bc0d909bebe007940c70e3d1bd4b7fb0b5725a1d424aedaabbccd44f36 firmware-b89cec942fe297ff8623dd87e92f1a2380ed68f8.tar.gz +"