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>
This commit is contained in:
Felix Fietkau 2017-11-07 10:22:47 +01:00
parent b15c563929
commit 3eb839b579

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