samsung-a5lte: new device (Samsung Galaxy A5 - SM-A500F) (!1024)

SM-A500F is pretty much identical to SM-A500FU (note the U),
but it needs different firmware for some reason.
This commit is contained in:
Minecrell 2020-03-03 11:13:58 +01:00 committed by Alexey Min
parent 5e7e254e08
commit 63583355e4
No known key found for this signature in database
GPG key ID: 463F84201DACD7B9
3 changed files with 127 additions and 0 deletions

View file

@ -0,0 +1,54 @@
# Reference: <https://postmarketos.org/devicepkg>
# Contributor: Minecrell <minecrell@minecrell.net>
pkgname="device-samsung-a5lte"
pkgdesc="Samsung Galaxy A5 (SM-A500F)"
pkgver=2
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="postmarketos-base mkbootimg soc-qcom-msm8916"
makedepends="devicepkg-dev"
source="deviceinfo"
subpackages="
$pkgname-kernel-mainline:kernel_mainline
$pkgname-kernel-mainline-modem:kernel_mainline_modem
$pkgname-nonfree-firmware:nonfree_firmware
$pkgname-nonfree-firmware-modem:nonfree_firmware_modem
"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
kernel_mainline() {
pkgdesc="Mainline kernel (no modem, audio routed directly)"
depends="linux-postmarketos-qcom-msm8916"
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}
kernel_mainline_modem() {
pkgdesc="Mainline kernel (non-free modem, audio routed through ADSP)"
depends="linux-postmarketos-qcom-msm8916 soc-qcom-msm8916-modem"
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}
nonfree_firmware() {
pkgdesc="GPU/WiFi/BT/Video(/Modem) firmware"
depends="linux-firmware-qcom firmware-samsung-a5lte-venus firmware-samsung-a5lte-wcnss"
mkdir "$subpkgdir"
}
nonfree_firmware_modem() {
pkgdesc="Modem firmware"
depends="firmware-samsung-a5lte-modem"
install_if="$pkgname-nonfree-firmware $pkgname-kernel-mainline-modem"
mkdir "$subpkgdir"
}
sha512sums="b23540d7472d4affb10d3f42fe89d4697db055cee73f10c839c4a04bc512b2dc3a34adfaf0cfad28242f263cdf6699a4b873b2eac1a44a6b62dc35988b75ff05 deviceinfo"

View file

@ -0,0 +1,36 @@
# 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 A5 (SM-A500F)"
deviceinfo_manufacturer="Samsung"
deviceinfo_codename="samsung-a5lte"
deviceinfo_year="2015"
# Eventually this should be replaced with a special DTB for a5lte.
# However, the differences are minimal, so for now a5u-eur works fine.
deviceinfo_dtb_mainline="qcom/msm8916-samsung-a5u-eur"
deviceinfo_dtb_mainline_modem="qcom/msm8916-samsung-a5u-eur-modem"
deviceinfo_append_dtb="true"
deviceinfo_modules_initfs=""
deviceinfo_arch="aarch64"
# Device related
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="720"
deviceinfo_screen_height="1280"
# MSM DRM cannot take over the framebuffer from the bootloader at the moment
deviceinfo_no_framebuffer="true"
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_kernel_cmdline="earlycon=msm_serial_dm,0x78b0000 console=ttyMSM0,115200,n8 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"

View file

@ -0,0 +1,37 @@
pkgname=firmware-samsung-a5lte
pkgver=2
pkgrel=0
pkgdesc="Firmware for Samsung Galaxy A5 (SM-A500F)"
url="https://pepethekingprawn.gitlab.io/firmware/"
subpackages="$pkgname-modem $pkgname-venus $pkgname-wcnss"
arch="aarch64"
license="proprietary"
options="!check !strip !archcheck"
source="https://pepethekingprawn.gitlab.io/firmware/SM-A500F.tar.xz"
_fwdir="/lib/firmware/postmarketos"
package() {
# parent package is empty
mkdir -p "$pkgdir"
}
modem() {
pkgdesc="Samsung Galaxy A5 (SM-A500F) modem firmware"
install -Dm644 "$srcdir"/mba.mbn -t "$subpkgdir/$_fwdir"
install -Dm644 "$srcdir"/modem.* -t "$subpkgdir/$_fwdir"
}
venus() {
pkgdesc="Samsung Galaxy A5 (SM-A500F) video firmware"
install -Dm644 "$srcdir"/venus.* -t "$subpkgdir/$_fwdir"/qcom/venus-1.8
}
wcnss() {
pkgdesc="Samsung Galaxy A5 (SM-A500F) WiFi/BT firmware"
cd "$srcdir"
install -Dm644 wcnss.* -t "$subpkgdir/$_fwdir"
install -Dm644 WCNSS_* -t "$subpkgdir/$_fwdir"/wlan/prima
}
sha512sums="08421f2788eb873b4c4440c09da6732065233075e99a37b25932112297e036443664b5a9c19bb11f03da68618e065ce7638b41f80a2ad6a295a1375137a20405 SM-A500F.tar.xz"