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>
master
Mathias Kresin 8 years ago
parent 29f5e643ad
commit a75ce960ac
  1. 30
      target/linux/ramips/base-files/lib/ramips.sh
  2. 3
      target/linux/ramips/base-files/sbin/fixup-mac-address
  3. 2
      target/linux/ramips/dts/ASL26555-16M.dts
  4. 2
      target/linux/ramips/dts/ASL26555-8M.dts
  5. 4
      target/linux/ramips/dts/NIXCORE-16M.dts
  6. 4
      target/linux/ramips/dts/NIXCORE-8M.dts
  7. 1
      target/linux/ramips/dts/NIXCORE.dtsi
  8. 4
      target/linux/ramips/dts/VOCORE-16M.dts
  9. 4
      target/linux/ramips/dts/VOCORE-8M.dts
  10. 1
      target/linux/ramips/dts/VOCORE.dtsi
  11. 2
      target/linux/ramips/dts/WT3020-4M.dts
  12. 2
      target/linux/ramips/dts/WT3020-8M.dts
  13. 2
      target/linux/ramips/image/mt7620.mk
  14. 18
      target/linux/ramips/image/rt305x.mk

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

@ -7,7 +7,8 @@ offset=""
NEW_MAC= NEW_MAC=
YES= YES=
case "$(cat /tmp/sysinfo/board_name)" in board=$(ramips_board_name)
case $board in
witi) witi)
partname=factory partname=factory
offset=$((0xe000)) offset=$((0xe000))

@ -6,7 +6,7 @@
/ { / {
compatible = "ASL26555", "ralink,rt3050-soc"; compatible = "ASL26555", "ralink,rt3050-soc";
model = "Alpha ASL26555"; model = "Alpha ASL26555 (16M)";
gpio-keys-polled { gpio-keys-polled {
compatible = "gpio-keys-polled"; compatible = "gpio-keys-polled";

@ -6,7 +6,7 @@
/ { / {
compatible = "ASL26555", "ralink,rt3050-soc"; compatible = "ASL26555", "ralink,rt3050-soc";
model = "Alpha ASL26555"; model = "Alpha ASL26555 (8M)";
gpio-keys-polled { gpio-keys-polled {
compatible = "gpio-keys-polled"; compatible = "gpio-keys-polled";

@ -2,6 +2,10 @@
#include "NIXCORE.dtsi" #include "NIXCORE.dtsi"
/ {
model = "NixcoreX1 (16M)";
};
&spi0 { &spi0 {
status = "okay"; status = "okay";

@ -2,6 +2,10 @@
#include "NIXCORE.dtsi" #include "NIXCORE.dtsi"
/ {
model = "NixcoreX1 (8M)";
};
&spi0 { &spi0 {
status = "okay"; status = "okay";

@ -2,7 +2,6 @@
/ { / {
compatible = "Nixcore", "ralink,rt5350-soc"; compatible = "Nixcore", "ralink,rt5350-soc";
model = "Nixcore";
chosen { chosen {
bootargs = "console=ttyS1,57600"; bootargs = "console=ttyS1,57600";

@ -2,6 +2,10 @@
#include "VOCORE.dtsi" #include "VOCORE.dtsi"
/ {
model = "VoCore (16M)";
};
&spi0 { &spi0 {
status = "okay"; status = "okay";

@ -2,6 +2,10 @@
#include "VOCORE.dtsi" #include "VOCORE.dtsi"
/ {
model = "VoCore (8M)";
};
&spi0 { &spi0 {
status = "okay"; status = "okay";

@ -2,7 +2,6 @@
/ { / {
compatible = "VoCore", "ralink,rt5350-soc"; compatible = "VoCore", "ralink,rt5350-soc";
model = "VoCore";
gpio-export { gpio-export {
compatible = "gpio-export"; compatible = "gpio-export";

@ -6,7 +6,7 @@
/ { / {
compatible = "wt3020", "ralink,mt7620n-soc"; compatible = "wt3020", "ralink,mt7620n-soc";
model = "Nexx WT3020"; model = "Nexx WT3020 (4M)";
gpio-keys-polled { gpio-keys-polled {
compatible = "gpio-keys-polled"; compatible = "gpio-keys-polled";

@ -6,7 +6,7 @@
/ { / {
compatible = "wt3020", "ralink,mt7620n-soc"; compatible = "wt3020", "ralink,mt7620n-soc";
model = "Nexx WT3020"; model = "Nexx WT3020 (8M)";
gpio-keys-polled { gpio-keys-polled {
compatible = "gpio-keys-polled"; compatible = "gpio-keys-polled";

@ -89,7 +89,6 @@ define Device/wt3020-4M
BLOCKSIZE := 4k BLOCKSIZE := 4k
IMAGE_SIZE := $(ralink_default_fw_size_4M) IMAGE_SIZE := $(ralink_default_fw_size_4M)
IMAGES += factory.bin IMAGES += factory.bin
SUPPORTED_DEVICES := wt3020
IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
poray-header -B WT3020 -F 4M poray-header -B WT3020 -F 4M
DEVICE_TITLE := Nexx WT3020 (4MB) DEVICE_TITLE := Nexx WT3020 (4MB)
@ -99,7 +98,6 @@ TARGET_DEVICES += wt3020-4M
define Device/wt3020-8M define Device/wt3020-8M
DTS := WT3020-8M DTS := WT3020-8M
IMAGES += factory.bin IMAGES += factory.bin
SUPPORTED_DEVICES := wt3020
IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
poray-header -B WT3020 -F 8M poray-header -B WT3020 -F 8M
DEVICE_TITLE := Nexx WT3020 (8MB) DEVICE_TITLE := Nexx WT3020 (8MB)

@ -40,7 +40,6 @@ TARGET_DEVICES += all5003
define Device/asl26555-8M define Device/asl26555-8M
DTS := ASL26555-8M DTS := ASL26555-8M
IMAGE_SIZE := 7744k IMAGE_SIZE := 7744k
SUPPORTED_DEVICES := asl26555
DEVICE_TITLE := Alpha ASL26555 DEVICE_TITLE := Alpha ASL26555
DEVICE_PACKAGES := kmod-usb-core kmod-usb-dwc2 kmod-usb-ledtrig-usbport DEVICE_PACKAGES := kmod-usb-core kmod-usb-dwc2 kmod-usb-ledtrig-usbport
endef endef
@ -49,7 +48,6 @@ TARGET_DEVICES += asl26555-8M
define Device/asl26555-16M define Device/asl26555-16M
DTS := ASL26555-16M DTS := ASL26555-16M
IMAGE_SIZE := 15872k IMAGE_SIZE := 15872k
SUPPORTED_DEVICES := asl26555
DEVICE_TITLE := Alpha ASL26555 16M DEVICE_TITLE := Alpha ASL26555 16M
DEVICE_PACKAGES := DEVICE_PACKAGES :=
endef endef
@ -270,20 +268,18 @@ define Device/ncs601w
endef endef
TARGET_DEVICES += ncs601w TARGET_DEVICES += ncs601w
define Device/nixcore-8M define Device/nixcore-x1-8M
DTS := NIXCORE-8M DTS := NIXCORE-8M
IMAGE_SIZE := 7872k IMAGE_SIZE := 7872k
SUPPORTED_DEVICES := nixcore-x1 DEVICE_TITLE := NixcoreX1 (8M)
DEVICE_TITLE := NixcoreX1 8M
DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-i2c-core kmod-i2c-ralink kmod-spi-dev DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-i2c-core kmod-i2c-ralink kmod-spi-dev
endef endef
TARGET_DEVICES += nixcore-8M TARGET_DEVICES += nixcore-8M
define Device/nixcore-16M define Device/nixcore-x1-16M
DTS := NIXCORE-16M DTS := NIXCORE-16M
IMAGE_SIZE := 16064k IMAGE_SIZE := 16064k
SUPPORTED_DEVICES := nixcore-x1 DEVICE_TITLE := NixcoreX1 (16M)
DEVICE_TITLE := NixcoreX1 16M
DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-i2c-core kmod-i2c-ralink kmod-spi-dev DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-i2c-core kmod-i2c-ralink kmod-spi-dev
endef endef
TARGET_DEVICES += nixcore-16M TARGET_DEVICES += nixcore-16M
@ -391,8 +387,7 @@ TARGET_DEVICES += v22rw-2x2
define Device/vocore-8M define Device/vocore-8M
DTS := VOCORE-8M DTS := VOCORE-8M
IMAGE_SIZE := 7872k IMAGE_SIZE := 7872k
SUPPORTED_DEVICES := vocore DEVICE_TITLE := VoCore (8M)
DEVICE_TITLE := VoCore 8M
DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 \ DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 \
kmod-i2c-core kmod-i2c-ralink \ kmod-i2c-core kmod-i2c-ralink \
kmod-spi-dev kmod-spi-dev
@ -402,8 +397,7 @@ TARGET_DEVICES += vocore-8M
define Device/vocore-16M define Device/vocore-16M
DTS := VOCORE-16M DTS := VOCORE-16M
IMAGE_SIZE := 16064k IMAGE_SIZE := 16064k
SUPPORTED_DEVICES := vocore DEVICE_TITLE := VoCore (16M)
DEVICE_TITLE := VoCore 16M
DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 \ DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 \
kmod-i2c-core kmod-i2c-ralink \ kmod-i2c-core kmod-i2c-ralink \
kmod-spi-dev kmod-spi-dev

Loading…
Cancel
Save