ramips: use different board names for variants

Use different names for flash size related board variants, to make sure
that only images for the actual flash size are considered as valid by
the image validation code.

Remove the flash size suffix from the string returned by
ramips_board_detect() to ensure that existing scripts relying on the
former used boardname are still working.

Signed-off-by: Mathias Kresin <dev@kresin.me>
This commit is contained in:
Mathias Kresin
2016-12-23 09:46:48 +01:00
parent 29f5e643ad
commit a75ce960ac
14 changed files with 49 additions and 30 deletions

View File

@@ -55,8 +55,11 @@ ramips_board_detect() {
*"AR725W")
name="ar725w"
;;
*"ASL26555")
name="asl26555"
*"ASL26555 (8M)")
name="asl26555-8M"
;;
*"ASL26555 (16M)")
name="asl26555-16M"
;;
*"ATP-52B")
name="atp-52b"
@@ -343,8 +346,11 @@ ramips_board_detect() {
*"NCS601W")
name="ncs601w"
;;
*"NixcoreX1")
name="nixcore-x1"
*"NixcoreX1 (8M)")
name="nixcore-x1-8M"
;;
*"NixcoreX1 (16M)")
name="nixcore-x1-16M"
;;
*"NW718")
name="nw718"
@@ -451,8 +457,11 @@ ramips_board_detect() {
*"V22RW-2X2")
name="v22rw-2x2"
;;
*"VoCore")
name="vocore"
*"VoCore (8M)")
name="vocore-8M"
;;
*"VoCore (16M)")
name="vocore-16M"
;;
*"VR500")
name="vr500"
@@ -556,8 +565,11 @@ ramips_board_detect() {
*"WT1520")
name="wt1520"
;;
*"WT3020")
name="wt3020"
*"WT3020 (4M)")
name="wt3020-4M"
;;
*"WT3020 (8M)")
name="wt3020-8M"
;;
*"WZR-AGL300NH")
name="wzr-agl300nh"
@@ -627,5 +639,5 @@ ramips_board_name() {
[ -f /tmp/sysinfo/board_name ] && name=$(cat /tmp/sysinfo/board_name)
[ -z "$name" ] && name="unknown"
echo "$name"
echo "${name%-[0-9]*M}"
}