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

Paweł Dembicki paweldembicki at gmail.com
Sun Jun 14 15:52:11 EDT 2020


sob., 13 cze 2020 o 22:09 Adrian Schmutzler
<freifunk at adrianschmutzler.de> napisał(a):
>

Hi Adrian,

> 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.
>
> Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
> ---
>
> While marked as RFC, this patch should be fully ready for merge already.
>
> ---
>  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 ++--
>  target/linux/kirkwood/base-files/etc/init.d/bootcount  |  4 ++--
>  .../linux/kirkwood/base-files/lib/upgrade/platform.sh  |  4 ++--
>  .../arch/arm/boot/dts/kirkwood-linksys-audi.dts        |  2 +-
>  target/linux/kirkwood/image/Makefile                   | 10 ++++++----
>  target/linux/kirkwood/patches-5.4/105-ea4500.patch     |  9 +++++++++
>  8 files changed, 25 insertions(+), 14 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 bba845eae5..7e589e9bfc 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"
>         ;;
>  "zyxel,nsa310b")
> 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 552ee44ee4..c56415bf1c 100644
> --- a/target/linux/kirkwood/image/Makefile
> +++ b/target/linux/kirkwood/image/Makefile
> @@ -78,7 +78,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
> @@ -90,11 +90,12 @@ define Device/linksys_audi
>    UBINIZE_OPTS := -E 5
>    IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
>    BOARD_NAME := linksys-audi
> +  SUPPORTED_DEVICES += linksys,audi

You didn't add "SUPPORTED_DEVICES" in mvebu. After movement to DSA,
images have broken config after sysupgrade. Maybe at this moment drop
this line?

>    DEFAULT := n
>  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,8 +104,9 @@ define Device/linksys_viper
>    UBINIZE_OPTS := -E 5
>    IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
>    BOARD_NAME := linksys-viper
> +  SUPPORTED_DEVICES += linksys,viper

The same issue like in Audi.

>  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


BR,
Pawel Dembicki

_______________________________________________
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