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/platform.sh
21 local rootdev=$(get_rootdev)
22 local envdev=/dev/$(get_partition $rootdev ubootenv)
23 ubootenv_add_uci_config "$envdev" "0x0" "0x80000" "0x80000" "1"
24 ubootenv_add_uci_config "$envdev" "0x80000" "0x80000" "0x80000" "1"
27 ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x1000" "0x20000"
29 ubnt,unifi-6-lr-ubootmod)
30 ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x1000" "0x10000"
35 config_foreach ubootenv_add_app_config ubootenv