[OpenWrt-Devel] [PATCH] ath79: Add GL.iNet AR-300M-Lite: Setup with eth0 as LAN
Mathias Kresin
dev at kresin.me
Sat Jan 26 09:24:16 EST 2019
21/01/2019 00:21, Jeff Klesky:
> On 1/16/19 9:03 PM, Petr Štetiar wrote:
>
>> Jeff Klesky <lede at allycomm.com> [2019-01-16 21:48:11]:
>>
>> Hi,
>>
>> subject could be just `ath79: Add support for GL.iNet AR-300M-Lite`,
>> since
>> you've already added that information about eth0 in the commit
>> message, and
>> that's the place where it belongs.
>
> Thanks for all your suggestions. Updated patches attached have clear,
> simple headlines.
>
>>
>>> --- a/target/linux/ath79/image/generic.mk
>>> +++ b/target/linux/ath79/image/generic.mk
>>> @@ -296,6 +296,15 @@ define Device/glinet_gl-ar150
>>> endef
>>> TARGET_DEVICES += glinet_gl-ar150
>> you're missing newline here.
>
> Not sure where it was missing, but the spacing looks self-consistent
> with the current patches that follow.
>
>>
>>> +define Device/glinet_gl-ar300m-lite
>>> + ATH_SOC := qca9531
>>> + DEVICE_TITLE := GL.iNet GL-AR300M-Lite
>>> + DEVICE_PACKAGES := kmod-usb-core kmod-usb2
>>> + IMAGE_SIZE := 16000k
>>> + SUPPORTED_DEVICES += gl-ar300m-lite
>> The correct supported devices entry for your board is added by:
>>
>> [...]
>>
>> Since you add support for a new board, you don't need to take care of
>> former
>> used userspace boardnames.
>
> Thanks for the insight -- it allowed me to use the proper SUPPORTED_DEVICES
> to allow the OpenWrt build to be installed with the OEM-supplied LuCI
>
>>> +endef
>>> +TARGET_DEVICES += glinet_gl-ar300m-lite
>>> +
>>> define Device/glinet_gl-ar300m-nor
>>> ATH_SOC := qca9531
>>> DEVICE_TITLE := GL.iNet GL-AR300M
>> In the spirit of DRY principle, this could be refactored into
>> something like
>> this:
>>
>> define Device/glinet_gl-ar300
>> ATH_SOC := qca9531
>> DEVICE_PACKAGES := kmod-usb-core kmod-usb2
>> IMAGE_SIZE := 16000k
>> endef
>>
>> define Device/glinet_gl-ar300m-nor
>> $(Device/glinet_gl-ar300)
>> DEVICE_TITLE := GL.iNet GL-AR300M
>> SUPPORTED_DEVICES += gl-ar300m
>> endef
>> TARGET_DEVICES += glinet_gl-ar300m-nor
>>
>> define Device/glinet_gl-ar300m-lite
>> $(Device/glinet_gl-ar300)
>> DEVICE_TITLE := GL.iNet GL-AR300M-Lite
>> endef
>> TARGET_DEVICES += glinet_gl-ar300m-lite
>>
>> -- ynezz
>
> Great idea, done!
>
> At some point I'd like to refactor out the duplication in the NOR flash
> layout,
> but I haven't been successful yet with my DTS-fu in referencing
> the compatible and label parameters within partition at 2 of the NOR flash,
> as they are subtly different in the NAND variant.
>
> Another day, perhaps once I get going with moving the AR750S NAND to ath79.
>
> Jeff
>
>
>
>
> From 2e3b968813e3862c5319c6c360781b0921d4b413 Mon Sep 17 00:00:00 2001
> From: Jeff Kletsky <git-commits at allycomm.com>
> Date: Sun, 20 Jan 2019 14:07:30 -0800
> Subject: [PATCH 1/2] ath79: Add GL.iNet AR-300M-Lite
>
> AR300M-Lite is single-Ethernet variant of the AR300M series
> Its eth0 would otherwise be assigned to the WAN interface
> making it unreachable firstboot or failsafe.
>
> Installation instructions from OEM (OpenWrt variant):
> * Install sysupgrade.bin using OEM's "Advanced" GUI (LuCI),
> * Do not preserve settings
> * Access rebooted device via Ethernet at OpenWrt default address
>
> Runtime-tested: GL.iNet AR300M-Lite
>
> Signed-off-by: Jeff Kletsky <git-commits at allycomm.com>
> ---
> target/linux/ath79/base-files/etc/board.d/02_network | 1 +
> target/linux/ath79/dts/qca9531_glinet_gl-ar300m-lite.dts | 8 ++++++++
> target/linux/ath79/image/generic.mk | 14
> ++++++++++++--
> 3 files changed, 21 insertions(+), 2 deletions(-)
> create mode 100644
> target/linux/ath79/dts/qca9531_glinet_gl-ar300m-lite.dts
>
> diff --git a/target/linux/ath79/base-files/etc/board.d/02_network
> b/target/linux/ath79/base-files/etc/board.d/02_network
> index 3eb0e413f3..fa947203f8 100755
> --- a/target/linux/ath79/base-files/etc/board.d/02_network
> +++ b/target/linux/ath79/base-files/etc/board.d/02_network
> @@ -13,6 +13,7 @@ ath79_setup_interfaces()
> devolo,dvl1200i|\
> devolo,dvl1750c|\
> devolo,dvl1750i|\
> + glinet,ar300m-lite|\
> ocedo,koala|\
> ocedo,raccoon|\
> pcs,cap324|\
> diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-ar300m-lite.dts
> b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m-lite.dts
> new file mode 100644
> index 0000000000..b14d1a47a9
> --- /dev/null
> +++ b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m-lite.dts
> @@ -0,0 +1,8 @@
> +/dts-v1/;
> +
> +#include "qca9531_glinet_gl-ar300m-nor.dts"
> +
> +/ {
> + compatible = "glinet,gl-ar300m-lite", "qca,qca9531";
> + model = "GL.iNet GL-AR300M-Lite";
> +};
> diff --git a/target/linux/ath79/image/generic.mk
> b/target/linux/ath79/image/generic.mk
> index 22ba5305b1..2021d83471 100644
> --- a/target/linux/ath79/image/generic.mk
> +++ b/target/linux/ath79/image/generic.mk
> @@ -296,13 +296,23 @@ define Device/glinet_gl-ar150
> endef
> TARGET_DEVICES += glinet_gl-ar150
>
> -define Device/glinet_gl-ar300m-nor
> +define Device/glinet_gl-ar300m-common-nor
> ATH_SOC := qca9531
> - DEVICE_TITLE := GL.iNet GL-AR300M
> DEVICE_PACKAGES := kmod-usb-core kmod-usb2
> IMAGE_SIZE := 16000k
> SUPPORTED_DEVICES += gl-ar300m
> endef
> +
> +define Device/glinet_gl-ar300m-lite
> + $(Device/glinet_gl-ar300m-common-nor)
> + DEVICE_TITLE := GL.iNet GL-AR300M-Lite
> +endef
> +TARGET_DEVICES += glinet_gl-ar300m-lite
> +
> +define Device/glinet_gl-ar300m-nor
> + $(Device/glinet_gl-ar300m-common-nor)
> + DEVICE_TITLE := GL.iNet GL-AR300M
> +endef
> TARGET_DEVICES += glinet_gl-ar300m-nor
>
> define Device/glinet_gl-ar750s
Please resend the patch! Patchwork failed to pickup the "patch as a
reply" [0].
Mathias
[0] https://patchwork.ozlabs.org/patch/1026411/
_______________________________________________
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