[openwrt/openwrt] ipq806x: g10: case-insensitive qcom-smem partitions

LEDE Commits lede-commits at lists.infradead.org
Sat May 8 09:46:01 PDT 2021


ynezz pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/f70e11cd974effdea1ed2ae0ded3033984ba3dad

commit f70e11cd974effdea1ed2ae0ded3033984ba3dad
Author: Stefan Lippers-Hollmann <s.l-h at gmx.de>
AuthorDate: Fri May 7 01:00:58 2021 +0200

    ipq806x: g10: case-insensitive qcom-smem partitions
    
    The out-of-tree qcom-smem patches traditionally displayed mtd partition names
    in upper case, starting with the new mainline qcom-smem support in kernel v5.10,
    it switches to normalizing the partition names to lower case.
    
    Signed-off-by: Stefan Lippers-Hollmann <s.l-h at gmx.de>
---
 .../base-files/etc/hotplug.d/firmware/11-ath10k-caldata    | 14 ++++++++++++--
 target/linux/ipq806x/base-files/lib/upgrade/asrock.sh      |  4 +++-
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index a05bd99bc7..3dd7a51d5d 100644
--- a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -10,7 +10,12 @@ case "$FIRMWARE" in
 "ath10k/pre-cal-pci-0000:01:00.0.bin")
 	case $board in
 	asrock,g10)
-		caldata_extract "0:ART" 0x1000 0x2f20
+		if [ -b "$(find_mtd_part 0:art)" ]; then
+			caldata_extract "0:art" 0x1000 0x2f20
+		else
+			# XXX: drop upper case after kernel v5.4 is gone (qcom-smem)
+			caldata_extract "0:ART" 0x1000 0x2f20
+		fi
 		;;
 	buffalo,wxr-2533dhp)
 		caldata_extract "ART" 0x1000 0x2f20
@@ -59,7 +64,12 @@ case "$FIRMWARE" in
 "ath10k/pre-cal-pci-0001:01:00.0.bin")
 	case $board in
 	asrock,g10)
-		caldata_extract "0:ART" 0x5000 0x2f20
+		if [ -b "$(find_mtd_part 0:art)" ]; then
+			caldata_extract "0:art" 0x5000 0x2f20
+		else
+			# XXX: drop upper case after kernel v5.4 is gone (qcom-smem)
+			caldata_extract "0:ART" 0x5000 0x2f20
+		fi
 		;;
 	buffalo,wxr-2533dhp)
 		caldata_extract "ART" 0x5000 0x2f20
diff --git a/target/linux/ipq806x/base-files/lib/upgrade/asrock.sh b/target/linux/ipq806x/base-files/lib/upgrade/asrock.sh
index 9e1376a578..8be737d2da 100644
--- a/target/linux/ipq806x/base-files/lib/upgrade/asrock.sh
+++ b/target/linux/ipq806x/base-files/lib/upgrade/asrock.sh
@@ -1,7 +1,9 @@
 . /lib/functions.sh
 
 asrock_bootconfig_mangle() {
-	local mtdnum="$( find_mtd_index 0:BOOTCONFIG )"
+	local mtdnum="$(find_mtd_index 0:bootconfig)"
+	# XXX: drop upper case after kernel v5.4 is gone (qcom-smem)
+	[ -n "$mtdnum" ] || mtdnum="$(find_mtd_index 0:BOOTCONFIG)"
 
 	if [ -z "$mtdnum" ]; then
 		echo "cannot find bootconfig mtd partition"



More information about the lede-commits mailing list