From 454b28e421a01bc31e8d2482faa1b26eb2add2c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20=C3=82ngelo?= Date: Sun, 3 Mar 2019 18:57:07 +0000 Subject: [PATCH] asus-grouper: create nonfree firmware subpackage (!252) With this firmware I can connect to my AP using wpa_supplicant, ping servers and fetch files normally. However the driver also brings up the p2p0 interface on boot and it seems to conflict with wlan0. So to test the wireless we need to disable p2p0 and stop the wpa_supplicant service (because it attaches itself to p2p0 on boot): $ sudo ip link set p2p0 down $ sudo rc-service wpa_supplicant stop $ wpa_passphrase > ./wpa_config $ sudo wpa_supplicant -B -Dnl80211 -iwlan0 -c./wpa_config $ sudo udhcpc -i wlan0 $ ping postmarketos.org PING postmarketos.org (188.166.143.8): 56 data bytes 64 bytes from 188.166.143.8: seq=0 ttl=42 time=41.604 ms 64 bytes from 188.166.143.8: seq=1 ttl=42 time=56.022 ms 64 bytes from 188.166.143.8: seq=2 ttl=42 time=54.911 ms 64 bytes from 188.166.143.8: seq=3 ttl=42 time=54.241 ms ... $ sudo apk update fetch http://postmarketos.brixit.nl/armhf/APKINDEX.tar.gz fetch http://dl-cdn.alpinelinux.org/alpine/edge/main/armhf/APKINDEX.tar.gz fetch http://dl-cdn.alpinelinux.org/alpine/edge/community/armhf/APKINDEX.tar.gz fetch http://dl-cdn.alpinelinux.org/alpine/edge/testing/armhf/APKINDEX.tar.gz v20190228-49-gbc0f9441b0 [http://dl-cdn.alpinelinux.org/alpine/edge/main] v20190228-41-g6ee930cc6c [http://dl-cdn.alpinelinux.org/alpine/edge/community] v20190228-48-g67283cdbf6 [http://dl-cdn.alpinelinux.org/alpine/edge/testing] OK: 13694 distinct packages available --- device/device-asus-grouper/APKBUILD | 16 ++++++++-- device/device-asus-grouper/nvram.txt | 47 ++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 3 deletions(-) create mode 100644 device/device-asus-grouper/nvram.txt diff --git a/device/device-asus-grouper/APKBUILD b/device/device-asus-grouper/APKBUILD index 7044d6d11..b7b8f2678 100644 --- a/device/device-asus-grouper/APKBUILD +++ b/device/device-asus-grouper/APKBUILD @@ -2,15 +2,17 @@ pkgname="device-asus-grouper" pkgdesc="Google Nexus 7 2012 Wifi" pkgver=2 -pkgrel=0 +pkgrel=1 url="https://postmarketos.org" license="MIT" arch="armhf" options="!check !archcheck" depends="postmarketos-base linux-asus-grouper mkbootimg mesa-dri-swrast" makedepends="devicepkg-dev" +subpackages="$pkgname-nonfree-firmware:nonfree_firmware" source="deviceinfo - pointercal" + pointercal + nvram.txt" build() { devicepkg_build $startdir $pkgname @@ -22,6 +24,14 @@ package() { "$pkgdir"/etc/pointercal } +nonfree_firmware() { + pkgdesc="Google Nexus 7 (2012) wifi firmware" + depends="firmware-aosp-broadcom-wlan" + mkdir "$subpkgdir" + install -D -m644 "$srcdir"/nvram.txt \ + "$subpkgdir"/lib/firmware/postmarketos/bcmdhd/bcm4330/fw_bcm4330_bg.txt +} sha512sums="a374e9681fbeaff5047820f8b7a9c249195232730a412208415243ea8bf7a87cdc4399ab86b1c08448be279f5c9dedcb47d03ac83587f908a4c51e442a97da50 deviceinfo -ae9c145ffd745c83c73edbc486d3b9d22c6cbb8c57827b6f1ba87b6449a17a73a443be7daa0ab87de8df2dd9594e624364652c84ec1e7b536d37f52449a5a58c pointercal" +ae9c145ffd745c83c73edbc486d3b9d22c6cbb8c57827b6f1ba87b6449a17a73a443be7daa0ab87de8df2dd9594e624364652c84ec1e7b536d37f52449a5a58c pointercal +093a615250689f83c43af18a195d66d89e4b56584069a3903652e68e9da42568d2e176aa77cf23e1f23b3cb869f5c639fb1c8cdfc8af9fc6d17abe17cad7e821 nvram.txt" diff --git a/device/device-asus-grouper/nvram.txt b/device/device-asus-grouper/nvram.txt new file mode 100644 index 000000000..95557d462 --- /dev/null +++ b/device/device-asus-grouper/nvram.txt @@ -0,0 +1,47 @@ +# Azurewave Release 2011/12/29 +# NH665 bgn+BT+FM +manfid=0x2d0 +prodid=0x0552 +vendid=0x14e4 +devid=0x4360 +boardtype=0x0552 +boardrev=0x11 +# this design has 2.4GHz SP3T switch +boardflags=0x00081200 +nocrc=1 +xtalfreq=37400 +boardnum=22 +#macaddr=00:11:22:33:44:55 +#nvram_override=1 +cckdigfilttype=20 #20~26 +ag0=255 +aa2g=3 +ccode=XY +regrev=4 +#pa0b0=0x13e1 +#pa0b1=0xfdab +#pa0b2=0xff66 +rssismf2g=0xa +rssismc2g=0x3 +rssisav2g=0x7 +maxp2ga0=0x46 +sromrev=3 +#il0macaddr=00:11:22:33:44:55 +wl0id=0x431b +cckPwrOffset=5 +#ofdmdigfilttype2g=4 +ofdm2gpo=0x44444444 +mcs2gpo0=0x6666 +mcs2gpo1=0x6666 +swctrlmap_2g=0x44844484,0x4a8a4282,0x42824282,0x818a82,0x1ff +rfreg033=0x19 +rfreg033_cck=0x1f +dacrate2g=160 +txalpfbyp2g=1 +bphyscale=17 +cckPwrIdxCorr=-15 +pacalidx2g=45 +txgaintbl=1 +muxenab=0x10 +#triso2g=9 +