ipq806x: add support for ASRock G10
[openwrt/openwrt.git] / target / linux / ipq806x / image / Makefile
index ec73630ae575b907ec6ae47e3ca4da678bdd2f43..ad7c4b94d2b8008ee08f1f7b2ed52ce25d9d9b0f 100644 (file)
@@ -13,6 +13,16 @@ define Build/buffalo-rootfs-cksum
        ) >> $@
 endef
 
+define Build/edimax-header
+       $(eval edimax_model=$(word 1,$(1)))
+
+       $(STAGING_DIR_HOST)/bin/mkedimaximg \
+       -b -s CSYS -m $(edimax_model) \
+       -f 0x70000 -S 0x1200000 \
+       -i $@ -o $@.new
+       @mv $@.new $@
+endef
+
 define Device/Default
        PROFILES := Default
        KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts)
@@ -82,6 +92,20 @@ define Device/ZyXELImage
        IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-to $$$$(BLOCKSIZE) | sysupgrade-tar rootfs=$$$$@ | append-metadata
 endef
 
+define Device/asrock_g10
+       $(call Device/FitImage)
+       $(call Device/UbiFit)
+       SOC := qcom-ipq8064
+       DEVICE_VENDOR := ASRock
+       DEVICE_MODEL := G10
+       BLOCKSIZE := 128k
+       PAGESIZE := 2048
+       KERNEL_SIZE := 5332k
+       DEVICE_PACKAGES := kmod-i2c-gpio ath10k-firmware-qca99x0-ct
+       IMAGE/nand-factory.bin := append-ubi | edimax-header RN67
+endef
+TARGET_DEVICES += asrock_g10
+
 define Device/buffalo_wxr-2533dhp
        $(call Device/LegacyImage)
        SOC := qcom-ipq8064