blob: 87dfac8b3012837e786738aa9ccfd8dfe6234acc [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001#!/bin/sh
2#
3# Copyright (C) 2012 OpenWrt.org
4#
5
6[ -e /etc/config/ubootenv ] && exit 0
7
8touch /etc/config/ubootenv
9
10. /lib/uboot-envtools.sh
11. /lib/functions.sh
12
13board=$(board_name)
14
15case "$board" in
16bt,homehub-v2b)
17 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000" "1"
18 ;;
19bt,homehub-v3a)
20 ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x4000" "0x4000" "1"
21 ;;
22siemens,gigaset-sx76x)
23 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000" "1"
24 ;;
25zyxel,p-2812hnu-f1)
26 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x2000" "0x20000" "1"
27 ;;
28buffalo,wbmr-300hpd)
29 idx="$(find_mtd_index u-boot-env)"
30 [ -n "$idx" ] && \
31 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x2000" "0x1000" "2"
32 ;;
33esac
34
35config_load ubootenv
36config_foreach ubootenv_add_app_config ubootenv
37
38exit 0