2
0
Эх сурвалжийг харах

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 <[email protected]>
Felix Fietkau 8 жил өмнө
parent
commit
3eb839b579

+ 3 - 1
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