ipq806x: increase kernel partition size for the Netgear Nighthawk X4 R7500
[openwrt/openwrt.git] / target / linux / ipq806x / image / Makefile
1 # Copyright (c) 2014 The Linux Foundation. All rights reserved.
2 #
3 include $(TOPDIR)/rules.mk
4 include $(INCLUDE_DIR)/image.mk
5
6 define Device/Default
7 PROFILES := Default
8 KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts)
9 KERNEL_INITRAMFS_PREFIX := $$(IMG_PREFIX)-$(1)-initramfs
10 KERNEL_PREFIX := $$(IMAGE_PREFIX)
11 KERNEL_LOADADDR = 0x42208000
12 SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
13 IMAGE/sysupgrade.bin = sysupgrade-tar | append-metadata
14 IMAGE/sysupgrade.bin/squashfs :=
15 endef
16
17 define Device/LegacyImage
18 KERNEL_SUFFIX := -uImage
19 KERNEL = kernel-bin | append-dtb | uImage none
20 KERNEL_NAME := zImage
21 endef
22
23 define Device/FitImage
24 KERNEL_SUFFIX := -fit-uImage.itb
25 KERNEL = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
26 KERNEL_NAME := Image
27 endef
28
29 define Device/FitImageLzma
30 KERNEL_SUFFIX := -fit-uImage.itb
31 KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb
32 KERNEL_NAME := Image
33 endef
34
35 define Device/UbiFit
36 KERNEL_IN_UBI := 1
37 IMAGES := nand-factory.bin nand-sysupgrade.bin
38 IMAGE/nand-factory.bin := append-ubi
39 IMAGE/nand-sysupgrade.bin := sysupgrade-tar | append-metadata
40 endef
41
42 define Device/DniImage
43 KERNEL_SUFFIX := -uImage
44 KERNEL = kernel-bin | append-dtb | uImage none
45 KERNEL_NAME := zImage
46 NETGEAR_BOARD_ID :=
47 NETGEAR_HW_ID :=
48 UBINIZE_OPTS := -E 5
49 IMAGES := factory.img sysupgrade.bin
50 IMAGE/factory.img := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-uImage-fakehdr filesystem | pad-to $$$$(KERNEL_SIZE) | append-ubi | netgear-dni
51 IMAGE/sysupgrade.bin := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-uImage-fakehdr filesystem | sysupgrade-tar kernel=$$$$@ | append-metadata
52 endef
53 DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID
54
55 define Device/TpSafeImage
56 KERNEL_SUFFIX := -uImage
57 KERNEL = kernel-bin | append-dtb | uImage none
58 KERNEL_NAME := zImage
59 TPLINK_BOARD_ID :=
60 IMAGES := factory.bin sysupgrade.bin
61 IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
62 IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | append-metadata
63 endef
64 DEVICE_VARS += TPLINK_BOARD_ID
65
66 define Device/ZyXELImage
67 KERNEL_SUFFIX := -uImage
68 KERNEL = kernel-bin | append-dtb | uImage none | pad-to $${KERNEL_SIZE}
69 KERNEL_NAME := zImage
70 IMAGES := sysupgrade.bin mmcblk0p5-rootfs.bin mmcblk0p4-kernel.bin
71 IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-to $$$${BLOCKSIZE} | sysupgrade-tar rootfs=$$$$@ | append-metadata
72 IMAGE/mmcblk0p5-rootfs.bin := append-rootfs | pad-rootfs | pad-to $$$${BLOCKSIZE}
73 IMAGE/mmcblk0p4-kernel.bin := append-kernel
74 endef
75
76 define Device/compex_wpq864
77 $(call Device/FitImage)
78 $(call Device/UbiFit)
79 BLOCKSIZE := 128k
80 PAGESIZE := 2048
81 DEVICE_DTS := qcom-ipq8064-wpq864
82 DEVICE_TITLE := Compex WPQ864
83 DEVICE_PACKAGES := kmod-gpio-beeper
84 endef
85 TARGET_DEVICES += compex_wpq864
86
87 define Device/linksys_ea8500
88 $(call Device/LegacyImage)
89 DEVICE_DTS := qcom-ipq8064-ea8500
90 PAGESIZE := 2048
91 BLOCKSIZE := 128k
92 KERNEL_SIZE := 3072k
93 KERNEL = kernel-bin | append-dtb | uImage none | append-uImage-fakehdr filesystem
94 BOARD_NAME := ea8500
95 SUPPORTED_DEVICES += ea8500
96 UBINIZE_OPTS := -E 5
97 IMAGES := factory.bin sysupgrade.bin
98 IMAGE/factory.bin := append-kernel | pad-to $$$${KERNEL_SIZE} | append-ubi
99 DEVICE_TITLE := Linksys EA8500
100 DEVICE_PACKAGES := ath10k-firmware-qca99x0
101 endef
102 TARGET_DEVICES += linksys_ea8500
103
104 define Device/netgear_d7800
105 $(call Device/DniImage)
106 DEVICE_DTS := qcom-ipq8064-d7800
107 KERNEL_SIZE := 4194304
108 NETGEAR_BOARD_ID := D7800
109 NETGEAR_HW_ID := 29764958+0+128+512+4x4+4x4
110 BLOCKSIZE := 128k
111 PAGESIZE := 2048
112 BOARD_NAME := d7800
113 SUPPORTED_DEVICES += d7800
114 DEVICE_TITLE := Netgear Nighthawk X4 D7800
115 DEVICE_PACKAGES := ath10k-firmware-qca99x0
116 endef
117 TARGET_DEVICES += netgear_d7800
118
119 define Device/netgear_r7500
120 $(call Device/DniImage)
121 DEVICE_DTS := qcom-ipq8064-r7500
122 KERNEL_SIZE := 4194304
123 NETGEAR_BOARD_ID := R7500
124 NETGEAR_HW_ID := 29764841+0+128+256+3x3+4x4
125 BLOCKSIZE := 128k
126 PAGESIZE := 2048
127 BOARD_NAME := r7500
128 SUPPORTED_DEVICES += r7500
129 DEVICE_TITLE := Netgear Nighthawk X4 R7500
130 DEVICE_PACKAGES := ath10k-firmware-qca988x
131 endef
132 TARGET_DEVICES += netgear_r7500
133
134 define Device/netgear_r7500v2
135 $(call Device/DniImage)
136 DEVICE_DTS := qcom-ipq8064-r7500v2
137 KERNEL_SIZE := 2097152
138 NETGEAR_BOARD_ID := R7500v2
139 NETGEAR_HW_ID := 29764958+0+128+512+3x3+4x4
140 BLOCKSIZE := 128k
141 PAGESIZE := 2048
142 BOARD_NAME := r7500v2
143 SUPPORTED_DEVICES += r7500v2
144 DEVICE_TITLE := Netgear Nighthawk X4 R7500v2
145 DEVICE_PACKAGES := ath10k-firmware-qca99x0 ath10k-firmware-qca988x
146 endef
147 TARGET_DEVICES += netgear_r7500v2
148
149 define Device/netgear_r7800
150 $(call Device/DniImage)
151 DEVICE_DTS := qcom-ipq8065-r7800
152 KERNEL_SIZE := 4194304
153 NETGEAR_BOARD_ID := R7800
154 NETGEAR_HW_ID := 29764958+0+128+512+4x4+4x4+cascade
155 BLOCKSIZE := 128k
156 PAGESIZE := 2048
157 BOARD_NAME := r7800
158 SUPPORTED_DEVICES += r7800
159 DEVICE_TITLE := Netgear Nighthawk X4S R7800
160 DEVICE_PACKAGES := ath10k-firmware-qca9984
161 endef
162 TARGET_DEVICES += netgear_r7800
163
164 define Device/qcom_ipq8064-ap148
165 $(call Device/FitImage)
166 $(call Device/UbiFit)
167 DEVICE_DTS := qcom-ipq8064-ap148
168 KERNEL_INSTALL := 1
169 BLOCKSIZE := 128k
170 PAGESIZE := 2048
171 BOARD_NAME := ap148
172 SUPPORTED_DEVICES += ap148
173 DEVICE_TITLE := Qualcomm AP148
174 DEVICE_PACKAGES := ath10k-firmware-qca99x0
175 endef
176 TARGET_DEVICES += qcom_ipq8064-ap148
177
178 define Device/qcom_ipq8064-ap148-legacy
179 $(call Device/LegacyImage)
180 $(call Device/UbiFit)
181 DEVICE_DTS := qcom-ipq8064-ap148
182 BLOCKSIZE := 128k
183 PAGESIZE := 2048
184 BOARD_NAME := ap148
185 SUPPORTED_DEVICES := qcom,ipq8064-ap148 ap148
186 DEVICE_TITLE := Qualcomm AP148 (legacy)
187 DEVICE_PACKAGES := ath10k-firmware-qca99x0
188 endef
189 TARGET_DEVICES += qcom_ipq8064-ap148-legacy
190
191 define Device/qcom_ipq8064-db149
192 $(call Device/FitImage)
193 DEVICE_DTS := qcom-ipq8064-db149
194 KERNEL_INSTALL := 1
195 BOARD_NAME := db149
196 DEVICE_TITLE := Qualcomm DB149
197 DEVICE_PACKAGES := ath10k-firmware-qca99x0
198 endef
199 TARGET_DEVICES += qcom_ipq8064-db149
200
201 define Device/tplink_c2600
202 $(call Device/TpSafeImage)
203 DEVICE_DTS := qcom-ipq8064-c2600
204 BLOCKSIZE := 128k
205 PAGESIZE := 2048
206 BOARD_NAME := c2600
207 SUPPORTED_DEVICES += c2600
208 TPLINK_BOARD_ID := C2600
209 DEVICE_TITLE := TP-Link Archer C2600
210 DEVICE_PACKAGES := ath10k-firmware-qca99x0
211 endef
212 TARGET_DEVICES += tplink_c2600
213
214 define Device/tplink_vr2600v
215 KERNEL_SUFFIX := -uImage
216 KERNEL = kernel-bin | append-dtb | uImage none
217 KERNEL_NAME := zImage
218 KERNEL_SIZE := 3145728
219 DEVICE_DTS := qcom-ipq8064-vr2600v
220 BLOCKSIZE := 128k
221 PAGESIZE := 2048
222 BOARD_NAME := vr2600v
223 SUPPORTED_DEVICES += vr2600v
224 DEVICE_TITLE := TP-Link Archer VR2600v
225 DEVICE_PACKAGES := ath10k-firmware-qca99x0
226 IMAGES := sysupgrade.bin
227 IMAGE/sysupgrade.bin := pad-extra 512 | append-kernel | pad-to $$$${KERNEL_SIZE} | append-rootfs | pad-rootfs | append-metadata
228 endef
229 TARGET_DEVICES += tplink_vr2600v
230
231 define Device/zyxel_nbg6817
232 DEVICE_DTS := qcom-ipq8065-nbg6817
233 KERNEL_SIZE := 4096k
234 BLOCKSIZE := 64k
235 BOARD_NAME := nbg6817
236 SUPPORTED_DEVICES += nbg6817
237 DEVICE_TITLE := ZyXEL NBG6817
238 DEVICE_PACKAGES := ath10k-firmware-qca9984 e2fsprogs kmod-fs-ext4 losetup
239 $(call Device/ZyXELImage)
240 endef
241 TARGET_DEVICES += zyxel_nbg6817
242
243 $(eval $(call BuildImage))