ramips: extract board name from device tree as a fallback

This makes it possible to avoid more duplication when adding support for
a new board

Signed-off-by: Felix Fietkau <nbd@nbd.name>
openwrt-18.06
Felix Fietkau 2017-11-07 10:22:47 +01:00
parent b15c563929
commit 3eb839b579
1 changed files with 3 additions and 1 deletions

View File

@ -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