openwrt/target/linux/ipq806x/image/Makefile
Matthew Hagan 67f5201276 ipq806x: add support for Cisco Meraki MR42/MR52
The MR42 and MR52 are two similar IPQ806x based devices from the Cisco
Meraki "Cryptid" series.

  MR42 main features:
  -  IPQ8068 1.4GHz
  -  512MB RAM
  -  128MB NAND
  -  2x QCA9992 (2.4 & 5GHz)
  -  1x QCA9889 (2.4 & 5GHz)
  -  1x AR8033 PHY
  -  PoE/AC power

  MR52 main features:
  -  IPQ8068 1.4GHz
  -  512MB RAM
  -  128MB NAND
  -  2x QCA9994 (2.4 & 5GHz)
  -  1x QCA9889 (2.4 & 5GHz)
  -  2x AR8033 PHYs
  -  PoE/AC power

(MR42 Only) Installation via diagnostic mode:

If you can successfully complete step 1 then you can continue to install
via this method without having to open the device. Otherwise please use
the standard UART method. Please note that when booting via TFTP, some
Ethernet devices, in particular those on laptops, will not connect in
time, resulting in TFTP boot not succeeding. In this instance it is
advised to connect via a switch.

  1. Hold down reset at power on and keep holding, after around 10 seconds
     if the orange LED changes behaviour to begin flashing, proceed to
     release reset, then press reset two times. Ensure that the LED has
     turned blue. Note that flashing will occur on some devices, but it
     will not be possible to change the LED colour using the reset button.
     In this case it will still be possible to continue with this install
     method.

  2. Set your IP to 192.168.1.250. Set up a TFTP server serving
     mr42_u-boot.mbn and
     openwrt-ipq806x-generic-meraki_mr42-initramfs-fit-uImage.itb, obtained
     from [1].

  3. Use telnet and connect to 192.168.1.1. Run the following commands to
     install u-boot. Note that all these commands are critical, an error
     will likely render the device unusable.

     Option 3.1:
       If you are sure you have set up the TFTP server correctly you can
       run this script on the device. This will download and flash the
       u-boot image immediately:

       `/etc/update_uboot.sh 192.168.1.250 mr42_u-boot.mbn`

       Once completed successfully, power off the device.

     Option 3.2:
       If you are unsure the TFTP server is correctly set up you can
       obtain the image and flash manually:

       3.2.1. `cd /tmp`
       3.2.2. `tftp-hpa 192.168.1.250 -m binary -c get mr42_u-boot.mbn`
       3.2.3. Confirm file has downloaded correctly by comparing the
              md5sum:

            `md5sum mr42_u-boot.mbn`

       3.2.4. The following are the required commands to write the image.

            `echo 1 > /sys/devices/platform/msm_nand/boot_layout
             mtd erase /dev/mtd1
             nandwrite -pam /dev/mtd1 mr42_u-boot.mbn
             echo 0 > /sys/devices/platform/msm_nand/boot_layout`

          Important: You must observe the output of the `nandwrite`
          command. Look for the following to verify writing is occurring:

            `Writing data to block 0 at offset 0x0
             Writing data to block 1 at offset 0x20000
             Writing data to block 2 at offset 0x40000`

          If you do not see this then do not power off the device. Check
          your previous commands and that mr42_u-boot.mbn was downloaded
          correctly. Once you are sure the image has been written you
          can proceed to power off the device.

  4. Hold the reset button and power on the device. This will immediately
     begin downloading the appropriate initramfs image and boot into it.

     Note: If the device does not download the initramfs, this is likely
     due to the interface not being brought up in time. Changing Ethernet
     source to a router or switch will likely resolve this. You can also
     try manually setting the link speed to 10Mb/s Half-Duplex.

  5. Once a solid white LED is displayed on the device, continue to the
     UART installation method, step 6.

Standard installation via UART - MR42 & MR52

  1. Disassemble the device and connect a UART header. The header pinout
     is as follows:

       1 - 3.3v
       2 - TXD
       3 - RXD
       4 - GND

     Important: You should only connect TXD, RXD and GND. Connecting
     3.3v may damage the device.

  2. Set your IP to 192.168.1.250. Set up a TFTP server serving
     openwrt-ipq806x-generic-meraki_(mr42|mr52)-initramfs-fit-uImage.itb.
     Separately obtain the respective sysupgrade image.

  3. Run the following commands, preferably from a Linux host. The
     mentioned files, including ubootwrite.py and u-boot images, can be
     obtained from [1].

       `python ubootwrite.py --write=(mr42|mr52)_u-boot.bin`

     The default for "--serial" option is /dev/ttyUSB0.

  4. Power on the device. The ubootwrite script will upload the image to
     the device and launch it. The second stage u-boot will in turn load
     the initramfs image by TFTP, provided the TFTP server is running
     correctly. This process will take about 13 minutes. Once a solid
     white LED is displayed, the image has successfully finished
     loading. Note: If the image does not load via TFTP, try again with
     the Ethernet link to 10Mb/s Half-Duplex.

  5. (MR42 only) Do not connect over the network. Instead connect over
     the UART using minicom or similar tool. To replace u-boot with
     the network enabled version, please run the following commands.
     Note that in the provided initramfs images, the u-boot.mbn file
     is located in /root:

     If you have not used the provided initramfs, you must ensure you
     are using an image with "boot_layout" ECC configuration enabled in
     the Kernel. This will be version 5.10 or higher. If you do not do
     this correctly the device will be bricked.

       `insmod mtd-rw i_want_a_brick=1
        mtd erase /dev/mtd8
        nandwrite -pam /dev/mtd8 /root/mr42_u-boot.mbn`

     After running nandwrite, ensure you observe the following output:

       `Writing data to block 0 at offset 0x0
        Writing data to block 1 at offset 0x20000
        Writing data to block 2 at offset 0x40000`

  6. (Optional) If you have no further use for the Meraki OS, you can
     remove all other UBI volumes on ubi0 (mtd11), including diagnostic1,
     part.old, storage and part.safe. You must not remove the ubi1 ART
     partition (mtd12).

       `for i in diagnostic1 part.old storage part.safe ; do
        ubirmvol /dev/ubi0 -N $i
        done`

  7. Proceed to flash the sysupgrade image via luci, or else download or
     scp the image to /tmp and use the sysupgrade command.

[1] The mentioned images and ubootwrite.py script can be found in this repo:
    https://github.com/clayface/openwrt-cryptid

[2] The modified u-boot sources for the MR42 and MR52 are available:
    https://github.com/clayface/U-boot-MR52-20200629

Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
2021-11-28 17:51:52 +01:00

474 lines
13 KiB
Makefile

# Copyright (c) 2014 The Linux Foundation. All rights reserved.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID
DEVICE_VARS += TPLINK_BOARD_ID
define Build/buffalo-rootfs-cksum
( \
echo -ne "\x$$(od -A n -t u1 $@ | tr -s ' ' '\n' | \
$(STAGING_DIR_HOST)/bin/awk '{s+=$$0}END{printf "%x", 255-s%256}')"; \
) >> $@
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)
KERNEL_LOADADDR = 0x42208000
DEVICE_DTS = $$(SOC)-$(lastword $(subst _, ,$(1)))
DEVICE_DTS_CONFIG := config@1
IMAGES := sysupgrade.bin
IMAGE/sysupgrade.bin = sysupgrade-tar | append-metadata
IMAGE/sysupgrade.bin/squashfs :=
endef
define Device/LegacyImage
KERNEL_SUFFIX := -uImage
KERNEL = kernel-bin | append-dtb | uImage none
KERNEL_NAME := zImage
endef
define Device/FitImage
KERNEL_SUFFIX := -fit-uImage.itb
KERNEL = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
KERNEL_NAME := Image
endef
define Device/FitImageLzma
KERNEL_SUFFIX := -fit-uImage.itb
KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb
KERNEL_NAME := Image
endef
define Device/UbiFit
KERNEL_IN_UBI := 1
IMAGES := nand-factory.bin nand-sysupgrade.bin
IMAGE/nand-factory.bin := append-ubi
IMAGE/nand-sysupgrade.bin := sysupgrade-tar | append-metadata
endef
define Device/DniImage
KERNEL_SUFFIX := -uImage
KERNEL = kernel-bin | append-dtb | uImage none
KERNEL_NAME := zImage
NETGEAR_BOARD_ID :=
NETGEAR_HW_ID :=
UBINIZE_OPTS := -E 5
IMAGES += factory.img
IMAGE/factory.img := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-uImage-fakehdr filesystem | pad-to $$$$(KERNEL_SIZE) | append-ubi | netgear-dni
IMAGE/sysupgrade.bin := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-uImage-fakehdr filesystem | sysupgrade-tar kernel=$$$$@ | append-metadata
endef
define Device/TpSafeImage
KERNEL_SUFFIX := -uImage
KERNEL = kernel-bin | append-dtb | uImage none
KERNEL_NAME := zImage
TPLINK_BOARD_ID :=
IMAGES += factory.bin
IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | append-metadata
endef
define Device/ZyXELImage
KERNEL_SUFFIX := -uImage
KERNEL = kernel-bin | append-dtb | uImage none | pad-to $$(KERNEL_SIZE)
KERNEL_NAME := zImage
IMAGES += factory.bin
IMAGE/factory.bin := append-rootfs | pad-rootfs | pad-to $$$$(BLOCKSIZE) | zyxel-ras-image separate-kernel
IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-to $$$$(BLOCKSIZE) | sysupgrade-tar rootfs=$$$$@ | append-metadata
endef
define Device/askey_rt4230w-rev6
$(call Device/LegacyImage)
DEVICE_VENDOR := Askey
DEVICE_MODEL := RT4230W
DEVICE_VARIANT := REV6
SOC := qcom-ipq8065
BLOCKSIZE := 128k
PAGESIZE := 2048
DEVICE_PACKAGES := ath10k-firmware-qca9984-ct
KERNEL_IN_UBI := 1
endef
TARGET_DEVICES += askey_rt4230w-rev6
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
DEVICE_VENDOR := Buffalo
DEVICE_MODEL := WXR-2533DHP
BLOCKSIZE := 128k
PAGESIZE := 2048
IMAGE_SIZE := 65536k
KERNEL_IN_UBI := 1
IMAGE/sysupgrade.bin := append-rootfs | buffalo-rootfs-cksum | \
sysupgrade-tar rootfs=$$$$@ | append-metadata
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
endef
TARGET_DEVICES += buffalo_wxr-2533dhp
define Device/compex_wpq864
$(call Device/FitImage)
$(call Device/UbiFit)
DEVICE_VENDOR := Compex
DEVICE_MODEL := WPQ864
BLOCKSIZE := 128k
PAGESIZE := 2048
SOC := qcom-ipq8064
DEVICE_PACKAGES := kmod-gpio-beeper
endef
TARGET_DEVICES += compex_wpq864
define Device/edgecore_ecw5410
$(call Device/FitImage)
$(call Device/UbiFit)
DEVICE_VENDOR := Edgecore
DEVICE_MODEL := ECW5410
SOC := qcom-ipq8068
BLOCKSIZE := 128k
PAGESIZE := 2048
DEVICE_DTS_CONFIG := config@v2.0-ap160
DEVICE_PACKAGES := ath10k-firmware-qca9984-ct ipq-wifi-edgecore_ecw5410
endef
TARGET_DEVICES += edgecore_ecw5410
define Device/linksys_ea7500-v1
$(call Device/LegacyImage)
DEVICE_VENDOR := Linksys
DEVICE_MODEL := EA7500
DEVICE_VARIANT := v1
SOC := qcom-ipq8064
PAGESIZE := 2048
BLOCKSIZE := 128k
KERNEL_SIZE := 3072k
KERNEL = kernel-bin | append-dtb | uImage none | append-uImage-fakehdr filesystem
UBINIZE_OPTS := -E 5
IMAGES := factory.bin sysupgrade.bin
IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | pad-to $$$$(PAGESIZE)
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
endef
TARGET_DEVICES += linksys_ea7500-v1
define Device/linksys_ea8500
$(call Device/LegacyImage)
DEVICE_VENDOR := Linksys
DEVICE_MODEL := EA8500
SOC := qcom-ipq8064
PAGESIZE := 2048
BLOCKSIZE := 128k
KERNEL_SIZE := 3072k
KERNEL = kernel-bin | append-dtb | uImage none | append-uImage-fakehdr filesystem
BOARD_NAME := ea8500
SUPPORTED_DEVICES += ea8500
UBINIZE_OPTS := -E 5
IMAGES += factory.bin
IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
endef
TARGET_DEVICES += linksys_ea8500
define Device/meraki_mr42
$(call Device/FitImage)
DEVICE_VENDOR := Cisco Meraki
DEVICE_MODEL := MR42
SOC := qcom-ipq8068
BLOCKSIZE := 128k
PAGESIZE := 2048
KERNEL_LOADADDR = 0x44208000
DEVICE_PACKAGES := -swconfig -kmod-ata-ahci -kmod-ata-ahci-platform \
-kmod-usb-ohci -kmod-usb2 -kmod-usb-ledtrig-usbport \
-kmod-phy-qcom-ipq806x-usb -kmod-usb3 -kmod-usb-dwc3-qcom \
-uboot-envtools ath10k-firmware-qca9887-ct \
ath10k-firmware-qca99x0-ct kmod-eeprom-at24 kmod-hwmon-ina2xx \
kmod-leds-tlc591xx
endef
TARGET_DEVICES += meraki_mr42
define Device/meraki_mr52
$(call Device/FitImage)
DEVICE_VENDOR := Cisco Meraki
DEVICE_MODEL := MR52
SOC := qcom-ipq8068
BLOCKSIZE := 128k
PAGESIZE := 2048
KERNEL_LOADADDR = 0x44208000
DEVICE_DTS_CONFIG := config@2
DEVICE_PACKAGES := -swconfig -kmod-ata-ahci -kmod-ata-ahci-platform \
-kmod-usb-ohci -kmod-usb2 -kmod-usb-ledtrig-usbport \
-kmod-phy-qcom-ipq806x-usb -kmod-usb3 -kmod-usb-dwc3-qcom \
-uboot-envtools ath10k-firmware-qca9887-ct \
ath10k-firmware-qca9984-ct kmod-eeprom-at24 kmod-hwmon-ina2xx \
kmod-leds-tlc591xx
endef
TARGET_DEVICES += meraki_mr52
define Device/nec_wg2600hp
$(call Device/LegacyImage)
DEVICE_VENDOR := NEC
DEVICE_MODEL := Aterm WG2600HP
SOC := qcom-ipq8064
BLOCKSIZE := 64k
BOARD_NAME := wg2600hp
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
endef
TARGET_DEVICES += nec_wg2600hp
define Device/nec_wg2600hp3
$(call Device/LegacyImage)
DEVICE_VENDOR := NEC Platforms
DEVICE_MODEL := Aterm WG2600HP3
SOC := qcom-ipq8062
BLOCKSIZE := 64k
IMAGES := sysupgrade.bin
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
DEVICE_PACKAGES := -kmod-ata-ahci -kmod-ata-ahci-platform -kmod-usb-ohci -kmod-usb2 \
-kmod-usb-ledtrig-usbport -kmod-usb-phy-qcom-dwc3 -kmod-usb3 -kmod-usb-dwc3-qcom \
ath10k-firmware-qca9984-ct ipq-wifi-nec_wg2600hp3
endef
TARGET_DEVICES += nec_wg2600hp3
define Device/netgear_d7800
$(call Device/DniImage)
DEVICE_VENDOR := NETGEAR
DEVICE_MODEL := Nighthawk X4 D7800
SOC := qcom-ipq8064
KERNEL_SIZE := 4096k
NETGEAR_BOARD_ID := D7800
NETGEAR_HW_ID := 29764958+0+128+512+4x4+4x4
BLOCKSIZE := 128k
PAGESIZE := 2048
BOARD_NAME := d7800
SUPPORTED_DEVICES += d7800
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
endef
TARGET_DEVICES += netgear_d7800
define Device/netgear_r7500
$(call Device/DniImage)
DEVICE_VENDOR := NETGEAR
DEVICE_MODEL := Nighthawk X4 R7500
DEVICE_VARIANT := v1
SOC := qcom-ipq8064
KERNEL_SIZE := 4096k
NETGEAR_BOARD_ID := R7500
NETGEAR_HW_ID := 29764841+0+128+256+3x3+4x4
BLOCKSIZE := 128k
PAGESIZE := 2048
BOARD_NAME := r7500
SUPPORTED_DEVICES += r7500
DEVICE_PACKAGES := ath10k-firmware-qca988x-ct
endef
TARGET_DEVICES += netgear_r7500
define Device/netgear_r7500v2
$(call Device/DniImage)
DEVICE_VENDOR := NETGEAR
DEVICE_MODEL := Nighthawk X4 R7500
DEVICE_VARIANT := v2
SOC := qcom-ipq8064
KERNEL_SIZE := 4096k
NETGEAR_BOARD_ID := R7500v2
NETGEAR_HW_ID := 29764958+0+128+512+3x3+4x4
BLOCKSIZE := 128k
PAGESIZE := 2048
BOARD_NAME := r7500v2
SUPPORTED_DEVICES += r7500v2
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct ath10k-firmware-qca988x-ct
endef
TARGET_DEVICES += netgear_r7500v2
define Device/netgear_r7800
$(call Device/DniImage)
DEVICE_VENDOR := NETGEAR
DEVICE_MODEL := Nighthawk X4S R7800
SOC := qcom-ipq8065
KERNEL_SIZE := 4096k
NETGEAR_BOARD_ID := R7800
NETGEAR_HW_ID := 29764958+0+128+512+4x4+4x4+cascade
BLOCKSIZE := 128k
PAGESIZE := 2048
BOARD_NAME := r7800
SUPPORTED_DEVICES += r7800
DEVICE_PACKAGES := ath10k-firmware-qca9984-ct
endef
TARGET_DEVICES += netgear_r7800
define Device/netgear_xr500
$(call Device/DniImage)
DEVICE_VENDOR := NETGEAR
DEVICE_MODEL := Nighthawk XR500
SOC := qcom-ipq8065
KERNEL_SIZE := 4096k
NETGEAR_BOARD_ID := XR500
NETGEAR_HW_ID := 29764958+0+256+512+4x4+4x4+cascade
BLOCKSIZE := 128k
PAGESIZE := 2048
DEVICE_PACKAGES := ath10k-firmware-qca9984-ct
endef
TARGET_DEVICES += netgear_xr500
define Device/qcom_ipq8064-ap148
$(call Device/FitImage)
$(call Device/UbiFit)
DEVICE_VENDOR := Qualcomm
DEVICE_MODEL := AP148
DEVICE_VARIANT := standard
SOC := qcom-ipq8064
DEVICE_DTS := qcom-ipq8064-ap148
KERNEL_INSTALL := 1
BLOCKSIZE := 128k
PAGESIZE := 2048
BOARD_NAME := ap148
SUPPORTED_DEVICES += ap148
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
endef
TARGET_DEVICES += qcom_ipq8064-ap148
define Device/qcom_ipq8064-ap148-legacy
$(call Device/LegacyImage)
$(call Device/UbiFit)
DEVICE_VENDOR := Qualcomm
DEVICE_MODEL := AP148
DEVICE_VARIANT := legacy
SOC := qcom-ipq8064
DEVICE_DTS := qcom-ipq8064-ap148
BLOCKSIZE := 128k
PAGESIZE := 2048
BOARD_NAME := ap148
SUPPORTED_DEVICES := qcom,ipq8064-ap148 ap148
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
endef
TARGET_DEVICES += qcom_ipq8064-ap148-legacy
define Device/qcom_ipq8064-ap161
$(call Device/FitImage)
$(call Device/UbiFit)
DEVICE_VENDOR := Qualcomm
DEVICE_MODEL := AP161
SOC := qcom-ipq8064
DEVICE_DTS := qcom-ipq8064-ap161
KERNEL_INSTALL := 1
BLOCKSIZE := 128k
PAGESIZE := 2048
BOARD_NAME := ap161
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
endef
TARGET_DEVICES += qcom_ipq8064-ap161
define Device/qcom_ipq8064-db149
$(call Device/FitImage)
DEVICE_VENDOR := Qualcomm
DEVICE_MODEL := DB149
SOC := qcom-ipq8064
DEVICE_DTS := qcom-ipq8064-db149
KERNEL_INSTALL := 1
BOARD_NAME := db149
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
endef
TARGET_DEVICES += qcom_ipq8064-db149
define Device/tplink_ad7200
$(call Device/TpSafeImage)
DEVICE_VENDOR := TP-Link
DEVICE_MODEL := AD7200
DEVICE_VARIANT := v1/v2
DEVICE_ALT0_VENDOR := TP-Link
DEVICE_ALT0_MODEL := Talon AD7200
DEVICE_ALT0_VARIANT := v1/v2
SOC := qcom-ipq8064
BLOCKSIZE := 128k
PAGESIZE := 2048
TPLINK_BOARD_ID := AD7200
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct kmod-wil6210
endef
TARGET_DEVICES += tplink_ad7200
define Device/tplink_c2600
$(call Device/TpSafeImage)
DEVICE_VENDOR := TP-Link
DEVICE_MODEL := Archer C2600
DEVICE_VARIANT := v1
SOC := qcom-ipq8064
BLOCKSIZE := 128k
PAGESIZE := 2048
BOARD_NAME := c2600
SUPPORTED_DEVICES += c2600
TPLINK_BOARD_ID := C2600
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
endef
TARGET_DEVICES += tplink_c2600
define Device/tplink_vr2600v
DEVICE_VENDOR := TP-Link
DEVICE_MODEL := Archer VR2600v
DEVICE_VARIANT := v1
KERNEL_SUFFIX := -uImage
KERNEL = kernel-bin | append-dtb | uImage none
KERNEL_NAME := zImage
KERNEL_SIZE := 3072k
SOC := qcom-ipq8064
BLOCKSIZE := 128k
PAGESIZE := 2048
BOARD_NAME := vr2600v
SUPPORTED_DEVICES += vr2600v
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
IMAGE/sysupgrade.bin := pad-extra 512 | append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | append-metadata
endef
TARGET_DEVICES += tplink_vr2600v
define Device/ubnt_unifi-ac-hd
$(call Device/FitImageLzma)
DEVICE_VENDOR := Ubiquiti
DEVICE_MODEL := UniFi AC HD
SOC := qcom-ipq8064
BLOCKSIZE := 64k
IMAGE_SIZE := 14784k
DEVICE_PACKAGES := ath10k-firmware-qca9984-ct
IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size | append-metadata
endef
TARGET_DEVICES += ubnt_unifi-ac-hd
define Device/zyxel_nbg6817
DEVICE_VENDOR := ZyXEL
DEVICE_MODEL := NBG6817
SOC := qcom-ipq8065
KERNEL_SIZE := 4096k
BLOCKSIZE := 64k
BOARD_NAME := nbg6817
RAS_BOARD := NBG6817
RAS_ROOTFS_SIZE := 20934k
RAS_VERSION := "V1.99(OWRT.9999)C0"
SUPPORTED_DEVICES += nbg6817
DEVICE_PACKAGES := ath10k-firmware-qca9984-ct e2fsprogs kmod-fs-ext4 losetup
$(call Device/ZyXELImage)
endef
TARGET_DEVICES += zyxel_nbg6817
$(eval $(call BuildImage))