lantiq: UbinizeImage instead of lantiq-specific ubinize.cfg files
[openwrt/openwrt.git] / target / linux / lantiq / image / Makefile
1 #
2 # Copyright (C) 2010-2012 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 # boards missing since devicetree update
9 #EASY50712 ARV3527P
10
11 include $(TOPDIR)/rules.mk
12 include $(INCLUDE_DIR)/image.mk
13
14 JFFS2_BLOCKSIZE = 64k 128k 256k
15 KDIR_TMP:=$(KDIR)/tmp
16
17 LOADER_MAKE := $(NO_TRACE_MAKE) -C lzma-loader KDIR=$(KDIR)
18
19 define Image/BuildLoader/Template
20 -rm -rf $(KDIR)/lzma-loader
21 $(LOADER_MAKE) LOADER=loader$(2)-$(1).bin\
22 LZMA_TEXT_START=0x80a00000 \
23 LOADADDR=0x80002000 \
24 LOADER_DATA="$(KDIR)/vmlinux$(2)-$(1).lzma" BOARD="$(1)" \
25 compile loader.bin
26 endef
27
28
29 define CompressLzma
30 $(STAGING_DIR_HOST)/bin/lzma e $(1) $(2)
31 endef
32
33 define PatchKernelLzma
34 cp $(KDIR)/vmlinux$(2) $(KDIR)/vmlinux$(2)-$(1)
35 $(LINUX_DIR)/scripts/dtc/dtc -O dtb -o $(KDIR)/$(1).dtb ../dts/$(1).dts
36 $(STAGING_DIR_HOST)/bin/patch-dtb $(KDIR)/vmlinux$(2)-$(1) $(KDIR)/$(1).dtb
37 $(call CompressLzma,$(KDIR)/vmlinux$(2)-$(1),$(KDIR)/vmlinux$(2)-$(1).lzma)
38 endef
39
40 define MkBrnImage
41 mkbrncmdline -i $(KDIR)/vmlinux-$(4) -o $(KDIR)/vmlinux-$(4)-brn BRN-BOOT $(6)
42 $(call CompressLzma,$(KDIR)/vmlinux-$(4)-brn,$(KDIR)/vmlinux-$(4)-brn.lzma)
43 mkbrnimg -s $(1) -m $(2) -o $(3) $(KDIR)/vmlinux-$(4)-brn.lzma $(KDIR)/root.$(5)
44 endef
45
46 define MkImageLzma
47 mkimage -A mips -O linux -T kernel -a 0x80002000 -C lzma \
48 -e 0x80002000 -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
49 -d $(KDIR)/vmlinux$(2)-$(1).lzma $(KDIR)/uImage-$(1)$(2)
50 endef
51
52 define TPLinkImageLzma
53 mktplinkfw2 -c -B $(2) -s \
54 -k $(KDIR)/vmlinux$(3)-$(1).lzma -o $(KDIR)/uImage-$(1)$(3)
55 endef
56
57 define MkImageEVA
58 lzma2eva 0x80002000 0x80002000 $(KDIR)/vmlinux$(2)-$(1).lzma $(KDIR)/$(1)$(2).eva.prealign
59 dd if=$(KDIR)/$(1)$(2).eva.prealign of=$(KDIR)/$(1)$(2).eva.align.64k bs=64k conv=sync
60 dd if=$(KDIR)/$(1)$(2).eva.prealign of=$(KDIR)/$(1)$(2).eva.align.128k bs=128k conv=sync
61 cat ./eva.dummy.squashfs >> $(KDIR)/$(1)$(2).eva.align.64k
62 endef
63
64 define CompressGzip
65 gzip -c $(1) > $(2)
66 endef
67
68 define PatchKernelGzip
69 cp $(KDIR)/vmlinux$(3) $(KDIR)/vmlinux$(3)-$(1)
70 $(STAGING_DIR_HOST)/bin/patch-cmdline $(KDIR)/vmlinux$(3)-$(1) '$(strip $(2))'
71 $(call CompressGzip,$(KDIR)/vmlinux$(3)-$(1),$(KDIR)/vmlinux$(3)-$(1).gzip)
72 endef
73
74 define MkImageGzip
75 mkimage -A mips -O linux -T kernel -a 0x80002000 -C gzip \
76 -e 0x80002000 -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
77 -d $(KDIR)/vmlinux$(2)-$(1).gzip $(KDIR)/uImage-$(1)$(2)
78 endef
79
80 define Image/Build/squashfs
81 cat $(KDIR)/uImage-$(2) $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image
82 $(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image)
83 $(if $(3),$(call MkBrnImage,$(3),$(4),$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(3)-brnImage,$(2),$(1),$(5)))
84 endef
85
86 define Image/BuildNAND/squashfs
87
88 ifneq ($($(PROFILE)_UBI_OPTS),)
89 $(call prepare_generic_squashfs,$(KDIR)/root.$(1))
90 $(call Image/Build/UbinizeImage,$(PROFILE),,squashfs,$($(PROFILE)_UBI_OPTS))
91 $(call Image/Build/SysupgradeNAND,$(PROFILE),$(1),$(KDIR)/uImage-$(PROFILE))
92 endif
93 endef
94
95 DGN3500_SKERNEL=0x50000
96 DGN3500_SKERNEL_DECIMAL=327680
97 define Image/BuildDGN3500/squashfs
98 dd if=/dev/zero of=$(BIN_DIR)/$(IMG_PREFIX)-pad bs=$(DGN3500_SKERNEL_DECIMAL) count=1
99 cat $(BIN_DIR)/$(IMG_PREFIX)-pad $(KDIR)/uImage-$(2) $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepad.img
100 rm -r $(BIN_DIR)/$(IMG_PREFIX)-pad
101 dd if=/dev/zero ibs=16M count=1 | tr "\000" "\377" > $(BIN_DIR)/$(IMG_PREFIX)-pwf
102 cp $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepad.img $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepadNA.img
103 dgn3500sum $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepadNA.img $(DGN3500_SKERNEL) NA
104 $(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepadNA.img)
105 cp $(BIN_DIR)/$(IMG_PREFIX)-pwf $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-NA.img
106 dd if=$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepadNA.img of=$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-NA.img conv=notrunc
107 dd if=$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepadNA.img of=$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-sysupgrade-NA.image bs=$(DGN3500_SKERNEL_DECIMAL) skip=1
108 rm -r $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepadNA.img
109 mv $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepad.img $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepadWW.img
110 dgn3500sum $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepadWW.img $(DGN3500_SKERNEL) WW
111 $(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepadWW.img)
112 mv $(BIN_DIR)/$(IMG_PREFIX)-pwf $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-WW.img
113 dd if=$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepadWW.img of=$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-WW.img conv=notrunc
114 dd if=$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepadWW.img of=$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-sysupgrade-WW.image bs=$(DGN3500_SKERNEL_DECIMAL) skip=1
115 rm -r $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepadWW.img
116 endef
117
118 define Image/BuildDGN3500B/squashfs
119 dd if=/dev/zero of=$(BIN_DIR)/$(IMG_PREFIX)-pad bs=327680 count=1
120 cat $(BIN_DIR)/$(IMG_PREFIX)-pad $(KDIR)/uImage-$(2) $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepad.img
121 rm -r $(BIN_DIR)/$(IMG_PREFIX)-pad
122 dd if=/dev/zero ibs=16M count=1 | tr "\000" "\377" > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory.img
123 dgn3500sum $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepad.img $(DGN3500_SKERNEL) DE
124 $(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepad.img)
125 dd if=$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepad.img of=$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory.img conv=notrunc
126 dd if=$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepad.img of=$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-sysupgrade.image bs=$(DGN3500_SKERNEL_DECIMAL) skip=1
127 rm -r $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepad.img
128 dgn3500sum $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-sysupgrade.image $(DGN3500_SKERNEL) DE
129 endef
130
131
132 define Image/BuildTPLink/squashfs
133 mktplinkfw2 -B $(3) -s -a 0x4 -j \
134 -k $(KDIR)/vmlinux-$(2).lzma -r $(KDIR)/root.$(1) \
135 -o $(BIN_DIR)/$(IMG_PREFIX)-$(2)-sysupgrade.image
136 endef
137
138 define Image/BuildEVA/squashfs
139 cat $(KDIR)/$(2).eva.align.64k $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image.eva
140 $(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image.eva)
141 endef
142
143 define Image/BuildEVA/ubifs
144
145 ifneq ($($(PROFILE)_UBIFS_OPTS),)
146 $(CP) $(KDIR)/root.ubifs $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-rootfs.ubifs
147 endif
148 endef
149
150 define Image/BuildEVA/ubi
151
152 ifneq ($($(PROFILE)_UBI_OPTS),)
153 $(CP) $(KDIR)/root.ubi $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-rootfs.ubi
154 $(CP) $(KDIR)/root-overlay.ubi $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-rootfs-overlay.ubi
155 endif
156 endef
157
158 define Image/BuildLoader/squashfs
159 dd if=$(KDIR)/loader-$(2).bin of=$(KDIR)/loader-$(2).bin.padded bs=1536k conv=sync
160 cat $(KDIR)/loader-$(2).bin.padded $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image
161 $(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image)
162 endef
163
164 define Image/BuildEVA/jffs2-128k
165 cat $(KDIR)/$(2).eva.align.128k $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image.eva
166 endef
167
168 define Image/Build/jffs2-64k
169 dd if=$(KDIR)/uImage-$(2) of=$(KDIR)/uImage-$(2)-$(1) bs=64k conv=sync
170 cat $(KDIR)/uImage-$(2)-$(1) $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image
171 endef
172
173 define Image/Build/jffs2-128k
174 dd if=$(KDIR)/uImage-$(2) of=$(KDIR)/uImage-$(2)-$(1) bs=128k conv=sync
175 cat $(KDIR)/uImage-$(2)-$(1) $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image
176 endef
177
178 define Image/Build/jffs2-256k
179 dd if=$(KDIR)/uImage-$(2) of=$(KDIR)/uImage-$(2)-$(1) bs=256k conv=sync
180 cat $(KDIR)/uImage-$(2)-$(1) $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image
181 endef
182
183 define Image/Build/ubifs
184
185 ifneq ($($(PROFILE)_UBIFS_OPTS),)
186 $(CP) $(KDIR)/root.ubifs $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-rootfs.ubifs
187 endif
188 endef
189
190 define Image/Build/ubi
191
192 ifneq ($($(PROFILE)_UBI_OPTS),)
193 $(CP) $(KDIR)/root.ubi $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-rootfs.ubi
194 $(CP) $(KDIR)/root-overlay.ubi $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-rootfs-overlay.ubi
195 endif
196 endef
197
198
199 define Image/BuildNAND/ubifs
200
201 ifneq ($($(PROFILE)_UBIFS_OPTS),)
202 ifneq ($($(PROFILE)_UBI_OPTS),)
203 $(call Image/Build/UbinizeImage,$(PROFILE),,ubifs,$($(PROFILE)_UBI_OPTS))
204 $(call Image/Build/SysupgradeNAND,$(PROFILE),$(1),$(KDIR)/uImage-$(PROFILE))
205 endif
206 endif
207 endef
208
209
210 define Image/InstallKernel/Template
211
212 ifneq ($(CONFIG_TARGET_ROOTFS_INCLUDE_KERNEL),)
213 $(INSTALL_DIR) $(TARGET_DIR)/boot
214
215 ifneq ($(CONFIG_TARGET_ROOTFS_INCLUDE_UIMAGE),)
216 $(CP) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-uImage $(TARGET_DIR)/boot/
217 ln -sf $(IMG_PREFIX)-$(1)-uImage $(TARGET_DIR)/boot/uImage
218 endif
219
220 ifneq ($(CONFIG_TARGET_ROOTFS_INCLUDE_ZIMAGE),)
221 $(CP) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-zImage $(TARGET_DIR)/boot/
222 ln -sf $(IMG_PREFIX)-$(1)-zImage $(TARGET_DIR)/boot/zImage
223 endif
224 endif
225
226 ifneq ($(CONFIG_TARGET_ROOTFS_INCLUDE_DTB),)
227 $(INSTALL_DIR) $(TARGET_DIR)/boot
228
229 ifneq ($(1),)
230 $(CP) $(KDIR)/$(1).dtb $(TARGET_DIR)/boot/
231 endif
232 endif
233 endef
234
235 define Image/BuildKernel/Template
236 $(call PatchKernelLzma,$(1))
237 $(call MkImageLzma,$(1))
238 $(CP) $(KDIR)/uImage-$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-uImage
239 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
240 $(call PatchKernelLzma,$(1),-initramfs)
241 $(call MkImageLzma,$(1),-initramfs)
242 $(CP) $(KDIR)/uImage-$(1)-initramfs $(BIN_DIR)/$(IMG_PREFIX)-$(1)-uImage-initramfs
243 endif
244 endef
245
246 define Image/BuildKernelLoader/Template
247 $(call PatchKernelLzma,$(1))
248 $(call Image/BuildLoader/Template,$(1))
249 $(CP) $(KDIR)/loader-$(1).bin $(BIN_DIR)/$(IMG_PREFIX)-$(1)-vmlinux-loader
250 $(CP) $(KDIR)/vmlinux-$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-vmlinux
251 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
252 $(call PatchKernelLzma,$(1),-initramfs)
253 $(call Image/BuildLoader/Template,$(1),-initramfs)
254 $(CP) $(KDIR)/loader-initramfs-$(1).bin $(BIN_DIR)/$(IMG_PREFIX)-$(1)-vmlinux-initramfs-loader
255 $(CP) $(KDIR)/vmlinux-initramfs-$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-vmlinux-initramfs
256 endif
257 endef
258
259 define Image/BuildKernelTPLink/Template
260 $(call PatchKernelLzma,$(1))
261 $(call TPLinkImageLzma,$(1),$(2))
262 $(CP) $(KDIR)/uImage-$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-uImage
263 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
264 $(call PatchKernelLzma,$(1),-initramfs)
265 $(call TPLinkImageLzma,$(1),$(2),-initramfs)
266 $(CP) $(KDIR)/uImage-$(1)-initramfs $(BIN_DIR)/$(IMG_PREFIX)-$(1)-uImage-initramfs
267 endif
268 endef
269
270 define Image/BuildKernelEVA/Template
271 $(call PatchKernelLzma,$(1))
272 $(call MkImageEVA,$(1))
273 $(CP) $(KDIR)/$(1).eva.align.64k $(BIN_DIR)/$(IMG_PREFIX)-$(1).eva.align.64k
274 $(CP) $(KDIR)/$(1).eva.align.128k $(BIN_DIR)/$(IMG_PREFIX)-$(1).eva.align.128k
275 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
276 $(call PatchKernelLzma,$(1),-initramfs)
277 $(call MkImageEVA,$(1),-initramfs)
278 $(CP) $(KDIR)/$(1)-initramfs.eva.align.64k $(BIN_DIR)/$(IMG_PREFIX)-$(1)-initramfs.eva.align.64k
279 $(CP) $(KDIR)/$(1)-initramfs.eva.align.128k $(BIN_DIR)/$(IMG_PREFIX)-$(1)-initramfs.eva.align.128k
280 endif
281 endef
282
283 define Image/BuildKernelGzip/Template
284 $(call PatchKernelGzip,$(1),$(if $(2),$(2) machtype=$(1),))
285 $(call MkImageGzip,$(1))
286 $(CP) $(KDIR)/uImage-$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-uImage
287 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
288 $(call PatchKernelGzip,$(1),$(if $(2),$(2) machtype=$(1),),-initramfs)
289 $(call MkImageGzip,$(1),-initramfs)
290 $(CP) $(KDIR)/uImage-$(1)-initramfs $(BIN_DIR)/$(IMG_PREFIX)-$(1)-uImage-initramfs
291 endif
292 endef
293
294
295 ifeq ($(CONFIG_TARGET_lantiq_falcon),y)
296
297 Image/BuildKernel/Profile/EASY98000NOR=$(call Image/BuildKernel/Template,EASY98000NOR)
298 Image/Build/Profile/EASY98000NOR=$(call Image/Build/$(1),$(1),EASY98000NOR)
299
300 Image/BuildKernel/Profile/EASY98000SFLASH=$(call Image/BuildKernel/Template,EASY98000SFLASH)
301 Image/Build/Profile/EASY98000SFLASH=$(call Image/Build/$(1),$(1),EASY98000SFLASH)
302
303 endif
304
305
306 ifeq ($(CONFIG_TARGET_lantiq_ase),y)
307
308 Image/BuildKernel/Profile/DGN1000B=$(call Image/BuildKernel/Template,DGN1000B)
309 Image/Build/Profile/DGN1000B=$(call Image/Build/$(1),$(1),DGN1000B)
310
311 endif
312
313
314 ifeq ($(CONFIG_TARGET_lantiq_xway),y)
315
316 # Danube
317 Image/BuildKernel/Profile/BTHOMEHUBV2B=$(call Image/BuildKernel/Template,BTHOMEHUBV2B)
318 Image/Build/Profile/BTHOMEHUBV2B=$(call Image/BuildNAND/$(1),$(1),BTHOMEHUBV2B)
319
320 Image/BuildKernel/Profile/EASY50712=$(call Image/BuildKernel/Template,EASY50712)
321 Image/Build/Profile/EASY50712=$(call Image/Build/$(1),$(1),EASY50712)
322
323 Image/BuildKernel/Profile/ACMP252=$(call Image/BuildKernel/Template,ACMP252)
324 Image/Build/Profile/ACMP252=$(call Image/Build/$(1),$(1),ACMP252)
325
326 Image/BuildKernel/Profile/ARV4510PW=$(call Image/BuildKernel/Template,ARV4510PW)
327 Image/Build/Profile/ARV4510PW=$(call Image/Build/$(1),$(1),ARV4510PW)
328
329 Image/BuildKernel/Profile/ARV4525PW=$(call Image/BuildKernel/Template,ARV4525PW)
330 Image/Build/Profile/ARV4525PW=$(call Image/Build/$(1),$(1),ARV4525PW)
331
332 Image/BuildKernel/Profile/ARV7525PW=$(call Image/BuildKernel/Template,ARV7525PW)
333 Image/Build/Profile/ARV7525PW=$(call Image/Build/$(1),$(1),ARV7525PW)
334
335 Image/BuildKernel/Profile/ARV4518PWR01=$(call Image/BuildKernel/Template,ARV4518PWR01)
336 Image/Build/Profile/ARV4518PWR01=$(call Image/Build/$(1),$(1),ARV4518PWR01)
337
338 Image/BuildKernel/Profile/ARV4518PWR01A=$(call Image/BuildKernel/Template,ARV4518PWR01A)
339 Image/Build/Profile/ARV4518PWR01A=$(call Image/Build/$(1),$(1),ARV4518PWR01A)
340
341 Image/BuildKernel/Profile/ARV4519PW=$(call Image/BuildKernel/Template,ARV4519PW)
342 Image/Build/Profile/ARV4519PW=$(call Image/Build/$(1),$(1),ARV4519PW)
343
344 Image/BuildKernel/Profile/ARV4520PW=$(call Image/BuildKernel/Template,ARV4520PW)
345 Image/Build/Profile/ARV4520PW=$(call Image/Build/$(1),$(1),ARV4520PW)
346
347 Image/BuildKernel/Profile/ARV452CQW=$(call Image/BuildKernel/Template,ARV452CQW)
348 Image/Build/Profile/ARV452CQW=$(call Image/Build/$(1),$(1),ARV452CQW)
349
350 Image/BuildKernel/Profile/ARV7510PW22=$(call Image/BuildKernel/Template,ARV7510PW22)
351 Image/Build/Profile/ARV7510PW22=$(call Image/Build/$(1),$(1),ARV7510PW22)
352
353 Image/BuildKernel/Profile/ARV7518PW=$(call Image/BuildKernel/Template,ARV7518PW)
354 Image/Build/Profile/ARV7518PW=$(call Image/Build/$(1),$(1),ARV7518PW)
355
356 Image/BuildKernel/Profile/ARV7519PW=$(call Image/BuildKernel/Template,ARV7519PW)
357 Image/Build/Profile/ARV7519PW=$(call Image/Build/$(1),$(1),ARV7519PW)
358
359 Image/BuildKernel/Profile/ARV752DPW=$(call Image/BuildKernel/Template,ARV752DPW)
360 Image/Build/Profile/ARV752DPW=$(call Image/Build/$(1),$(1),ARV752DPW)
361
362 Image/BuildKernel/Profile/ARV752DPW22=$(call Image/BuildKernel/Template,ARV752DPW22)
363 Image/Build/Profile/ARV752DPW22=$(call Image/Build/$(1),$(1),ARV752DPW22)
364
365 Image/BuildKernel/Profile/GIGASX76X=$(call Image/BuildKernel/Template,GIGASX76X)
366 Image/Build/Profile/GIGASX76X=$(call Image/Build/$(1),$(1),GIGASX76X)
367
368
369 # AR9
370 Image/BuildKernel/Profile/DGN3500=$(call Image/BuildKernel/Template,DGN3500)
371 Image/Build/Profile/DGN3500=$(call Image/BuildDGN3500/$(1),$(1),DGN3500)
372
373 Image/BuildKernel/Profile/DGN3500B=$(call Image/BuildKernel/Template,DGN3500B)
374 Image/Build/Profile/DGN3500B=$(call Image/BuildDGN3500B/$(1),$(1),DGN3500B)
375
376 Image/BuildKernel/Profile/WBMRA=$(call Image/BuildKernel/Template,WBMR)
377 Image/Build/Profile/WBMRA=$(call Image/Build/$(1),$(1),WBMR)
378
379 Image/BuildKernel/Profile/WBMRB=$(call Image/BuildKernel/Template,WBMR)
380 Image/Build/Profile/WBMRB=$(call Image/Build/$(1),$(1),WBMR)
381
382 Image/BuildKernel/Profile/FRITZ7320=$(call Image/BuildKernelEVA/Template,FRITZ7320)
383 Image/Build/Profile/FRITZ7320=$(call Image/BuildEVA/$(1),$(1),FRITZ7320)
384
385 Image/BuildKernel/Profile/GR7000=$(call Image/BuildKernel/Template,GR7000)
386 Image/Build/Profile/GR7000=$(call Image/Build/$(1),$(1),GR7000)
387
388 Image/BuildKernel/Profile/H201L=$(call Image/BuildKernel/Template,H201L)
389 Image/Build/Profile/H201L=$(call Image/Build/$(1),$(1),H201L)
390
391 Image/BuildKernel/Profile/P2601HNFX=$(call Image/BuildKernel/Template,P2601HNFX)
392 Image/Build/Profile/P2601HNFX=$(call Image/Build/$(1),$(1),P2601HNFX)
393
394 endif
395
396
397 ifeq ($(CONFIG_TARGET_lantiq_xrx200),y)
398
399 # VR9
400 Image/BuildKernel/Profile/P2812HNUFX=$(call Image/BuildKernel/Template,P2812HNUFX)
401 Image/InstallKernel/Template/P2812HNUFX=$(call Image/InstallKernel/Template,P2812HNUFX)
402 Image/Build/Profile/P2812HNUFX=$(call Image/Build/$(1),$(1),P2812HNUFX)
403
404 Image/BuildKernel/Profile/ARV7519RWV11=$(call Image/BuildKernel/Template,ARV7519RWV11,$(1))
405 Image/Build/Profile/ARV7519RWV11=$(call Image/Build/$(1),$(1),ARV7519RWV11)
406
407 Image/BuildKernel/Profile/ARV7519RWV12=$(call Image/BuildKernel/Template,ARV7519RWV12,$(1))
408 Image/Build/Profile/ARV7519RWV12=$(call Image/Build/$(1),$(1),ARV7519RWV12)
409
410 Image/BuildKernel/Profile/EASY80920NAND=$(call Image/BuildKernel/Template,EASY80920NAND)
411 Image/Build/Profile/EASY80920NAND=$(call Image/Build/$(1),$(1),EASY80920NAND)
412
413 Image/BuildKernel/Profile/EASY80920NOR=$(call Image/BuildKernel/Template,EASY80920NOR)
414 Image/Build/Profile/EASY80920NOR=$(call Image/Build/$(1),$(1),EASY80920NOR)
415
416 Image/BuildKernel/Profile/FRITZ3370=$(call Image/BuildKernelEVA/Template,FRITZ3370)
417 Image/Build/Profile/FRITZ3370=$(call Image/BuildEVA/$(1),$(1),FRITZ3370)
418
419 Image/BuildKernel/Profile/VG3503J=$(call Image/BuildKernelLoader/Template,VG3503J)
420 Image/Build/Profile/VG3503J=$(call Image/BuildLoader/$(1),$(1),VG3503J)
421
422 Image/BuildKernel/Profile/VG3503J_V2=$(call Image/BuildKernelLoader/Template,VG3503J_V2)
423 Image/Build/Profile/VG3503J_V2=$(call Image/BuildLoader/$(1),$(1),VG3503J_V2)
424
425 Image/BuildKernel/Profile/TDW8970=$(call Image/BuildKernelTPLink/Template,TDW8970,TD-W8970v1,$(1))
426 Image/Build/Profile/TDW8970=$(call Image/BuildTPLink/$(1),$(1),TDW8970,TD-W8970v1)
427
428 Image/BuildKernel/Profile/VGV7519NOR=$(call Image/BuildKernel/Template,VGV7519NOR,$(1))
429 Image/Build/Profile/VGV7519NOR=$(call Image/Build/$(1),$(1),VGV7519NOR)
430
431 Image/BuildKernel/Profile/VGV7519BRN=$(call Image/BuildKernel/Template,VGV7519BRN,$(1))
432 Image/Build/Profile/VGV7519BRN=$(call Image/Build/$(1),$(1),VGV7519BRN,5D00008000,0x12345678,$(1))
433
434 endif
435
436
437 ifeq ($(CONFIG_TARGET_lantiq_svip_be),y)
438
439 Image/BuildKernel/Profile/EASY33016=$(call Image/BuildKernelGzip/Template,EASY33016)
440 Image/Build/Profile/EASY33016=$(call Image/Build/$(1),$(1),EASY33016)
441
442 endif
443
444
445 define Image/BuildKernel
446 $(call Image/BuildKernel/Profile/$(PROFILE))
447 endef
448
449 define Image/InstallKernel
450 $(call Image/InstallKernel/Template/$(PROFILE))
451 endef
452
453 define Image/Build
454 $(call Image/Build/Profile/$(PROFILE),$(1))
455 endef
456
457 $(eval $(call BuildImage))