[OpenWrt-Devel] [RFT PATCH v2] kirkwood: use real model names for Linksys devices

Adrian Schmutzler freifunk at adrianschmutzler.de
Sun Jun 14 18:13:00 EDT 2020


This replaces the internal device names "Audi" and "Viper" with the
real model names, which a user would look for. This makes the
Linksys devices on this target consistent with the names recently
changed for mvebu based on the same idea.

After the recent switch from swconfig to DSA, this also drops the
SUPPORTED_DEVICES for these devices. This might serve as indirect
warning to not just upgrade into a broken config.

Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---

Please run-test this patch on the devices if possible, I don't have them.

---
 package/boot/uboot-envtools/files/kirkwood           |  4 ++--
 target/linux/kirkwood/base-files/etc/board.d/01_leds |  2 +-
 .../linux/kirkwood/base-files/etc/board.d/02_network |  4 ++--
 .../linux/kirkwood/base-files/etc/init.d/bootcount   |  4 ++--
 .../kirkwood/base-files/lib/upgrade/platform.sh      |  4 ++--
 .../arch/arm/boot/dts/kirkwood-linksys-audi.dts      |  2 +-
 target/linux/kirkwood/image/Makefile                 | 12 ++++++------
 target/linux/kirkwood/patches-5.4/105-ea4500.patch   |  9 +++++++++
 8 files changed, 25 insertions(+), 16 deletions(-)

diff --git a/package/boot/uboot-envtools/files/kirkwood b/package/boot/uboot-envtools/files/kirkwood
index b5f7ddccb7..10dde84c8c 100644
--- a/package/boot/uboot-envtools/files/kirkwood
+++ b/package/boot/uboot-envtools/files/kirkwood
@@ -16,14 +16,14 @@ case "$board" in
 cloudengines,pogoe02|\
 cloudengines,pogoplugv4|\
 iom,ix2-200|\
-linksys,viper|\
+linksys,ea4500|\
 raidsonic,ib-nas62x0|\
 seagate,dockstar|\
 zyxel,nsa310b|\
 zyxel,nsa325)
 	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
 	;;
-linksys,audi)
+linksys,ea3500)
 	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x4000" "0x4000"
 	;;
 esac
diff --git a/target/linux/kirkwood/base-files/etc/board.d/01_leds b/target/linux/kirkwood/base-files/etc/board.d/01_leds
index bbe689bbb5..7186663ed1 100755
--- a/target/linux/kirkwood/base-files/etc/board.d/01_leds
+++ b/target/linux/kirkwood/base-files/etc/board.d/01_leds
@@ -13,7 +13,7 @@ case "$board" in
 "iom,ix2-200")
 	ucidef_set_led_timer "health" "health" "status:white:rebuild_led" "200" "800"
 	;;
-"linksys,viper")
+"linksys,ea4500")
 	ucidef_set_led_default "pulse" "pulse" "viper:white:pulse" "1"
 	;;
 esac
diff --git a/target/linux/kirkwood/base-files/etc/board.d/02_network b/target/linux/kirkwood/base-files/etc/board.d/02_network
index df01b0bb1b..3c844f2819 100755
--- a/target/linux/kirkwood/base-files/etc/board.d/02_network
+++ b/target/linux/kirkwood/base-files/etc/board.d/02_network
@@ -24,8 +24,8 @@ case "$board" in
 "seagate,goflexnet")
 	ucidef_set_interface_lan "eth0" "dhcp"
 	;;
-"linksys,audi"|\
-"linksys,viper")
+"linksys,ea3500"|\
+"linksys,ea4500")
 	ucidef_set_interfaces_lan_wan "ethernet1 ethernet2 ethernet3 ethernet4" "internet"
 	ucidef_set_interface_macaddr "wan" $( mtd_get_mac_ascii u_env eth1addr )
 	;;
diff --git a/target/linux/kirkwood/base-files/etc/init.d/bootcount b/target/linux/kirkwood/base-files/etc/init.d/bootcount
index 478f3d0134..b1e5152326 100755
--- a/target/linux/kirkwood/base-files/etc/init.d/bootcount
+++ b/target/linux/kirkwood/base-files/etc/init.d/bootcount
@@ -4,8 +4,8 @@ START=99
 
 boot() {
 	case $(board_name) in
-	linksys,audi|\
-	linksys,viper)
+	linksys,ea3500|\
+	linksys,ea4500)
 		mtd resetbc s_env || true
 		;;
 	esac
diff --git a/target/linux/kirkwood/base-files/lib/upgrade/platform.sh b/target/linux/kirkwood/base-files/lib/upgrade/platform.sh
index 6d63a0a4b7..4629395347 100644
--- a/target/linux/kirkwood/base-files/lib/upgrade/platform.sh
+++ b/target/linux/kirkwood/base-files/lib/upgrade/platform.sh
@@ -11,8 +11,8 @@ platform_do_upgrade() {
 	local board="$(board_name)"
 
 	case "$board" in
-	"linksys,audi"|\
-	"linksys,viper")
+	linksys,ea3500|\
+	linksys,ea4500)
 		platform_do_upgrade_linksys "$1"
 		;;
 	*)
diff --git a/target/linux/kirkwood/files-5.4/arch/arm/boot/dts/kirkwood-linksys-audi.dts b/target/linux/kirkwood/files-5.4/arch/arm/boot/dts/kirkwood-linksys-audi.dts
index 90250fefc8..5952f57a4a 100644
--- a/target/linux/kirkwood/files-5.4/arch/arm/boot/dts/kirkwood-linksys-audi.dts
+++ b/target/linux/kirkwood/files-5.4/arch/arm/boot/dts/kirkwood-linksys-audi.dts
@@ -16,7 +16,7 @@
 
 / {
 	model = "Linksys Audi (EA3500)";
-	compatible = "linksys,audi", "marvell,kirkwood-88f6282", "marvell,kirkwood";
+	compatible = "linksys,ea3500", "linksys,audi", "marvell,kirkwood-88f6282", "marvell,kirkwood";
 
 	memory at 0 {
 		device_type = "memory";
diff --git a/target/linux/kirkwood/image/Makefile b/target/linux/kirkwood/image/Makefile
index b8cc92760d..f67a26f12e 100644
--- a/target/linux/kirkwood/image/Makefile
+++ b/target/linux/kirkwood/image/Makefile
@@ -80,7 +80,7 @@ define Device/iom_ix2-200
 endef
 TARGET_DEVICES += iom_ix2-200
 
-define Device/linksys_audi
+define Device/linksys_ea3500
   DEVICE_VENDOR := Linksys
   DEVICE_MODEL := EA3500 (Audi)
   DEVICE_PACKAGES := kmod-mwl8k wpad-basic kmod-gpio-button-hotplug
@@ -91,11 +91,11 @@ define Device/linksys_audi
   KERNEL_IN_UBI :=
   UBINIZE_OPTS := -E 5
   IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
-  BOARD_NAME := linksys-audi
+  DEVICE_DTS := kirkwood-linksys-audi
 endef
-TARGET_DEVICES += linksys_audi
+TARGET_DEVICES += linksys_ea3500
 
-define Device/linksys_viper
+define Device/linksys_ea4500
   DEVICE_VENDOR := Linksys
   DEVICE_MODEL := E4200v2 / EA4500 (Viper)
   DEVICE_PACKAGES := kmod-mwl8k wpad-basic kmod-gpio-button-hotplug
@@ -103,9 +103,9 @@ define Device/linksys_viper
   KERNEL_IN_UBI :=
   UBINIZE_OPTS := -E 5
   IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
-  BOARD_NAME := linksys-viper
+  DEVICE_DTS := kirkwood-linksys-viper
 endef
-TARGET_DEVICES += linksys_viper
+TARGET_DEVICES += linksys_ea4500
 
 define Device/raidsonic_ib-nas62x0
   DEVICE_VENDOR := RaidSonic
diff --git a/target/linux/kirkwood/patches-5.4/105-ea4500.patch b/target/linux/kirkwood/patches-5.4/105-ea4500.patch
index 0d97ad14a2..c2bbe9d240 100644
--- a/target/linux/kirkwood/patches-5.4/105-ea4500.patch
+++ b/target/linux/kirkwood/patches-5.4/105-ea4500.patch
@@ -1,5 +1,14 @@
 --- a/arch/arm/boot/dts/kirkwood-linksys-viper.dts
 +++ b/arch/arm/boot/dts/kirkwood-linksys-viper.dts
+@@ -16,7 +16,7 @@
+ 
+ / {
+ 	model = "Linksys Viper (E4200v2 / EA4500)";
+-	compatible = "linksys,viper", "marvell,kirkwood-88f6282", "marvell,kirkwood";
++	compatible = "linksys,ea4500", "linksys,viper", "marvell,kirkwood-88f6282", "marvell,kirkwood";
+ 
+ 	memory {
+ 		device_type = "memory";
 @@ -24,6 +24,10 @@
  	};
  
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list