mirror of
https://github.com/archlinux-jerry/pkgbuilds
synced 2024-11-26 07:50:40 +08:00
update: firmware-phicomm-n1
This commit is contained in:
parent
d1a07e9f55
commit
ca83afaada
3 changed files with 13 additions and 6 deletions
|
@ -1,10 +1,13 @@
|
|||
pkgbase = firmware-phicomm-n1
|
||||
pkgdesc = Additional firmware for Phicomm N1
|
||||
pkgver = 6
|
||||
pkgrel = 5
|
||||
pkgrel = 8
|
||||
url = https://github.com/RPi-Distro
|
||||
install = firmware-phicomm-n1.install
|
||||
arch = any
|
||||
license = custom
|
||||
depends = wireless-regdb
|
||||
depends = uboot-tools
|
||||
conflicts = firmware-raspberrypi
|
||||
options = !strip
|
||||
source = https://raw.githubusercontent.com/RPi-Distro/firmware-nonfree/130cb86fa30cafbd575d38865fa546350d4c5f9c/brcm/brcmfmac43455-sdio.clm_blob
|
||||
|
|
|
@ -4,7 +4,7 @@ buildarch=28
|
|||
|
||||
pkgname=firmware-phicomm-n1
|
||||
pkgver=6
|
||||
pkgrel=7
|
||||
pkgrel=8
|
||||
pkgdesc="Additional firmware for Phicomm N1"
|
||||
arch=('any')
|
||||
conflicts=('firmware-raspberrypi')
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
post_install() {
|
||||
post_upgrade $1 0
|
||||
echo 'Please REBOOT your machine.'
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
# get uboot wifi macaddr
|
||||
tmpfile=$(mktemp -p /tmp)
|
||||
echo '/dev/mmcblk1 0x27400000 0x10000' > $tmpfile
|
||||
|
@ -12,8 +17,7 @@ post_install() {
|
|||
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
|
||||
# set bluetooth macaddr
|
||||
echo -en $(sed 's/^.*:\(..\):\(..\):\(..\)$/\\x\3\\x\2\\x\1/' <<< "$mac") | \
|
||||
dd of=/usr/lib/firmware/brcm/BCM4345C0.hcd bs=1 seek=$((0x21)) count=3 conv=notrunc
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue