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 <oliver@schinagl.nl>
This commit is contained in:
Olliver Schinagl 2022-12-21 23:26:08 +01:00 committed by Sander Vanheule
parent 0a931767cf
commit 94d8b4852b
9 changed files with 110 additions and 31 deletions

View File

@ -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))

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -12,4 +12,3 @@ define Target/Description
endef
FEATURES := $(filter-out mips16,$(FEATURES))

View File

@ -10,4 +10,3 @@ KERNEL_PATCHVER:=5.10
define Target/Description
Build firmware images for Realtek RTL839x based boards.
endef

View File

@ -10,4 +10,3 @@ KERNEL_PATCHVER:=5.10
define Target/Description
Build firmware images for Realtek RTL930x based boards.
endef