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