samsung-gt58lte: convert to common gt58 package (MR 2431)

With msm-firmware-loader it's possible to use common package for both
variants and prompt the user if they need the modem or not.
This commit is contained in:
Nikita Travkin 2021-09-19 18:13:29 +05:00 committed by Alexey Minnekhanov
parent dbf5ae3c21
commit b23163daf0
No known key found for this signature in database
GPG key ID: 6FE3B029D9D9FAFF
5 changed files with 54 additions and 62 deletions

View file

@ -1,6 +1,6 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-samsung-gt58lte
pkgdesc="Samsung Galaxy Tab A 8.0 2015 (SM-T355Y)"
pkgname=device-samsung-gt58
pkgdesc="Samsung Galaxy Tab A 8.0 (2015)"
pkgver=1
pkgrel=0
url="https://postmarketos.org"
@ -9,12 +9,14 @@ arch="aarch64"
options="!check !archcheck"
depends="postmarketos-base mkbootimg soc-qcom-msm8916"
makedepends="devicepkg-dev dtbtool"
source="deviceinfo rootston.ini"
source="
deviceinfo
rootston.ini
"
subpackages="
$pkgname-kernel-mainline:kernel_mainline
$pkgname-kernel-mainline-modem:kernel_mainline_modem
$pkgname-kernel-mainline-modem-lte:kernel_mainline_modem_lte
$pkgname-nonfree-firmware:nonfree_firmware
$pkgname-nonfree-firmware-modem:nonfree_firmware_modem
$pkgname-phosh
"
@ -27,27 +29,20 @@ package() {
}
kernel_mainline() {
pkgdesc="Close to mainline kernel (no modem, audio routed directly)"
pkgdesc="Close to mainline kernel (no modem, audio routed directly, for all variants)"
depends="linux-postmarketos-qcom-msm8916"
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}
kernel_mainline_modem() {
pkgdesc="Close to mainline kernel (non-free modem, audio routed through ADSP)"
kernel_mainline_modem_lte() {
pkgdesc="Close to mainline kernel (non-free modem, audio routed through ADSP, for LTE variant)"
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-gt58lte-venus firmware-samsung-gt58lte-wcnss"
mkdir "$subpkgdir"
}
nonfree_firmware_modem() {
pkgdesc="Modem firmware"
depends="firmware-samsung-gt58lte-modem"
install_if="$pkgname-nonfree-firmware $pkgname-kernel-mainline-modem"
depends="linux-firmware-qcom msm-firmware-loader firmware-samsung-gt58-wcnss-nv"
mkdir "$subpkgdir"
}
@ -58,6 +53,6 @@ phosh() {
}
sha512sums="
5ae8a75de908de406d4c35d1f844714636ae8aa8da29c124371540a0fae6f67da3ba670dd87ab115d84895577eb75783365f19b3fada1de69ae898d1869043be deviceinfo
3017f500a9cc6d424efd2d1498709e9319cefd6c87eaeaa4b6db6862c0df9f327ebb18b09b73c2a173aaaecc95cf465d978e08f9eaebd4f300317c433b575606 rootston.ini
22220a98b127734caeb72d59b7c6d6ff7ade7c5fadc934b2b8db41a989c4ca21c47ab9f7026785841c0496f5420c1c8a336ac605bc2437734deb695c7b1c614d deviceinfo
bc620d2031027405f70eea68854744799b460db0d787e2c844556f437120eea0fc857689c6894dd485a5cd3794c7fb5281b901e9e10da1b550c637a852445180 rootston.ini
"

View file

@ -2,9 +2,9 @@
# Please use double quotes only. You can source this file in shell scripts.
deviceinfo_format_version="0"
deviceinfo_name="Samsung Galaxy Tab A 8.0 2015 (SM-T355Y)"
deviceinfo_name="Samsung Galaxy Tab A 8.0 (2015)"
deviceinfo_manufacturer="Samsung"
deviceinfo_codename="samsung-gt58lte"
deviceinfo_codename="samsung-gt58"
deviceinfo_year="2015"
deviceinfo_dtb_mainline="qcom/msm8916-samsung-gt58"
deviceinfo_dtb_mainline_modem="qcom/msm8916-samsung-gt58lte-modem"

View file

@ -1,5 +1,6 @@
[cursor:seat0]
map-to-output:DSI-1
[output:DSI-1]
scale = 1
[cursor:seat0]
map-to-output:DSI-1
[output:DSI-1]
scale = 1

View file

@ -0,0 +1,33 @@
pkgname=firmware-samsung-gt58
pkgver=1
pkgrel=0
_name="Samsung Galaxy Tab A 8.0 (2015)"
pkgdesc="Firmware for $_name"
url="https://postmarketos.org"
subpackages="$pkgname-wcnss-nv:wcnss_nv"
arch="aarch64"
license="proprietary"
options="!check !strip !archcheck !tracedeps pmb:cross-native"
source="$pkgname-WCNSS_qcom_wlan_nv.bin.base64::https://pastebin.com/raw/L95C6H61"
_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="
0708fde555d49c7cad49613af764921a906c6de00638b766b6adbfdcf8848fad630264c9234f804dbfcba9f91dde941a1f594673c1789b6ad48145e8039cde71 firmware-samsung-gt58-WCNSS_qcom_wlan_nv.bin.base64
"

View file

@ -1,37 +0,0 @@
pkgname=firmware-samsung-gt58lte
pkgver=1
pkgrel=0
pkgdesc="Firmware for Samsung Galaxy Tab A 8.0 2015 (SM-T355Y)"
url="http://hello-world-321.github.io/pmos-firmware/"
subpackages="$pkgname-modem $pkgname-venus $pkgname-wcnss"
arch="aarch64"
license="proprietary"
options="!check !strip !archcheck !tracedeps pmb:cross-native"
source="http://hello-world-321.github.io/pmos-firmware/SM-T355Y.tar.xz"
_fwdir="/lib/firmware/postmarketos"
package() {
# parent package is empty
mkdir -p "$pkgdir"
}
modem() {
pkgdesc="Samsung Galaxy Tab A 8.0 2015 (SM-T355Y) modem firmware"
install -Dm644 "$srcdir"/mba.mbn -t "$subpkgdir/$_fwdir"
install -Dm644 "$srcdir"/modem.* -t "$subpkgdir/$_fwdir"
}
venus() {
pkgdesc="Samsung Galaxy Tab A 8.0 2015 (SM-T355Y) video firmware"
install -Dm644 "$srcdir"/venus.* -t "$subpkgdir/$_fwdir"/qcom/venus-1.8
}
wcnss() {
pkgdesc="Samsung Galaxy Tab A 8.0 2015 (SM-T355Y) WiFi/BT firmware"
cd "$srcdir"
install -Dm644 wcnss.* -t "$subpkgdir/$_fwdir"
install -Dm644 WCNSS_* -t "$subpkgdir/$_fwdir"/wlan/prima
}
sha512sums="c826317e7aec6fc713e91aa398399818b699b8059b52fec0931f1af4952282331977ba677e90f531ca031be7272542f0cb181b1a1e7243da694f8caaecea66f8 SM-T355Y.tar.xz"