scripts: fix revision calculation using new "main" branch
[openwrt/openwrt.git] / package / boot / uboot-envtools / files / mediatek_filogic
index 1050277292a2c9789c4efe61ce28c18a55dcc747..c439af12c88b81f41f66f1a0b15a05a19bc6190d 100644 (file)
@@ -36,26 +36,14 @@ case "$board" in
 asus,rt-ax59u)
        ubootenv_add_uci_config "/dev/mtd0" "0x100000" "0x20000" "0x20000"
        ;;
-bananapi,bpi-r3)
-       rootdev="$(cmdline_get_var root)"
-       rootdev="${rootdev##*/}"
-       rootdev="${rootdev%%p[0-9]*}"
-       case "$rootdev" in
-       mmc*)
-               ubootenv_add_mmc_default
-               ;;
-       mtd*)
-               ubootenv_add_nor_default
-               ;;
-       ubi*)
-               ubootenv_add_ubi_default
-               ;;
-       esac
-       ;;
-bananapi,bpi-r4)
-       . /lib/upgrade/platform.sh
+bananapi,bpi-r3|\
+bananapi,bpi-r3-mini|\
+bananapi,bpi-r4|\
+bananapi,bpi-r4-poe|\
+jdcloud,re-cp-03)
+       . /lib/upgrade/common.sh
 
-       bootdev="$(platform_get_bootdev)"
+       bootdev="$(fitblk_get_bootdev)"
        case "$bootdev" in
        ubi*)
                ubootenv_add_ubi_default
@@ -63,6 +51,9 @@ bananapi,bpi-r4)
        mmc*)
                ubootenv_add_mmc_default "${bootdev%%p[0-9]*}"
                ;;
+       mtd*)
+               ubootenv_add_nor_default
+               ;;
        esac
        ;;
 cmcc,rax3000m)
@@ -79,13 +70,18 @@ comfast,cf-e393ax)
        ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x80000"
        ;;
 cetron,ct3003|\
+edgecore,eap111|\
 netgear,wax220|\
 zbtlink,zbt-z8102ax|\
 zbtlink,zbt-z8103ax)
        ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
        ;;
+dlink,aquila-pro-ai-m30-a1)
+       ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x40000"
+       ;;
 h3c,magic-nx30-pro|\
 jcg,q30-pro|\
+netcore,n60|\
 qihoo,360t7|\
 tplink,tl-xdr4288|\
 tplink,tl-xdr6086|\
@@ -104,16 +100,15 @@ glinet,gl-mt6000)
 glinet,gl-mt3000)
        ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x20000"
        ;;
-jdcloud,re-cp-03)
-       local envdev=$(find_mmc_part "ubootenv" "mmcblk0")
-       ubootenv_add_uci_config "$envdev" "0x0" "0x40000" "0x40000" "1"
-       ubootenv_add_uci_config "$envdev" "0x40000" "0x40000" "0x40000" "1"
-       ;;
 mercusys,mr90x-v1|\
 routerich,ax3000)
        local envdev=/dev/mtd$(find_mtd_index "u-boot-env")
        ubootenv_add_uci_config "$envdev" "0x0" "0x20000" "0x20000" "1"
        ;;
+openembed,som7981)
+       ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x80000"
+       ubootenv_add_uci_sys_config "/dev/mtd3" "0x0" "0x100000" "0x100000"
+       ;;
 ubnt,unifi-6-plus)
        ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x10000"
        ;;