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