firmware-samsung-chagall: add downstream and mainline subpkgs (MR 4238)

For downstream kernel we have wifi files from android, while for
mainline we pull in linux-firmware-other which contains mfc firmware.
This commit is contained in:
Henrik Grimler 2023-07-06 22:28:40 +02:00 committed by Dylan Van Assche
parent 139b6bdea3
commit 9d3a8332cd
No known key found for this signature in database
GPG key ID: 8642571587897EA1

View file

@ -1,26 +1,47 @@
pkgname=firmware-samsung-chagall
pkgver=1
pkgver=2
pkgrel=0
pkgdesc="Firmware for Samsung tablets based on exynos5420"
pkgdesc="Firmware for Samsung chagallwifi and chagalllte"
url="https://github.com/TheMuppets/proprietary_vendor_samsung"
arch="armv7"
license="proprietary"
options="!check !strip !archcheck !spdx !tracedeps pmb:cross-native"
subpackages="
$pkgname-downstream:downstream
$pkgname-mainline:mainline
"
# Source
_commit="06294e9dd7dd1a7edd3ae1e03634c8bae1358ff7"
_url="https://github.com/TheMuppets/proprietary_vendor_samsung/raw/$_commit"
_chagallwifi_wifi_files="bcmdhd_sta.bin nvram_net.txt_4354_a1"
_chagall_commit="06294e9dd7dd1a7edd3ae1e03634c8bae1358ff7"
_url="https://github.com/TheMuppets/proprietary_vendor_samsung/raw/$_chagall_commit"
_chagall_wifi_files="bcmdhd_sta.bin nvram_net.txt_4354_a1"
for _i in $_chagallwifi_wifi_files; do
source="$source $pkgname-$_commit-$_i::$_url/chagallwifi/proprietary/etc/wifi/$_i";
for _i in $_chagall_wifi_files; do
source="$source $pkgname-$_chagall_commit-$_i::$_url/chagallwifi/proprietary/etc/wifi/$_i";
done
package() {
install -Dm644 "$srcdir/$pkgname-$_commit-bcmdhd_sta.bin" \
"$pkgdir"/lib/firmware/postmarketos/bcmdhd_sta.bin_4354_a1
install -Dm644 "$srcdir/$pkgname-$_commit-nvram_net.txt_4354_a1" \
"$pkgdir"/lib/firmware/postmarketos/nvram_net.txt_4354_a1
mkdir -p "$pkgdir"
}
downstream() {
pkgdesc="Firmware for Samsung chagall* when using downstream kernel"
install_if="device-samsung-chgallwifi-kernel-downstream"
mkdir -p "$subpkgdir"
# Wifi
local file
for file in $_chagall_wifi_files; do
install -Dm644 "$srcdir/$pkgname-$_chagall_commit-$file" \
"$subpkgdir/lib/firmware/postmarketos/$file"
done
}
mainline() {
pkgdesc="Firmware for Samsung chagall* when using mainline kernel"
install_if="device-samsung-chagallwifi-kernel-mainline"
# linux-firmware-other contains s5p-mfc-v7.fw
depends="linux-firmware-other"
mkdir -p "$subpkgdir"
}
sha512sums="1666a13ee4eed31b9c320acd0f48d770a4343fe37da02527e191c5d50f083b20c902c4519f10c256c173315a5315cbe2c7f605e4b7fda1e327243e3fe4a782b6 firmware-samsung-chagall-06294e9dd7dd1a7edd3ae1e03634c8bae1358ff7-bcmdhd_sta.bin