update: firmware-phicomm-n1

This commit is contained in:
JerryXiao 2019-09-08 00:30:20 +08:00
parent d1a07e9f55
commit ca83afaada
3 changed files with 13 additions and 6 deletions

View file

@ -1,10 +1,13 @@
pkgbase = firmware-phicomm-n1 pkgbase = firmware-phicomm-n1
pkgdesc = Additional firmware for Phicomm N1 pkgdesc = Additional firmware for Phicomm N1
pkgver = 6 pkgver = 6
pkgrel = 5 pkgrel = 8
url = https://github.com/RPi-Distro url = https://github.com/RPi-Distro
install = firmware-phicomm-n1.install
arch = any arch = any
license = custom license = custom
depends = wireless-regdb
depends = uboot-tools
conflicts = firmware-raspberrypi conflicts = firmware-raspberrypi
options = !strip options = !strip
source = https://raw.githubusercontent.com/RPi-Distro/firmware-nonfree/130cb86fa30cafbd575d38865fa546350d4c5f9c/brcm/brcmfmac43455-sdio.clm_blob source = https://raw.githubusercontent.com/RPi-Distro/firmware-nonfree/130cb86fa30cafbd575d38865fa546350d4c5f9c/brcm/brcmfmac43455-sdio.clm_blob

View file

@ -4,7 +4,7 @@ buildarch=28
pkgname=firmware-phicomm-n1 pkgname=firmware-phicomm-n1
pkgver=6 pkgver=6
pkgrel=7 pkgrel=8
pkgdesc="Additional firmware for Phicomm N1" pkgdesc="Additional firmware for Phicomm N1"
arch=('any') arch=('any')
conflicts=('firmware-raspberrypi') conflicts=('firmware-raspberrypi')

View file

@ -1,4 +1,9 @@
post_install() { post_install() {
post_upgrade $1 0
echo 'Please REBOOT your machine.'
}
post_upgrade() {
# get uboot wifi macaddr # get uboot wifi macaddr
tmpfile=$(mktemp -p /tmp) tmpfile=$(mktemp -p /tmp)
echo '/dev/mmcblk1 0x27400000 0x10000' > $tmpfile 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 grep -qiE '([0-9a-f][0-9a-f]:){5}[0-9a-f][0-9a-f]' <<< "$mac" || exit 1
fi fi
sed -i "s/^macaddr=.*$/macaddr=${mac}/g" /usr/lib/firmware/brcm/brcmfmac43455-sdio.phicomm,n1.txt sed -i "s/^macaddr=.*$/macaddr=${mac}/g" /usr/lib/firmware/brcm/brcmfmac43455-sdio.phicomm,n1.txt
} # set bluetooth macaddr
echo -en $(sed 's/^.*:\(..\):\(..\):\(..\)$/\\x\3\\x\2\\x\1/' <<< "$mac") | \
post_upgrade() { dd of=/usr/lib/firmware/brcm/BCM4345C0.hcd bs=1 seek=$((0x21)) count=3 conv=notrunc
post_install $1
} }