mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-29 17:42:41 +00:00
patches: remove uboot-envtools patches
Remove ipq807x, ipq50xx, and udaya-id5 uboot-envtools patches as this logic has been moved to the target feeds. Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
@@ -1,257 +0,0 @@
|
||||
From b4de8243ca22d160f9cad42ed0f145e90ac98249 Mon Sep 17 00:00:00 2001
|
||||
From: John Crispin <john@phrozen.org>
|
||||
Date: Sat, 15 Jul 2023 16:10:26 +0200
|
||||
Subject: [PATCH 61/68] ipq807x: add uboot-envtools support
|
||||
|
||||
Signed-off-by: John Crispin <john@phrozen.org>
|
||||
---
|
||||
package/base-files/files/lib/functions.sh | 13 ++++
|
||||
package/boot/uboot-envtools/Makefile | 6 --
|
||||
package/boot/uboot-envtools/files/ipq50xx | 37 +++++++++++
|
||||
package/boot/uboot-envtools/files/ipq60xx | 53 ++++++++++++++++
|
||||
package/boot/uboot-envtools/files/ipq807x | 76 +++++++++++------------
|
||||
5 files changed, 141 insertions(+), 44 deletions(-)
|
||||
create mode 100644 package/boot/uboot-envtools/files/ipq50xx
|
||||
create mode 100644 package/boot/uboot-envtools/files/ipq60xx
|
||||
|
||||
diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh
|
||||
index 4b1b838572..87e2edee7a 100644
|
||||
--- a/package/base-files/files/lib/functions.sh
|
||||
+++ b/package/base-files/files/lib/functions.sh
|
||||
@@ -32,6 +32,19 @@ xor() {
|
||||
printf "%0${retlen}x" "$ret"
|
||||
}
|
||||
|
||||
+find_mmc_part() {
|
||||
+ local DEVNAME PARTNAME
|
||||
+ if grep -q "$1" /proc/mtd; then
|
||||
+ echo "" && return 0
|
||||
+ fi
|
||||
+
|
||||
+ for DEVNAME in /sys/block/mmcblk*/mmcblk*p*; do
|
||||
+ PARTNAME=$(grep PARTNAME ${DEVNAME}/uevent | cut -f2 -d'=')
|
||||
+ [ "$PARTNAME" = "$1" ] && echo "/dev/$(basename $DEVNAME)" && return 0
|
||||
+ done
|
||||
+}
|
||||
+
|
||||
+
|
||||
append() {
|
||||
local var="$1"
|
||||
local value="$2"
|
||||
diff --git a/package/boot/uboot-envtools/Makefile b/package/boot/uboot-envtools/Makefile
|
||||
index 2e4c1ac39e..b9d8895e76 100644
|
||||
--- a/package/boot/uboot-envtools/Makefile
|
||||
+++ b/package/boot/uboot-envtools/Makefile
|
||||
@@ -58,12 +58,6 @@ MAKE_FLAGS += \
|
||||
no-dot-config-targets=envtools \
|
||||
envtools
|
||||
|
||||
-define Package/uboot-envtools/conffiles
|
||||
-/etc/config/ubootenv
|
||||
-/etc/fw_env.config
|
||||
-/etc/fw_sys.config
|
||||
-endef
|
||||
-
|
||||
define Package/uboot-envtools/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/env/fw_printenv $(1)/usr/sbin
|
||||
diff --git a/package/boot/uboot-envtools/files/ipq50xx b/package/boot/uboot-envtools/files/ipq50xx
|
||||
new file mode 100644
|
||||
index 0000000000..84ed73f288
|
||||
--- /dev/null
|
||||
+++ b/package/boot/uboot-envtools/files/ipq50xx
|
||||
@@ -0,0 +1,37 @@
|
||||
+[ -e /etc/config/ubootenv ] && rm /etc/config/ubootenv
|
||||
+
|
||||
+touch /etc/config/ubootenv
|
||||
+
|
||||
+. /lib/uboot-envtools.sh
|
||||
+. /lib/functions.sh
|
||||
+
|
||||
+board=$(board_name)
|
||||
+
|
||||
+ubootenv_mtdinfo () {
|
||||
+ UBOOTENV_PART=$(cat /proc/mtd | grep APPSBLENV)
|
||||
+ mtd_dev=$(echo $UBOOTENV_PART | awk '{print $1}' | sed 's/:$//')
|
||||
+ mtd_size=$(echo $UBOOTENV_PART | awk '{print "0x"$2}')
|
||||
+ mtd_erase=$(echo $UBOOTENV_PART | awk '{print "0x"$3}')
|
||||
+ nor_flash=$(find /sys/bus/spi/devices/*/mtd -name ${mtd_dev})
|
||||
+
|
||||
+ if [ -n "$nor_flash" ]; then
|
||||
+ ubootenv_size=$mtd_size
|
||||
+ else
|
||||
+ # size is fixed to 0x40000 in u-boot
|
||||
+ ubootenv_size=0x40000
|
||||
+ fi
|
||||
+
|
||||
+ sectors=$(( $ubootenv_size / $mtd_erase ))
|
||||
+ echo /dev/$mtd_dev 0x0 $ubootenv_size $mtd_erase $sectors
|
||||
+}
|
||||
+
|
||||
+case "$board" in
|
||||
+*)
|
||||
+ ubootenv_add_uci_config $(ubootenv_mtdinfo)
|
||||
+ ;;
|
||||
+esac
|
||||
+
|
||||
+config_load ubootenv
|
||||
+config_foreach ubootenv_add_app_config ubootenv
|
||||
+
|
||||
+exit 0
|
||||
diff --git a/package/boot/uboot-envtools/files/ipq60xx b/package/boot/uboot-envtools/files/ipq60xx
|
||||
new file mode 100644
|
||||
index 0000000000..8863df4225
|
||||
--- /dev/null
|
||||
+++ b/package/boot/uboot-envtools/files/ipq60xx
|
||||
@@ -0,0 +1,53 @@
|
||||
+[ -e /etc/config/ubootenv ] && rm /etc/config/ubootenv
|
||||
+
|
||||
+touch /etc/config/ubootenv
|
||||
+
|
||||
+. /lib/uboot-envtools.sh
|
||||
+. /lib/functions.sh
|
||||
+
|
||||
+board=$(board_name)
|
||||
+
|
||||
+ubootenv_mtdinfo () {
|
||||
+ UBOOTENV_PART=$(cat /proc/mtd | grep APPSBLENV)
|
||||
+ mtd_dev=$(echo $UBOOTENV_PART | awk '{print $1}' | sed 's/:$//')
|
||||
+ mtd_size=$(echo $UBOOTENV_PART | awk '{print "0x"$2}')
|
||||
+ mtd_erase=$(echo $UBOOTENV_PART | awk '{print "0x"$3}')
|
||||
+ nor_flash=$(find /sys/bus/spi/devices/*/mtd -name ${mtd_dev})
|
||||
+ found_emmc=0
|
||||
+
|
||||
+ if [ -z "$UBOOTENV_PART" ]; then
|
||||
+ mtd_dev=$(echo $(find_mmc_part "0:APPSBLENV") | sed 's/^.\{5\}//')
|
||||
+ if [ -n "$mtd_dev" ]; then
|
||||
+ EMMC_UBOOTENV_PART=$(cat /proc/partitions | grep $mtd_dev)
|
||||
+ #convert block to bytes
|
||||
+ emmc_ubootenv_size=`expr $(echo $EMMC_UBOOTENV_PART | awk '{print $3}') \* 1024`
|
||||
+ ubootenv_size=0x`printf "%x" $emmc_ubootenv_size`
|
||||
+ found_emmc=1
|
||||
+ fi
|
||||
+ mtd_erase=""
|
||||
+
|
||||
+ elif [ -n "$nor_flash" ]; then
|
||||
+ ubootenv_size=$mtd_size
|
||||
+ else
|
||||
+ # size is fixed to 0x40000 in u-boot
|
||||
+ ubootenv_size=0x40000
|
||||
+ fi
|
||||
+ if [ $found_emmc -eq 0 ]; then
|
||||
+ sectors=$(printf '0x%x' $(( $ubootenv_size / $mtd_erase )))
|
||||
+ echo /dev/$mtd_dev 0x0 $ubootenv_size $mtd_erase $sectors
|
||||
+ else
|
||||
+ echo /dev/$mtd_dev 0x0 $ubootenv_size
|
||||
+ fi
|
||||
+
|
||||
+}
|
||||
+
|
||||
+case "$board" in
|
||||
+*)
|
||||
+ ubootenv_add_uci_config $(ubootenv_mtdinfo)
|
||||
+ ;;
|
||||
+esac
|
||||
+
|
||||
+config_load ubootenv
|
||||
+config_foreach ubootenv_add_app_config ubootenv
|
||||
+
|
||||
+exit 0
|
||||
diff --git a/package/boot/uboot-envtools/files/ipq807x b/package/boot/uboot-envtools/files/ipq807x
|
||||
index 2064bfc6f2..8863df4225 100644
|
||||
--- a/package/boot/uboot-envtools/files/ipq807x
|
||||
+++ b/package/boot/uboot-envtools/files/ipq807x
|
||||
@@ -1,4 +1,4 @@
|
||||
-[ -e /etc/config/ubootenv ] && exit 0
|
||||
+[ -e /etc/config/ubootenv ] && rm /etc/config/ubootenv
|
||||
|
||||
touch /etc/config/ubootenv
|
||||
|
||||
@@ -7,47 +7,47 @@ touch /etc/config/ubootenv
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
+ubootenv_mtdinfo () {
|
||||
+ UBOOTENV_PART=$(cat /proc/mtd | grep APPSBLENV)
|
||||
+ mtd_dev=$(echo $UBOOTENV_PART | awk '{print $1}' | sed 's/:$//')
|
||||
+ mtd_size=$(echo $UBOOTENV_PART | awk '{print "0x"$2}')
|
||||
+ mtd_erase=$(echo $UBOOTENV_PART | awk '{print "0x"$3}')
|
||||
+ nor_flash=$(find /sys/bus/spi/devices/*/mtd -name ${mtd_dev})
|
||||
+ found_emmc=0
|
||||
+
|
||||
+ if [ -z "$UBOOTENV_PART" ]; then
|
||||
+ mtd_dev=$(echo $(find_mmc_part "0:APPSBLENV") | sed 's/^.\{5\}//')
|
||||
+ if [ -n "$mtd_dev" ]; then
|
||||
+ EMMC_UBOOTENV_PART=$(cat /proc/partitions | grep $mtd_dev)
|
||||
+ #convert block to bytes
|
||||
+ emmc_ubootenv_size=`expr $(echo $EMMC_UBOOTENV_PART | awk '{print $3}') \* 1024`
|
||||
+ ubootenv_size=0x`printf "%x" $emmc_ubootenv_size`
|
||||
+ found_emmc=1
|
||||
+ fi
|
||||
+ mtd_erase=""
|
||||
+
|
||||
+ elif [ -n "$nor_flash" ]; then
|
||||
+ ubootenv_size=$mtd_size
|
||||
+ else
|
||||
+ # size is fixed to 0x40000 in u-boot
|
||||
+ ubootenv_size=0x40000
|
||||
+ fi
|
||||
+ if [ $found_emmc -eq 0 ]; then
|
||||
+ sectors=$(printf '0x%x' $(( $ubootenv_size / $mtd_erase )))
|
||||
+ echo /dev/$mtd_dev 0x0 $ubootenv_size $mtd_erase $sectors
|
||||
+ else
|
||||
+ echo /dev/$mtd_dev 0x0 $ubootenv_size
|
||||
+ fi
|
||||
+
|
||||
+}
|
||||
+
|
||||
case "$board" in
|
||||
-dynalink,dl-wrx36|\
|
||||
-netgear,wax218)
|
||||
- idx="$(find_mtd_index 0:appsblenv)"
|
||||
- [ -n "$idx" ] && \
|
||||
- ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000" "2"
|
||||
- ;;
|
||||
-edgecore,eap102|\
|
||||
-zyxel,nbg7815)
|
||||
- idx="$(find_mtd_index 0:appsblenv)"
|
||||
- [ -n "$idx" ] && \
|
||||
- ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000" "1"
|
||||
- ;;
|
||||
-edimax,cax1800)
|
||||
- idx="$(find_mtd_index 0:appsblenv)"
|
||||
- [ -n "$idx" ] && \
|
||||
- ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x20000"
|
||||
- ;;
|
||||
-redmi,ax6|\
|
||||
-xiaomi,ax3600|\
|
||||
-xiaomi,ax9000)
|
||||
- idx="$(find_mtd_index 0:appsblenv)"
|
||||
- [ -n "$idx" ] && \
|
||||
- ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x20000"
|
||||
- idx2="$(find_mtd_index bdata)"
|
||||
- [ -n "$idx2" ] && \
|
||||
- ubootenv_add_uci_sys_config "/dev/mtd$idx2" "0x0" "0x10000" "0x20000"
|
||||
- ;;
|
||||
-prpl,haze)
|
||||
- mmcpart="$(find_mmc_part 0:APPSBLENV)"
|
||||
- [ -n "$mmcpart" ] && \
|
||||
- ubootenv_add_uci_config "$mmcpart" "0x0" "0x40000" "0x400" "0x100"
|
||||
- ;;
|
||||
-qnap,301w)
|
||||
- idx="$(find_mtd_index 0:appsblenv)"
|
||||
- [ -n "$idx" ] && \
|
||||
- ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x20000" "0x20000" "1"
|
||||
+*)
|
||||
+ ubootenv_add_uci_config $(ubootenv_mtdinfo)
|
||||
;;
|
||||
esac
|
||||
|
||||
config_load ubootenv
|
||||
-config_foreach ubootenv_add_app_config
|
||||
+config_foreach ubootenv_add_app_config ubootenv
|
||||
|
||||
exit 0
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
From ad05e4778d7a01e2005150d1dad44380dc4022f4 Mon Sep 17 00:00:00 2001
|
||||
From: Venkat Chimata <venkata@shasta.cloud>
|
||||
Date: Wed, 10 Jul 2024 15:32:24 +0530
|
||||
Subject: [PATCH] ipq50xx: Adjust ubootenv_size for ipq50xx
|
||||
|
||||
ubootenv_size is computed dynamically similar to ipq807x.
|
||||
|
||||
Signed-off-by: Venkat Chimata <venkata@shasta.cloud>
|
||||
---
|
||||
package/boot/uboot-envtools/files/ipq50xx | 23 +++++++++++++++++++----
|
||||
1 file changed, 19 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/package/boot/uboot-envtools/files/ipq50xx b/package/boot/uboot-envtools/files/ipq50xx
|
||||
index 84ed73f288..3163ae84d2 100644
|
||||
--- a/package/boot/uboot-envtools/files/ipq50xx
|
||||
+++ b/package/boot/uboot-envtools/files/ipq50xx
|
||||
@@ -14,15 +14,30 @@ ubootenv_mtdinfo () {
|
||||
mtd_erase=$(echo $UBOOTENV_PART | awk '{print "0x"$3}')
|
||||
nor_flash=$(find /sys/bus/spi/devices/*/mtd -name ${mtd_dev})
|
||||
|
||||
- if [ -n "$nor_flash" ]; then
|
||||
+ found_emmc=0
|
||||
+
|
||||
+ if [ -z "$UBOOTENV_PART" ]; then
|
||||
+ mtd_dev=$(echo $(find_mmc_part "0:APPSBLENV") | sed 's/^.\{5\}//')
|
||||
+ if [ -n "$mtd_dev" ]; then
|
||||
+ EMMC_UBOOTENV_PART=$(cat /proc/partitions | grep $mtd_dev)
|
||||
+ #convert block to bytes
|
||||
+ emmc_ubootenv_size=`expr $(echo $EMMC_UBOOTENV_PART | awk '{print $3}') \* 1024`
|
||||
+ ubootenv_size=0x`printf "%x" $emmc_ubootenv_size`
|
||||
+ found_emmc=1
|
||||
+ fi
|
||||
+ mtd_erase=""
|
||||
+ elif [ -n "$nor_flash" ]; then
|
||||
ubootenv_size=$mtd_size
|
||||
else
|
||||
# size is fixed to 0x40000 in u-boot
|
||||
ubootenv_size=0x40000
|
||||
fi
|
||||
-
|
||||
- sectors=$(( $ubootenv_size / $mtd_erase ))
|
||||
- echo /dev/$mtd_dev 0x0 $ubootenv_size $mtd_erase $sectors
|
||||
+ if [ $found_emmc -eq 0 ]; then
|
||||
+ sectors=$(printf '0x%x' $(( $ubootenv_size / $mtd_erase )))
|
||||
+ echo /dev/$mtd_dev 0x0 $ubootenv_size $mtd_erase $sectors
|
||||
+ else
|
||||
+ echo /dev/$mtd_dev 0x0 $ubootenv_size
|
||||
+ fi
|
||||
}
|
||||
|
||||
case "$board" in
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
From d366477af72e725524b47f2fffe8a8c1d500060d Mon Sep 17 00:00:00 2001
|
||||
From: John Crispin <john@phrozen.org>
|
||||
Date: Thu, 31 Jul 2025 14:45:12 +0200
|
||||
Subject: [PATCH] uboot-envtools: add udaya-id5
|
||||
|
||||
Signed-off-by: John Crispin <john@phrozen.org>
|
||||
---
|
||||
package/boot/uboot-envtools/files/ipq40xx | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/package/boot/uboot-envtools/files/ipq40xx b/package/boot/uboot-envtools/files/ipq40xx
|
||||
index 8d993fae36..78299195bd 100644
|
||||
--- a/package/boot/uboot-envtools/files/ipq40xx
|
||||
+++ b/package/boot/uboot-envtools/files/ipq40xx
|
||||
@@ -42,6 +42,7 @@ luma,wrtq-329acn|\
|
||||
netgear,wac510|\
|
||||
openmesh,a42|\
|
||||
openmesh,a62|\
|
||||
+udaya,a5-id2|\
|
||||
pakedge,wr-1|\
|
||||
plasmacloud,pa1200|\
|
||||
plasmacloud,pa2200)
|
||||
--
|
||||
2.34.1
|
||||
|
||||
Reference in New Issue
Block a user