Author: blogic
Date: 2014-11-26 10:00:40 +0100 (Wed, 26 Nov 2014)
New Revision: 43390

Added:
   trunk/package/boot/uboot-envtools/files/oxnas
Modified:
   trunk/package/boot/uboot-envtools/Makefile
Log:
uboot-envtools: add support for oxnas target

Signed-off-by: Daniel Golle <[email protected]>

Modified: trunk/package/boot/uboot-envtools/Makefile
===================================================================
--- trunk/package/boot/uboot-envtools/Makefile  2014-11-26 09:00:17 UTC (rev 
43389)
+++ trunk/package/boot/uboot-envtools/Makefile  2014-11-26 09:00:40 UTC (rev 
43390)
@@ -94,6 +94,10 @@
        $(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

Added: trunk/package/boot/uboot-envtools/files/oxnas
===================================================================
--- trunk/package/boot/uboot-envtools/files/oxnas                               
(rev 0)
+++ trunk/package/boot/uboot-envtools/files/oxnas       2014-11-26 09:00:40 UTC 
(rev 43390)
@@ -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
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to