ipq40xx: dynamically build board-2.bin for Mikrotik
[openwrt/staging/chunkeey.git] / target / linux / ipq40xx / image / generic.mk
index 3354084a70800f05fe037ddf64960ac6de9362fd..be313e672d3222ad5d07d7991027e49d64d8e2ee 100644 (file)
@@ -130,7 +130,6 @@ define Device/8dev_habanero-dvk
        DEVICE_MODEL := Habanero DVK
        IMAGE_SIZE := 30976k
        SOC := qcom-ipq4019
-       DEVICE_PACKAGES := ipq-wifi-8dev_habanero-dvk
        IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | append-rootfs | pad-rootfs | check-size | append-metadata
 endef
 TARGET_DEVICES += 8dev_habanero-dvk
@@ -169,7 +168,6 @@ define Device/aruba_glenmorangie
        $(call Device/FitImageLzma)
        DEVICE_VENDOR := Aruba
        SOC := qcom-ipq4029
-       DEVICE_PACKAGES := ipq-wifi-aruba_ap-303
 endef
 
 define Device/aruba_ap-303
@@ -214,6 +212,8 @@ define Device/asus_rt-ac42u
        DEVICE_MODEL := RT-AC42U
        DEVICE_ALT0_VENDOR := ASUS
        DEVICE_ALT0_MODEL := RT-ACRH17
+       DEVICE_ALT1_VENDOR := ASUS
+       DEVICE_ALT1_MODEL := RT-AC2200
        SOC := qcom-ipq4019
        BLOCKSIZE := 128k
        PAGESIZE := 2048
@@ -223,7 +223,7 @@ define Device/asus_rt-ac42u
 #      Rather, this device is a/k/a RT-AC42U
 #      But we'll go with what the vendor firmware has...
        UIMAGE_NAME:=$(shell echo -e '\03\01\01\01RT-AC82U')
-       DEVICE_PACKAGES := ath10k-firmware-qca9984-ct ipq-wifi-asus_rt-ac42u kmod-usb-ledtrig-usbport
+       DEVICE_PACKAGES := ath10k-firmware-qca9984-ct kmod-usb-ledtrig-usbport
 endef
 TARGET_DEVICES += asus_rt-ac42u
 
@@ -236,7 +236,7 @@ define Device/asus_rt-ac58u
        SOC := qcom-ipq4018
        BLOCKSIZE := 128k
        PAGESIZE := 2048
-       IMAGE_SIZE := 20439364
+       IMAGE_SIZE := 20439300
        FILESYSTEMS := squashfs
 #      Someone - in their infinite wisdom - decided to put the firmware
 #      version in front of the image name \03\00\00\04 => Version 3.0.0.4
@@ -244,6 +244,9 @@ define Device/asus_rt-ac58u
 #      to add a version... or we are very careful not to add '\0' into that
 #      string and call it a day.... Yeah, we do the latter!
        UIMAGE_NAME:=$(shell echo -e '\03\01\01\01RT-AC58U')
+       ARTIFACTS := install.trx
+       ARTIFACT/install.trx := copy-file $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE) \
+               | pad-to $$$$(IMAGE_SIZE) | uImage none
        DEVICE_PACKAGES := -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers \
                kmod-usb-ledtrig-usbport
 endef
@@ -281,7 +284,7 @@ define Device/avm_fritzrepeater-1200
        DEVICE_VENDOR := AVM
        DEVICE_MODEL := FRITZ!Repeater 1200
        SOC := qcom-ipq4019
-       DEVICE_PACKAGES := fritz-caldata fritz-tffs-nand ipq-wifi-avm_fritzrepeater-1200
+       DEVICE_PACKAGES := fritz-caldata fritz-tffs-nand
 endef
 TARGET_DEVICES += avm_fritzrepeater-1200
 
@@ -300,7 +303,7 @@ define Device/buffalo_wtr-m2133hp
        DEVICE_VENDOR := Buffalo
        DEVICE_MODEL := WTR-M2133HP
        SOC := qcom-ipq4019
-       DEVICE_PACKAGES := ath10k-firmware-qca9984-ct ipq-wifi-buffalo_wtr-m2133hp
+       DEVICE_PACKAGES := ath10k-firmware-qca9984-ct
        BLOCKSIZE := 128k
        PAGESIZE := 2048
 endef
@@ -324,7 +327,7 @@ define Device/cellc_rtl30vw
        IMAGE_SIZE := 57344k
        BLOCKSIZE := 128k
        PAGESIZE := 2048
-       DEVICE_PACKAGES := kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi ipq-wifi-cellc_rtl30vw
+       DEVICE_PACKAGES := kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi
 endef
 TARGET_DEVICES += cellc_rtl30vw
 
@@ -410,7 +413,6 @@ define Device/dlink_dap-2610
        # append-rootfs must start on an erase block boundary.
        IMAGE/factory.bin    := append-kernel | pad-offset 6144k 160 | append-rootfs | wrgg-image | check-size
        IMAGE/sysupgrade.bin := append-kernel | wrgg-image | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size | append-metadata
-       DEVICE_PACKAGES := ipq-wifi-dlink_dap2610
 endef
 TARGET_DEVICES += dlink_dap-2610
 
@@ -462,7 +464,7 @@ define Device/engenius_eap2200
        SOC := qcom-ipq4019
        BLOCKSIZE := 128k
        PAGESIZE := 2048
-       DEVICE_PACKAGES := ath10k-firmware-qca9888-ct ipq-wifi-engenius_eap2200 -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers
+       DEVICE_PACKAGES := ath10k-firmware-qca9888-ct -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers
 endef
 TARGET_DEVICES += engenius_eap2200
 
@@ -476,7 +478,6 @@ define Device/engenius_emd1
        IMAGES += factory.bin
        IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
        IMAGE/factory.bin := qsdk-ipq-factory-nor | check-size
-       DEVICE_PACKAGES := ipq-wifi-engenius_emd1
 endef
 TARGET_DEVICES += engenius_emd1
 
@@ -491,7 +492,6 @@ define Device/engenius_emr3500
        IMAGES += factory.bin
        IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
        IMAGE/factory.bin := qsdk-ipq-factory-nor | check-size
-       DEVICE_PACKAGES := ipq-wifi-engenius_emr3500
        DEFAULT := n
 endef
 TARGET_DEVICES += engenius_emr3500
@@ -532,8 +532,7 @@ define Device/ezviz_cs-w3-wd1200g-eup
        SOC := qcom-ipq4018
        IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \
                append-metadata
-       DEVICE_PACKAGES := -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers \
-               ipq-wifi-ezviz_cs-w3-wd1200g-eup
+       DEVICE_PACKAGES := -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers
        DEVICE_COMPAT_VERSION := 2.0
        DEVICE_COMPAT_MESSAGE := uboot's bootcmd has to be updated (see wiki). \
                Upgrade via sysupgrade mechanism is not possible.
@@ -662,16 +661,35 @@ define Device/linksys_mr8300
        UBINIZE_OPTS := -E 5    # EOD marks to "hide" factory sig at EOF
        IMAGES += factory.bin
        IMAGE/factory.bin  := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=MR8300
-       DEVICE_PACKAGES := ath10k-firmware-qca9888-ct ipq-wifi-linksys_mr8300-v0 kmod-usb-ledtrig-usbport
+       DEVICE_PACKAGES := ath10k-firmware-qca9888-ct kmod-usb-ledtrig-usbport
 endef
 TARGET_DEVICES += linksys_mr8300
 
+define Device/linksys_whw01-v1
+       $(call Device/FitzImage)
+       DEVICE_VENDOR := Linksys
+       DEVICE_MODEL := WHW01
+       DEVICE_VARIANT := v1
+       KERNEL_SIZE := 6144k
+       IMAGE_SIZE := 28704512  # 28032k minus linksys signature (256-bytes).
+       SOC := qcom-ipq4018
+       BLOCKSIZE := 128k
+       PAGESIZE := 2048
+       UBINIZE_OPTS := -E 5    # EOD marks to "hide" factory sig at EOF
+       IMAGES += factory.bin
+       IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | \
+               append-ubi | linksys-image type=WHW01 | pad-to $$$$(PAGESIZE) | \
+               check-size
+       DEVICE_PACKAGES := uboot-envtools kmod-leds-pca963x
+endef
+TARGET_DEVICES += linksys_whw01-v1
+
 define Device/luma_wrtq-329acn
        $(call Device/FitImage)
        DEVICE_VENDOR := Luma Home
        DEVICE_MODEL := WRTQ-329ACN
        SOC := qcom-ipq4018
-       DEVICE_PACKAGES := ipq-wifi-luma_wrtq-329acn kmod-ath3k kmod-eeprom-at24 kmod-i2c-gpio
+       DEVICE_PACKAGES := kmod-ath3k kmod-eeprom-at24 kmod-i2c-gpio
        IMAGE_SIZE := 76632k
        BLOCKSIZE := 128k
        PAGESIZE := 2048
@@ -697,7 +715,7 @@ define Device/mobipromo_cm520-79f
        SOC := qcom-ipq4019
        BLOCKSIZE := 128k
        PAGESIZE := 2048
-       DEVICE_PACKAGES := ipq-wifi-mobipromo_cm520-79f kmod-usb-ledtrig-usbport
+       DEVICE_PACKAGES := kmod-usb-ledtrig-usbport
 endef
 TARGET_DEVICES += mobipromo_cm520-79f
 
@@ -867,7 +885,6 @@ define Device/plasmacloud_pa1200
        IMAGES += factory.bin
        IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=PA1200
        IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
-       DEVICE_PACKAGES := ipq-wifi-plasmacloud_pa1200
 endef
 TARGET_DEVICES += plasmacloud_pa1200
 
@@ -883,7 +900,7 @@ define Device/plasmacloud_pa2200
        IMAGES += factory.bin
        IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=PA2200
        IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
-       DEVICE_PACKAGES := ath10k-firmware-qca9888-ct ipq-wifi-plasmacloud_pa2200
+       DEVICE_PACKAGES := ath10k-firmware-qca9888-ct
 endef
 TARGET_DEVICES += plasmacloud_pa2200
 
@@ -930,7 +947,7 @@ define Device/qxwlan_e2600ac-c1
        KERNEL_SIZE := 4096k
        IMAGE_SIZE := 31232k
        IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
-       DEVICE_PACKAGES := ipq-wifi-qxwlan_e2600ac
+       DEVICE_PACKAGES := ipq-wifi-qxwlan_e2600ac-c1
        DEFAULT := n
 endef
 TARGET_DEVICES += qxwlan_e2600ac-c1
@@ -945,7 +962,7 @@ define Device/qxwlan_e2600ac-c2
        KERNEL_INSTALL := 1
        BLOCKSIZE := 128k
        PAGESIZE := 2048
-       DEVICE_PACKAGES := ipq-wifi-qxwlan_e2600ac
+       DEVICE_PACKAGES := ipq-wifi-qxwlan_e2600ac-c2
 endef
 TARGET_DEVICES += qxwlan_e2600ac-c2
 
@@ -1001,7 +1018,7 @@ define Device/zte_mf286d
        BLOCKSIZE := 128k
        PAGESIZE := 2048
        KERNEL_IN_UBI := 1
-       DEVICE_PACKAGES := ipq-wifi-zte_mf286d kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi
+       DEVICE_PACKAGES := kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi
 endef
 TARGET_DEVICES += zte_mf286d