samsung-a52q: new device (MR 3379)

This commit is contained in:
Leandro Friedrich 2022-08-22 22:19:07 +02:00 committed by Dylan Van Assche
parent ea62ccf0d4
commit df62747456
No known key found for this signature in database
GPG key ID: 8642571587897EA1
3 changed files with 183 additions and 0 deletions

View file

@ -0,0 +1,48 @@
# Maintainer: Leandro Friedrich <email@leandrofriedrich.de>
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-samsung-a52q
pkgdesc="Samsung Galaxy A52"
pkgver=1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="
linux-postmarketos-qcom-sm7125
mesa-dri-gallium
mkbootimg
postmarketos-base
soc-qcom-sm7125
alsa-ucm-conf-samsung-sm7125
"
makedepends="devicepkg-dev"
source="deviceinfo"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
nonfree_firmware() {
pkgdesc="Firmware for GPU, Audio, Modem, WiFi, etc."
depends="
firmware-samsung-a52q-adreno
firmware-samsung-a52q-adsp
firmware-samsung-a52q-cdsp
firmware-samsung-a52q-ipa
firmware-samsung-a52q-modem
firmware-samsung-a52q-wlan
firmware-samsung-a52q-bluetooth
firmware-samsung-a52q-venus
"
mkdir "$subpkgdir"
}
sha512sums="
ebbba971a0c250627bf12f8b0922b44720875e3e1987c2ad5da25b258af684e01e349c392c0706003a9104fbea9cd5c623ae80cc731c52b581713d3d68dc01e5 deviceinfo
"

View file

@ -0,0 +1,38 @@
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell
# scripts.
deviceinfo_format_version="0"
deviceinfo_name="Samsung Galaxy A52"
deviceinfo_manufacturer="Samsung"
deviceinfo_codename="samsung-a52q"
deviceinfo_year="2021"
deviceinfo_dtb="qcom/sm7125-samsung-a52q"
deviceinfo_append_dtb="true"
deviceinfo_arch="aarch64"
deviceinfo_gpu_accelerated="true"
# Device related
deviceinfo_chassis="handset"
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="1080"
deviceinfo_screen_height="2400"
# Bootloader related
deviceinfo_flash_method="heimdall-bootimg"
deviceinfo_kernel_cmdline="console=null"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="false"
deviceinfo_bootimg_mtk_mkimage="false"
deviceinfo_bootimg_dtb_second="false"
deviceinfo_flash_pagesize="4096"
deviceinfo_flash_offset_base="0x00000000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x02000000"
deviceinfo_flash_offset_second="0x00000000"
deviceinfo_flash_offset_tags="0x01e00000"
deviceinfo_flash_heimdall_partition_kernel="BOOT"
deviceinfo_flash_heimdall_partition_system="SUPER"
deviceinfo_rootfs_image_sector_size="4096"
deviceinfo_flash_sparse="true"

View file

@ -0,0 +1,97 @@
# Maintainer: Leandro Friedrich <email@leandrofriedrich.de>
pkgname=firmware-samsung-a52q
pkgver=20220820
pkgrel=0
pkgdesc="Firmware for Samsung Galaxy A52"
subpackages="
$pkgname-adreno
$pkgname-adsp
$pkgname-cdsp
$pkgname-ipa
$pkgname-modem
$pkgname-venus
$pkgname-wlan
$pkgname-bluetooth
"
url="https://github.com/budderbrot/a52q-firmware"
arch="aarch64"
license="proprietary"
options="!check !strip !archcheck !tracedeps pmb:cross-native"
_commit="3ec32aecf7837a34240702955f5d01a336cf0c2c"
source="https://github.com/budderbrot/a52q-firmware/archive/$_commit/a52q-firmware-$_commit.tar.gz"
builddir="$srcdir/a52q-firmware-$_commit"
package() {
# parent package is empty
mkdir -p "$pkgdir"
}
adreno() {
pkgdesc="Samsung Galaxy A52 adreno firmware"
install -Dm644 "$builddir"/a6* -t \
"$subpkgdir/lib/firmware/qcom/"
}
adsp() {
pkgdesc="Samsung Galaxy A52 adsp firmware"
install -Dm644 "$builddir"/adsp* -t \
"$subpkgdir/lib/firmware/qcom/sm7125/a52q/"
}
cdsp() {
pkgdesc="Samsung Galaxy A52 cdsp firmware"
install -Dm644 "$builddir"/cdsp* -t \
"$subpkgdir/lib/firmware/qcom/sm7125/a52q/"
}
ipa() {
pkgdesc="Samsung Galaxy A52 ipa firmware"
install -Dm644 "$builddir"/ipa_fws.* -t \
"$subpkgdir/lib/firmware/qcom/sm7125/a52q/"
}
modem() {
pkgdesc="Samsung Galaxy A52 modem firmware"
# cp because of the modem_pr directory
mkdir -p "$subpkgdir/lib/firmware/qcom/sm7125/a52q/"
cp -r "$builddir"/modem* \
"$subpkgdir/lib/firmware/qcom/sm7125/a52q/"
find "$subpkgdir/lib/firmware/qcom/sm7125/a52q/" \
-type f -exec chmod 0644 {} \;
}
venus() {
pkgdesc="Samsung Galaxy A52 venus firmware"
install -Dm644 "$builddir"/venus.* -t \
"$subpkgdir/lib/firmware/qcom/sm7125/a52q/"
}
wlan() {
pkgdesc="Samsung Galaxy A52 wlan firmware"
install -Dm644 "$builddir"/board-2.bin -t \
"$subpkgdir/lib/firmware/ath10k/WCN3990/hw1.0/"
install -Dm644 "$builddir"/firmware-5.bin -t \
"$subpkgdir/lib/firmware/ath10k/WCN3990/hw1.0/"
install -Dm644 "$builddir"/wlanmdsp.mbn -t \
"$subpkgdir/lib/firmware/qcom/sm7125/a52q/"
}
bluetooth() {
pkgdesc="Samsung Galaxy A52 bluetooth firmware"
install -Dm644 "$builddir"/crbtfw21.tlv -t \
"$subpkgdir/lib/firmware/qca/"
install -Dm644 "$builddir"/crnv21.* -t \
"$subpkgdir/lib/firmware/qca/sm7125/a52q/"
}
sha512sums="
fbd93fc61903d16489f531c8431e8e1a4d5c21c0ada0c998c619c3b5193506c2fc6b6b56d6dd3002f834955e5d884dd80519eee260a04c96319b125ffad4b60a a52q-firmware-3ec32aecf7837a34240702955f5d01a336cf0c2c.tar.gz
"