From: Olliver Schinagl Date: Wed, 21 Dec 2022 22:26:08 +0000 (+0100) Subject: realtek: Cleanup Makefiles X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=94d8b4852b9ff0063cddfda13a96fb5449f3bd6d;p=openwrt%2Fstaging%2Fjow.git realtek: Cleanup Makefiles Our current Makefiles a little bit messy and can be improved somewhat, both in whitespace and in style. Signed-off-by: Olliver Schinagl --- diff --git a/target/linux/realtek/Makefile b/target/linux/realtek/Makefile index 797ae60274..94280f43e5 100644 --- a/target/linux/realtek/Makefile +++ b/target/linux/realtek/Makefile @@ -18,8 +18,17 @@ endef include $(INCLUDE_DIR)/target.mk -DEFAULT_PACKAGES += uboot-envtools ethtool kmod-gpio-button-hotplug \ - firewall4 nftables kmod-nft-offload odhcp6c \ - ip-full ip-bridge tc-bpf +DEFAULT_PACKAGES += \ + ethtool \ + firewall4 \ + ip-bridge \ + ip-full \ + kmod-gpio-button-hotplug \ + kmod-nft-offload \ + nftables \ + odhcp6c \ + tc-bpf \ + uboot-envtools \ + $(eval $(call BuildTarget)) diff --git a/target/linux/realtek/image/Makefile b/target/linux/realtek/image/Makefile index 6c7be4aa90..e4a3904aa8 100644 --- a/target/linux/realtek/image/Makefile +++ b/target/linux/realtek/image/Makefile @@ -6,9 +6,15 @@ include $(INCLUDE_DIR)/image.mk KERNEL_LOADADDR = 0x80000000 KERNEL_ENTRY = 0x80000400 -DEVICE_VARS += ZYXEL_VERS DLINK_KERNEL_PART_SIZE -DEVICE_VARS += CAMEO_KERNEL_PART CAMEO_ROOTFS_PART CAMEO_CUSTOMER_SIGNATURE CAMEO_BOARD_VERSION -DEVICE_VARS += H3C_PRODUCT_ID H3C_DEVICE_ID +DEVICE_VARS += \ + CAMEO_BOARD_VERSION \ + CAMEO_CUSTOMER_SIGNATURE \ + CAMEO_KERNEL_PART \ + CAMEO_ROOTFS_PART \ + DLINK_KERNEL_PART_SIZE \ + H3C_DEVICE_ID \ + H3C_PRODUCT_ID \ + ZYXEL_VERS define Build/zyxel-vers ( echo VERS;\ @@ -81,13 +87,26 @@ endef define Device/Default PROFILES = Default - KERNEL := kernel-bin | append-dtb | gzip | uImage gzip - KERNEL_INITRAMFS := kernel-bin | append-dtb | gzip | uImage gzip + KERNEL := \ + kernel-bin | \ + append-dtb | \ + gzip | \ + uImage gzip + KERNEL_INITRAMFS := \ + kernel-bin | \ + append-dtb | \ + gzip | \ + uImage gzip DEVICE_DTS_DIR := ../dts-$(KERNEL_PATCHVER) DEVICE_DTS = $$(SOC)_$(1) IMAGES := sysupgrade.bin - IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | append-rootfs | pad-rootfs | \ - check-size | append-metadata + IMAGE/sysupgrade.bin := \ + append-kernel | \ + append-metadata | \ + append-rootfs | \ + check-size | \ + pad-rootfs | \ + pad-to 64k endef include $(SUBTARGET).mk diff --git a/target/linux/realtek/image/common.mk b/target/linux/realtek/image/common.mk index 9d84ec08f5..0c51529569 100644 --- a/target/linux/realtek/image/common.mk +++ b/target/linux/realtek/image/common.mk @@ -4,15 +4,26 @@ define Device/d-link_dgs-1210 IMAGE_SIZE := 13824k DEVICE_VENDOR := D-Link DLINK_KERNEL_PART_SIZE := 1572864 - KERNEL := kernel-bin | append-dtb | gzip | uImage gzip | dlink-cameo + KERNEL := \ + kernel-bin | \ + append-dtb | \ + gzip | \ + uImage gzip | \ + dlink-cameo CAMEO_KERNEL_PART := 2 CAMEO_ROOTFS_PART := 3 CAMEO_CUSTOMER_SIGNATURE := 2 CAMEO_BOARD_VERSION := 32 IMAGES += factory_image1.bin - IMAGE/factory_image1.bin := append-kernel | pad-to 64k | \ - append-rootfs | pad-rootfs | pad-to 16 | check-size | \ - dlink-version | dlink-headers + IMAGE/factory_image1.bin := \ + append-kernel | \ + pad-to 64k | \ + append-rootfs | \ + pad-rootfs | \ + pad-to 16 | \ + check-size | \ + dlink-version | \ + dlink-headers endef define Device/hpe_1920 @@ -20,8 +31,24 @@ define Device/hpe_1920 IMAGE_SIZE := 29632k BLOCKSIZE := 64k H3C_PRODUCT_ID := 0x3c010501 - KERNEL := kernel-bin | append-dtb | relocate-kernel | 7z | h3c-image | h3c-vfs - KERNEL_INITRAMFS := kernel-bin | append-dtb | relocate-kernel | 7z | h3c-image - IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \ - pad-rootfs | check-size | append-metadata + KERNEL := \ + kernel-bin | \ + append-dtb | \ + relocate-kernel | \ + 7z | \ + h3c-image | \ + h3c-vfs + KERNEL_INITRAMFS := \ + kernel-bin | \ + append-dtb | \ + relocate-kernel | \ + 7z | \ + h3c-image + IMAGE/sysupgrade.bin := \ + append-kernel | \ + pad-to $$$$(BLOCKSIZE) | \ + append-rootfs | \ + pad-rootfs | \ + check-size | \ + append-metadata endef diff --git a/target/linux/realtek/image/rtl838x.mk b/target/linux/realtek/image/rtl838x.mk index eef66c89ce..6d67011549 100644 --- a/target/linux/realtek/image/rtl838x.mk +++ b/target/linux/realtek/image/rtl838x.mk @@ -67,7 +67,10 @@ define Device/engenius_ews2910p DEVICE_VENDOR := EnGenius DEVICE_MODEL := EWP2910P UIMAGE_MAGIC := 0x03802910 - KERNEL_INITRAMFS := kernel-bin | append-dtb | gzip | \ + KERNEL_INITRAMFS := \ + kernel-bin | \ + append-dtb | \ + gzip | \ uImage gzip -n 'IMG-0.00.00-c0.0.00' endef TARGET_DEVICES += engenius_ews2910p @@ -116,8 +119,16 @@ TARGET_DEVICES += iodata_bsh-g24mb # "NGE" refers to the uImage magic define Device/netgear_nge - KERNEL := kernel-bin | append-dtb | lzma | uImage lzma - KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | uImage lzma + KERNEL := \ + kernel-bin | \ + append-dtb | \ + lzma | \ + uImage lzma + KERNEL_INITRAMFS := \ + kernel-bin | \ + append-dtb | \ + lzma | \ + uImage lzma SOC := rtl8380 IMAGE_SIZE := 14848k UIMAGE_MAGIC := 0x4e474520 @@ -212,7 +223,11 @@ define Device/zyxel_gs1900 IMAGE_SIZE := 6976k DEVICE_VENDOR := ZyXEL UIMAGE_MAGIC := 0x83800000 - KERNEL_INITRAMFS := kernel-bin | append-dtb | gzip | zyxel-vers | \ + KERNEL_INITRAMFS := \ + kernel-bin | \ + append-dtb | \ + gzip | \ + zyxel-vers | \ uImage gzip endef diff --git a/target/linux/realtek/image/rtl839x.mk b/target/linux/realtek/image/rtl839x.mk index 74ae95ccd7..081c13ff9b 100644 --- a/target/linux/realtek/image/rtl839x.mk +++ b/target/linux/realtek/image/rtl839x.mk @@ -15,7 +15,10 @@ define Device/panasonic_m48eg-pn28480k DEVICE_VENDOR := Panasonic DEVICE_MODEL := Switch-M48eG DEVICE_VARIANT := PN28480K - DEVICE_PACKAGES := kmod-hwmon-gpiofan kmod-hwmon-lm75 kmod-i2c-mux-pca954x \ + DEVICE_PACKAGES := \ + kmod-hwmon-gpiofan \ + kmod-hwmon-lm75 \ + kmod-i2c-mux-pca954x \ kmod-thermal endef TARGET_DEVICES += panasonic_m48eg-pn28480k @@ -27,7 +30,9 @@ define Device/tplink_sg2452p-v4 DEVICE_VENDOR := TP-Link DEVICE_MODEL := SG2452P DEVICE_VARIANT := v4 - DEVICE_PACKAGES := kmod-hwmon-gpiofan kmod-hwmon-tps23861 + DEVICE_PACKAGES := \ + kmod-hwmon-gpiofan \ + kmod-hwmon-tps23861 endef TARGET_DEVICES += tplink_sg2452p-v4 @@ -38,7 +43,11 @@ define Device/zyxel_gs1900-48 UIMAGE_MAGIC := 0x83800000 ZYXEL_VERS := AAHO DEVICE_MODEL := GS1900-48 - KERNEL_INITRAMFS := kernel-bin | append-dtb | gzip | zyxel-vers $$$$(ZYXEL_VERS) | \ + KERNEL_INITRAMFS := \ + kernel-bin | \ + append-dtb | \ + gzip | \ + zyxel-vers $$$$(ZYXEL_VERS) | \ uImage gzip endef TARGET_DEVICES += zyxel_gs1900-48 diff --git a/target/linux/realtek/image/rtl930x.mk b/target/linux/realtek/image/rtl930x.mk index 191ea5b204..f55c5c002b 100644 --- a/target/linux/realtek/image/rtl930x.mk +++ b/target/linux/realtek/image/rtl930x.mk @@ -6,9 +6,12 @@ define Device/zyxel_xgs1250-12 ZYXEL_VERS := ABWE DEVICE_VENDOR := Zyxel DEVICE_MODEL := XGS1250-12 - IMAGE_SIZE := 13312k - KERNEL_INITRAMFS := kernel-bin | append-dtb | gzip | zyxel-vers $$$$(ZYXEL_VERS) | \ + IMAGE_SIZE := 13312k + KERNEL_INITRAMFS := \ + kernel-bin | \ + append-dtb | \ + gzip | \ + zyxel-vers $$$$(ZYXEL_VERS) | \ uImage gzip endef - TARGET_DEVICES += zyxel_xgs1250-12 diff --git a/target/linux/realtek/rtl838x/target.mk b/target/linux/realtek/rtl838x/target.mk index ee658ea986..d78b44b717 100644 --- a/target/linux/realtek/rtl838x/target.mk +++ b/target/linux/realtek/rtl838x/target.mk @@ -12,4 +12,3 @@ define Target/Description endef FEATURES := $(filter-out mips16,$(FEATURES)) - diff --git a/target/linux/realtek/rtl839x/target.mk b/target/linux/realtek/rtl839x/target.mk index 0bbd6a5d4a..88993fad14 100644 --- a/target/linux/realtek/rtl839x/target.mk +++ b/target/linux/realtek/rtl839x/target.mk @@ -10,4 +10,3 @@ KERNEL_PATCHVER:=5.10 define Target/Description Build firmware images for Realtek RTL839x based boards. endef - diff --git a/target/linux/realtek/rtl930x/target.mk b/target/linux/realtek/rtl930x/target.mk index f6f204d006..31b06219ca 100644 --- a/target/linux/realtek/rtl930x/target.mk +++ b/target/linux/realtek/rtl930x/target.mk @@ -10,4 +10,3 @@ KERNEL_PATCHVER:=5.10 define Target/Description Build firmware images for Realtek RTL930x based boards. endef -