aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/base-files/lib/ramips.sh
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ramips/base-files/lib/ramips.sh')
-rwxr-xr-xtarget/linux/ramips/base-files/lib/ramips.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
index b71a130cbe..76ca3d1306 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -737,7 +737,9 @@ ramips_board_detect() {
name="youku-yk1"
;;
*)
- name="generic"
+ name="$(strings /proc/device-tree/compatible | head -1)"
+ name="${name##*,}"
+ name="${name:-generic}"
;;
esac