Browse Source

qualcommax: ipq807x: define common Linksys MX device

Define common Linksys MX device for MX4200v1/v2 and MX5300.

Signed-off-by: Paweł Owoc <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/14883
Signed-off-by: Robert Marko <[email protected]>
Paweł Owoc 1 year ago
parent
commit
7f1c87ebde
1 changed files with 15 additions and 18 deletions
  1. 15 18
      target/linux/qualcommax/image/ipq807x.mk

+ 15 - 18
target/linux/qualcommax/image/ipq807x.mk

@@ -103,20 +103,26 @@ define Device/edimax_cax1800
 endef
 TARGET_DEVICES += edimax_cax1800
 
-define Device/linksys_mx4200v1
+define Device/linksys_mx
 	$(call Device/FitImage)
 	DEVICE_VENDOR := Linksys
-	DEVICE_MODEL := MX4200
-	DEVICE_VARIANT := v1
 	BLOCKSIZE := 128k
 	PAGESIZE := 2048
 	KERNEL_SIZE := 6144k
 	IMAGE_SIZE := 147456k
 	NAND_SIZE := 512m
-	SOC := ipq8174
+	SOC := ipq8072
 	IMAGES += factory.bin
-	IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=MX4200
-	DEVICE_PACKAGES := kmod-leds-pca963x ipq-wifi-linksys_mx4200 kmod-bluetooth
+	IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=$$$$(DEVICE_MODEL)
+	DEVICE_PACKAGES := kmod-leds-pca963x
+endef
+
+define Device/linksys_mx4200v1
+	$(call Device/linksys_mx)
+	DEVICE_MODEL := MX4200
+	DEVICE_VARIANT := v1
+	SOC := ipq8174
+	DEVICE_PACKAGES += ipq-wifi-linksys_mx4200 kmod-bluetooth
 endef
 TARGET_DEVICES += linksys_mx4200v1
 
@@ -127,19 +133,10 @@ endef
 TARGET_DEVICES += linksys_mx4200v2
 
 define Device/linksys_mx5300
-	$(call Device/FitImage)
-	DEVICE_VENDOR := Linksys
+	$(call Device/linksys_mx)
 	DEVICE_MODEL := MX5300
-	BLOCKSIZE := 128k
-	PAGESIZE := 2048
-	KERNEL_SIZE := 6144k
-	IMAGE_SIZE := 147456k
-	NAND_SIZE := 512m
-	SOC := ipq8072
-	IMAGES += factory.bin
-	IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=MX5300
-	DEVICE_PACKAGES := kmod-leds-pca963x kmod-rtc-ds1307 \
-		ipq-wifi-linksys_mx5300 kmod-ath10k-ct ath10k-firmware-qca9984-ct
+	DEVICE_PACKAGES += kmod-rtc-ds1307 ipq-wifi-linksys_mx5300 \
+		kmod-ath10k-ct ath10k-firmware-qca9984-ct
 endef
 TARGET_DEVICES += linksys_mx5300