Signed-off-by: Daniel Golle <daniel.go...@gmail.com>
---
 package/boot/uboot-envtools/Makefile    |  4 ++++
 package/boot/uboot-envtools/files/oxnas | 28 ++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+)
 create mode 100644 package/boot/uboot-envtools/files/oxnas

diff --git a/package/boot/uboot-envtools/Makefile 
b/package/boot/uboot-envtools/Makefile
index 631032c..5f27268 100644
--- a/package/boot/uboot-envtools/Makefile
+++ b/package/boot/uboot-envtools/Makefile
@@ -81,6 +81,10 @@ ifneq ($(CONFIG_TARGET_mxs),)
        $(INSTALL_DIR) $(1)/etc/uci-defaults
        $(INSTALL_BIN) ./files/mxs $(1)/etc/uci-defaults/30_uboot-envtools
 endif
+ifneq ($(CONFIG_TARGET_oxnas),)
+       $(INSTALL_DIR) $(1)/etc/uci-defaults
+       $(INSTALL_BIN) ./files/oxnas $(1)/etc/uci-defaults/30_uboot-envtools
+endif
 ifneq ($(CONFIG_TARGET_ramips),)
        $(INSTALL_DIR) $(1)/etc/uci-defaults
        $(INSTALL_DATA) ./files/ramips $(1)/etc/uci-defaults/30_uboot-envtools
diff --git a/package/boot/uboot-envtools/files/oxnas 
b/package/boot/uboot-envtools/files/oxnas
new file mode 100644
index 0000000..425855c
--- /dev/null
+++ b/package/boot/uboot-envtools/files/oxnas
@@ -0,0 +1,28 @@
+#!/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
+stg-212)
+       ubootenv_add_uci_config "/dev/mtd0" "0x3c0000" "0x20000" "0x20000" "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
-- 
1.9.0

Attachment: pgpz2D2t_pOiB.pgp
Description: PGP signature

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to