samsung-nevisp: add Wi-Fi support (!995)

This commit is contained in:
Théo Friberg 2020-02-27 11:54:21 +02:00 committed by Alexey Min
parent 456d068b4d
commit f88b94ba7d
No known key found for this signature in database
GPG key ID: 0B19D2A65870B448
5 changed files with 60 additions and 9 deletions

View file

@ -3,7 +3,7 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname="device-samsung-nevisp"
pkgdesc="Samsung Galaxy Fame GT-S6810P"
pkgver=0.1
pkgver=0.2
pkgrel=0
url="https://postmarketos.org"
license="MIT"
@ -11,7 +11,9 @@ arch="armv7"
options="!check !archcheck"
depends="postmarketos-base linux-samsung-nevisp mkbootimg mesa-dri-swrast msm-fb-refresher"
makedepends="devicepkg-dev"
source="deviceinfo"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
source="deviceinfo
modules-load.conf"
build() {
devicepkg_build $startdir $pkgname
@ -19,7 +21,14 @@ build() {
package() {
devicepkg_package $startdir $pkgname
install -Dm644 "$srcdir"/modules-load.conf \
"$pkgdir"/etc/modules-load.d/00-$pkgname.conf
}
sha512sums="233d1fca39301b3ba995b6ae9a52aa19d7124efd2f452009f828d1fe0ae88fcde98a46257990adf75281d8cf99b3bf1d24c30ff949393e54f4f0e6a55a35734e deviceinfo"
nonfree_firmware() {
pkgdesc="Firmware for wifi."
depends="firmware-samsung-nevisp"
mkdir "$subpkgdir"
}
sha512sums="233d1fca39301b3ba995b6ae9a52aa19d7124efd2f452009f828d1fe0ae88fcde98a46257990adf75281d8cf99b3bf1d24c30ff949393e54f4f0e6a55a35734e deviceinfo
0aa06f2147be0ce89fb1ae418abff809ffa8de677afce4e3b29926ccea66f776065d2bb95675a8692230e40e57ec2ce657d9b3f79be56f1db35f4a724a3484f9 modules-load.conf"

View file

@ -0,0 +1,5 @@
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
# wifi module
dhd

View file

@ -5,7 +5,7 @@
pkgname="linux-samsung-nevisp"
pkgver=3.0.101
pkgrel=0
pkgrel=1
pkgdesc="Samsung Galaxy Fame GT-S6810P kernel fork"
arch="armv7"
_carch="arm"
@ -15,7 +15,7 @@ license="GPL-2.0-only"
options="!strip !check !tracedeps"
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev gcc4 xz"
# Compiler: GCC 4 (doesn't compile with newer versions)
if [ "${CC:0:5}" != "gcc4-" ]; then
CC="gcc4-$CC"
HOSTCC="gcc4-gcc"
@ -45,6 +45,12 @@ build() {
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
# the 'no-pic' flag is necessary to avoid the
# error 'Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)' when loading the module
make ARCH="$_carch" CC="${CC:-gcc}" CFLAGS_MODULE="-fno-pic" \
KBUILD_BUILD_VERSION="$((pkgrel + 1))-postmarketOS" modules
}
package() {
@ -65,10 +71,18 @@ package() {
error "Could not find zImage in $PWD!"
return 1
fi
# Modules
cd "$builddir"
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1))-postmarketOS" \
INSTALL_MOD_PATH="$pkgdir" INSTALL_MOD_STRIP=1 \
modules_install
}
sha512sums="1c62313451ff2a04ab9259a4b2c954388a360f45f20af90d05e9cfe73d31f49fc4847f24c1742c89a45f1646e1d27999fc6f5bd224baba7046b07ab324e7baae linux-samsung-nevisp-8224116dca7de79d181c0761468f569e6ac3505e.tar.gz
18056bc314704d2a6f9f2c14cddd970663297c49296909ebe4d42ec5b4b55d107a86ef1b6b8df82c46f6ac1cd4b09e8aca1383d54a005bc380fa4134c87b4372 config-samsung-nevisp.armv7
a6c7bff882eb299c11f8fc8e1d3e70119e78493c5ecec7c8607b44bf5930bfe7bf11033005cd1912264d30fba8fda8b39737f5b37a91778110e3a4ff038e421d config-samsung-nevisp.armv7
d8cdc1137e6a4ad78a3a31acc40f0c98f4db272eaf5b90ee850abb83b80916c4ff3c18a0a181e94eebead44213f6314e3363d0c4b91d95ee1adafbcad6dc57ab android_paranoid_network.patch
77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch"

View file

@ -1380,8 +1380,8 @@ CONFIG_BROADCOM_WIFI_RESERVED_MEM=y
# CONFIG_B43 is not set
# CONFIG_B43LEGACY is not set
# CONFIG_BCMDHD_4334 is not set
CONFIG_BCMDHD_FW_PATH="/system/etc/firmware/fw_bcmdhd.bin"
CONFIG_BCMDHD_NVRAM_PATH="/system/etc/wifi/bcmdhd.cal"
CONFIG_BCMDHD_FW_PATH="/lib/firmware/postmarketos/fw_bcmdhd.bin"
CONFIG_BCMDHD_NVRAM_PATH="/lib/firmware/postmarketos/bcmdhd.cal"
# CONFIG_BCM4330 is not set
CONFIG_BCM4334=m
# CONFIG_BCM43241 is not set

View file

@ -0,0 +1,23 @@
# Contributor: Théo Friberg <fsmnarmosta@posteo.net>
# Maintainer: Théo Friberg <fsmnarmosta@posteo.net>
pkgname="firmware-samsung-nevisp"
pkgver=1
pkgrel=0
pkgdesc="Non-free firmware for the Samsung Galaxy Fame (wifi)"
url="https://github.com/wulsic/android_vendor_samsung_nevisp"
arch="armv7"
license="other:proprietary"
# Sources
_commit="fbbefae4c3b06978d0e2948211a8138bb6a6a11c"
source="$pkgname-$_commit.tar.gz::https://github.com/wulsic/android_vendor_samsung_nevisp/archive/$_commit.tar.gz"
builddir="$srcdir/android_vendor_samsung_nevisp-$_commit"
package() {
install -Dm644 "$builddir"/proprietary/etc/wifi/nvram_net.txt \
"$pkgdir"/lib/firmware/postmarketos/bcmdhd.cal
install -Dm644 "$builddir"/proprietary/etc/wifi/bcmdhd_sta.bin_b2 \
"$pkgdir"/lib/firmware/postmarketos/fw_bcmdhd.bin_b2
}
sha512sums="9e27f2fe1c897d9fcf8d4736a35bab729079842f7f18e29c0d02fe63e7321400af40541b235b7ae80f9ad551489ba14bbe8fea2539106a6394f612e298876033 firmware-samsung-nevisp-fbbefae4c3b06978d0e2948211a8138bb6a6a11c.tar.gz"