[openwrt/openwrt] kirkwood: use real model names for Linksys devices
LEDE Commits
lede-commits at lists.infradead.org
Fri Jul 31 09:03:51 EDT 2020
adrian pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/65305cb44869774a7db10c517b871dce5ab46ccb
commit 65305cb44869774a7db10c517b871dce5ab46ccb
Author: Adrian Schmutzler <freifunk at adrianschmutzler.de>
AuthorDate: Sat Jun 13 00:36:01 2020 +0200
kirkwood: use real model names for Linksys devices
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.
As a consequence, the "viper" device definition is split into two
separate definitions with the correct names for both real models.
Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
package/boot/uboot-envtools/files/kirkwood | 5 ++-
.../linux/kirkwood/base-files/etc/board.d/01_leds | 5 ++-
.../kirkwood/base-files/etc/board.d/02_network | 5 ++-
.../base-files/etc/board.d/05_compat-version | 5 ++-
.../linux/kirkwood/base-files/etc/init.d/bootcount | 5 ++-
.../kirkwood/base-files/lib/upgrade/platform.sh | 5 ++-
.../arch/arm/boot/dts/kirkwood-e4200-v2.dts | 8 ++++
...rkwood-linksys-audi.dts => kirkwood-ea3500.dts} | 4 +-
.../arch/arm/boot/dts/kirkwood-ea4500.dts | 8 ++++
target/linux/kirkwood/image/Makefile | 47 ++++++++++++++--------
...05-ea4500.patch => 105-linksys-viper-dts.patch} | 0
11 files changed, 66 insertions(+), 31 deletions(-)
diff --git a/package/boot/uboot-envtools/files/kirkwood b/package/boot/uboot-envtools/files/kirkwood
index a099c925ea..401df74597 100644
--- a/package/boot/uboot-envtools/files/kirkwood
+++ b/package/boot/uboot-envtools/files/kirkwood
@@ -17,7 +17,8 @@ checkpoint,l-50|\
cloudengines,pogoe02|\
cloudengines,pogoplugv4|\
iom,ix2-200|\
-linksys,viper|\
+linksys,e4200-v2|\
+linksys,ea4500|\
raidsonic,ib-nas62x0|\
seagate,dockstar|\
zyxel,nsa310b|\
@@ -25,7 +26,7 @@ zyxel,nsa310s|\
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..3f7fe71c0a 100755
--- a/target/linux/kirkwood/base-files/etc/board.d/01_leds
+++ b/target/linux/kirkwood/base-files/etc/board.d/01_leds
@@ -10,10 +10,11 @@ board_config_update
board=$(board_name)
case "$board" in
-"iom,ix2-200")
+iom,ix2-200)
ucidef_set_led_timer "health" "health" "status:white:rebuild_led" "200" "800"
;;
-"linksys,viper")
+linksys,e4200-v2|\
+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 658ce13346..a60b87c912 100755
--- a/target/linux/kirkwood/base-files/etc/board.d/02_network
+++ b/target/linux/kirkwood/base-files/etc/board.d/02_network
@@ -28,8 +28,9 @@ case "$board" in
"zyxel,nsa310s")
ucidef_set_interface_lan "eth0" "dhcp"
;;
-"linksys,audi"|\
-"linksys,viper")
+"linksys,e4200-v2"|\
+"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/board.d/05_compat-version b/target/linux/kirkwood/base-files/etc/board.d/05_compat-version
index 8954d69d12..29d1debe58 100755
--- a/target/linux/kirkwood/base-files/etc/board.d/05_compat-version
+++ b/target/linux/kirkwood/base-files/etc/board.d/05_compat-version
@@ -9,8 +9,9 @@
board_config_update
case "$(board_name)" in
- linksys,audi|\
- linksys,viper)
+ linksys,e4200-v2|\
+ linksys,ea3500|\
+ linksys,ea4500)
ucidef_set_compat_version "1.1"
;;
esac
diff --git a/target/linux/kirkwood/base-files/etc/init.d/bootcount b/target/linux/kirkwood/base-files/etc/init.d/bootcount
index 478f3d0134..bbb36eb6ea 100755
--- a/target/linux/kirkwood/base-files/etc/init.d/bootcount
+++ b/target/linux/kirkwood/base-files/etc/init.d/bootcount
@@ -4,8 +4,9 @@ START=99
boot() {
case $(board_name) in
- linksys,audi|\
- linksys,viper)
+ linksys,e4200-v2|\
+ 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..8ff1709f2c 100644
--- a/target/linux/kirkwood/base-files/lib/upgrade/platform.sh
+++ b/target/linux/kirkwood/base-files/lib/upgrade/platform.sh
@@ -11,8 +11,9 @@ platform_do_upgrade() {
local board="$(board_name)"
case "$board" in
- "linksys,audi"|\
- "linksys,viper")
+ linksys,e4200-v2|\
+ linksys,ea3500|\
+ linksys,ea4500)
platform_do_upgrade_linksys "$1"
;;
*)
diff --git a/target/linux/kirkwood/files-5.4/arch/arm/boot/dts/kirkwood-e4200-v2.dts b/target/linux/kirkwood/files-5.4/arch/arm/boot/dts/kirkwood-e4200-v2.dts
new file mode 100644
index 0000000000..bfd708a677
--- /dev/null
+++ b/target/linux/kirkwood/files-5.4/arch/arm/boot/dts/kirkwood-e4200-v2.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "kirkwood-linksys-viper.dts"
+
+/ {
+ model = "Linksys E4200 v2 (Viper)";
+ compatible = "linksys,e4200-v2", "linksys,viper", "marvell,kirkwood-88f6282", "marvell,kirkwood";
+};
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-ea3500.dts
similarity index 96%
rename from target/linux/kirkwood/files-5.4/arch/arm/boot/dts/kirkwood-linksys-audi.dts
rename to target/linux/kirkwood/files-5.4/arch/arm/boot/dts/kirkwood-ea3500.dts
index 90250fefc8..851f316711 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-ea3500.dts
@@ -15,8 +15,8 @@
#include "kirkwood-6282.dtsi"
/ {
- model = "Linksys Audi (EA3500)";
- compatible = "linksys,audi", "marvell,kirkwood-88f6282", "marvell,kirkwood";
+ model = "Linksys EA3500 (Audi)";
+ compatible = "linksys,ea3500", "linksys,audi", "marvell,kirkwood-88f6282", "marvell,kirkwood";
memory at 0 {
device_type = "memory";
diff --git a/target/linux/kirkwood/files-5.4/arch/arm/boot/dts/kirkwood-ea4500.dts b/target/linux/kirkwood/files-5.4/arch/arm/boot/dts/kirkwood-ea4500.dts
new file mode 100644
index 0000000000..495cff34a4
--- /dev/null
+++ b/target/linux/kirkwood/files-5.4/arch/arm/boot/dts/kirkwood-ea4500.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "kirkwood-linksys-viper.dts"
+
+/ {
+ model = "Linksys EA4500 (Viper)";
+ compatible = "linksys,ea4500", "linksys,viper", "marvell,kirkwood-88f6282", "marvell,kirkwood";
+};
diff --git a/target/linux/kirkwood/image/Makefile b/target/linux/kirkwood/image/Makefile
index 6554fc2669..3a600da13c 100644
--- a/target/linux/kirkwood/image/Makefile
+++ b/target/linux/kirkwood/image/Makefile
@@ -96,34 +96,47 @@ define Device/iom_ix2-200
endef
TARGET_DEVICES += iom_ix2-200
-define Device/linksys_audi
- $(Device/dsa-migration)
+define Device/linksys
DEVICE_VENDOR := Linksys
- DEVICE_MODEL := EA3500 (Audi)
DEVICE_PACKAGES := kmod-mwl8k wpad-basic kmod-gpio-button-hotplug
+ KERNEL_IN_UBI :=
+ UBINIZE_OPTS := -E 5
+ IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
+endef
+
+define Device/linksys_e4200-v2
+ $(Device/linksys)
+ $(Device/dsa-migration)
+ DEVICE_MODEL := E4200
+ DEVICE_VARIANT := v2
+ DEVICE_DTS := kirkwood-e4200-v2
+ KERNEL_SIZE := 2688k
+ SUPPORTED_DEVICES += linksys,viper linksys-viper
+endef
+TARGET_DEVICES += linksys_e4200-v2
+
+define Device/linksys_ea3500
+ $(Device/linksys)
+ $(Device/dsa-migration)
+ DEVICE_MODEL := EA3500
+ DEVICE_DTS := kirkwood-ea3500
PAGESIZE := 512
SUBPAGESIZE := 256
BLOCKSIZE := 16k
KERNEL_SIZE := 2624k
- KERNEL_IN_UBI :=
- UBINIZE_OPTS := -E 5
- IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
- BOARD_NAME := linksys-audi
+ SUPPORTED_DEVICES += linksys,audi linksys-audi
endef
-TARGET_DEVICES += linksys_audi
+TARGET_DEVICES += linksys_ea3500
-define Device/linksys_viper
+define Device/linksys_ea4500
+ $(Device/linksys)
$(Device/dsa-migration)
- DEVICE_VENDOR := Linksys
- DEVICE_MODEL := E4200v2 / EA4500 (Viper)
- DEVICE_PACKAGES := kmod-mwl8k wpad-basic kmod-gpio-button-hotplug
+ DEVICE_MODEL := EA4500
+ DEVICE_DTS := kirkwood-ea4500
KERNEL_SIZE := 2688k
- KERNEL_IN_UBI :=
- UBINIZE_OPTS := -E 5
- IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
- BOARD_NAME := linksys-viper
+ SUPPORTED_DEVICES += linksys,viper 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-linksys-viper-dts.patch
similarity index 100%
rename from target/linux/kirkwood/patches-5.4/105-ea4500.patch
rename to target/linux/kirkwood/patches-5.4/105-linksys-viper-dts.patch
More information about the lede-commits
mailing list