generic: rtl8366rb: use correct bitmasks in sanity checks
[openwrt.git] / target / linux / adm5120 / image / router_le.mk
1 #
2 # Copyright (C) 2007-2009 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 define trxedimax/jffs2-128k
9 -a 0x20000 -f $(KDIR)/root.jffs2-128k
10 endef
11
12 define trxedimax/jffs2-64k
13 -a 0x10000 -f $(KDIR)/root.jffs2-64k
14 endef
15
16 define trxedimax/squashfs
17 -a 1024 -f $(KDIR)/root.squashfs
18 endef
19
20 define Image/Build/TRXEdimax
21 $(STAGING_DIR_HOST)/bin/trx -o $(1) -f $(KDIR)/vmlinux.lzma \
22 $(call trxedimax/$(2))
23 endef
24
25 define Image/Build/Compex
26 $(call Image/Build/Loader,$(2),gz,0x80500000,0,y,$(2))
27 $(call Image/Build/TRX,$(call imgname,$(1),$(2)).trx,$(1),$(KDIR)/loader-$(2).gz)
28 endef
29
30 define Image/Build/Edimax
31 $(call Image/Build/Loader,$(2),gz,0x80500000,0x6D8,y,$(2))
32 $(call Image/Build/TRXEdimax,$(call imgname,$(1),$(2)).trx,$(1))
33 $(STAGING_DIR_HOST)/bin/mkcsysimg -B $(2) -d -w \
34 -r $(KDIR)/loader-$(2).gz::0x1000 \
35 -x $(call imgname,$(1),$(2)).trx:0x10000 \
36 -x $(JFFS2MARK):0x10000 \
37 $(call imgname,$(1),$(2))-webui.bin
38 $(STAGING_DIR_HOST)/bin/mkcsysimg -B $(2) -d \
39 -r $(KDIR)/loader-$(2).gz::0x1000 \
40 -x $(call imgname,$(1),$(2)).trx:0x10000 \
41 -x $(JFFS2MARK):0x10000 \
42 $(call imgname,$(1),$(2))-xmodem.bin
43 rm -f $(call imgname,$(1),$(2)).trx
44 endef
45
46 define Image/Build/Osbridge
47 $(call Image/Build/Loader,$(2),gz,0x80500000,0x6D8,y,$(2))
48 $(call Image/Build/TRXEdimax,$(call imgname,$(1),$(2)).trx,$(1))
49 $(STAGING_DIR_HOST)/bin/mkcsysimg -B $(2) -d \
50 -r $(KDIR)/loader-$(2).gz::0x1000 \
51 -x $(call imgname,$(1),$(2)).trx:0x10000 \
52 -x $(JFFS2MARK):0x10000 \
53 $(call imgname,$(1),$(2))-firmware.bin
54 $(STAGING_DIR_HOST)/bin/osbridge-crc \
55 -i $(call imgname,$(1),$(2))-firmware.bin \
56 -o $(call imgname,$(1),$(2))-temp.bin
57 $(STAGING_DIR_HOST)/bin/pc1crypt \
58 -i $(call imgname,$(1),$(2))-temp.bin \
59 -o $(call imgname,$(1),$(2))-webui.bin
60 rm -f $(call imgname,$(1),$(2))-temp.bin
61 rm -f $(call imgname,$(1),$(2)).trx
62 endef
63
64 define Image/Build/Infineon
65 $(call Image/Build/Loader,$(2),gz,0x80500000,0x6D8,y,$(2))
66 $(call Image/Build/TRXNoloader,$(call imgname,$(1),$(2)).trx,$(1))
67 dd if=$(KDIR)/loader-$(2).gz of=$(call imgname,$(1),$(2)).img bs=64k conv=sync
68 cat $(call imgname,$(1),$(2)).trx >> $(call imgname,$(1),$(2)).img
69 endef
70
71 define Image/Build/Cellvision
72 $(call Image/Build/Loader,$(2),bin,0x80500000,0x6D8,y,$(3))
73 mkdir -p $(BIN_DIR)/tmp
74 cp $(KDIR)/loader-$(2).bin $(BIN_DIR)/tmp/vmlinux.bin
75 gzip -9 $(BIN_DIR)/tmp/vmlinux.bin
76 dd if=$(BIN_DIR)/tmp/vmlinux.bin.gz of=$(call imgname,$(1),$(2))-xmodem.bin bs=64k conv=sync
77 rm -rf $(BIN_DIR)/tmp
78 $(call Image/Build/TRXNoloader,$(call imgname,$(1),$(2)).trx,$(1))
79 cat $(call imgname,$(1),$(2)).trx >> $(call imgname,$(1),$(2))-xmodem.bin
80 $(STAGING_DIR_HOST)/bin/mkcasfw -B $(2) -d \
81 -K $(call imgname,$(1),$(2))-xmodem.bin \
82 $(call imgname,$(1),$(2))-webui.bin
83 endef
84
85 define Image/Build/Cellvision2
86 # only for CAS-700/771/790/861
87 $(call Image/Build/Loader,$(2),gz,0x80500000,0x6D8,y,$(3))
88 $(call Image/Build/TRXNoloader,$(call imgname,$(1),$(2)).trx,$(1))
89 dd if=$(KDIR)/loader-$(2).gz of=$(call imgname,$(1),$(2)).bin bs=64k conv=sync
90 cat $(call imgname,$(1),$(2)).trx >> $(call imgname,$(1),$(2)).bin
91 echo -ne '\x14\x07\x24\x06$(2)' | dd bs=14 count=1 conv=sync >> $(call imgname,$(1),$(2)).bin
92 echo -ne 'OpenWrt\x00\x00\x00' >> $(call imgname,$(1),$(2)).bin
93 endef
94
95 define Image/Build/MyLoader
96 $(call Image/Build/Loader,$(2),gz,0x80500000,0)
97 $(call Image/Build/TRXNoloader,$(call imgname,$(1),$(2)).trx,$(1))
98 $(STAGING_DIR_HOST)/bin/mkmylofw -B $(2) \
99 -p0x20000:0x10000:ahp:0x80001000 \
100 -p0x30000:0 \
101 -b0x20000:0x10000:h:$(KDIR)/loader-$(2).gz \
102 -b0x30000:0::$(call imgname,$(1),$(2)).trx \
103 $(call imgname,$(1),$(2)).bin
104 endef
105
106 #
107 # Cellvision CAS-630/630W, CAS-670/670W, NFS-101U/101WU, NFS-202U/202WU
108 #
109 define Image/Build/Template/Cellvision
110 $(call Image/Build/Cellvision,$(1),$(2),$(3))
111 endef
112
113 define Image/Build/Template/Cellvision/squashfs
114 $(call Image/Build/Template/Cellvision,squashfs,$(1),$(2))
115 endef
116
117 define Image/Build/Template/Cellvision/jffs2-64k
118 $(call Image/Build/Template/Cellvision,jffs2-64k,$(1),$(2))
119 endef
120
121 #
122 # Cellvision CAS-700/700W, CAS-771/771W, CAS-790, CAS-861/861W
123 #
124 define Image/Build/Template/Cellvision2
125 $(call Image/Build/Cellvision2,$(1),$(2),$(3))
126 endef
127
128 define Image/Build/Template/Cellvision2/squashfs
129 $(call Image/Build/Template/Cellvision2,squashfs,$(1),$(2))
130 endef
131
132 define Image/Build/Template/Cellvision2/jffs2-64k
133 $(call Image/Build/Template/Cellvision2,jffs2-64k,$(1),$(2))
134 endef
135
136 define Image/Build/Template/Cellvision2/Initramfs
137 $(call Image/Build/LZMAKernel/Cellvision,$(1),$(2),gz)
138 endef
139
140 #
141 # Compex NP27G, NP28G, WP54G, WP54AG, WPP54G, WPP54AG
142 #
143 define Image/Build/Template/Compex
144 $(call Image/Build/MyLoader,$(1),$(2))
145 endef
146
147 define Image/Build/Template/Compex/squashfs
148 $(call Image/Build/Template/Compex,squashfs,$(1))
149 endef
150
151 define Image/Build/Template/Compex/jffs2-64k
152 $(call Image/Build/Template/Compex,jffs2-64k,$(1))
153 endef
154
155 define Image/Build/Template/Compex/Initramfs
156 $(call Image/Build/LZMAKernel/Generic,$(1),bin)
157 endef
158
159 #
160 # Compex WP54G-WRT
161 #
162 define Image/Build/Template/WP54GWRT
163 $(call Image/Build/Compex,$(1),wp54g-wrt)
164 endef
165
166 define Image/Build/Template/WP54GWRT/squashfs
167 $(call Image/Build/Template/WP54GWRT,squashfs)
168 endef
169
170 define Image/Build/Template/WP54GWRT/jffs2-64k
171 $(call Image/Build/Template/WP54GWRT,jffs2-64k)
172 endef
173
174 define Image/Build/Template/WP54GWRT/Initramfs
175 $(call Image/Build/LZMAKernel/KArgs,wp54g-wrt,bin)
176 endef
177
178 #
179 # Edimax BR-6104K, BR-6104KP, BR-6104Wg, BR-6114WG
180 #
181 define Image/Build/Template/Edimax
182 $(call Image/Build/Edimax,$(1),$(2))
183 endef
184
185 define Image/Build/Template/Edimax/squashfs
186 $(call Image/Build/Template/Edimax,squashfs,$(1))
187 endef
188
189 define Image/Build/Template/Edimax/Initramfs
190 $(call Image/Build/LZMAKernel/Admboot,$(1),gz)
191 endef
192
193 #
194 # Infineon EASY 5120, EASY 83000
195 #
196 define Image/Build/Template/Infineon
197 $(call Image/Build/Infineon,$(1),$(2))
198 endef
199
200 define Image/Build/Template/Infineon/squashfs
201 $(call Image/Build/Template/Infineon,squashfs,$(1))
202 endef
203
204 define Image/Build/Template/Infineon/jffs2-64k
205 $(call Image/Build/Template/Infineon,jffs2-64k,$(1))
206 endef
207
208 define Image/Build/Template/Infineon/Initramfs
209 $(call Image/Build/LZMAKernel/Admboot,$(1),gz)
210 endef
211
212 #
213 # Generic EB-214A
214 #
215 define Image/Build/Template/Edimax/Initramfs
216 $(call Image/Build/LZMAKernel/Admboot,eb-214a,bin)
217 endef
218
219
220 #
221 # Mikrotik RouterBOARD 1xx
222 #
223 define Image/Build/Template/Mikrotik/Initramfs
224 $(CP) $(KDIR)/vmlinux.elf $(call imgname,netboot,rb1xx)
225 endef
226
227 #
228 # OSBRiDGE 5GXi/5XLi
229 #
230 define Image/Build/Template/Osbridge
231 $(call Image/Build/Osbridge,$(1),$(2))
232 endef
233
234 define Image/Build/Template/Osbridge/squashfs
235 $(call Image/Build/Template/Osbridge,squashfs,$(1))
236 endef
237
238 define Image/Build/Template/Osbridge/Initramfs
239 $(call Image/Build/LZMAKernel/Admboot,$(1),gz)
240 endef
241
242 #
243 # Profiles
244 #
245 define Image/Build/Profile/CAS630
246 $(call Image/Build/Template/Cellvision/$(1),cas-630,cas-630)
247 endef
248
249 define Image/Build/Profile/CAS630W
250 $(call Image/Build/Template/Cellvision/$(1),cas-630w,cas-630)
251 endef
252
253 define Image/Build/Profile/CAS670
254 $(call Image/Build/Template/Cellvision/$(1),cas-670,cas-670)
255 endef
256
257 define Image/Build/Profile/CAS670W
258 $(call Image/Build/Template/Cellvision/$(1),cas-670w,cas-670)
259 endef
260
261 define Image/Build/Profile/NFS101U
262 $(call Image/Build/Template/Cellvision/$(1),nfs-101u,nfs-101u)
263 $(call Image/Build/Template/Cellvision/$(1),dn-7013,nfs-101u)
264 $(call Image/Build/Template/Cellvision/$(1),dns-120,nfs-101u)
265 $(call Image/Build/Template/Cellvision/$(1),mu-5000fs,nfs-101u)
266 $(call Image/Build/Template/Cellvision/$(1),tn-u100,nfs-101u)
267 $(call Image/Build/Template/Cellvision/$(1),cg-nsadp,nfs-101u)
268 endef
269
270 define Image/Build/Profile/NFS101WU
271 $(call Image/Build/Template/Cellvision/$(1),nfs-101wu,nfs-101u)
272 $(call Image/Build/Template/Cellvision/$(1),dns-g120,nfs-101u)
273 endef
274
275 define Image/Build/Profile/CAS700
276 $(call Image/Build/Template/Cellvision2/$(1),cas-700,cas-700)
277 endef
278
279 define Image/Build/Profile/CAS700W
280 $(call Image/Build/Template/Cellvision2/$(1),cas-700w,cas-700)
281 endef
282
283 define Image/Build/Profile/CAS771
284 $(call Image/Build/Template/Cellvision2/$(1),cas-771,cas-771)
285 endef
286
287 define Image/Build/Profile/CAS771W
288 $(call Image/Build/Template/Cellvision2/$(1),cas-771w,cas-771)
289 endef
290
291 define Image/Build/Profile/CAS790
292 $(call Image/Build/Template/Cellvision2/$(1),cas-790,cas-790)
293 endef
294
295 define Image/Build/Profile/CAS861
296 $(call Image/Build/Template/Cellvision2/$(1),cas-861,cas-861)
297 endef
298
299 define Image/Build/Profile/CAS861W
300 $(call Image/Build/Template/Cellvision2/$(1),cas-861w,cas-861)
301 endef
302
303 define Image/Build/Profile/NP27G
304 $(call Image/Build/Template/Compex/$(1),np27g)
305 endef
306
307 define Image/Build/Profile/NP28G
308 $(call Image/Build/Template/Compex/$(1),np28g)
309 endef
310
311 define Image/Build/Profile/WP54
312 $(call Image/Build/Template/Compex/$(1),wp54g)
313 $(call Image/Build/Template/Compex/$(1),wp54ag)
314 $(call Image/Build/Template/Compex/$(1),wpp54g)
315 $(call Image/Build/Template/Compex/$(1),wpp54ag)
316 $(call Image/Build/Template/WP54GWRT/$(1))
317 endef
318
319 define Image/Build/Profile/BR6104K
320 $(call Image/Build/Template/Edimax/$(1),br-6104k)
321 endef
322
323 define Image/Build/Profile/BR6104KP
324 $(call Image/Build/Template/Edimax/$(1),br-6104kp)
325 endef
326
327 define Image/Build/Profile/BR6104WG
328 $(call Image/Build/Template/Edimax/$(1),br-6104wg)
329 endef
330
331 define Image/Build/Profile/BR6114WG
332 $(call Image/Build/Template/Edimax/$(1),br-6114wg)
333 endef
334
335 define Image/Build/Profile/EASY83000
336 $(call Image/Build/Template/Infineon/$(1),easy-83000)
337 endef
338
339 define Image/Build/Profile/EASY5120RT
340 $(call Image/Build/Template/Infineon/$(1),easy-5120-rt)
341 endef
342
343 define Image/Build/Profile/EASY5120PATA
344 $(call Image/Build/Template/Infineon/$(1),easy-5120p-ata)
345 endef
346
347 define Image/Build/Profile/PMUGW
348 $(call Image/Build/Template/Infineon/$(1),powerline-mugw)
349 endef
350
351 define Image/Build/Profile/5GXI
352 $(call Image/Build/Template/Osbridge/$(1),5gxi)
353 endef
354
355 define Image/Build/Profile/RouterBoard
356 $(call Image/Build/Template/Mikrotik/$(1))
357 endef
358
359 ifeq ($(CONFIG_BROKEN),y)
360 define Image/Build/Experimental
361 # Cellvison
362 $(call Image/Build/Profile/CAS630,$(1))
363 $(call Image/Build/Profile/CAS630W,$(1))
364 $(call Image/Build/Profile/CAS670,$(1))
365 $(call Image/Build/Profile/CAS670W,$(1))
366 $(call Image/Build/Profile/CAS700,$(1))
367 $(call Image/Build/Profile/CAS700W,$(1))
368 $(call Image/Build/Profile/CAS771,$(1))
369 $(call Image/Build/Profile/CAS771W,$(1))
370 $(call Image/Build/Profile/CAS861,$(1))
371 $(call Image/Build/Profile/CAS861W,$(1))
372 # Motorola
373 $(call Image/Build/Profile/PMUGW,$(1))
374 # OSBRiDGE
375 $(call Image/Build/Profile/5GXI,$(1))
376 endef
377 endif
378
379 define Image/Build/Profile/Generic
380 # Cellvision
381 $(call Image/Build/Profile/NFS101U,$(1))
382 $(call Image/Build/Profile/NFS101WU,$(1))
383 # Compex
384 $(call Image/Build/Profile/WP54,$(1))
385 $(call Image/Build/Profile/NP27G,$(1))
386 $(call Image/Build/Profile/NP28G,$(1))
387 # Edimax
388 $(call Image/Build/Profile/BR6104K,$(1))
389 $(call Image/Build/Profile/BR6104KP,$(1))
390 $(call Image/Build/Profile/BR6104WG,$(1))
391 $(call Image/Build/Profile/BR6114WG,$(1))
392 $(call Image/Build/Profile/EB214A,$(1))
393 # Infineon
394 $(call Image/Build/Profile/EASY83000,$(1))
395 $(call Image/Build/Profile/EASY5120RT,$(1))
396 $(call Image/Build/Profile/EASY5120PATA,$(1))
397 # Mikrotik
398 $(call Image/Build/Profile/RB1xx/$(1))
399
400 $(call Image/Build/Experimental,$(1))
401 endef
402
403 ifeq ($(PROFILE),RouterBoard)
404 define Image/cmdline/yaffs2
405 root=/dev/mtdblock3 rootfstype=yaffs2
406 endef
407
408 define Image/BuildKernel/RouterBoard
409 $(CP) $(KDIR)/vmlinux.elf $(call imgname,kernel,rb1xx)
410 $(STAGING_DIR_HOST)/bin/patch-cmdline $(call imgname,kernel,rb1xx) \
411 '$(strip $(call Image/cmdline/yaffs2))'
412 endef
413
414 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
415 define Image/BuildKernel
416 $(call Image/BuildKernel/RouterBoard)
417 endef
418 endif
419
420 endif
421
This page took 0.065067 seconds and 5 git commands to generate.