diff options
author | John Crispin <john@phrozen.org> | 2020-11-28 11:46:47 +0100 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2020-12-02 07:51:00 +0100 |
commit | f3926d233dba451831f4dd587fb3d01cc126df5b (patch) | |
tree | e077a14f42b81e4af7decd24237d545b9ec5fcac /package/boot/uboot-envtools | |
parent | f281aca97821ece3990b3082bfb14b6fa63ddec4 (diff) | |
download | upstream-f3926d233dba451831f4dd587fb3d01cc126df5b.tar.gz upstream-f3926d233dba451831f4dd587fb3d01cc126df5b.tar.bz2 upstream-f3926d233dba451831f4dd587fb3d01cc126df5b.zip |
uboot-envtools: add support for the realtek target
On most boards the MAC is located inside the u-boot-env.
Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'package/boot/uboot-envtools')
-rw-r--r-- | package/boot/uboot-envtools/files/realtek | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/package/boot/uboot-envtools/files/realtek b/package/boot/uboot-envtools/files/realtek new file mode 100644 index 0000000000..cce0628ffc --- /dev/null +++ b/package/boot/uboot-envtools/files/realtek @@ -0,0 +1,29 @@ +[ -e /etc/config/ubootenv ] && exit 0 + +touch /etc/config/ubootenv + +. /lib/uboot-envtools.sh +. /lib/functions.sh + +board=$(board_name) + +case "$board" in +d-link,dgs-1210-16|\ +d-link,dgs-1210-28|\ +d-link,dgs-1210-10p|\ +zyxel,gs1900-10hp) + idx="$(find_mtd_index u-boot-env)" + [ -n "$idx" ] && \ + ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x400" "0x10000" + ;; +*) + idx="$(find_mtd_index u-boot-env)" + [ -n "$idx" ] && \ + ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000" + ;; +esac + +config_load ubootenv +config_foreach ubootenv_add_app_config ubootenv + +exit 0 |