summaryrefslogtreecommitdiff
path: root/target/linux
diff options
context:
space:
mode:
authorAsh Benz <ash.benz@bk.ru>2016-05-27 22:26:42 +0800
committerJohn Crispin <john@phrozen.org>2016-05-27 15:50:17 +0200
commit14515cc27140069904d4ffc1766c97da439fb42e (patch)
tree5226c5e3c058d17b669755f557afdaef61a3f173 /target/linux
parent98b50f0beff0c6f7691a0433fc43b959b56f9a4f (diff)
downloadmtk-20170518-14515cc27140069904d4ffc1766c97da439fb42e.zip
mtk-20170518-14515cc27140069904d4ffc1766c97da439fb42e.tar.gz
mtk-20170518-14515cc27140069904d4ffc1766c97da439fb42e.tar.bz2
ipq806x/base-files: Add support for Archer C2600
Signed-off-by: Ash Benz <ash.benz@bk.ru>
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ipq806x/base-files/lib/ipq806x.sh3
-rw-r--r--target/linux/ipq806x/base-files/lib/upgrade/platform.sh20
2 files changed, 22 insertions, 1 deletions
diff --git a/target/linux/ipq806x/base-files/lib/ipq806x.sh b/target/linux/ipq806x/base-files/lib/ipq806x.sh
index db22708..73202c0 100644
--- a/target/linux/ipq806x/base-files/lib/ipq806x.sh
+++ b/target/linux/ipq806x/base-files/lib/ipq806x.sh
@@ -17,6 +17,9 @@ ipq806x_board_detect() {
*"AP148")
name="ap148"
;;
+ *"C2600")
+ name="c2600"
+ ;;
*"D7800")
name="d7800"
;;
diff --git a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh
index 542b5ce..a181f13 100644
--- a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh
@@ -12,6 +12,14 @@ platform_check_image() {
nand_do_platform_check $board $1
return $?;
;;
+ c2600)
+ local magic_long="$(get_magic_long "$1")"
+ [ "$magic_long" != "27051956" ] && {
+ echo "Invalid image, bad magic: $magic_long"
+ return 1
+ }
+ return 0;
+ ;;
*)
return 1;
esac
@@ -29,4 +37,14 @@ platform_pre_upgrade() {
esac
}
-# use default for platform_do_upgrade()
+platform_do_upgrade() {
+ local board=$(ipq806x_board_name)
+
+ case "$board" in
+ c2600)
+ PART_NAME="os-image:rootfs"
+ MTD_CONFIG_ARGS="-s 0x200000"
+ default_do_upgrade "$ARGV"
+ ;;
+ esac
+}