Skip to content

Commit

Permalink
ramips: extract board name from device tree as a fallback
Browse files Browse the repository at this point in the history
This makes it possible to avoid more duplication when adding support for
a new board

Signed-off-by: Felix Fietkau <[email protected]>
  • Loading branch information
nbd168 committed Nov 16, 2017
1 parent b15c563 commit 3eb839b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion target/linux/ramips/base-files/lib/ramips.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 3eb839b

Please sign in to comment.