aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/kirkwood/base-files
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/kirkwood/base-files')
-rw-r--r--target/linux/kirkwood/base-files/etc/board.d/02_network1
-rwxr-xr-xtarget/linux/kirkwood/base-files/etc/init.d/hwmon_fancontrol7
-rw-r--r--target/linux/kirkwood/base-files/lib/upgrade/platform.sh13
-rwxr-xr-xtarget/linux/kirkwood/base-files/sbin/ctera_c200-v1_back_to_factory28
4 files changed, 48 insertions, 1 deletions
diff --git a/target/linux/kirkwood/base-files/etc/board.d/02_network b/target/linux/kirkwood/base-files/etc/board.d/02_network
index 694bcaecce..c98e30adcb 100644
--- a/target/linux/kirkwood/base-files/etc/board.d/02_network
+++ b/target/linux/kirkwood/base-files/etc/board.d/02_network
@@ -18,6 +18,7 @@ cisco,on100)
;;
cloudengines,pogoe02|\
cloudengines,pogoplugv4|\
+ctera,c200-v1|\
globalscale,sheevaplug|\
iom,iconnect-1.1|\
iom,ix2-200|\
diff --git a/target/linux/kirkwood/base-files/etc/init.d/hwmon_fancontrol b/target/linux/kirkwood/base-files/etc/init.d/hwmon_fancontrol
index 334a2a08ef..ec85b56ca1 100755
--- a/target/linux/kirkwood/base-files/etc/init.d/hwmon_fancontrol
+++ b/target/linux/kirkwood/base-files/etc/init.d/hwmon_fancontrol
@@ -7,6 +7,13 @@ boot() {
# for more information, please read https://www.kernel.org/doc/Documentation/hwmon/sysfs-interface
case $(board_name) in
+ ctera,c200-v1)
+ path_to_hwmon='/sys/devices/platform/ocp@f1000000/f1011000.i2c/i2c-0/0-004c/hwmon/hwmon0'
+
+ # It should be related to hdd temerature instead lm63 temp
+ echo 1 > "$path_to_hwmon/pwm1_enable"
+ echo 128 > "$path_to_hwmon/pwm1"
+ ;;
iom,ix2-200)
path_to_hwmon='/sys/class/hwmon/hwmon0'
echo 2 > "$path_to_hwmon/pwm1_enable" # fan is on pwm1
diff --git a/target/linux/kirkwood/base-files/lib/upgrade/platform.sh b/target/linux/kirkwood/base-files/lib/upgrade/platform.sh
index 8ff1709f2c..3f84df2808 100644
--- a/target/linux/kirkwood/base-files/lib/upgrade/platform.sh
+++ b/target/linux/kirkwood/base-files/lib/upgrade/platform.sh
@@ -1,4 +1,4 @@
-RAMFS_COPY_BIN='fw_printenv fw_setenv'
+RAMFS_COPY_BIN='fw_printenv fw_setenv strings'
RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock'
REQUIRE_IMAGE_METADATA=1
@@ -11,6 +11,17 @@ platform_do_upgrade() {
local board="$(board_name)"
case "$board" in
+ ctera,c200-v1)
+ part=$(find_mtd_part "active_bank")
+
+ if [ -n "$part" ]; then
+ CI_KERNPART="$(strings $part | grep bank)"
+ nand_do_upgrade "$1"
+ else
+ echo "active_bank partition missed!"
+ return 1
+ fi
+ ;;
linksys,e4200-v2|\
linksys,ea3500|\
linksys,ea4500)
diff --git a/target/linux/kirkwood/base-files/sbin/ctera_c200-v1_back_to_factory b/target/linux/kirkwood/base-files/sbin/ctera_c200-v1_back_to_factory
new file mode 100755
index 0000000000..bb922d4d75
--- /dev/null
+++ b/target/linux/kirkwood/base-files/sbin/ctera_c200-v1_back_to_factory
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+. /lib/functions.sh
+
+case $(board_name) in
+ctera,c200-v1)
+ part=$(find_mtd_part "active_bank")
+
+ if [ -n "$part" ]; then
+ active_bank="$(strings $part | grep bank)"
+
+ if [ $active_bank = "bank1" ]; then
+ echo "bank2" > /tmp/change_bank
+ else
+ echo "bank1" > /tmp/change_bank
+ fi
+
+ mtd write /tmp/change_bank active_bank
+ reboot
+ else
+ echo "active_bank partition missed!"
+ return 1
+ fi
+ ;;
+*)
+ echo "Unsupported hardware."
+ ;;
+esac