From 045baca10b157fcc57461392cf27838d147ae5bd Mon Sep 17 00:00:00 2001 From: Sander Vanheule Date: Wed, 28 Dec 2022 21:39:46 +0100 Subject: realtek: deduplicate GS1900 recipes ZyXEL GS1900 devices with SoCs from both the RTL838x and RTL839x families share the same image structure and size of the firmware partition. Additionally, the GS1900-48 recipe provided a parameter for the zyxel-vers command, but this parameter is not used. Deduplicate the recipes by moving it to target/linux/realtek/image/common.mk. Signed-off-by: Sander Vanheule --- target/linux/realtek/image/common.mk | 12 ++++++++++++ target/linux/realtek/image/rtl838x.mk | 17 ++++------------- target/linux/realtek/image/rtl839x.mk | 12 ++---------- 3 files changed, 18 insertions(+), 23 deletions(-) (limited to 'target') diff --git a/target/linux/realtek/image/common.mk b/target/linux/realtek/image/common.mk index 0c51529569..702158978f 100644 --- a/target/linux/realtek/image/common.mk +++ b/target/linux/realtek/image/common.mk @@ -52,3 +52,15 @@ define Device/hpe_1920 check-size | \ append-metadata endef + +define Device/zyxel_gs1900 + DEVICE_VENDOR := ZyXEL + IMAGE_SIZE := 6976k + UIMAGE_MAGIC := 0x83800000 + KERNEL_INITRAMFS := \ + kernel-bin | \ + append-dtb | \ + gzip | \ + zyxel-vers | \ + uImage gzip +endef diff --git a/target/linux/realtek/image/rtl838x.mk b/target/linux/realtek/image/rtl838x.mk index 6d67011549..8727bfa6fb 100644 --- a/target/linux/realtek/image/rtl838x.mk +++ b/target/linux/realtek/image/rtl838x.mk @@ -218,21 +218,9 @@ define Device/tplink_sg2210p-v3 endef TARGET_DEVICES += tplink_sg2210p-v3 -define Device/zyxel_gs1900 - SOC := rtl8380 - IMAGE_SIZE := 6976k - DEVICE_VENDOR := ZyXEL - UIMAGE_MAGIC := 0x83800000 - KERNEL_INITRAMFS := \ - kernel-bin | \ - append-dtb | \ - gzip | \ - zyxel-vers | \ - uImage gzip -endef - define Device/zyxel_gs1900-10hp $(Device/zyxel_gs1900) + SOC := rtl8380 DEVICE_MODEL := GS1900-10HP ZYXEL_VERS := AAZI endef @@ -248,6 +236,7 @@ TARGET_DEVICES += zyxel_gs1900-16 define Device/zyxel_gs1900-8 $(Device/zyxel_gs1900) + SOC := rtl8380 DEVICE_MODEL := GS1900-8 ZYXEL_VERS := AAHH endef @@ -255,6 +244,7 @@ TARGET_DEVICES += zyxel_gs1900-8 define Device/zyxel_gs1900-8hp-v1 $(Device/zyxel_gs1900) + SOC := rtl8380 DEVICE_MODEL := GS1900-8HP DEVICE_VARIANT := v1 ZYXEL_VERS := AAHI @@ -264,6 +254,7 @@ TARGET_DEVICES += zyxel_gs1900-8hp-v1 define Device/zyxel_gs1900-8hp-v2 $(Device/zyxel_gs1900) + SOC := rtl8380 DEVICE_MODEL := GS1900-8HP DEVICE_VARIANT := v2 ZYXEL_VERS := AAHI diff --git a/target/linux/realtek/image/rtl839x.mk b/target/linux/realtek/image/rtl839x.mk index b5e669fce4..e9f47786dc 100644 --- a/target/linux/realtek/image/rtl839x.mk +++ b/target/linux/realtek/image/rtl839x.mk @@ -37,17 +37,9 @@ endef TARGET_DEVICES += tplink_sg2452p-v4 define Device/zyxel_gs1900-48 + $(Device/zyxel_gs1900) SOC := rtl8393 - IMAGE_SIZE := 6976k - DEVICE_VENDOR := ZyXEL - UIMAGE_MAGIC := 0x83800000 - ZYXEL_VERS := AAHN DEVICE_MODEL := GS1900-48 - KERNEL_INITRAMFS := \ - kernel-bin | \ - append-dtb | \ - gzip | \ - zyxel-vers $$$$(ZYXEL_VERS) | \ - uImage gzip + ZYXEL_VERS := AAHN endef TARGET_DEVICES += zyxel_gs1900-48 -- cgit v1.2.3