From a75ce960ac1b9d67af280e17e1e653b3b39def20 Mon Sep 17 00:00:00 2001 From: Mathias Kresin Date: Fri, 23 Dec 2016 09:46:48 +0100 Subject: 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 --- target/linux/ramips/base-files/lib/ramips.sh | 30 +++++++++++++++------- .../linux/ramips/base-files/sbin/fixup-mac-address | 3 ++- 2 files changed, 23 insertions(+), 10 deletions(-) (limited to 'target/linux/ramips/base-files') diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index bfb186d..6b14d19 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -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}" } diff --git a/target/linux/ramips/base-files/sbin/fixup-mac-address b/target/linux/ramips/base-files/sbin/fixup-mac-address index 6e3bac4..3fd8fcb 100755 --- a/target/linux/ramips/base-files/sbin/fixup-mac-address +++ b/target/linux/ramips/base-files/sbin/fixup-mac-address @@ -7,7 +7,8 @@ offset="" NEW_MAC= YES= -case "$(cat /tmp/sysinfo/board_name)" in +board=$(ramips_board_name) +case $board in witi) partname=factory offset=$((0xe000)) -- cgit v1.1