lantiq: use wpad-mini for WBMR boards
[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 ifeq ($(SUBTARGET),xway)
20 UBIFS_OPTS := -m 512 -e 15872 -c 1959
21 else
22 UBIFS_OPTS := -m 2048 -e 126KiB -c 4096
23 endif
24
25 LOADER_MAKE := $(NO_TRACE_MAKE) -C lzma-loader KDIR=$(KDIR)
26
27 define Image/BuildLoader/Template
28 -rm -rf $(KDIR)/lzma-loader
29 $(LOADER_MAKE) LOADER=loader$(2)-$(1).bin\
30 LZMA_TEXT_START=0x80a00000 \
31 LOADADDR=0x80002000 \
32 LOADER_DATA="$(KDIR)/vmlinux$(2)-$(1).lzma" BOARD="$(1)" \
33 compile loader.bin
34 endef
35
36 define Build/eva-image
37 lzma2eva $(KERNEL_LOADADDR) $(KERNEL_LOADADDR) $@ $@.new
38 ( dd if=$@.new bs=64k conv=sync; cat ./eva.dummy.squashfs; ) > $@
39 endef
40
41
42 define CompressLzma
43 $(STAGING_DIR_HOST)/bin/lzma e $(1) $(2)
44 endef
45
46 define PatchKernelLzma
47 cp $(KDIR)/vmlinux$(2) $(KDIR)/vmlinux$(2)-$(1)
48 $(LINUX_DIR)/scripts/dtc/dtc -O dtb -o $(KDIR)/$(1).dtb ../dts/$(1).dts
49 cat $(KDIR)/vmlinux$(2)-$(1) $(KDIR)/$(1).dtb > $(KDIR)/vmlinux$(2)-$(1).tmp
50 $(call CompressLzma,$(KDIR)/vmlinux$(2)-$(1).tmp,$(KDIR)/vmlinux$(2)-$(1).lzma)
51 endef
52
53 define MkImageLzma
54 mkimage -A mips -O linux -T kernel -a 0x80002000 -C lzma \
55 -e 0x80002000 -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
56 -d $(KDIR)/vmlinux$(2)-$(1).lzma $(KDIR)/uImage-$(1)$(2)
57 endef
58
59 define Image/Build/squashfs
60 cat $(KDIR)/uImage-$(2) $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image
61 $(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image)
62 endef
63
64 DGN3500_SKERNEL=0x50000
65 DGN3500_SKERNEL_DECIMAL=327680
66 define Image/BuildDGN3500/squashfs
67 dd if=/dev/zero of=$(BIN_DIR)/$(IMG_PREFIX)-pad bs=$(DGN3500_SKERNEL_DECIMAL) count=1
68 cat $(BIN_DIR)/$(IMG_PREFIX)-pad $(KDIR)/uImage-$(2) $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepad.img
69 rm -r $(BIN_DIR)/$(IMG_PREFIX)-pad
70 dd if=/dev/zero ibs=16M count=1 | tr "\000" "\377" > $(BIN_DIR)/$(IMG_PREFIX)-pwf
71 cp $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepad.img $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepadNA.img
72 dgn3500sum $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepadNA.img $(DGN3500_SKERNEL) NA
73 $(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepadNA.img)
74 cp $(BIN_DIR)/$(IMG_PREFIX)-pwf $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-NA.img
75 dd if=$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepadNA.img of=$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-NA.img conv=notrunc
76 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
77 rm -r $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepadNA.img
78 mv $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepad.img $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepadWW.img
79 dgn3500sum $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepadWW.img $(DGN3500_SKERNEL) WW
80 $(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepadWW.img)
81 mv $(BIN_DIR)/$(IMG_PREFIX)-pwf $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-WW.img
82 dd if=$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepadWW.img of=$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-WW.img conv=notrunc
83 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
84 rm -r $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepadWW.img
85 endef
86
87 define Image/BuildDGN3500B/squashfs
88 dd if=/dev/zero of=$(BIN_DIR)/$(IMG_PREFIX)-pad bs=327680 count=1
89 cat $(BIN_DIR)/$(IMG_PREFIX)-pad $(KDIR)/uImage-$(2) $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepad.img
90 rm -r $(BIN_DIR)/$(IMG_PREFIX)-pad
91 dd if=/dev/zero ibs=16M count=1 | tr "\000" "\377" > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory.img
92 dgn3500sum $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepad.img $(DGN3500_SKERNEL) DE
93 $(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepad.img)
94 dd if=$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepad.img of=$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory.img conv=notrunc
95 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
96 rm -r $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-factory-prepad.img
97 dgn3500sum $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-sysupgrade.image $(DGN3500_SKERNEL) DE
98 endef
99
100
101 define Image/BuildLoader/squashfs
102 dd if=$(KDIR)/loader-$(2).bin of=$(KDIR)/loader-$(2).bin.padded bs=3072k conv=sync
103 cat $(KDIR)/loader-$(2).bin.padded $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image
104 $(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image)
105 endef
106
107 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
108 define Image/BuildKernel/InitramfsTemplate
109 $(call PatchKernelLzma,$(1),-initramfs)
110 $(call MkImageLzma,$(1),-initramfs)
111 $(CP) $(KDIR)/uImage-$(1)-initramfs $(BIN_DIR)/$(IMG_PREFIX)-$(1)-uImage-initramfs
112 endef
113 endif
114
115 define Image/BuildKernel/Template
116 $(call PatchKernelLzma,$(1))
117 $(call MkImageLzma,$(1))
118 $(CP) $(KDIR)/uImage-$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-uImage
119 $(Image/BuildKernel/InitramfsTemplate)
120 endef
121
122 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
123 define Image/BuildKernelLoader/InitramfsTemplate
124 $(CP) $(KDIR)/loader-initramfs-$(1).bin $(BIN_DIR)/$(IMG_PREFIX)-$(1)-vmlinux-initramfs-loader
125 $(CP) $(KDIR)/vmlinux-initramfs-$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-vmlinux-initramfs
126 endef
127 endif
128
129 define Image/BuildKernelLoader/Template
130 $(CP) $(KDIR)/loader-$(1).bin $(BIN_DIR)/$(IMG_PREFIX)-$(1)-vmlinux-loader
131 $(CP) $(KDIR)/vmlinux-$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-vmlinux
132 $(Image/BuildKernelLoader/InitramfsTemplate)
133 endef
134
135 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
136 define Image/Prepare/InitramfsTemplate
137 $(call PatchKernelLzma,$(1),-initramfs)
138 $(call Image/BuildLoader/Template,$(1),-initramfs)
139 endef
140 endif
141
142 define Image/Prepare/Template
143 $(call PatchKernelLzma,$(1))
144 $(call Image/BuildLoader/Template,$(1))
145 $(Image/Prepare/InitramfsTemplate)
146 endef
147
148 ### Kernel scripts ###
149 define Build/mkbrncmdline
150 mkbrncmdline -i $@ -o $@.new BRN-BOOT
151 mv $@.new $@
152 endef
153
154 define Build/mkbrnimg
155 mkbrnimg -s $(SIGNATURE) -m $(MAGIC) -p $(CRC32_POLY) -o $@ $(IMAGE_KERNEL) $(IMAGE_ROOTFS)
156 endef
157
158 define Build/fullimage
159 mkimage -A mips -O linux -C lzma -T filesystem -a 0x00 \
160 -e 0x00 -n 'LEDE RootFS' \
161 -d $(IMAGE_ROOTFS) $(IMAGE_ROOTFS).new
162
163 cat $(IMAGE_KERNEL) $(IMAGE_ROOTFS).new > $@.tmp
164
165 mkimage -A mips -O linux -T multi -a 0x00 -C none \
166 -e 0x00 -n 'OpenWrt fullimage' \
167 -d $@.tmp $@
168
169 rm $(IMAGE_ROOTFS).new
170 rm $@.tmp
171 endef
172
173 # Shared device definition: applies to every defined device
174 define Device/Default
175 PROFILES = Default
176 KERNEL_DEPENDS = $$(wildcard ../dts/$$(DEVICE_DTS).dts)
177 KERNEL_INITRAMFS_NAME = $$(KERNEL_NAME)-initramfs
178 KERNEL := kernel-bin | append-dtb | lzma | uImage lzma
179 KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | uImage lzma
180 FILESYSTEMS := squashfs
181 DEVICE_DTS := $(1)
182 DEVICE_DTS_DIR := ../dts
183 IMAGE_SIZE :=
184 IMAGES := sysupgrade.bin
185 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
186 endef
187 DEVICE_VARS += IMAGE_SIZE
188
189 define Device/NAND/xway
190 BLOCKSIZE := 16k
191 PAGESIZE := 512
192 SUBPAGESIZE := 256
193 FILESYSTEMS += ubifs
194 endef
195
196 define Device/NAND/xrx200
197 BLOCKSIZE := 128k
198 PAGESIZE := 2048
199 SUBPAGESIZE := 512
200 FILESYSTEMS += ubifs
201 endef
202
203 define Device/NAND
204 $(Device/NAND/$(SUBTARGET))
205 IMAGE/sysupgrade.bin := sysupgrade-tar
206 endef
207
208 define Device/lantiqBrnImage
209 KERNEL := kernel-bin | append-dtb | mkbrncmdline | lzma-no-dict
210 IMAGES := factory.bin
211 IMAGE/factory.bin := mkbrnimg | check-size $$$$(IMAGE_SIZE)
212 endef
213 DEVICE_VARS += SIGNATURE MAGIC CRC32_POLY
214
215 define Device/lantiqFullImage
216 KERNEL := kernel-bin | append-dtb | lzma | uImage lzma | pad-offset 4 0
217 IMAGES := sysupgrade.bin fullimage.img
218 IMAGE/fullimage.img := fullimage | check-size $$$$(IMAGE_SIZE)
219 endef
220
221 define Device/AVM
222 KERNEL := kernel-bin | append-dtb | lzma | eva-image
223 endef
224
225 ifeq ($(SUBTARGET),xway_legacy)
226
227 define Device/ARV4520PW
228 IMAGE_SIZE := 3648k
229 DEVICE_TITLE := Easybox 800, WAV-281 - ARV4520PW
230 DEVICE_PACKAGES := kmod-ltq-hcd-danube kmod-ledtrig-usbdev \
231 kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
232 kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
233 ltq-adsl-app ppp-mod-pppoa \
234 kmod-rt61-pci wpad-mini \
235 swconfig
236 endef
237 TARGET_DEVICES += ARV4520PW
238
239 define Device/ARV4525PW
240 IMAGE_SIZE := 3776k
241 DEVICE_TITLE := Speedport W502V Typ A - ARV4525PW
242 DEVICE_PACKAGES := kmod-ath5k wpad-mini \
243 kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
244 kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
245 ltq-adsl-app ppp-mod-pppoa
246 endef
247 TARGET_DEVICES += ARV4525PW
248
249 define Device/ARV452CQW
250 IMAGE_SIZE := 3776k
251 DEVICE_TITLE := Easybox 801 - ARV452CQW
252 DEVICE_PACKAGES := kmod-ltq-hcd-danube kmod-ledtrig-usbdev \
253 kmod-ath5k wpad-mini \
254 kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
255 kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
256 ltq-adsl-app ppp-mod-pppoa \
257 swconfig
258 endef
259 TARGET_DEVICES += ARV452CQW
260
261 define Device/ARV4518PWR01
262 IMAGE_SIZE := 3776k
263 DEVICE_TITLE := ARV4518PWR01
264 DEVICE_PACKAGES := kmod-ltq-hcd-danube kmod-ledtrig-usbdev \
265 kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
266 kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
267 ltq-adsl-app ppp-mod-pppoa \
268 kmod-ath5k wpad-mini \
269 swconfig
270 endef
271 TARGET_DEVICES += ARV4518PWR01
272
273 define Device/ARV4518PWR01A
274 IMAGE_SIZE := 3776k
275 DEVICE_TITLE := ARV4518PWR01A
276 DEVICE_PACKAGES := kmod-ltq-hcd-danube kmod-ledtrig-usbdev \
277 kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
278 kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
279 ltq-adsl-app ppp-mod-pppoa \
280 kmod-ath5k wpad-mini \
281 swconfig
282 endef
283 TARGET_DEVICES += ARV4518PWR01A
284
285 endif
286
287 ifeq ($(SUBTARGET),xway)
288
289 # Danube
290
291 define Device/BTHOMEHUBV2B
292 $(Device/NAND)
293 DEVICE_TITLE := BT Home Hub 2B
294 DEVICE_PACKAGES := kmod-ltq-hcd-danube \
295 kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
296 kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
297 kmod-ltq-deu-danube \
298 ltq-adsl-app ppp-mod-pppoa \
299 kmod-ath9k wpad-mini \
300 swconfig
301 endef
302 TARGET_DEVICES += BTHOMEHUBV2B
303
304 define Device/EASY50712
305 IMAGE_SIZE := 3776k
306 DEVICE_TITLE := Lantiq Danube - EASY50712
307 endef
308 TARGET_DEVICES += EASY50712
309
310 define Device/ACMP252
311 IMAGE_SIZE := 14848k
312 DEVICE_TITLE := AudioCodes MediaPack MP-252
313 DEVICE_PACKAGES := kmod-rt2x00-pci wpad-mini \
314 kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
315 kmod-ltq-adsl-danube-fw-a kmod-ltq-ptm-danube \
316 ltq-adsl-app
317 endef
318 TARGET_DEVICES += ACMP252
319
320 define Device/ARV4510PW
321 IMAGE_SIZE := 15616k
322 DEVICE_TITLE := Wippies, Elisa - ARV4510PW
323 DEVICE_PACKAGES := kmod-ledtrig-usbdev kmod-usb2-pci kmod-usb-uhci \
324 kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
325 kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
326 ltq-adsl-app ppp-mod-pppoa \
327 kmod-ltq-tapi kmod-ltq-vmmc \
328 kmod-rt2800-pci kmod-ath5k wpad-mini \
329 swconfig
330 endef
331 TARGET_DEVICES += ARV4510PW
332
333 define Device/ARV7525PW
334 IMAGE_SIZE := 3776k
335 DEVICE_TITLE := Speedport W303V Typ A - ARV7525PW
336 DEVICE_PACKAGES := kmod-rt2800-pci wpad-mini \
337 kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
338 kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
339 ltq-adsl-app ppp-mod-pppoa
340 endef
341 TARGET_DEVICES += ARV7525PW
342
343 define Device/ARV4519PW
344 IMAGE_SIZE := 3776k
345 DEVICE_TITLE := Vodafone, Pirelli - ARV4519PW
346 DEVICE_PACKAGES := kmod-ltq-hcd-danube kmod-ledtrig-usbdev \
347 kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
348 kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
349 ltq-adsl-app ppp-mod-pppoa \
350 swconfig
351 endef
352 TARGET_DEVICES += ARV4519PW
353
354 define Device/ARV7506PW11
355 IMAGE_SIZE := 7808k
356 DEVICE_TITLE := Alice/O2 IAD 4421 - ARV7506PW11
357 DEVICE_PACKAGES := kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
358 kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
359 ltq-adsl-app ppp-mod-pppoa \
360 kmod-rt2800-pci wpad-mini \
361 swconfig
362 endef
363 TARGET_DEVICES += ARV7506PW11
364
365 define Device/ARV7510PW22
366 IMAGE_SIZE := 31232k
367 DEVICE_TITLE := Astoria - ARV7510PW22
368 DEVICE_PACKAGES := kmod-ltq-hcd-danube kmod-ledtrig-usbdev \
369 kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
370 kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
371 ltq-adsl-app ppp-mod-pppoa \
372 kmod-ltq-tapi kmod-ltq-vmmc \
373 kmod-rt2800-pci wpad-mini \
374 kmod-usb-uhci kmod-usb2 kmod-usb2-pci \
375 swconfig
376 endef
377 TARGET_DEVICES += ARV7510PW22
378
379 define Device/ARV7518PW
380 IMAGE_SIZE := 7872k
381 DEVICE_TITLE := Astoria - ARV7518PW
382 DEVICE_PACKAGES := kmod-ltq-hcd-danube kmod-ledtrig-usbdev \
383 kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
384 kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
385 ltq-adsl-app ppp-mod-pppoa \
386 kmod-ath9k wpad-mini \
387 swconfig
388 endef
389 TARGET_DEVICES += ARV7518PW
390
391 define Device/ARV7519PW
392 IMAGE_SIZE := 15488k
393 DEVICE_TITLE := Astoria - ARV7519PW
394 DEVICE_PACKAGES := kmod-ltq-hcd-danube \
395 kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
396 kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
397 ltq-adsl-app ppp-mod-pppoa \
398 kmod-rt2800-pci wpad-mini \
399 swconfig
400 endef
401 TARGET_DEVICES += ARV7519PW
402
403 define Device/ARV752DPW
404 IMAGE_SIZE := 7872k
405 DEVICE_TITLE := Easybox 802 - ARV752DPW
406 DEVICE_PACKAGES := kmod-ltq-hcd-danube kmod-ledtrig-usbdev \
407 kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
408 kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
409 ltq-adsl-app ppp-mod-pppoa \
410 kmod-ltq-tapi kmod-ltq-vmmc \
411 kmod-rt2800-pci wpad-mini \
412 swconfig
413 endef
414 TARGET_DEVICES += ARV752DPW
415
416 define Device/ARV752DPW22
417 IMAGE_SIZE := 7616k
418 DEVICE_TITLE := Easybox 803 - ARV752DPW22
419 DEVICE_PACKAGES := kmod-usb2-pci kmod-usb-uhci kmod-ltq-hcd-danube kmod-ledtrig-usbdev \
420 kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
421 kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
422 ltq-adsl-app ppp-mod-pppoa \
423 kmod-ltq-tapi kmod-ltq-vmmc \
424 kmod-rt2800-pci wpad-mini \
425 swconfig
426 endef
427 TARGET_DEVICES += ARV752DPW22
428
429 define Device/ARV8539PW22
430 IMAGE_SIZE := 7616k
431 DEVICE_TITLE := Speedport W504V Typ A - ARV8539PW22
432 DEVICE_PACKAGES := kmod-ltq-hcd-danube \
433 kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
434 kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
435 ltq-adsl-app ppp-mod-pppoa \
436 kmod-ath9k wpad-mini \
437 swconfig
438 endef
439 TARGET_DEVICES += ARV8539PW22
440
441 define Device/GIGASX76X
442 IMAGE_SIZE := 7680k
443 DEVICE_TITLE := Gigaset sx76x
444 DEVICE_PACKAGES := kmod-ltq-hcd-danube \
445 kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
446 kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
447 ltq-adsl-app ppp-mod-pppoe \
448 kmod-ath5k wpad-mini \
449 swconfig
450 endef
451 TARGET_DEVICES += GIGASX76X
452
453
454 # AR9
455
456 define Device/BTHOMEHUBV3A
457 $(Device/NAND)
458 DEVICE_TITLE := BT Home Hub 3A
459 DEVICE_PACKAGES := kmod-usb-dwc2 \
460 kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
461 kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \
462 kmod-ltq-deu-ar9 \
463 ltq-adsl-app ppp-mod-pppoa \
464 kmod-ath9k wpad-mini \
465 swconfig uboot-envtools
466 endef
467 TARGET_DEVICES += BTHOMEHUBV3A
468
469 Image/BuildKernel/Profile/DGN3500=$(call Image/BuildKernel/Template,DGN3500)
470 Image/Build/Profile/DGN3500=$(call Image/BuildDGN3500/$(1),$(1),DGN3500)
471
472 define LegacyDevice/DGN3500
473 DEVICE_TITLE := Netgear DGN3500
474 DEVICE_PACKAGES := kmod-usb-dwc2 kmod-ledtrig-usbdev \
475 kmod-ath9k wpad-mini \
476 kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
477 kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \
478 ltq-adsl-app ppp-mod-pppoa \
479 kmod-ltq-deu-ar9 swconfig
480 endef
481 LEGACY_DEVICES += DGN3500
482
483 Image/BuildKernel/Profile/DGN3500B=$(call Image/BuildKernel/Template,DGN3500B)
484 Image/Build/Profile/DGN3500B=$(call Image/BuildDGN3500B/$(1),$(1),DGN3500B)
485
486 define LegacyDevice/DGN3500B
487 DEVICE_TITLE := Netgear DGN3500B
488 DEVICE_PACKAGES := kmod-usb-dwc2 kmod-ledtrig-usbdev \
489 kmod-ath9k wpad-mini \
490 kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
491 kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
492 ltq-adsl-app ppp-mod-pppoa \
493 kmod-ltq-deu-ar9 swconfig
494 endef
495 LEGACY_DEVICES += DGN3500B
496
497 define Device/WBMRA
498 IMAGE_SIZE := 31488k
499 DEVICE_DTS := WBMR
500 DEVICE_TITLE := Buffalo WBMR-HP-G300H (A) - WBMR
501 DEVICE_PACKAGES := kmod-usb-dwc2 kmod-ledtrig-usbdev \
502 kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
503 kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \
504 ltq-adsl-app ppp-mod-pppoa \
505 kmod-ath9k wpad-mini swconfig
506 endef
507 TARGET_DEVICES += WBMRA
508
509 define Device/WBMRB
510 IMAGE_SIZE := 31488k
511 DEVICE_DTS := WBMR
512 DEVICE_TITLE := Buffalo WBMR-HP-G300H (B) - WBMR
513 DEVICE_PACKAGES := kmod-usb-dwc2 kmod-ledtrig-usbdev \
514 kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
515 kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
516 ltq-adsl-app ppp-mod-pppoa \
517 kmod-ath9k wpad-mini swconfig
518 endef
519 TARGET_DEVICES += WBMRB
520
521 define Device/FRITZ7320
522 $(Device/AVM)
523 IMAGE_SIZE := 15744k
524 DEVICE_TITLE := 1&1 HomeServer - FRITZ7320
525 DEVICE_PACKAGES := kmod-ath9k wpad-mini \
526 kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
527 kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
528 ltq-adsl-app ppp-mod-pppoa \
529 kmod-ltq-deu-ar9 kmod-usb-dwc2 \
530 kmod-ath9k wpad-mini
531 endef
532 TARGET_DEVICES += FRITZ7320
533
534 define Device/H201L
535 IMAGE_SIZE := 7808k
536 DEVICE_TITLE := ZTE H201L - H201L
537 DEVICE_PACKAGES := kmod-ath9k-htc wpad-mini \
538 kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
539 kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
540 ltq-adsl-app ppp-mod-pppoe \
541 kmod-ltq-deu-ar9 kmod-usb-dwc2 kmod-ledtrig-usbdev \
542 kmod-ltq-tapi kmod-ltq-vmmc \
543 swconfig
544 endef
545 TARGET_DEVICES += H201L
546
547 define Device/P2601HNFX
548 IMAGE_SIZE := 15616k
549 DEVICE_TITLE := ZyXEL P-2601HN-Fx
550 DEVICE_PACKAGES := kmod-rt2800-usb wpad-mini \
551 kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
552 kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
553 ltq-adsl-app ppp-mod-pppoe \
554 kmod-ltq-deu-ar9 kmod-usb-dwc2 \
555 swconfig
556 endef
557 TARGET_DEVICES += P2601HNFX
558
559
560 endif
561
562
563 ifeq ($(SUBTARGET),xrx200)
564
565 # VR9
566
567 define Device/P2812HNUF1
568 $(Device/NAND)
569 DEVICE_TITLE := ZyXEL P-2812HNU-F1
570 DEVICE_PACKAGES := kmod-rt2800-pci wpad-mini kmod-usb-dwc2 kmod-ledtrig-usbdev
571 endef
572 TARGET_DEVICES += P2812HNUF1
573
574 define Device/P2812HNUF3
575 $(Device/NAND)
576 DEVICE_TITLE := ZyXEL P-2812HNU-F3
577 DEVICE_PACKAGES := kmod-rt2800-pci wpad-mini kmod-usb-dwc2
578 endef
579 TARGET_DEVICES += P2812HNUF3
580
581 define Device/ARV7519RW22
582 IMAGE_SIZE := 31232k
583 DEVICE_TITLE := Livebox Astoria ARV7519RW22
584 DEVICE_PACKAGES := kmod-usb-dwc2
585 endef
586 TARGET_DEVICES += ARV7519RW22
587
588 define Device/BTHOMEHUBV5A
589 $(Device/NAND)
590 DEVICE_TITLE := BT Home Hub 5A
591 DEVICE_PACKAGES := kmod-ath9k kmod-ath10k ath10k-firmware-qca988x wpad-mini kmod-usb-dwc2
592 endef
593 TARGET_DEVICES += BTHOMEHUBV5A
594
595 define Device/EASY80920NAND
596 $(Device/lantiqFullImage)
597 IMAGE_SIZE := 64512k
598 DEVICE_TITLE := Lantiq VR9 - EASY80920NAND
599 DEVICE_PACKAGES := kmod-ath9k wpad-mini kmod-usb-dwc2 kmod-ledtrig-usbdev
600 endef
601 TARGET_DEVICES += EASY80920NAND
602
603 define Device/EASY80920NOR
604 IMAGE_SIZE := 7936k
605 DEVICE_TITLE := Lantiq VR9 - EASY80920NOR
606 DEVICE_PACKAGES := kmod-ath9k wpad-mini kmod-usb-dwc2 kmod-ledtrig-usbdev
607 endef
608 TARGET_DEVICES += EASY80920NOR
609
610 define Device/FRITZ3370
611 $(Device/AVM)
612 $(Device/NAND)
613 DEVICE_TITLE := Fritz!Box WLan - FRITZ3370
614 DEVICE_PACKAGES := kmod-ath9k wpad-mini kmod-usb-dwc2
615 endef
616 TARGET_DEVICES += FRITZ3370
617
618 define Device/FRITZ7360SL
619 $(Device/AVM)
620 IMAGE_SIZE := 15744k
621 DEVICE_TITLE := 1&1 HomeServer - FRITZ7360SL
622 DEVICE_PACKAGES := kmod-ath9k wpad-mini kmod-usb-dwc2
623 endef
624 TARGET_DEVICES += FRITZ7360SL
625
626 Image/Prepare/Profile/VG3503J=$(call Image/Prepare/Template,VG3503J)
627 Image/BuildKernel/Profile/VG3503J=$(call Image/BuildKernelLoader/Template,VG3503J)
628 Image/Build/Profile/VG3503J=$(call Image/BuildLoader/$(1),$(1),VG3503J)
629
630 define LegacyDevice/VG3503J
631 DEVICE_TITLE := BT Openreak - ECI VDSL Modem
632 endef
633 LEGACY_DEVICES += VG3503J
634
635 include tp-link.mk
636
637 define Device/WBMR300
638 IMAGE_SIZE := 15616k
639 DEVICE_TITLE := Buffalo WBMR-300HPD
640 DEVICE_PACKAGES := kmod-mt76 wpad-mini kmod-usb-dwc2
641 endef
642 TARGET_DEVICES += WBMR300
643
644 define Device/VGV7510KW22NOR
645 IMAGE_SIZE := 15232k
646 DEVICE_TITLE := o2 Box 6431 / Arcadyan VGV7510KW22 (NOR)
647 DEVICE_PACKAGES := kmod-rt2800-pci wpad-mini kmod-usb-dwc2
648 endef
649 TARGET_DEVICES += VGV7510KW22NOR
650
651 define Device/VGV7510KW22BRN
652 $(Device/lantiqBrnImage)
653 IMAGE_SIZE := 7168k
654 SIGNATURE := 5D00008000
655 MAGIC := 0x12345678
656 CRC32_POLY := 0x2083b8ed
657 DEVICE_TITLE := o2 Box 6431 / Arcadyan VGV7510KW22 (BRN)
658 DEVICE_PACKAGES := kmod-rt2800-pci wpad-mini kmod-usb-dwc2
659 endef
660 TARGET_DEVICES += VGV7510KW22BRN
661
662 define Device/VGV7519NOR
663 IMAGE_SIZE := 15360k
664 DEVICE_TITLE := Experiabox 8 VGV7519
665 DEVICE_PACKAGES := kmod-rt2800-pci wpad-mini kmod-usb-dwc2
666 endef
667 TARGET_DEVICES += VGV7519NOR
668
669 define Device/VGV7519BRN
670 $(Device/lantiqBrnImage)
671 IMAGE_SIZE := 7168k
672 SIGNATURE := 5D00008000
673 MAGIC := 0x12345678
674 CRC32_POLY := 0x2083b8ed
675 DEVICE_TITLE := Experiabox 8 VGV7519 (BRN)
676 DEVICE_PACKAGES := kmod-rt2800-pci wpad-mini kmod-usb-dwc2
677 endef
678 TARGET_DEVICES += VGV7519BRN
679
680 endif
681
682 define Image/Prepare/Profile
683 $(call Image/Prepare/Profile/$(1))
684 endef
685
686 define Image/BuildKernel/Profile
687 $(call Image/BuildKernel/Profile/$(1))
688 endef
689
690 define Image/Build/Profile
691 $(call Image/Build/Profile/$(1),$(2))
692 endef
693
694 $(eval $(call BuildImage))