From 006fba63304b8ae276cd7cce36c21056e6e726f5 Mon Sep 17 00:00:00 2001 From: Justin Date: Sun, 20 Dec 2020 23:06:05 +0800 Subject: [PATCH] firmware-phicomm-n1: update to 7.6, changes: do not hardcode mmc device name --- firmware-phicomm-n1/PKGBUILD | 2 +- firmware-phicomm-n1/firmware-phicomm-n1.install | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/firmware-phicomm-n1/PKGBUILD b/firmware-phicomm-n1/PKGBUILD index 43fc543..b12db82 100644 --- a/firmware-phicomm-n1/PKGBUILD +++ b/firmware-phicomm-n1/PKGBUILD @@ -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') diff --git a/firmware-phicomm-n1/firmware-phicomm-n1.install b/firmware-phicomm-n1/firmware-phicomm-n1.install index d3acc28..d6ed310 100644 --- a/firmware-phicomm-n1/firmware-phicomm-n1.install +++ b/firmware-phicomm-n1/firmware-phicomm-n1.install @@ -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#*=}