aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2013-03-03 12:47:28 +0000
committerGabor Juhos <juhosg@openwrt.org>2013-03-03 12:47:28 +0000
commit1720de28720e3695df6db783de009ed8a116e54d (patch)
tree904ee98a7237eec6c90b2e0b5b922f843c1d4997 /target/linux
parent6d4126a70e75cc6d1955456bd8a88ff7023d4bf9 (diff)
downloadupstream-1720de28720e3695df6db783de009ed8a116e54d.tar.gz
upstream-1720de28720e3695df6db783de009ed8a116e54d.tar.bz2
upstream-1720de28720e3695df6db783de009ed8a116e54d.zip
ramips: add user-space detection for ALL5002/ALL5003
Signed-off-by: Daniel Golle <dgolle@allnet.de> Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35852 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rwxr-xr-xtarget/linux/ramips/base-files/lib/ramips.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
index 4b3e362acc..0702145358 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -6,6 +6,19 @@
RAMIPS_BOARD_NAME=
RAMIPS_MODEL=
+all500x_board_detect() {
+ local systype
+
+ systype=$(awk 'BEGIN{FS="[ \t]+:[ \t]"} /system type/ {print $2}' /proc/cpuinfo)
+ case "$systype" in
+ *"RT5350"*)
+ RAMIPS_MODEL="Allnet ALL5003"
+ ;;
+ *"RT3352"*)
+ RAMIPS_MODEL="Allnet ALL5002"
+ ;;
+ esac
+}
ramips_board_detect() {
local machine
@@ -193,6 +206,12 @@ ramips_board_detect() {
;;
esac
+ case "$machine" in
+ *"Allnet ALL5002/ALL5003")
+ all500x_board_detect
+ ;;
+ esac
+
[ -z "$RAMIPS_BOARD_NAME" ] && RAMIPS_BOARD_NAME="$name"
[ -z "$RAMIPS_MODEL" ] && RAMIPS_MODEL="$machine"