aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ixp4xx/base-files/lib/ixp4xx.sh
diff options
context:
space:
mode:
authorJames <>2015-09-26 12:29:31 +0100
committerJames <>2015-09-26 12:29:31 +0100
commit626d9efa74685720020e816f3a917b7591d3cf7a (patch)
treed22eef73ae82287b30a1140decb4fc806d39d621 /target/linux/ixp4xx/base-files/lib/ixp4xx.sh
downloadtrunk-47048-626d9efa74685720020e816f3a917b7591d3cf7a.tar.gz
trunk-47048-626d9efa74685720020e816f3a917b7591d3cf7a.tar.bz2
trunk-47048-626d9efa74685720020e816f3a917b7591d3cf7a.zip
trunk-47048
Diffstat (limited to 'target/linux/ixp4xx/base-files/lib/ixp4xx.sh')
-rw-r--r--target/linux/ixp4xx/base-files/lib/ixp4xx.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/target/linux/ixp4xx/base-files/lib/ixp4xx.sh b/target/linux/ixp4xx/base-files/lib/ixp4xx.sh
new file mode 100644
index 0000000..f7a6b76
--- /dev/null
+++ b/target/linux/ixp4xx/base-files/lib/ixp4xx.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+#
+# Copyright (C) 2012 OpenWrt.org
+#
+
+ixp4xx_board_name() {
+ local machine
+ local name
+
+ machine=$(awk 'BEGIN{FS="[ \t]+:[ \t]"} /Hardware/ {print $2}' /proc/cpuinfo)
+
+ case "$machine" in
+ "Gateworks Cambria"*)
+ name="cambria"
+ ;;
+ "Gateworks Avila"*)
+ name="avila"
+ ;;
+ *)
+ name="generic";
+ ;;
+ esac
+
+ echo $name
+}