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

Hauke Mehrtens hauke at hauke-m.de
Sat Feb 27 11:01:14 EST 2021


On 2/25/21 11:10 AM, Adrian Schmutzler wrote:
> 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.

I will update it like this and also remove the DEVICE_MODEL.

Hauke
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0x93DD20630910B515.asc
Type: application/pgp-keys
Size: 9895 bytes
Desc: not available
URL: <http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20210227/26ca09f9/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20210227/26ca09f9/attachment.sig>


More information about the openwrt-devel mailing list