From ca83afaada45594ce3c059c547be2e5df0b780d6 Mon Sep 17 00:00:00 2001 From: Jerry Date: Sun, 8 Sep 2019 00:30:20 +0800 Subject: [PATCH] update: firmware-phicomm-n1 --- firmware-phicomm-n1/.SRCINFO | 5 ++++- firmware-phicomm-n1/PKGBUILD | 2 +- firmware-phicomm-n1/firmware-phicomm-n1.install | 12 ++++++++---- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/firmware-phicomm-n1/.SRCINFO b/firmware-phicomm-n1/.SRCINFO index 1bedf4a..e04ebd6 100644 --- a/firmware-phicomm-n1/.SRCINFO +++ b/firmware-phicomm-n1/.SRCINFO @@ -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 diff --git a/firmware-phicomm-n1/PKGBUILD b/firmware-phicomm-n1/PKGBUILD index 5462dfd..5015c6a 100644 --- a/firmware-phicomm-n1/PKGBUILD +++ b/firmware-phicomm-n1/PKGBUILD @@ -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') diff --git a/firmware-phicomm-n1/firmware-phicomm-n1.install b/firmware-phicomm-n1/firmware-phicomm-n1.install index 82e4060..2d325d8 100644 --- a/firmware-phicomm-n1/firmware-phicomm-n1.install +++ b/firmware-phicomm-n1/firmware-phicomm-n1.install @@ -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 }