[PATCH 1/2] realtek: Add generic zyxel_gs1900 image definition

Adrian Schmutzler mail at adrianschmutzler.de
Thu Feb 25 05:10:44 EST 2021


Hi,

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org]
> On Behalf Of Stefan Lippers-Hollmann
> Sent: Donnerstag, 25. Februar 2021 07:56
> To: Hauke Mehrtens <hauke at hauke-m.de>
> Cc: openwrt-devel at lists.openwrt.org
> Subject: Re: [PATCH 1/2] realtek: Add generic zyxel_gs1900 image definition
> 
> Hi
> 
> On 2021-02-24, Hauke Mehrtens wrote:
> > Add a new common device definition for the Zyxel GS1900 line of
> > switches.
> [...]
> > -define Device/zyxel_gs1900-10hp
> > +define Device/zyxel_gs1900
> >    SOC := rtl8380
> >    IMAGE_SIZE := 6976k
> >    DEVICE_VENDOR := ZyXEL
> >    DEVICE_MODEL := GS1900-10HP
> >    UIMAGE_MAGIC := 0x83800000
> > +  KERNEL_INITRAMFS := kernel-bin | append-dtb | gzip | zyxel-vers
> > +AAHI | uImage gzip endef
> 
> I'm wondering if this attempt to deal the gs1900 switch family really improves
> the situation for these devices. While IMAGE_SIZE and UIMAGE_MAGIC
> might indeed by rather generic to most (all?) members of the gs1900 family,
> SOC might not be (GS1900-24, GS1900-24E, GS1900-24HP are RTL8382M,
> GS1900-48 and GS1900-48HP are RTL8393 - admittedly, I do not know how
> different the resulting DTS would need to be, as these devices are not
> supported yet) and zyxel-vers is different for every single model (aside from
> GS1900-8HPv1 && GS1900-8HPv2):

Common definitions in Makefiles and DTS are two different questions. It's not uncommon that shared nodes in Makefile are possible where DTSes are still individual. Anyway, one could make zyxel-vers a variable and move back SOC to the devices when necessary:

DEVICE_VARS += ZYXEL_VERS

define Device/zyxel_gs1900
   IMAGE_SIZE := 6976k
   DEVICE_VENDOR := ZyXEL
   UIMAGE_MAGIC := 0x83800000
   KERNEL_INITRAMFS := kernel-bin | append-dtb | gzip | zyxel-vers $$$$(ZYXEL_VERS) 
	| uImage gzip
endef

define Device/zyxel_gs1900-10hp
   $(Device/zyxel_gs1900)
   SOC := rtl8380
   DEVICE_MODEL := GS1900-10HP
   ZYXEL_VERS := AAZI
endef
TARGET_DEVICES += zyxel_gs1900-10hp

That would still keep the kernel_initramfs recipe in the common node. Of course, this might eventually hit a point where having the common node is more effort than benefit.

Best

Adrian Schmutzler

> 
> GS1900-8:	AAHH
> GS1900-8HPv1:	AAHI
> GS1900-8HPv2:	AAHI
> GS1900-10HP:	AAZI
> GS1900-16:	AAHJ
> GS1900-24:	AAHL
> GS1900-24E:	AAHK
> GS1900-24EP:	ABTO
> GS1900-24HP:	AAHM
> GS1900-24HPv2:	ABTP
> GS1900-48:	AAHN
> GS1900-48HP:	AAHO
> GS1900-48HPv2:	ABTQ
> 
> Most of these should be supportable by OpenWrt.
> 
> Regards
> 	Stefan Lippers-Hollmann
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20210225/ee6e4dfc/attachment-0001.sig>


More information about the openwrt-devel mailing list