From a66eee63368eb5625b359244bfffc9b9eb921875 Mon Sep 17 00:00:00 2001 From: Roger Pueyo Centelles Date: Fri, 28 Feb 2020 16:01:02 +0100 Subject: ath79: add mikrotik subtarget This commit creates the ath79/mikrotik subtarget in order to support MikroTik devices based on Qualcomm Atheros MIPS SoCs. MikroTik devices need a couple of specific features: the split MiNOR firmware MTD format, which is not used by other devices, and the 4k sector erase size on SPI NOR storage, which can not be added to the ath79/generic and ath79/nand subtargets now. Additionally, the commit moves the two MikroTik devices already in the generic and nand subtargets to this new one. Tested on the RB922 board and the wAP AC router. Signed-off-by: Roger Pueyo Centelles --- target/linux/ath79/image/Makefile | 3 +++ target/linux/ath79/image/generic.mk | 14 -------------- target/linux/ath79/image/mikrotik.mk | 27 +++++++++++++++++++++++++++ target/linux/ath79/image/nand.mk | 14 -------------- 4 files changed, 30 insertions(+), 28 deletions(-) create mode 100644 target/linux/ath79/image/mikrotik.mk (limited to 'target/linux/ath79/image') diff --git a/target/linux/ath79/image/Makefile b/target/linux/ath79/image/Makefile index c27db93947..c568c7238c 100644 --- a/target/linux/ath79/image/Makefile +++ b/target/linux/ath79/image/Makefile @@ -73,6 +73,9 @@ include ./generic.mk include ./generic-tp-link.mk include ./generic-ubnt.mk endif +ifeq ($(SUBTARGET),mikrotik) +include ./mikrotik.mk +endif ifeq ($(SUBTARGET),nand) include ./nand.mk endif diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 5a0b0ab67e..3ce51cc0d6 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -1,5 +1,4 @@ include ./common-buffalo.mk -include ./common-mikrotik.mk include ./common-netgear.mk include ./common-tp-link.mk include ./common-yuncore.mk @@ -765,19 +764,6 @@ define Device/librerouter_librerouter-v1 endef TARGET_DEVICES += librerouter_librerouter-v1 -define Device/mikrotik_routerboard-wap-g-5hact2hnd - $(Device/mikrotik) - SOC := qca9556 - DEVICE_MODEL := RouterBOARD wAP G-5HacT2HnD (wAP AC) - IMAGE_SIZE := 16256k - IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 -e | \ - pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | \ - append-metadata | check-size $$$$(IMAGE_SIZE) - DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct - SUPPORTED_DEVICES += rb-wapg-5hact2hnd -endef -TARGET_DEVICES += mikrotik_routerboard-wap-g-5hact2hnd - define Device/nec_wg1200cr SOC := qca9563 DEVICE_VENDOR := NEC diff --git a/target/linux/ath79/image/mikrotik.mk b/target/linux/ath79/image/mikrotik.mk new file mode 100644 index 0000000000..a6863dc130 --- /dev/null +++ b/target/linux/ath79/image/mikrotik.mk @@ -0,0 +1,27 @@ +include ./common-mikrotik.mk + +define Device/mikrotik_routerboard-922uags-5hpacd + $(Device/mikrotik) + SOC := qca9558 + DEVICE_MODEL := RouterBOARD 922UAGS-5HPacD + BOARD_NAME := routerboard + IMAGE/sysupgrade.bin = append-kernel | kernel2minor -s 2048 -e -c | \ + sysupgrade-tar kernel=$$$$@ | append-metadata + DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct \ + kmod-usb2 nand-utils + SUPPORTED_DEVICES += rb-922uags-5hpacd +endef +TARGET_DEVICES += mikrotik_routerboard-922uags-5hpacd + +define Device/mikrotik_routerboard-wap-g-5hact2hnd + $(Device/mikrotik) + SOC := qca9556 + DEVICE_MODEL := RouterBOARD wAP G-5HacT2HnD (wAP AC) + IMAGE_SIZE := 16256k + IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 -e | \ + pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | \ + append-metadata | check-size $$$$(IMAGE_SIZE) + DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct + SUPPORTED_DEVICES += rb-wapg-5hact2hnd +endef +TARGET_DEVICES += mikrotik_routerboard-wap-g-5hact2hnd diff --git a/target/linux/ath79/image/nand.mk b/target/linux/ath79/image/nand.mk index 4cb6ea2957..8f28af4655 100644 --- a/target/linux/ath79/image/nand.mk +++ b/target/linux/ath79/image/nand.mk @@ -1,4 +1,3 @@ -include ./common-mikrotik.mk include ./common-netgear.mk # for netgear-uImage # attention: only zlib compression is allowed for the boot fs @@ -129,19 +128,6 @@ define Device/glinet_gl-ar750s-nor endef TARGET_DEVICES += glinet_gl-ar750s-nor -define Device/mikrotik_routerboard-922uags-5hpacd - $(Device/mikrotik) - SOC := qca9558 - DEVICE_MODEL := RouterBOARD 922UAGS-5HPacD - BOARD_NAME := routerboard - IMAGE/sysupgrade.bin = append-kernel | kernel2minor -s 2048 -e -c | \ - sysupgrade-tar kernel=$$$$@ | append-metadata - DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct \ - kmod-usb2 nand-utils - SUPPORTED_DEVICES += rb-922uags-5hpacd -endef -TARGET_DEVICES += mikrotik_routerboard-922uags-5hpacd - # fake rootfs is mandatory, pad-offset 129 equals (2 * uimage_header + 0xff) define Device/netgear_ath79_nand DEVICE_VENDOR := NETGEAR -- cgit v1.2.3