From b3ae5b60caf224160f589ed79a4220b49d335919 Mon Sep 17 00:00:00 2001 From: lgs2007m <116912542@qq.com> Date: Sat, 6 Jan 2024 00:36:56 +0800 Subject: [PATCH] uboot-envtools: use find_mmc_part for emmc decives (#213) --- package/boot/uboot-envtools/files/mediatek | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/package/boot/uboot-envtools/files/mediatek b/package/boot/uboot-envtools/files/mediatek index 6752d0ef67..85e2f2b7dc 100644 --- a/package/boot/uboot-envtools/files/mediatek +++ b/package/boot/uboot-envtools/files/mediatek @@ -10,33 +10,13 @@ touch /etc/config/ubootenv . /lib/uboot-envtools.sh . /lib/functions.sh -block_dev_path() { - local dev_path - - case "$1" in - /dev/mmcblk*) - dev_path="$1" - ;; - PARTLABEL=* | PARTUUID=*) - dev_path=$(blkid -t "$1" -o device) - [ -z "${dev_path}" -o $? -ne 0 ] && return 1 - ;; - *) - return 1; - ;; - esac - - echo "${dev_path}" - return 0 -} - board=$(board_name) case "$board" in cmcc,rax3000m-emmc |\ glinet,gl-mt6000 |\ jdcloud,re-cp-03) - env_dev=$(block_dev_path "PARTLABEL=u-boot-env") + env_dev=$(find_mmc_part "u-boot-env") [ -n "$env_dev" ] && ubootenv_add_uci_config "$env_dev" "0" "0x80000" ;; *360,t7* |\