mirror of
https://github.com/archlinux-jerry/pkgbuilds
synced 2024-11-22 14:00:40 +08:00
update: firmware-phicomm-n1
This commit is contained in:
parent
18ef18ff3f
commit
d1a07e9f55
2 changed files with 22 additions and 1 deletions
|
@ -4,10 +4,12 @@ buildarch=28
|
||||||
|
|
||||||
pkgname=firmware-phicomm-n1
|
pkgname=firmware-phicomm-n1
|
||||||
pkgver=6
|
pkgver=6
|
||||||
pkgrel=5
|
pkgrel=7
|
||||||
pkgdesc="Additional firmware for Phicomm N1"
|
pkgdesc="Additional firmware for Phicomm N1"
|
||||||
arch=('any')
|
arch=('any')
|
||||||
conflicts=('firmware-raspberrypi')
|
conflicts=('firmware-raspberrypi')
|
||||||
|
depends=('wireless-regdb' 'uboot-tools')
|
||||||
|
install=${pkgname}.install
|
||||||
url="https://github.com/RPi-Distro"
|
url="https://github.com/RPi-Distro"
|
||||||
license=('custom')
|
license=('custom')
|
||||||
_commitid_wl=130cb86fa30cafbd575d38865fa546350d4c5f9c
|
_commitid_wl=130cb86fa30cafbd575d38865fa546350d4c5f9c
|
||||||
|
|
19
firmware-phicomm-n1/firmware-phicomm-n1.install
Normal file
19
firmware-phicomm-n1/firmware-phicomm-n1.install
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
post_install() {
|
||||||
|
# get uboot wifi macaddr
|
||||||
|
tmpfile=$(mktemp -p /tmp)
|
||||||
|
echo '/dev/mmcblk1 0x27400000 0x10000' > $tmpfile
|
||||||
|
mac_wifi=$(fw_printenv -c $tmpfile mac_wifi)
|
||||||
|
rm $tmpfile
|
||||||
|
mac=${mac_wifi#*=}
|
||||||
|
# make sure we have got a correct mac address
|
||||||
|
if ! grep -qiE '([0-9a-f][0-9a-f]:){5}[0-9a-f][0-9a-f]' <<< "$mac"; then
|
||||||
|
# oops! Then we might generate a random one
|
||||||
|
mac=$(sed 's/^.*\(..\)\(..\)\(..\)\(..\)\(..\)\(..\)$/\1:\2:\3:\4:\5:\6/' < /etc/machine-id)
|
||||||
|
grep -qiE '([0-9a-f][0-9a-f]:){5}[0-9a-f][0-9a-f]' <<< "$mac" || exit 1
|
||||||
|
fi
|
||||||
|
sed -i "s/^macaddr=.*$/macaddr=${mac}/g" /usr/lib/firmware/brcm/brcmfmac43455-sdio.phicomm,n1.txt
|
||||||
|
}
|
||||||
|
|
||||||
|
post_upgrade() {
|
||||||
|
post_install $1
|
||||||
|
}
|
Loading…
Reference in a new issue