blob: 4dd1f17321e1584c7e32701671ceacded85bf260 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
#
# 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
DEVICE_VARS += TPLINK_HWID TPLINK_HWREV TPLINK_FLASHLAYOUT
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
endef
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 $@
endef
ifeq ($(SUBTARGET),generic)
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
SUPPORTED_DEVICES:=tl-wdr4900-v1 tplink,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 | append-metadata
endef
TARGET_DEVICES += tl-wdr4900-v1
endif
ifeq ($(SUBTARGET),p1020)
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
SUPPORTED_DEVICES := aerohive,hiveap-330
IMAGES := fdt.bin sysupgrade.bin
IMAGE/fdt.bin := append-dtb
IMAGE/sysupgrade.bin := append-dtb | pad-to 256k | check-size 256k | \
append-uImage-fakehdr ramdisk | pad-to 256k | check-size 512k | \
append-rootfs | pad-rootfs $$(BLOCKSIZE) | pad-to 41216k | check-size 41216k | \
append-kernel | append-metadata
endef
TARGET_DEVICES += hiveap-330
endif
$(eval $(call BuildImage))
|