projects
/
oweals
/
openwrt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b15c563
)
ramips: extract board name from device tree as a fallback
author
Felix Fietkau
<nbd@nbd.name>
Tue, 7 Nov 2017 09:22:47 +0000
(10:22 +0100)
committer
Felix Fietkau
<nbd@nbd.name>
Thu, 16 Nov 2017 11:52:55 +0000
(12:52 +0100)
This makes it possible to avoid more duplication when adding support for
a new board
Signed-off-by: Felix Fietkau <nbd@nbd.name>
target/linux/ramips/base-files/lib/ramips.sh
patch
|
blob
|
history
diff --git
a/target/linux/ramips/base-files/lib/ramips.sh
b/target/linux/ramips/base-files/lib/ramips.sh
index b71a130cbe0166d5f801e73c80e988f368d72220..76ca3d1306fb3a9165405be357dfd9c30a875a29 100755
(executable)
--- 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