2010-12-05 11:38:59 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
include $(INCLUDE_DIR)/image.mk
|
|
|
|
|
2017-10-20 17:36:25 +00:00
|
|
|
DEVICE_VARS += TPLINK_HWID TPLINK_HWREV TPLINK_FLASHLAYOUT
|
2013-03-15 16:11:45 +00:00
|
|
|
|
2017-10-20 17:36:25 +00:00
|
|
|
define Device/Default
|
|
|
|
PROFILES := Default
|
|
|
|
DEVICE_DTS := $(1)
|
|
|
|
KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts)
|
|
|
|
KERNEL_ENTRY := 0x00000000
|
|
|
|
KERNEL_LOADADDR := 0x00000000
|
|
|
|
KERNEL := kernel-bin
|
2013-03-15 16:11:45 +00:00
|
|
|
endef
|
|
|
|
|
2017-10-20 17:36:25 +00:00
|
|
|
define Build/tplink-v1-image
|
|
|
|
$(STAGING_DIR_HOST)/bin/mktplinkfw \
|
|
|
|
-H $(TPLINK_HWID) -W $(TPLINK_HWREV) -F $(TPLINK_FLASHLAYOUT) \
|
|
|
|
-N "$(VERSION_DIST)" -V $(REVISION) \
|
|
|
|
-k $(IMAGE_KERNEL) \
|
|
|
|
-r $(IMAGE_ROOTFS) \
|
|
|
|
-j \
|
|
|
|
$(1) \
|
|
|
|
-o $@
|
2010-12-05 11:38:59 +00:00
|
|
|
endef
|
|
|
|
|
2016-03-03 20:24:41 +00:00
|
|
|
ifeq ($(SUBTARGET),generic)
|
2017-09-30 16:14:58 +00:00
|
|
|
|
2017-10-20 17:36:25 +00:00
|
|
|
define Device/tl-wdr4900-v1
|
|
|
|
DEVICE_TITLE := TP-Link TL-WDR4900
|
2018-07-10 17:22:41 +00:00
|
|
|
DEVICE_PACKAGES := kmod-ath9k wpad-basic
|
2017-10-20 17:36:25 +00:00
|
|
|
TPLINK_HWID := 0x49000001
|
|
|
|
TPLINK_HWREV := 1
|
|
|
|
TPLINK_FLASHLAYOUT := 16Mppc
|
|
|
|
KERNEL_NAME := cuImage.tl-wdr4900-v1
|
2017-10-24 04:57:29 +00:00
|
|
|
SUPPORTED_DEVICES:=tl-wdr4900-v1 tplink,tl-wdr4900-v1
|
2017-10-20 17:36:25 +00:00
|
|
|
IMAGES := fdt.bin factory.bin sysupgrade.bin
|
|
|
|
IMAGE/fdt.bin := append-dtb
|
|
|
|
IMAGE/factory.bin := tplink-v1-image
|
2017-10-24 04:57:29 +00:00
|
|
|
IMAGE/sysupgrade.bin := tplink-v1-image -s | append-metadata
|
2014-12-11 15:29:39 +00:00
|
|
|
endef
|
2017-10-20 17:36:25 +00:00
|
|
|
TARGET_DEVICES += tl-wdr4900-v1
|
2014-12-11 15:29:39 +00:00
|
|
|
|
2017-10-20 17:36:25 +00:00
|
|
|
endif
|
2013-03-15 16:11:45 +00:00
|
|
|
|
2017-10-20 17:36:25 +00:00
|
|
|
ifeq ($(SUBTARGET),p1020)
|
2010-12-05 11:38:59 +00:00
|
|
|
|
2017-10-20 17:36:25 +00:00
|
|
|
define Device/hiveap-330
|
|
|
|
DEVICE_TITLE := Aerohive HiveAP-330
|
2018-07-10 17:22:41 +00:00
|
|
|
DEVICE_PACKAGES := kmod-ath9k wpad-basic kmod-tpm-i2c-atmel
|
2017-10-20 17:36:25 +00:00
|
|
|
BLOCKSIZE := 128k
|
|
|
|
KERNEL_NAME := zImage
|
|
|
|
KERNEL_SIZE := 8m
|
2017-10-24 04:57:29 +00:00
|
|
|
SUPPORTED_DEVICES := aerohive,hiveap-330
|
2017-10-20 17:36:25 +00:00
|
|
|
IMAGES := fdt.bin sysupgrade.bin
|
|
|
|
IMAGE/fdt.bin := append-dtb
|
|
|
|
IMAGE/sysupgrade.bin := append-dtb | pad-to 256k | check-size 256k | \
|
2018-04-20 04:30:46 +00:00
|
|
|
append-uImage-fakehdr ramdisk | pad-to 256k | check-size 512k | \
|
2017-10-20 17:36:25 +00:00
|
|
|
append-rootfs | pad-rootfs $$(BLOCKSIZE) | pad-to 41216k | check-size 41216k | \
|
2017-10-24 04:57:29 +00:00
|
|
|
append-kernel | append-metadata
|
2013-02-19 14:53:15 +00:00
|
|
|
endef
|
2017-10-20 17:36:25 +00:00
|
|
|
TARGET_DEVICES += hiveap-330
|
2013-02-19 14:53:15 +00:00
|
|
|
|
2017-10-20 17:36:25 +00:00
|
|
|
endif
|
2010-12-05 11:38:59 +00:00
|
|
|
|
|
|
|
$(eval $(call BuildImage))
|