2 # Copyright (C) 2007 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 define Image/Build/Compex
9 $(call Image/Build/Loader,$(2),gz,0x80500000,0,y,$(2))
10 $(call Image/Build/TRX,$(call imgname,$(1),$(2)).trx,$(1),$(KDIR)/loader-$(2).gz)
13 define Image/Build/Edimax
14 $(call Image/Build/Loader,$(2),gz,0x80500000,0x6D8,y,$(2))
15 $(call Image/Build/TRXNoloader,$(call imgname,$(1),$(2)).trx,$(1))
16 $(STAGING_DIR_HOST)/bin/mkcsysimg -B $(2) -d -w \
17 -r $(KDIR)/loader-$(2).gz::8192 \
18 -x $(call imgname,$(1),$(2)).trx \
19 $(call imgname,$(1),$(2))-webui.bin
20 $(STAGING_DIR_HOST)/bin/mkcsysimg -B $(2) -d \
21 -r $(KDIR)/loader-$(2).gz::8192 \
22 -x $(call imgname,$(1),$(2)).trx \
23 $(call imgname,$(1),$(2))-xmodem.bin
24 rm -f $(call imgname,$(1),$(2)).trx
27 define Image/Build/Infineon
28 $(call Image/Build/Loader,$(2),gz,0x80500000,0x6D8,y,$(2))
29 $(call Image/Build/TRXNoloader,$(call imgname,$(1),$(2)).trx,$(1))
30 dd if=$(KDIR)/loader-$(2).gz of=$(call imgname,$(1),$(2)).img bs=64k conv=sync
31 cat $(call imgname,$(1),$(2)).trx >> $(call imgname,$(1),$(2)).img
34 define Image/Build/MyLoader
35 $(call Image/Build/Loader,$(2),gz,0x80500000,0)
36 $(call Image/Build/TRXNoloader,$(call imgname,$(1),$(2)).trx,$(1))
37 $(STAGING_DIR_HOST)/bin/mkmylofw -B $(2) \
38 -p0x20000:0x10000:ahp:0x80001000 \
40 -b0x20000:0x10000:h:$(KDIR)/loader-$(2).gz \
41 -b0x30000:0::$(call imgname,$(1),$(2)).trx \
42 $(call imgname,$(1),$(2)).bin
48 define Image/Build/Board/CAS771/Initramfs
49 $(call Image/Build/LZMAKernel/Admboot,cas-771,gz)
55 define Image/Build/Board/CAS771W/Initramfs
56 $(call Image/Build/LZMAKernel/Admboot,cas-771w,gz)
62 define Image/Build/Board/NP27G
63 $(call Image/Build/MyLoader,$(1),np27g)
66 define Image/Build/Board/NP27G/squashfs
67 $(call Image/Build/Board/NP27G,squashfs)
70 define Image/Build/Board/NP27G/jffs2-64k
71 $(call Image/Build/Board/NP27G,jffs2-64k)
74 define Image/Build/Board/NP27G/Initramfs
75 $(call Image/Build/LZMAKernel/Generic,np27g,bin)
81 define Image/Build/Board/NP28G
82 $(call Image/Build/MyLoader,$(1),np28g)
85 define Image/Build/Board/NP28G/squashfs
86 $(call Image/Build/Board/NP28G,squashfs)
89 define Image/Build/Board/NP28G/jffs2-64k
90 $(call Image/Build/Board/NP28G,jffs2-64k)
93 define Image/Build/Board/NP28G/Initramfs
94 $(call Image/Build/LZMAKernel/Generic,np28g,bin)
100 define Image/Build/Board/WP54G
101 $(call Image/Build/MyLoader,$(1),wp54g)
104 define Image/Build/Board/WP54G/squashfs
105 $(call Image/Build/Board/WP54G,squashfs)
108 define Image/Build/Board/WP54G/jffs2-64k
109 $(call Image/Build/Board/WP54G,jffs2-64k)
112 define Image/Build/Board/WP54G/Initramfs
113 $(call Image/Build/LZMAKernel/Generic,wp54g,bin)
119 define Image/Build/Board/WP54AG
120 $(call Image/Build/MyLoader,$(1),wp54ag)
123 define Image/Build/Board/WP54AG/squashfs
124 $(call Image/Build/Board/WP54AG,squashfs)
127 define Image/Build/Board/WP54AG/jffs2-64k
128 $(call Image/Build/Board/WP54AG,jffs2-64k)
131 define Image/Build/Board/WP54AG/Initramfs
132 $(call Image/Build/LZMAKernel/Generic,wp54ag,bin)
138 define Image/Build/Board/WPP54G
139 $(call Image/Build/MyLoader,$(1),wpp54g)
142 define Image/Build/Board/WPP54G/squashfs
143 $(call Image/Build/Board/WPP54G,squashfs)
146 define Image/Build/Board/WPP54G/jffs2-64k
147 $(call Image/Build/Board/WPP54G,jffs2-64k)
150 define Image/Build/Board/WPP54G/Initramfs
151 $(call Image/Build/LZMAKernel/Generic,wpp54g,bin)
157 define Image/Build/Board/WPP54AG
158 $(call Image/Build/MyLoader,$(1),wpp54ag)
161 define Image/Build/Board/WPP54AG/squashfs
162 $(call Image/Build/Board/WPP54AG,squashfs)
165 define Image/Build/Board/WPP54AG/jffs2-64k
166 $(call Image/Build/Board/WPP54AG,jffs2-64k)
169 define Image/Build/Board/WPP54AG/Initramfs
170 $(call Image/Build/LZMAKernel/Generic,wpp54ag,bin)
176 define Image/Build/Board/WP54GWRT
177 $(call Image/Build/Compex,$(1),wp54g-wrt)
180 define Image/Build/Board/WP54GWRT/squashfs
181 $(call Image/Build/Board/WP54GWRT,squashfs)
184 define Image/Build/Board/WP54GWRT/jffs2-64k
185 $(call Image/Build/Board/WP54GWRT,jffs2-64k)
188 define Image/Build/Board/WP54GWRT/Initramfs
189 $(call Image/Build/LZMAKernel/KArgs,wp54g-wrt,bin)
195 define Image/Build/Board/BR6104K
196 $(call Image/Build/Edimax,$(1),br-6104k)
199 define Image/Build/Board/BR6104K/squashfs
200 $(call Image/Build/Board/BR6104K,squashfs)
203 define Image/Build/Board/BR6104K/Initramfs
204 $(call Image/Build/LZMAKernel/Admboot,br-6104k,gz)
210 define Image/Build/Board/BR6104WG
211 $(call Image/Build/Edimax,$(1),br-6104wg)
214 define Image/Build/Board/BR6104WG/squashfs
215 $(call Image/Build/Board/BR6104WG,squashfs)
218 define Image/Build/Board/BR6104WG/Initramfs
219 $(call Image/Build/LZMAKernel/Admboot,br-6104wg,gz)
223 # Infineon EASY 83000
225 define Image/Build/Board/EASY83000
226 $(call Image/Build/Infineon,$(1),easy-83000)
229 define Image/Build/Board/EASY83000/squashfs
230 $(call Image/Build/Board/EASY83000,squashfs)
233 define Image/Build/Board/EASY83000/jffs2-64k
234 $(call Image/Build/Board/EASY83000,jffs2-64k)
237 define Image/Build/Board/EASY83000/Initramfs
238 $(call Image/Build/LZMAKernel/Admboot,easy-83000,gz)
244 define Image/Build/Board/RB1xx/Initramfs
245 $(CP) $(KDIR)/vmlinux.elf $(call imgname,netboot,rb1xx)
251 define Image/Build/Group/Cellvision
252 $(call Image/Build/Board/CAS771/$(1))
253 $(call Image/Build/Board/CAS771W/$(1))
256 define Image/Build/Group/WP54G
257 $(call Image/Build/Board/WP54G/$(1))
258 $(call Image/Build/Board/WP54AG/$(1))
259 $(call Image/Build/Board/WPP54G/$(1))
260 $(call Image/Build/Board/WPP54AG/$(1))
261 $(call Image/Build/Board/WP54GWRT/$(1))
264 define Image/Build/Group/Compex
265 $(call Image/Build/Board/NP27G/$(1))
266 $(call Image/Build/Board/NP28G/$(1))
268 $(call Image/Build/Group/WP54G,$(1))
271 define Image/Build/Group/Edimax
272 $(call Image/Build/Board/BR6104K/$(1))
273 $(call Image/Build/Board/BR6104WG/$(1))
276 define Image/Build/Group/Infineon
277 $(call Image/Build/Board/EASY83000/$(1))
280 define Image/Build/Group/All
281 $(call Image/Build/Group/Cellvision,$(1))
282 $(call Image/Build/Group/Compex,$(1))
283 $(call Image/Build/Group/Edimax,$(1))
284 $(call Image/Build/Group/Cellvision,$(1))
285 $(call Image/Build/Group/Infineon,$(1))
286 $(call Image/Build/Board/RB1xx/$(1))
292 define Image/Build/Profile/Generic
293 $(call Image/Build/Group/All,$(1))
296 define Image/Build/Profile/Atheros
297 $(call Image/Build/AllBoards,$(1))
300 define Image/Build/Profile/Texas
301 $(call Image/Build/AllBoards,$(1))
304 define Image/Build/Profile/Ralink
305 $(call Image/Build/AllBoards,$(1))
308 define Image/Build/Profile/WP54G
309 $(call Image/Build/Group/WP54G,$(1))
312 define Image/Build/Profile/NP27G
313 $(call Image/Build/Board/NP27G/$(1))
316 define Image/Build/Profile/NP28G
317 $(call Image/Build/Board/NP28G/$(1))
320 define Image/Build/Profile/CAS771
321 $(call Image/Build/Board/CAS771/$(1))
324 define Image/Build/Profile/CAS771W
325 $(call Image/Build/Board/CAS771W/$(1))
328 define Image/Build/Profile/BR6104KP
329 $(call Image/Build/Board/BR6104K/$(1))
332 define Image/Build/Profile/RouterBoard
333 $(call Image/Build/Board/RB1xx/$(1))
336 ifeq ($(PROFILE),RouterBoard)
337 define Image/cmdline/yaffs2
338 root=/dev/mtdblock3 rootfstype=yaffs2 init=/etc/preinit
341 define Image/BuildKernel/RouterBoard
342 $(CP) $(KDIR)/vmlinux.elf $(call imgname,kernel,rb1xx)
343 $(STAGING_DIR_HOST)/bin/patch-cmdline $(call imgname,kernel,rb1xx) \
344 '$(strip $(call Image/cmdline/yaffs2))'
347 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
348 define Image/BuildKernel
349 $(call Image/BuildKernel/RouterBoard)