firmware-phicomm-n1: update to 7.6, changes: do not hardcode mmc device name

This commit is contained in:
Justin 2020-12-20 23:06:05 +08:00
parent 06574a2dca
commit 006fba6330
2 changed files with 4 additions and 2 deletions

View File

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

View File

@ -6,7 +6,9 @@ post_install() {
post_upgrade() {
# get uboot wifi macaddr
tmpfile=$(mktemp -p /tmp)
echo '/dev/mmcblk1 0x27400000 0x10000' > $tmpfile
# found in 5.10.1 kernel, mmc device name may be inconsistent across reboots, so we avoid hardcoding
mmcdevname=$(lsblk -d | grep -v 'mmcblk.boot' | grep mmcblk | xargs | cut -d ' ' -f1)
echo "/dev/${mmcdevname} 0x27400000 0x10000" > $tmpfile
mac_wifi=$(fw_printenv -c $tmpfile mac_wifi)
rm $tmpfile
mac=${mac_wifi#*=}