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/append-uImage-fakeramdisk-hdr
|
|
|
|
rm -f $@.fakeramdisk
|
|
|
|
$(STAGING_DIR_HOST)/bin/mkimage \
|
|
|
|
-A $(LINUX_KARCH) -O linux -T ramdisk -C none \
|
|
|
|
-n 'fakeramdisk' \
|
|
|
|
-s \
|
|
|
|
$@.fakeramdisk
|
|
|
|
cat $@.fakeramdisk >> $@
|
2017-09-30 16:14:58 +00:00
|
|
|
endef
|
2010-12-05 11:38:59 +00:00
|
|
|
|
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
|
|
|
|
DEVICE_PACKAGES := kmod-ath9k wpad-mini
|
|
|
|
TPLINK_HWID := 0x49000001
|
|
|
|
TPLINK_HWREV := 1
|
|
|
|
TPLINK_FLASHLAYOUT := 16Mppc
|
|
|
|
KERNEL_NAME := cuImage.tl-wdr4900-v1
|
|
|
|
IMAGES := fdt.bin factory.bin sysupgrade.bin
|
|
|
|
IMAGE/fdt.bin := append-dtb
|
|
|
|
IMAGE/factory.bin := tplink-v1-image
|
|
|
|
IMAGE/sysupgrade.bin := tplink-v1-image -s
|
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
|
|
|
|
DEVICE_PACKAGES := kmod-ath9k wpad-mini kmod-tpm-i2c-atmel
|
|
|
|
BLOCKSIZE := 128k
|
|
|
|
KERNEL_NAME := zImage
|
|
|
|
KERNEL_SIZE := 8m
|
|
|
|
IMAGES := fdt.bin sysupgrade.bin
|
|
|
|
IMAGE/fdt.bin := append-dtb
|
|
|
|
IMAGE/sysupgrade.bin := append-dtb | pad-to 256k | check-size 256k | \
|
|
|
|
append-uImage-fakeramdisk-hdr | pad-to 256k | check-size 512k | \
|
|
|
|
append-rootfs | pad-rootfs $$(BLOCKSIZE) | pad-to 41216k | check-size 41216k | \
|
|
|
|
append-kernel
|
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))
|