2 # Copyright (C) 2021 OpenWrt.org
5 [ -e /etc/config/ubootenv ] && exit 0
7 touch /etc/config/ubootenv
9 . /lib/uboot-envtools.sh
16 ubootenv_add_uci_config "/dev/ubi0_0" "0x0" "0x1f000" "0x1f000" "1"
17 ubootenv_add_uci_config "/dev/ubi0_1" "0x0" "0x1f000" "0x1f000" "1"
20 . /lib/upgrade/common.sh
22 export_partdevice rootdev 0
25 local envdev=$(find_mmc_part "ubootenv" $rootdev)
26 ubootenv_add_uci_config "$envdev" "0x0" "0x80000" "0x80000" "1"
27 ubootenv_add_uci_config "$envdev" "0x80000" "0x80000" "0x80000" "1"
30 ubootenv_add_uci_config "/dev/ubi0_0" "0x0" "0x1f000" "0x1f000" "1"
31 ubootenv_add_uci_config "/dev/ubi0_1" "0x0" "0x1f000" "0x1f000" "1"
36 ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x1000" "0x20000"
38 ubnt,unifi-6-lr-ubootmod)
39 ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x4000" "0x10000"
44 config_foreach ubootenv_add_app_config ubootenv