aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot/uboot-envtools/files/oxnas
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2014-11-26 09:00:40 +0000
committerJohn Crispin <john@openwrt.org>2014-11-26 09:00:40 +0000
commitde49133a8b20650771fd844f3a5454513f6bf0f6 (patch)
treec6c0cef9db7bfda530d35e8d43bcd8b907241fbf /package/boot/uboot-envtools/files/oxnas
parentc05048b0bb686bfa927d3a4848127b9052549fb1 (diff)
downloadupstream-de49133a8b20650771fd844f3a5454513f6bf0f6.tar.gz
upstream-de49133a8b20650771fd844f3a5454513f6bf0f6.tar.bz2
upstream-de49133a8b20650771fd844f3a5454513f6bf0f6.zip
uboot-envtools: add support for oxnas target
Signed-off-by: Daniel Golle <daniel@makrotopia.org> SVN-Revision: 43390
Diffstat (limited to 'package/boot/uboot-envtools/files/oxnas')
-rw-r--r--package/boot/uboot-envtools/files/oxnas29
1 files changed, 29 insertions, 0 deletions
diff --git a/package/boot/uboot-envtools/files/oxnas b/package/boot/uboot-envtools/files/oxnas
new file mode 100644
index 0000000000..b456fb3e2d
--- /dev/null
+++ b/package/boot/uboot-envtools/files/oxnas
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+
+[ -e /etc/config/ubootenv ] && exit 0
+
+touch /etc/config/ubootenv
+
+. /lib/oxnas.sh
+. /lib/uboot-envtools.sh
+. /lib/functions.sh
+
+board=$(oxnas_board_name)
+
+case "$board" in
+stg212)
+ ubootenv_add_uci_config "/dev/ubi0_0" "0x0" "0x4000" "0x1F000" "1"
+ ubootenv_add_uci_config "/dev/ubi0_1" "0x0" "0x4000" "0x1F000" "1"
+ ;;
+kd20)
+ ubootenv_add_uci_config "/dev/mtd0" "0x220000" "0x02000" "0x20000" "1"
+ ;;
+esac
+
+config_load ubootenv
+config_foreach ubootenv_add_app_config ubootenv
+
+exit 0