diff options
author | Mathias Kresin <dev@kresin.me> | 2016-12-23 09:46:48 +0100 |
---|---|---|
committer | Mathias Kresin <dev@kresin.me> | 2016-12-24 10:03:38 +0100 |
commit | a75ce960ac1b9d67af280e17e1e653b3b39def20 (patch) | |
tree | 25f7314479a3165ac565378783eba1a303645da9 /target/linux/ramips/base-files | |
parent | 29f5e643ad130c138507dc767187744ad710208a (diff) | |
download | upstream-a75ce960ac1b9d67af280e17e1e653b3b39def20.tar.gz upstream-a75ce960ac1b9d67af280e17e1e653b3b39def20.tar.bz2 upstream-a75ce960ac1b9d67af280e17e1e653b3b39def20.zip |
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>
Diffstat (limited to 'target/linux/ramips/base-files')
-rwxr-xr-x | target/linux/ramips/base-files/lib/ramips.sh | 30 | ||||
-rwxr-xr-x | target/linux/ramips/base-files/sbin/fixup-mac-address | 3 |
2 files changed, 23 insertions, 10 deletions
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index bfb186ddf8..6b14d19feb 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 6e3bac4997..3fd8fcb97a 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)) |