firmware-samsung-m0: fix wifi on mainline, and add bt fw (MR 2873)

With this wifi seem to work reliably, and it is possibly to for
example connect to a bluetooth speaker and play music.

For wifi, issue seem to be with the nvram_net.txt file, changing only
that one to a newer one makes wifi work.  Here, both the .txt and .bin
file are updated, as the old files are from 2012, while the new
ones have a datestamp from 2019.
This commit is contained in:
Henrik Grimler 2022-01-21 17:39:23 +01:00 committed by Newbyte
parent 8eab5f8b16
commit 33d94e95dd
No known key found for this signature in database
GPG Key ID: 5873C171C9429CFA
3 changed files with 47 additions and 19 deletions

View File

@ -3,7 +3,7 @@
pkgname=device-samsung-m0
pkgdesc="Samsung Galaxy S III"
pkgver=3
pkgrel=1
pkgrel=2
url="https://postmarketos.org"
license="MIT"
arch="armv7"
@ -28,7 +28,7 @@ package() {
}
nonfree_firmware() {
pkgdesc="WiFi firmware"
pkgdesc="WiFi and Bluetooth firmware"
depends="firmware-samsung-m0-mainline"
mkdir "$subpkgdir"
}

View File

@ -2,7 +2,7 @@
pkgname=device-samsung-m3
pkgdesc="Samsung Galaxy S III LTE"
pkgver=3
pkgrel=0
pkgrel=1
url="https://postmarketos.org"
license="MIT"
arch="armv7"
@ -27,7 +27,7 @@ package() {
}
nonfree_firmware() {
pkgdesc="WiFi firmware"
pkgdesc="WiFi and Bluetooth firmware"
depends="firmware-samsung-m0-mainline"
mkdir "$subpkgdir"
}

View File

@ -1,42 +1,70 @@
pkgname=firmware-samsung-m0
pkgver=1
pkgver=2
pkgrel=0
_commit="d5a8735a6ad1fff3091f100383ac004f411d7528"
_repo="android_vendor_samsung"
pkgdesc="Samsung Galaxy S III Firmware"
url="https://github.com/Androguide/android_vendor_samsung"
_commit="fdd8c44568a148c22fbf008de822ff4e27992da1"
url="https://github.com/TheMuppets/proprietary_vendor_samsung"
_armbian_commit="5ff122ef309a1ddabb4bf7f37c8347c43b314a61"
_armbian_url="https://github.com/armbian/firmware"
arch="armv7"
license="proprietary"
subpackages="
$pkgname-mainline
$pkgname-downstream
"
source="$pkgname-$_commit.tar.gz::https://github.com/Androguide/$_repo/archive/$_commit.tar.gz"
source="
$url/raw/$_commit/smdk4412-common/proprietary/bin/bcm4334.hcd
bcm4334_nvram_net.txt::$url/raw/$_commit/smdk4412-common/proprietary/etc/wifi/nvram_net.txt
$url/raw/$_commit/smdk4412-common/proprietary/etc/wifi/bcmdhd_sta.bin_b2
$_armbian_url/raw/$_armbian_commit/brcm/brcmfmac4334-sdio.bin
$_armbian_url/raw/$_armbian_commit/brcm/brcmfmac4334-sdio.rockchip%2Crk3318-box.txt
"
options="!check !strip !archcheck !spdx !tracedeps pmb:cross-native"
builddir="$srcdir/android_vendor_samsung-$_commit"
package() {
install -Dm644 "$srcdir/$_repo-$_commit"/smdk4412-common/proprietary/system/etc/wifi/nvram_net.txt \
"$pkgdir"/lib/firmware/postmarketos/nvram_net.txt
mkdir -p "$pkgdir"/lib/firmware/postmarketos
install -m644 "$srcdir"/bcm4334.hcd \
"$pkgdir"/lib/firmware/postmarketos/
}
mainline() {
depends="$pkgname linux-firmware-brcm"
mkdir -p "$subpkgdir"/lib/firmware/brcm
depends="$pkgname"
mkdir -p "$subpkgdir"/lib/firmware/brcm \
"$subpkgdir"/lib/firmware/postmarketos
ln -s /lib/firmware/postmarketos/nvram_net.txt \
install -m644 "$srcdir"/brcmfmac4334-sdio.bin \
"$subpkgdir"/lib/firmware/postmarketos/brcmfmac4334-sdio.bin
ln -s /lib/firmware/postmarketos/brcmfmac4334-sdio.bin \
"$subpkgdir"/lib/firmware/brcm/brcmfmac4334-sdio.samsung,i9300.bin
ln -s /lib/firmware/postmarketos/brcmfmac4334-sdio.bin \
"$subpkgdir"/lib/firmware/brcm/brcmfmac4334-sdio.samsung,i9305.bin
install -m644 "$srcdir"/brcmfmac4334-sdio.rockchip%2Crk3318-box.txt \
"$subpkgdir"/lib/firmware/postmarketos/brcmfmac4334-sdio.txt
ln -s /lib/firmware/postmarketos/brcmfmac4334-sdio.txt \
"$subpkgdir"/lib/firmware/brcm/brcmfmac4334-sdio.samsung,i9300.txt
ln -s /lib/firmware/postmarketos/nvram_net.txt \
ln -s /lib/firmware/postmarketos/brcmfmac4334-sdio.txt \
"$subpkgdir"/lib/firmware/brcm/brcmfmac4334-sdio.samsung,i9305.txt
ln -s /lib/firmware/postmarketos/bcm4334.hcd \
"$subpkgdir"/lib/firmware/brcm/BCM4334B0.hcd
}
downstream() {
depends="$pkgname"
mkdir -p "$subpkgdir"/lib/firmware/postmarketos/
install -Dm644 "$srcdir/$_repo-$_commit"/smdk4412-common/proprietary/system/etc/wifi/bcmdhd_sta.bin_b2 \
"$subpkgdir"/lib/firmware/postmarketos/bcmdhd_sta.bin_b2
install -m644 "$srcdir"/bcm4334_nvram_net.txt \
"$pkgdir"/lib/firmware/postmarketos/nvram_net.txt
install -m644 "$srcdir"/bcmdhd_sta.bin_b2 \
"$subpkgdir"/lib/firmware/postmarketos/
}
sha512sums="
6559320d23e6a73accacf8c760426cb5a0679ab34e353d24dde653b336eadf98c2aa28c783e7010bf9f32cc64baadc02a9fff09baac6ff8b535ed5bc94c8abc5 firmware-samsung-m0-d5a8735a6ad1fff3091f100383ac004f411d7528.tar.gz
cbed1dc60829161c7ac9649dcae67fc45204c1a25e8de320ad3bc4e9d5cae573fb8a4745f91355fa96d2d3d4124a9e707341fc5bd1b22705cb2efb16831e029f bcm4334.hcd
f6a936c526ace433b0268f2e35205776e17496fb14852deaf21f07e68ff16ac99963ab94c93094a58019bf514f11a415c1a0fc4a9e4cd523047ffefd9c6c55d8 bcm4334_nvram_net.txt
4f29f977acfa48437bb427ad49a03021bc98af9623575ecfb3e994a6ebcaa99899e843550b4080a0e16bca2076a0a9bd1788c1ff543e36687c2b3196b56e6099 bcmdhd_sta.bin_b2
528b8087ce2d985c397b1072070bd743114b7176340cd7612ca5d293e2059b1c483522c3adc4f58c4daf738848e95d3541195608f47acc5236032b6a2bfee441 brcmfmac4334-sdio.bin
d5c83e1dcd67630e186ab484d150ca5c0af12810de62a46ec6e525b50dabf64a75f1231ef8d7c1d102fb76389210fdb952975460179ca767acd0ffdd869907d7 brcmfmac4334-sdio.rockchip%2Crk3318-box.txt
"