source: src/router/Makefile.ar531x @ 31667

Last change on this file since 31667 was 31667, checked in by brainslayer, 2 weeks ago

new squashfs

File size: 42.7 KB
Line 
1#
2# Broadcom Linux Router Makefile
3#
4# Copyright 2001-2003, Broadcom Corporation
5# All Rights Reserved.
6#
7# THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
8# KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
9# SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
10# FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
11#
12# $Id: Makefile,v 1.2 2005/09/26 11:06:58 seg Exp $
13#
14
15include .config
16ifneq ($(wildcard ../cy_conf.mak),)
17  include ../cy_conf.mak
18endif
19
20
21CONFIG_MUSL=y
22CONFIG_NOOPT=y
23
24#
25# Paths
26#
27OPENSER_MODULES := sl tm rr maxfwd usrloc registrar dbtext textops exec auth auth_db nathelper
28OPENSER_MODULE_FILES := $(foreach module,$(OPENSER_MODULES),openser/modules/$(module)/$(module).so)
29OPENSSL_NO_CIPHERS:= no-idea no-md2 no-mdc2 no-rc5 no-sha0 no-rmd160 no-aes192
30OPENSSL_OPTIONS:= shared no-ec no-err no-fips no-hw no-krb5 no-threads zlib-dynamic no-engines
31
32# Source bases
33
34export PLATFORM LINUXDIR LIBDIR USRLIBDIR
35export TOP := $(shell pwd)
36export SRCBASE := $(shell (cd $(TOP)/.. && pwd -P))
37
38
39# Set the HAL directory if you have the HAL sources
40
41# Set the Atheros Rate Control directory if you have the proprietary rate control
42export ATH_RATE=ath_rate/sample
43
44#
45# Cross-compile environment variables
46#
47
48# Build platform
49export BUILD := i386-pc-linux-gnu
50export HOSTCC := gcc
51
52# uClibc wrapper
53export ARCH:=$(PLATFORM)
54ifeq ($(CONFIG_UCLIBC),y)
55export PLATFORM := $(PLATFORM)-uclibc
56endif
57
58#export LINUXDIR := $(SRCBASE)/linux/linux.v24
59#ifeq ($(ARCH),mips)
60#export LINUXDIR := $(SRCBASE)/linux/ar531x/linux-2.6.22
61#endif
62ifeq ($(ARCH),armeb)
63export LINUXDIR := $(SRCBASE)/linux/xscale/linux-2.6.17
64endif
65ifeq ($(ARCH),powerpc)
66export LINUXDIR := $(SRCBASE)/linux/magicbox/linux-2.6.19
67endif
68ifeq ($(ARCH),mipsel)
69export LINUXDIR := $(SRCBASE)/kernel/rb500/linux-2.6.17-rc5
70endif
71ifeq ($(ARCH),i386)
72export LINUXDIR := $(SRCBASE)/kernel/wrap/linux-2.6.16.7
73endif
74
75export KERNELRELEASE = $(shell cat $(LINUXDIR)/include/config/kernel.release 2> /dev/null)
76
77#ifeq ($(KERNELRELEASE),"")
78#export KERNELRELEASE = $(shell cat $(LINUXDIR)/include/config/kernel.release 2> /dev/null)
79#endif
80#ifeq ($(PLATFORM),mipsel)
81#export CROSS_COMPILE := mipsel-linux-
82#export CONFIGURE := ./configure mipsel-linux --build=$(BUILD)
83#export TOOLCHAIN := $(shell cd $(dir $(shell which $(CROSS_COMPILE)gcc))/../mipsel-linux && pwd -P)
84#endif
85
86#ifeq ($(PLATFORM),mipsel-uclibc)
87export CROSS_COMPILE := $(ARCH)-linux-uclibc-
88export CONFIGURE := ./configure $(ARCH)-linux --build=$(BUILD)
89export TOOLCHAIN := $(shell cd $(dir $(shell which $(CROSS_COMPILE)gcc))/.. && pwd -P)
90#export STAGING_DIR := $(shell cd $(dir $(shell which $(CROSS_COMPILE)gcc))/.. && pwd -P)
91
92
93#endif
94
95#ifeq ($(CONFIG_BCMWPA2),y)
96#export CFLAGS += -DBCMWPA2
97#endif
98
99export BASEOPT:=-Os
100#export ARCH:= mipsel
101
102ifeq ($(ARCH),mipsel)
103export COPTS:=$(BASEOPT) -pipe -mips32 -mtune=mips32 -funit-at-a-time
104endif
105ifeq ($(ARCH),armeb)
106export COPTS:=$(BASEOPT) -pipe -mtune=xscale -march=armv5te -Wa,-mcpu=xscale -mno-thumb-interwork -mno-thumb -funit-at-a-time
107endif
108ifeq ($(ARCH),mips)
109ifeq ($(ARCHITECTURE),pb42)
110export COPTS:=$(BASEOPT) -pipe -mips32 -mtune=mips32 -funit-at-a-time
111else
112export COPTS:=$(BASEOPT) -pipe -mips32 -mtune=mips32 -funit-at-a-time -DHAVE_AR531X
113endif
114endif
115ifeq ($(ARCH),powerpc)
116export COPTS:=$(BASEOPT) -pipe -funit-at-a-time -mcpu=405fp -mtune=405fp -mmultiple -mstring -mno-bit-align
117endif
118ifeq ($(ARCH),i386)
119export COPTS:=$(BASEOPT) -pipe -march=i486 -funit-at-a-time
120endif
121
122export CC := ccache $(CROSS_COMPILE)gcc
123export CXX := ccache $(CROSS_COMPILE)g++
124export AR := $(CROSS_COMPILE)ar
125export AS := $(CROSS_COMPILE)as
126export LD := $(CROSS_COMPILE)ld
127export NM := $(CROSS_COMPILE)nm
128export RANLIB := $(CROSS_COMPILE)ranlib
129export STRIP := $(CROSS_COMPILE)strip
130export SIZE := $(CROSS_COMPILE)size
131#export MIPS16_OPT:= -minterlink-mips16 -mips16
132
133export CFLAGS := $(COPTS)
134
135#
136# Install and target directories
137#
138
139export PLATFORMDIR := $(TOP)/$(PLATFORM)
140export INSTALLDIR := $(PLATFORMDIR)/install
141export TARGETDIR := $(PLATFORMDIR)/target
142
143ifeq ($(PLATFORM),mipsel)
144obj-y += libcrypto
145endif
146#
147# Configuration
148#
149CONFIG_IPTABLES=y
150include rules/configs.mk
151
152obj-clean := $(foreach obj,$(obj-y) $(obj-n) $(obj-m),$(obj)-clean)
153obj-install := $(foreach obj,$(obj-y) $(obj-m),$(obj)-install)
154obj-distclean := $(foreach obj,$(obj-y) $(obj-n),$(obj)-distclean)
155
156#
157# Basic rules
158#
159
160
161all: install_headers build_date clean_target $(obj-y) $(obj-m) $(LINUXDIR)/.config kernel
162
163
164build_date:
165        echo "#define BUILD_DATE \"$(shell date +%D)\"" > ../../opt/build.h
166        echo "HOSTAPDVERSION=20120910" >> .config
167        echo "CONFIG_MUSL=y" >> .config
168
169drop-sections   = .comment
170strip-flags     = $(addprefix --remove-section=,$(drop-sections))
171
172include kernel-features.mk
173
174kernel:
175        # Also build kernel
176        # Also build kernel
177ifeq ($(CONFIG_CA8),y)
178        cp $(LINUXDIR)/.config_ca8pro $(LINUXDIR)/.config
179else
180ifeq ($(CONFIG_LS5),y)
181        cp $(LINUXDIR)/.config_ca8 $(LINUXDIR)/.config
182else
183ifeq ($(CONFIG_TW6600_INITRD),y)
184        cp $(LINUXDIR)/.config_initrd $(LINUXDIR)/.config
185else
186ifeq ($(CONFIG_TW6600),y)
187###das ist ne config mit PRINTK=Y args (ja und. ich debugge manchmal gerne)
188        cp $(LINUXDIR)/.config_tw6660 $(LINUXDIR)/.config
189else
190        cp $(LINUXDIR)/.config_generic $(LINUXDIR)/.config
191endif
192endif
193endif
194endif
195ifeq ($(CONFIG_CA8PRO),y)
196        cp $(LINUXDIR)/.config_ca8pro $(LINUXDIR)/.config
197endif
198ifeq ($(CONFIG_RCAA01),y)
199        cp $(LINUXDIR)/.config_rcaa01 $(LINUXDIR)/.config
200endif
201ifeq ($(CONFIG_RDAT81),y)
202        cp $(LINUXDIR)/.config_ca8pro $(LINUXDIR)/.config
203endif
204ifeq ($(CONFIG_FONERA2200),y)
205        cp $(LINUXDIR)/.config_generic_selfmap_vlan $(LINUXDIR)/.config
206endif
207ifeq ($(CONFIG_DIR300),y)
208        cp $(LINUXDIR)/.config_dir300 $(LINUXDIR)/.config
209endif
210ifeq ($(CONFIG_DIR400),y)
211        cp $(LINUXDIR)/.config_dir400 $(LINUXDIR)/.config
212endif
213ifeq ($(CONFIG_LS2),y)
214        cp $(LINUXDIR)/.config_generic_selfmap $(LINUXDIR)/.config
215endif
216ifeq ($(CONFIG_DLM101),y)
217        cp $(LINUXDIR)/.config_generic_selfmap $(LINUXDIR)/.config
218endif
219ifeq ($(CONFIG_WRT54G2),y)
220        cp $(LINUXDIR)/.config_generic_selfmap $(LINUXDIR)/.config
221endif
222ifeq ($(CONFIG_RTG32),y)
223        cp $(LINUXDIR)/.config_g32 $(LINUXDIR)/.config
224endif
225ifeq ($(CONFIG_MERAKI),y)
226        cp $(LINUXDIR)/.config_generic_selfmap $(LINUXDIR)/.config
227endif
228ifeq ($(CONFIG_MR3202A),y)
229        cp $(LINUXDIR)/.config_generic_selfmap $(LINUXDIR)/.config
230endif
231ifeq ($(CONFIG_WPE53G),y)
232        cp $(LINUXDIR)/.config_generic_selfmap $(LINUXDIR)/.config
233endif
234ifeq ($(CONFIG_NP25G),y)
235        cp $(LINUXDIR)/.config_generic_selfmap $(LINUXDIR)/.config
236endif
237ifeq ($(CONFIG_MR3201A),y)
238        cp $(LINUXDIR)/.config_generic_selfmap $(LINUXDIR)/.config
239endif
240ifeq ($(CONFIG_GWMF54G2),y)
241        cp $(LINUXDIR)/.config_generic_selfmap_pp $(LINUXDIR)/.config
242endif
243ifeq ($(CONFIG_WRK54G),y)
244        cp $(LINUXDIR)/.config_micro_wrk $(LINUXDIR)/.config
245endif
246ifeq ($(CONFIG_WHRAG108),y)
247        cp $(LINUXDIR)/.config_whr $(LINUXDIR)/.config
248endif
249ifeq ($(CONFIG_USR5453),y)
250        cp $(LINUXDIR)/.config_usr5453 $(LINUXDIR)/.config
251endif
252ifeq ($(CONFIG_EOC2610),y)
253        cp $(LINUXDIR)/.config_eoc2610 $(LINUXDIR)/.config
254endif
255ifeq ($(CONFIG_EOC1650),y)
256        cp $(LINUXDIR)/.config_eoc2610 $(LINUXDIR)/.config
257endif
258ifeq ($(CONFIG_EAP3660),y)
259        cp $(LINUXDIR)/.config_eoc2610 $(LINUXDIR)/.config
260endif
261ifeq ($(CONFIG_EOC5610),y)
262        cp $(LINUXDIR)/.config_eoc5610 $(LINUXDIR)/.config
263endif
264ifeq ($(CONFIG_SOLO51),y)
265        cp $(LINUXDIR)/.config_eoc5610 $(LINUXDIR)/.config
266endif
267
268
269        $(kernelfeatures)
270ifeq ($(CONFIG_SWCONFIG),y)
271        echo CONFIG_AR8216_PHY=y >> $(LINUXDIR)/.config
272        sed -i 's/\CONFIG_SWCONFIG=y/# CONFIG_SWCONFIG is not set/g' $(LINUXDIR)/.config
273#       echo CONFIG_KALLSYMS=y >> $(LINUXDIR)/.config
274else
275        echo "# CONFIG_AR8216_PHY is not set" >> $(LINUXDIR)/.config
276endif
277
278        $(MAKE) -C $(LINUXDIR) oldconfig       
279        if ! grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
280            $(MAKE) -j 4 -C $(LINUXDIR) vmlinux CROSS_COMPILE="ccache $(ARCH)-linux-uclibc-" ; \
281        fi
282        if grep -q "CONFIG_MODULES=y" $(LINUXDIR)/.config ; then \
283            $(MAKE) -j 4 -C $(LINUXDIR) modules CROSS_COMPILE="ccache $(ARCH)-linux-uclibc-" ; \
284        fi
285
286        $(ARCH)-linux-objcopy -O binary $(LINUXDIR)/vmlinux $(ARCH)-uclibc/vmlinus_old
287
288        $(MAKE) -C $(LINUXDIR) modules_install DEPMOD=/bin/true INSTALL_MOD_PATH=$(TARGETDIR)
289#       -$(MAKE) -f Makefile.ar531x ath9k
290#       -$(MAKE) -f Makefile.ar531x ath9k-install
291        -$(MAKE) -f Makefile.ar531x libutils
292        -$(MAKE) -f Makefile.ar531x madwifi
293        -$(MAKE) -f Makefile.ar531x madwifi-install
294        -$(MAKE) -f Makefile.ar531x batman-adv
295        -$(MAKE) -f Makefile.ar531x batman-adv-install
296        -$(MAKE) -f Makefile.ar531x opendpi
297        -$(MAKE) -f Makefile.ar531x opendpi-install
298        -$(MAKE) -f Makefile.ar531x uniwip-gpio
299        -$(MAKE) -f Makefile.ar531x uniwip-gpio-install
300
301        rm -f $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/build
302        rm -f $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/source
303
304ifneq ($(CONFIG_SAMBA),y)
305        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/cifs
306        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/nfs
307endif
308ifneq ($(CONFIG_JFFS2),y)
309        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/jffs2
310        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/lib/lzma
311        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/lib/lzo
312endif
313ifneq ($(CONFIG_MMC),y)
314        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/ext2
315endif
316ifneq ($(CONFIG_SAMBA),y)
317        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/cifs
318endif
319ifneq ($(CONFIG_JFFS2),y)
320        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/jffs2
321        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/lib/lzma
322endif
323ifneq ($(CONFIG_IPV6),y)
324        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/net/ipv6
325endif
326ifneq ($(CONFIG_BONDING),y)
327        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/drivers/net/bonding
328endif
329ifneq ($(CONFIG_USBIP),y)
330        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/drivers/staging/usbip
331endif
332ifneq ($(CONFIG_USB),y)
333        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/ext2
334        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/ext3
335        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/xfs
336        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/jbd
337        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/fat
338        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/vfat
339        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/msdos
340        rm -f $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/mbcache.ko
341endif
342ifneq ($(CONFIG_USB_ADVANCED),y)
343        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/ext3
344        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/ext4
345        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/xfs
346        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/btrfs
347        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/jbd 
348        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/jbd2
349endif
350        find $(ARCH)-uclibc/install $(ARCH)-uclibc/target  -name \*.ko | \
351                xargs $(ARCH)-linux-nm | \
352                awk '$$1 == "U" { print $$2 } ' | \
353                sort -u > $(LINUXDIR)/mod_symtab.txt
354        $(ARCH)-linux-nm -n $(LINUXDIR)/vmlinux.o | grep ' r __ksymtab' | sed -e 's,........ r __ksymtab_,,' > $(LINUXDIR)/kernel_symtab.txt
355        $(ARCH)-linux-nm -n $(LINUXDIR)/vmlinux.o | grep ' R __ksymtab' | sed -e 's,........ R __ksymtab_,,' >> $(LINUXDIR)/kernel_symtab.txt
356        grep -f $(LINUXDIR)/mod_symtab.txt $(LINUXDIR)/kernel_symtab.txt -F > $(LINUXDIR)/sym_include.txt
357        grep -vf $(LINUXDIR)/mod_symtab.txt $(LINUXDIR)/kernel_symtab.txt -F > $(LINUXDIR)/sym_exclude.txt
358        ( \
359                echo '#define SYMTAB_KEEP \'; \
360                cat $(LINUXDIR)/sym_include.txt | \
361                        awk '{print "KEEP(*(___ksymtab+" $$$$1 ")) \\" }'; \
362                echo; \
363                echo '#define SYMTAB_KEEP_GPL \'; \
364                cat $(LINUXDIR)/sym_include.txt | \
365                        awk '{print "KEEP(*(___ksymtab_gpl+" $$$$1 ")) \\" }'; \
366                echo; \
367                echo '#define SYMTAB_DISCARD \'; \
368                cat $(LINUXDIR)/sym_exclude.txt | \
369                        awk '{print "*(___ksymtab+" $$$$1 ") \\" }'; \
370                echo; \
371                echo '#define SYMTAB_DISCARD_GPL \'; \
372                cat $(LINUXDIR)/sym_exclude.txt | \
373                        awk '{print "*(___ksymtab_gpl+" $$$$1 ") \\" }'; \
374                echo; \
375        ) > $(LINUXDIR)/symtab.h
376
377        if ! grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
378            $(MAKE) -j 4 -C $(LINUXDIR) vmlinux EXTRA_LDSFLAGS="-I$(LINUXDIR) -include symtab.h" CROSS_COMPILE="ccache $(ARCH)-linux-uclibc-" ; \
379        fi
380
381        $(ARCH)-linux-objcopy -O binary $(LINUXDIR)/vmlinux $(ARCH)-uclibc/vmlinus
382        cat $(ARCH)-uclibc/vmlinus | lzma e -si -so -eos -lc1 -lp2 -pb2 > lzma-loader/whrag108/vmlinux.lzma
383        cat $(ARCH)-uclibc/vmlinus | lzma e -si -so -eos -lc1 -lp2 -pb2 > lzma-loader/aw6600/vmlinux.lzma
384        cat $(ARCH)-uclibc/vmlinus | lzma e -si -so -eos -lc1 -lp2 -pb2 > lzma-loader/meraki/vmlinux.lzma
385        cat $(ARCH)-uclibc/vmlinus | lzma e -si -so -eos -lc1 -lp2 -pb2 > lzma-loader/ls5/vmlinux.lzma
386        cat $(ARCH)-uclibc/vmlinus | lzma e -si -so -eos -lc1 -lp2 -pb2 > lzma-loader/ca8pro/vmlinux.lzma
387        cat $(ARCH)-uclibc/vmlinus | lzma e -si -so -eos -lc1 -lp2 -pb2 > lzma-loader/bwrg1000/vmlinux.lzma
388        make -C lzma-loader/rt32g clean
389        make -C lzma-loader/rt32g
390        make -C lzma-loader/whrag108 clean
391        make -C lzma-loader/whrag108
392        make -C lzma-loader/meraki clean
393        make -C lzma-loader/meraki
394        make -C lzma-loader/aw6600 clean
395        make -C lzma-loader/aw6600
396        make -C lzma-loader/ls5 clean
397        make -C lzma-loader/ls5
398        make -C lzma-loader/ca8pro clean
399        make -C lzma-loader/ca8pro
400        make -C lzma-loader/bwrg1000 clean
401        make -C lzma-loader/bwrg1000
402        cp lzma-loader/bwrg1000/lzma.elf $(ARCH)-uclibc/bwrg1000_linux.elf
403#       $(ARCH)-linux-objcopy -O binary $(strip-flags) $(ARCH)-uclibc/bwrg1000_linux.elf $(ARCH)-uclibc/lzma_vmlinus.m
404
405        cp lzma-loader/rt32g/lzma.elf $(ARCH)-uclibc/lzma_vmlinux_rt32g
406        $(ARCH)-linux-objcopy -O binary $(ARCH)-uclibc/lzma_vmlinux_rt32g $(ARCH)-uclibc/lzma_vmlinus_rt32g
407
408
409        cp lzma-loader/meraki/lzma.elf $(ARCH)-uclibc/lzma_vmlinux_meraki
410        $(ARCH)-linux-objcopy -O binary $(strip-flags) $(ARCH)-uclibc/lzma_vmlinux_meraki $(ARCH)-uclibc/lzma_vmlinus.m
411        cp lzma-loader/whrag108/lzma.elf $(ARCH)-uclibc/lzma_vmlinux
412        $(ARCH)-linux-objcopy -O binary $(strip-flags) $(ARCH)-uclibc/lzma_vmlinux $(ARCH)-uclibc/lzma_vmlinus
413        cp lzma-loader/ca8pro/lzma.elf $(ARCH)-uclibc/lzma_vmlinux
414        $(ARCH)-linux-objcopy -O binary $(strip-flags) $(ARCH)-uclibc/lzma_vmlinux $(ARCH)-uclibc/lzma_vmlinusca8pro
415        cp lzma-loader/aw6600/lzma.elf $(ARCH)-uclibc/lzma_vmlinuxaw
416        $(ARCH)-linux-objcopy -O binary $(strip-flags) $(ARCH)-uclibc/lzma_vmlinuxaw $(ARCH)-uclibc/lzma_vmlinusaw
417        cp lzma-loader/aw6600/lzma.elf $(ARCH)-uclibc/lzma_vmlinuxls5
418        $(ARCH)-linux-objcopy -O binary $(strip-flags) $(ARCH)-uclibc/lzma_vmlinuxls5 $(ARCH)-uclibc/lzma_vmlinusls5
419
420
421
422        # make overtake image
423        $(ARCH)-linux-objcopy -O binary $(strip-flags) lzma-loader/vmlinux $(ARCH)-uclibc/vmlinus_initrd
424        cat $(ARCH)-uclibc/vmlinus_initrd | lzma e -si -so -eos -lc1 -lp2 -pb2 > lzma-loader/aw6600/vmlinux.lzma
425        make -C lzma-loader/aw6600 clean
426        make -C lzma-loader/aw6600
427        cp lzma-loader/aw6600/lzma.elf $(ARCH)-uclibc/lzma_vmlinuxaw_initrd
428        $(ARCH)-linux-objcopy -O binary $(strip-flags) $(ARCH)-uclibc/lzma_vmlinuxaw_initrd $(ARCH)-uclibc/lzma_vmlinusaw_initrd
429
430
431install_headers:
432# important step, required for new kernels
433        -mkdir -p $(TOP)/kernel_headers/$(KERNELRELEASE)
434        $(MAKE) -C $(LINUXDIR) headers_install ARCH=mips INSTALL_HDR_PATH=$(TOP)/kernel_headers/$(KERNELRELEASE)
435
436
437       
438realclean: $(obj-clean)
439        rm -f .config.old .config.cmd
440        #umount $(TARGETDIR)
441        rm -rf $(INSTALLDIR)
442        rm -rf $(TARGETDIR)
443        rm -f $(TARGETDIR)/*
444        -rm -f $(ARCH)-uclibc/*
445
446       
447clean: rc-clean httpd-clean services-clean shared-clean libutils-clean madwifi-clean madwifi_mimo-clean busybox-clean dnsmasq-clean iptables-clean pppd-clean nvram-clean utils-clean radauth-clean  upnp-clean iproute2-clean
448        rm -f .config.old .config.cmd
449        #umount $(TARGETDIR)
450        rm -rf $(INSTALLDIR)
451        rm -rf $(TARGETDIR)
452        rm -f $(TARGETDIR)/*
453        -rm -f $(ARCH)-uclibc/*
454
455clean_target:
456        #umount $(TARGETDIR)
457        rm -rf $(TARGETDIR)
458        rm -rf $(INSTALLDIR)
459        rm -rf $(INSTALLDIR)
460#       rm -f $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.squashfs
461
462distclean mrproper: $(obj-distclean) clean_target
463        rm -rf $(INSTALLDIR)
464        $(MAKE) -C $(LINUXDIR) distclean
465        $(MAKE) -C $(LINUXDIR)/arch/mips/bcm947xx/compressed clean
466        #rm -f $(PLATFORMDIR)/zImage $(PLATFORMDIR)/linux.bin
467        $(MAKE) -C config clean
468        rm -f .config $(LINUXDIR)/.config
469        rm -f .config.old .config.cmd
470
471optimize-lib:
472ifneq ($(CONFIG_MUSL),y)
473        cp ${shell $(ARCH)-linux-gcc -print-file-name=libc.so.0} $(ARCH)-uclibc/target/lib/libc.so.0
474else
475        cp ${shell $(ARCH)-linux-gcc -print-file-name=libc.so} $(ARCH)-uclibc/target/lib/libc.so
476#       cp ${shell $(ARCH)-linux-gcc -print-file-name=libc.a} $(ARCH)-uclibc/target/lib/libc_pic.a
477endif
478ifneq ($(CONFIG_MUSL),y)
479        cp ${shell $(ARCH)-linux-gcc -print-file-name=ld-uClibc.so.0} $(ARCH)-uclibc/target/lib/ld-uClibc.so.0
480else
481        cd $(ARCH)-uclibc/target/lib && ln -sf libc.so ld-musl-mips-sf.so.1
482endif
483ifeq ($(CONFIG_LIBDL),y)
484        -cp ${shell $(ARCH)-linux-gcc -print-file-name=libdl.so.0} $(ARCH)-uclibc/target/lib/libdl.so.0
485endif
486ifeq ($(CONFIG_LIBRT),y)
487        -cp ${shell $(ARCH)-linux-gcc -print-file-name=librt.so.0} $(ARCH)-uclibc/target/lib/librt.so.0
488endif
489ifeq ($(CONFIG_LIBNSL),y)
490        -cp ${shell $(ARCH)-linux-gcc -print-file-name=libnsl.so.0} $(ARCH)-uclibc/target/lib/libnsl.so.0
491endif
492ifeq ($(CONFIG_LIBUTIL),y)
493        -cp ${shell $(ARCH)-linux-gcc -print-file-name=libutil.so.0} $(ARCH)-uclibc/target/lib/libutil.so.0
494endif
495ifeq ($(CONFIG_LIBCPP),y)
496        -cp ${shell $(ARCH)-linux-gcc -print-file-name=libstdc++.so.6} $(ARCH)-uclibc/target/lib/libstdc++.so.6
497endif
498ifeq ($(CONFIG_LIBCRYPT),y)
499        -cp ${shell $(ARCH)-linux-gcc -print-file-name=libcrypt.so.0} $(ARCH)-uclibc/target/lib/libcrypt.so.0
500endif
501ifeq ($(CONFIG_LIBM),y)
502        -cp ${shell $(ARCH)-linux-gcc -print-file-name=libm.so.0} $(ARCH)-uclibc/target/lib/libm.so.0
503endif
504ifeq ($(CONFIG_LIBRESOLV),y)
505        -cp ${shell $(ARCH)-linux-gcc -print-file-name=libresolv.so.0} $(ARCH)-uclibc/target/lib/libresolv.so.0
506endif
507ifeq ($(CONFIG_LIBPTHREAD),y)
508        -cp ${shell $(ARCH)-linux-gcc -print-file-name=libpthread.so.0} $(ARCH)-uclibc/target/lib/libpthread.so.0
509endif
510#       cp ${shell $(ARCH)-linux-gcc -print-file-name=libc.so.0} $(ARCH)-uclibc/target/lib/libc.so.0
511        -cp ${shell $(ARCH)-linux-gcc -print-file-name=libgcc_s.so.1} $(ARCH)-uclibc/target/lib/libgcc_s.so.1
512
513ifneq ($(CONFIG_NOOPT),y)
514        rm -rf /tmp/$(ARCHITECTURE)/mklibs-out
515        rm -f /tmp/$(ARCHITECTURE)/mklibs-progs
516        -mkdir -p /tmp/$(ARCHITECTURE)/
517        find $(TARGETDIR) -type f -perm /100 -exec \
518                file -r -N -F '' {} + | \
519                awk ' /executable.*dynamically/ { print $$1 }' > /tmp/$(ARCHITECTURE)/mklibs-progs
520
521        find $(TARGETDIR) -type f -name \*.so\* -exec \
522                file -r -N -F '' {} + | \
523                awk ' /shared object/ { print $$1 }' >> /tmp/$(ARCHITECTURE)/mklibs-progs
524
525        mkdir -p /tmp/$(ARCHITECTURE)/mklibs-out
526ifneq ($(CONFIG_MUSL),y)
527        mklibs.py -D \
528                -d /tmp/$(ARCHITECTURE)/mklibs-out \
529                --sysroot $(TARGETDIR) \
530                -L /lib \
531                -L /usr/lib \
532                --ldlib /lib/ld-uClibc.so.0 \
533                --target $(ARCH)-linux-uclibc \
534                `cat /tmp/$(ARCHITECTURE)/mklibs-progs` 2>&1
535else
536        mklibs.py -D \
537                -d /tmp/$(ARCHITECTURE)/mklibs-out \
538                --sysroot $(TARGETDIR) \
539                -L /lib \
540                -L /usr/lib \
541                --ldlib /lib/ld-musl-mips-sf.so.1 \
542                --target $(ARCH)-linux-uclibc \
543                `cat /tmp/$(ARCHITECTURE)/mklibs-progs` 2>&1
544
545endif
546
547        cp /tmp/$(ARCHITECTURE)/mklibs-out/* $(TARGETDIR)/lib
548else
549#       cp ${shell $(ARCH)-linux-gcc -print-file-name=libc.so.0} $(ARCH)-uclibc/target/lib/libc.so.0
550#       cp ${shell $(ARCH)-linux-gcc -print-file-name=libuClibc-0.99.33.2.so}  $(ARCH)-uclibc/target/lib/libc.so.0
551#       relink-lib.sh \
552#               "$(ARCH)-linux-" \
553#               "${shell $(ARCH)-linux-gcc -print-file-name=libc_so.a}" \
554#               "${shell $(ARCH)-linux-gcc -print-file-name=libc_so.a}" \
555#               "$(ARCH)-uclibc/target/lib/libc.so.0" \
556#               -Wl,-init,__uClibc_init -Wl,-soname=libc.so.0 \
557#               ${shell $(ARCH)-linux-gcc -print-file-name=libgcc_s.so.1}
558
559ifneq ($(CONFIG_MUSL),y)
560
561        relink-lib.sh \
562                "$(ARCH)-linux-" \
563                "${shell $(ARCH)-linux-gcc -print-file-name=libcrypt.so}" \
564                "${shell $(ARCH)-linux-gcc -print-file-name=libcrypt_pic.a}" \
565                "$(ARCH)-uclibc/target/lib/libcrypt.so.0" \
566                ${shell $(ARCH)-linux-gcc -print-file-name=libgcc_s.so.1} \
567                -Wl,-soname=libcrypt.so.0
568
569        relink-lib.sh \
570                "$(ARCH)-linux-" \
571                "${shell $(ARCH)-linux-gcc -print-file-name=libm.so}" \
572                "${shell $(ARCH)-linux-gcc -print-file-name=libm_pic.a}" \
573                "$(ARCH)-uclibc/target/lib/libm.so.0" \
574                ${shell $(ARCH)-linux-gcc -print-file-name=libgcc_s.so.1} \
575                -Wl,-soname=libm.so.0
576
577        relink-lib.sh \
578                "$(ARCH)-linux-" \
579                "${shell $(ARCH)-linux-gcc -print-file-name=libpthread.so.0}" \
580                "${shell $(ARCH)-linux-gcc -print-file-name=libpthread_so.a}" \
581                "$(ARCH)-uclibc/target/lib/libpthread.so.0" \
582                -Wl,-z,nodelete,-z,initfirst,-init=__pthread_initialize_minimal_internal \
583                ${shell $(ARCH)-linux-gcc -print-file-name=libgcc_s.so.1} \
584                -Wl,-soname=libpthread.so.0
585endif
586endif
587
588        rm -f $(TARGETDIR)/lib/*.a
589        rm -f $(TARGETDIR)/lib/*.map
590#       cp lib.$(ARCH)/libresolv.so.0 $(TARGETDIR)/lib
591#       cp lib.$(ARCH)/libgcc_s.so.1 $(TARGETDIR)/lib
592
593
594install package: clean_target $(filter-out lib.$(ARCH)-install,$(obj-install)) $(LINUXDIR)/.config
595        install -d $(TARGETDIR)
596        install -d $(ARCH)-uclibc/modules
597        for dir in $(wildcard $(patsubst %,$(INSTALLDIR)/%,$(obj-y))) ; do \
598            (cd $${dir} && tar cpf - .) | (cd $(TARGETDIR) && tar xpf -) \
599        done
600        for dir in $(wildcard $(patsubst %,%,$(obj-m))) ; do \
601            (cd $(INSTALLDIR)/$${dir} && tar -cvvzf $(TOP)/$(ARCH)-uclibc/modules/$${dir}.tar.gz .) \
602        done
603        mkdir -p $(ARCH)-uclibc/target/etc/config
604        mkdir -p $(ARCH)-uclibc/target/etc/kaid
605        mkdir -p $(ARCH)-uclibc/target/etc/langpack
606        cp ./opt/bin/ipkg $(ARCH)-uclibc/target/bin
607        cd  $(ARCH)-uclibc/target/lib
608        cp ./opt/etc/preinit $(ARCH)-uclibc/target/etc
609        cp ./opt/etc/postinit $(ARCH)-uclibc/target/etc
610        cp ./opt/etc/ipkg.conf $(ARCH)-uclibc/target/etc
611        cp ./opt/etc/config/* $(ARCH)-uclibc/target/etc/config
612ifeq ($(CONFIG_HTTPD),y)
613        cp ./opt/usr/lib/smb.conf $(ARCH)-uclibc/target/usr/lib
614        ln -sf ../tmp/smbshare $(ARCH)-uclibc/target/www/smb
615endif
616
617        # optimize the crypto library by removing unneeded symbols
618        #[ ! -d libcrypto ] || $(MAKE) -C libcrypto optimize
619        #[ ! -d libcrypto ] || $(MAKE) -C libcrypto optimize
620        # Install (and possibly optimize) C library
621ifneq ($(CONFIG_MUSL),y)
622ifeq ($(CONFIG_WRK54G),y)
623        $(MAKE) -f Makefile.ar531x lib.$(ARCH)_micro-install
624else
625        $(MAKE) -f Makefile.ar531x lib.$(ARCH)-install
626endif
627endif
628        # optimize the others library by removing unneeded symbols
629        $(MAKE) -f Makefile.ar531x optimize-lib
630        # Install modules into filesystem
631        if grep -q "CONFIG_MODULES=y" $(LINUXDIR)/.config ; then \
632            $(MAKE) -C $(LINUXDIR) modules_install DEPMOD=/bin/true INSTALL_MOD_PATH=$(TARGETDIR) ; \
633        fi
634ifeq ($(CONFIG_MADWIFI),y)
635        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/drivers/net/wl
636endif
637#       mkdir -p $(TARGETDIR)/lib/modules/2.4.32/kernel/drivers/net/ctmisc
638#       cp ../wl/ctmisc/ctmisc.o $(TARGETDIR)/lib/modules/2.4.32/kernel/drivers/net/ctmisc
639        ##not used yet
640        #mkdir -p $(TARGETDIR)/lib/modules/2.4.32-rc3/kernel/drivers/net/switch
641        #cp ./switch/switch-core.o $(TARGETDIR)/lib/modules/2.4.32-rc3/kernel/drivers/net/switch
642        #mkdir -p $(TARGETDIR)/lib/modules/2.4.32-rc3/kernel/drivers/net/switch
643#       cp ./viarhine/via-rhine.o $(TARGETDIR)/lib/modules/2.4.32/kernel/drivers/net
644
645        #mkdir -p $(TARGETDIR)/lib/modules/2.4.32-rc3/kernel/drivers/net/switch
646        #cp ./switch/switch-adm.o $(TARGETDIR)/lib/modules/2.4.32-rc3/kernel/drivers/net/switch
647        #cp lib.$(ARCH)/libgcc_s.so.1 $(TARGETDIR)/lib
648        #mkdir -p $(TARGETDIR)/lib/modules/2.4.32-rc3/kernel/drivers/net/switch
649        #cp ./switch/switch-robo.o $(TARGETDIR)/lib/modules/2.4.32-rc3/kernel/drivers/net/switch
650       
651        #mkdir -p $(TARGETDIR)/lib/modules/2.4.32-rc1/kernel/drivers/net/et
652        #cp ../et/linux/et.o $(TARGETDIR)/lib/modules/2.4.32-rc1/kernel/drivers/net/et
653       
654        #mkdir -p $(TARGETDIR)/lib/modules/2.4.32-rc3/kernel/drivers/net/et.4702
655        #cp ../et.4702/linux/4702et.o $(TARGETDIR)/lib/modules/2.4.32-rc3/kernel/drivers/net/et.4702
656        # robo switch
657        #mkdir -p $(TARGETDIR)/lib/modules/2.4.32-rc3/kernel/drivers/net/robo
658        #cp ../robo/linux/robo.o $(TARGETDIR)/lib/modules/2.4.32-rc3/kernel/drivers/net/robo
659       
660        find $(TARGETDIR) -name "wl_*.o"  | xargs rm -rf
661        # quick n dirty - stuff Nikki's module where it belongs
662        #mkdir $(TARGETDIR)/lib/modules/2.4.32-rc3/kernel/drivers/net/adm6996
663#       if [ "$(CONFIG_MMC)" = "y" ] ; then \
664#       mkdir $(TARGETDIR)/lib/modules/2.4.32/kernel/fs/mmc ; \
665#       cp mmc/mmc.o $(TARGETDIR)/lib/modules/2.4.32/kernel/fs/mmc ; \
666#       fi ;
667ifneq ($(CONFIG_SAMBA),y)
668        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/cifs
669        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/nfs
670endif
671ifneq ($(CONFIG_JFFS2),y)
672        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/jffs2
673        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/lib/lzma
674        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/lib/lzo
675endif
676ifneq ($(CONFIG_MMC),y)
677        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/ext2
678endif
679ifneq ($(CONFIG_SAMBA),y)
680        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/cifs
681endif
682ifneq ($(CONFIG_JFFS2),y)
683        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/jffs2
684        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/lib/lzma
685endif
686ifneq ($(CONFIG_IPV6),y)
687        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/net/ipv6
688endif
689ifneq ($(CONFIG_BONDING),y)
690        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/drivers/net/bonding
691endif
692ifneq ($(CONFIG_USBIP),y)
693        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/drivers/staging/usbip
694endif
695ifneq ($(CONFIG_USB),y)
696        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/ext2
697        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/ext3
698        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/xfs
699        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/jbd
700        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/fat
701        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/vfat
702        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/msdos
703        rm -f $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/mbcache.ko
704endif
705ifneq ($(CONFIG_USB_ADVANCED),y)
706        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/ext3
707        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/ext4
708        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/xfs
709        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/btrfs
710        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/jbd 
711        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel/fs/jbd2
712endif
713
714
715#ifeq ($(CONFIG_MSSID),y)
716#       cp adm6996.v24/adm6996.o $(TARGETDIR)/lib/modules/2.4.32-rc3/kernel/drivers/net/adm6996/adm6996.o
717#else   
718#       cp adm6996/adm6996.o $(TARGETDIR)/lib/modules/2.4.32-rc3/kernel/drivers/net/adm6996/adm6996.o
719#endif
720
721
722#ifeq ($(CONFIG_MSSID),y)
723#       cp adm6996.v24/adm6996.o $(TARGETDIR)/lib/modules/2.4.32-rc3/kernel/drivers/net/adm6996/adm6996.o
724#else   
725#       cp adm6996/adm6996.o $(TARGETDIR)/lib/modules/2.4.32-rc3/kernel/drivers/net/adm6996/adm6996.o
726#endif
727
728        rm -f $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/build
729        rm -f $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/source
730       
731       
732       
733        # Prepare filesystem
734        cd $(TARGETDIR) && $(TOP)/misc/rootprep.sh
735        # Make sure mksquashfs-2.0 is used
736#       $(MAKE) -C $(LINUXDIR)/scripts/squashfs mksquashfs
737        cd $(TARGETDIR)  &&  find . -iname "CVS" | xargs rm -rf
738        cd $(TARGETDIR)  &&  find . -iname ".svn" | xargs rm -rf
739#       cp viarhine/pci-scan.o $(TARGETDIR)/lib/modules/2.4.32/kernel/drivers/net/pci-scan.o
740#       cp -f test/* $(TARGETDIR)/lib/modules/2.4.33-pre1/kernel/drivers/net
741       
742#       mknod $(TARGETDIR)/dev/cfa b 13 0
743#       mknod $(TARGETDIR)/dev/cfa1 b 13 1
744#       mknod $(TARGETDIR)/dev/cfa2 b 13 2
745#       mknod $(TARGETDIR)/dev/cfa3 b 13 3
746#       mknod $(TARGETDIR)/dev/cfa4 b 13 4
747#       umount $(TARGETDIR)
748        #e2fsck -y -f $(ARCH)-uclibc/root.fs
749        ./busybox/examples/depmod.pl -F $(LINUXDIR)/System.map -b $(ARCH)-uclibc/target/lib/modules
750        -find $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel -name *.ko -exec mv {} $(TARGETDIR)/lib/modules/$(KERNELRELEASE) \;
751        -find $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/net -name *.ko -exec mv {} $(TARGETDIR)/lib/modules/$(KERNELRELEASE) \;
752        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel
753        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/net
754        export STRIP_KMOD="$(LINUXDIR)/scripts/strip-kmod.sh" && \
755        export STRIP="sstrip" && \
756        $(LINUXDIR)/scripts/rstrip.sh $(TARGETDIR)
757       
758        #cd $(TARGETDIR)
759#       tar --directory=$(TARGETDIR) --remove-files -cvvjf $(TARGETDIR)/etc/local.tar.bz2 usr/local
760        rm -rf $(TARGETDIR)/usr/local
761        mkdir $(TARGETDIR)/usr/local
762ifeq ($(CONFIG_KAID),y)
763        cp kaid/kaid $(TARGETDIR)/usr/sbin
764endif
765ifeq ($(CONFIG_RC),y)
766        mv $(TARGETDIR)/usr/lib/services.so $(TARGETDIR)/lib
767endif
768ifeq ($(CONFIG_WRK54G),y)
769        misc/makeDevs $(ARCH)-uclibc/target     
770endif
771        $(TOP)/../../tools/removewhitespace.sh $(TOP)/../../tools $(TARGETDIR)/etc/config
772        @true
773        $(LINUXDIR)/scripts/squashfs/mksquashfs4 $(ARCH)-uclibc/target $(ARCH)-uclibc/root.fs -comp xz -nopad  -root-owned -noappend
774#       $(LINUXDIR)/scripts/squashfs/mksquashfs-lzma $(ARCH)-uclibc/target $(ARCH)-uclibc/root.fs -noappend -be
775        mkfs.jffs2 --pad --big-endian --squash -e 0x10000 -o $(ARCH)-uclibc/dd-wrt.jffs2 -d $(ARCH)-uclibc/target
776        $(MAKE) -f Makefile.ar531x kernel
777        find $(TARGETDIR)/lib/modules -name *.ko -exec mips-linux-strip --strip-unneeded --remove-section=.comment {} +         
778        #e2fsck -y -f $(ARCH)-uclibc/root.fs
779        -find $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel -name *.ko -exec mv {} $(TARGETDIR)/lib/modules/$(KERNELRELEASE) \;
780        -find $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/net -name *.ko -exec mv {} $(TARGETDIR)/lib/modules/$(KERNELRELEASE) \;
781        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/kernel
782        rm -rf $(TARGETDIR)/lib/modules/$(KERNELRELEASE)/net
783        export STRIP_KMOD="$(LINUXDIR)/scripts/strip-kmod.sh" && \
784        export STRIP="sstrip" && \
785        $(LINUXDIR)/scripts/rstrip.sh $(TARGETDIR)
786       
787        ./tools/kernelopt/kernelopt.sh $(LINUXDIR) $(ARCH)-uclibc/target $(ARCH)-linux-
788        cp $(LINUXDIR)/vmlinux_opt $(ARCH)-uclibc/vmlinux
789
790        cp $(ARCH)-uclibc/vmlinux $(ARCH)-uclibc/vmlinux.bak
791       
792        mips-linux-uclibc-objcopy -O binary $(strip-flags) -g $(ARCH)-uclibc/vmlinux $(ARCH)-uclibc/vmlinux.bin
793        lzma e -lc1 -lp2 -pb2 $(ARCH)-uclibc/vmlinux.bin $(ARCH)-uclibc/vmlinux.lzma
794#       gzip -9 $(ARCH)-uclibc/vmlinux.bin $(ARCH)-uclibc/vmlinux.gz
795ifeq ($(CONFIG_TW6600),y)
796        dd if=$(ARCH)-uclibc/vmlinux.lzma of=$(ARCH)-uclibc/vmlinux.bin.l7 bs=65536 conv=sync
797else
798ifeq ($(CONFIG_RTG32),y)
799        dd if=$(ARCH)-uclibc/vmlinux.lzma of=$(ARCH)-uclibc/vmlinux.bin.l7 bs=65536 conv=sync
800else
801        dd if=$(ARCH)-uclibc/vmlinux.lzma of=$(ARCH)-uclibc/vmlinux.bin.l7 bs=131072 conv=sync
802endif
803endif
804ifeq ($(CONFIG_BWRG1000),y)
805        dd if=$(ARCH)-uclibc/vmlinux.lzma of=$(ARCH)-uclibc/vmlinux.bin.l7 bs=65536 conv=sync
806        cat $(ARCH)-uclibc/root.fs>>$(ARCH)-uclibc/vmlinux.bin.l7
807        cp $(ARCH)-uclibc/vmlinux.bin.l7 $(ARCH)-uclibc/bwrg1000-linux.bin
808        dd if=$(ARCH)-uclibc/vmlinux.lzma of=$(ARCH)-uclibc/vmlinux.bin.l7 bs=131072 conv=sync
809        ./tools/trx_n -o $(ARCH)-uclibc/bwrg1000-firmware.bin $(ARCH)-uclibc/bwrg1000-linux.bin
810endif
811
812#       dd if=$(ARCH)-uclibc/vmlinux.gz of=$(ARCH)-uclibc/vmlinux.bin.gz bs=65536 conv=sync
813ifeq ($(CONFIG_GLAUCO),y)
814        dd if=$(ARCH)-uclibc/root.fs of=$(ARCH)-uclibc/root.aligned bs=2818048 conv=sync
815else
816ifeq ($(CONFIG_PB42),y)
817        dd if=$(ARCH)-uclibc/root.fs of=$(ARCH)-uclibc/root.aligned bs=6750208 conv=sync
818else
819        dd if=$(ARCH)-uclibc/root.fs of=$(ARCH)-uclibc/root.aligned bs=2883584 conv=sync
820endif
821endif
822ifeq ($(CONFIG_DIR400),y)
823        dd if=$(ARCH)-uclibc/vmlinux.lzma of=$(ARCH)-uclibc/vmlinux.dir400 bs=65536 conv=sync
824        cat $(ARCH)-uclibc/root.fs>>$(ARCH)-uclibc/vmlinux.dir400
825endif
826ifeq ($(CONFIG_MERAKI),y)
827        dd if=$(ARCH)-uclibc/lzma_vmlinus.m of=$(ARCH)-uclibc/lzma_vmlinus.meraki bs=65536 conv=sync
828        cat $(ARCH)-uclibc/root.fs>>$(ARCH)-uclibc/lzma_vmlinus.meraki
829endif
830#ifeq ($(CONFIG_NP25G),y)
831#       gzip -9 $(ARCH)-uclibc/lzma_vmlinus.m
832#       dd if=$(ARCH)-uclibc/lzma_vmlinus.m.gz of=$(ARCH)-uclibc/lzma_vmlinus.np25g.gz bs=65536 conv=sync
833#       cat $(ARCH)-uclibc/root.fs>>$(ARCH)-uclibc/lzma_vmlinus.np25g.gz
834#endif
835ifeq ($(CONFIG_DIR300),y)
836        dd if=$(ARCH)-uclibc/vmlinux.lzma of=$(ARCH)-uclibc/vmlinux.dir300 bs=65536 conv=sync
837        cat $(ARCH)-uclibc/root.fs>>$(ARCH)-uclibc/vmlinux.dir300
838endif
839ifeq ($(CONFIG_WPE53G),y)
840        dd if=$(ARCH)-uclibc/vmlinux.lzma of=$(ARCH)-uclibc/vmlinux.wpe53g bs=65536 conv=sync
841        cat $(ARCH)-uclibc/root.fs>>$(ARCH)-uclibc/vmlinux.wpe53g
842endif
843ifeq ($(CONFIG_WRT54G2),y)
844        dd if=$(ARCH)-uclibc/vmlinux.lzma of=$(ARCH)-uclibc/vmlinux.wrt54g2 bs=65536 conv=sync
845        cat $(ARCH)-uclibc/root.fs>>$(ARCH)-uclibc/vmlinux.wrt54g2
846endif
847ifeq ($(CONFIG_RTG32),y)
848        lzma e $(ARCH)-uclibc/lzma_vmlinus_rt32g $(ARCH)-uclibc/lzma_vmlinus_rt32g.lzma
849        dd if=$(ARCH)-uclibc/lzma_vmlinus_rt32g.lzma of=$(ARCH)-uclibc/rt32_preloader.bin bs=4096 conv=sync     
850        cat mips-uclibc/vmlinux.lzma >> mips-uclibc/rt32_preloader.bin
851        dd if=$(ARCH)-uclibc/rt32_preloader.bin of=$(ARCH)-uclibc/rt32_preloader.align bs=65536 conv=sync
852        dd if=$(ARCH)-uclibc/root.fs of=$(ARCH)-uclibc/root.g32 bs=3080192 conv=sync
853        cp $(ARCH)-uclibc/root.g32 $(ARCH)-uclibc/g32.bin
854        cat $(ARCH)-uclibc/rt32_preloader.align>>$(ARCH)-uclibc/g32.bin
855endif
856ifeq ($(CONFIG_LS2),y)
857        dd if=$(ARCH)-uclibc/vmlinux.lzma of=$(ARCH)-uclibc/vmlinux.ls2 bs=65536 conv=sync
858        cat $(ARCH)-uclibc/root.fs>>$(ARCH)-uclibc/vmlinux.ls2
859endif
860ifeq ($(CONFIG_WRK54G),y)
861        dd if=$(ARCH)-uclibc/vmlinux.lzma of=$(ARCH)-uclibc/vmlinux.wrk bs=65536 conv=sync
862        cat $(ARCH)-uclibc/root.fs>>$(ARCH)-uclibc/vmlinux.wrk
863endif
864ifeq ($(CONFIG_MR3202A),y)
865        dd if=$(ARCH)-uclibc/vmlinux.lzma of=$(ARCH)-uclibc/vmlinux.mr3202a bs=65536 conv=sync
866        cat $(ARCH)-uclibc/root.fs>>$(ARCH)-uclibc/vmlinux.mr3202a
867endif
868ifeq ($(CONFIG_NP25G),y)
869        dd if=$(ARCH)-uclibc/vmlinux.lzma of=$(ARCH)-uclibc/vmlinux.mr3202a bs=65536 conv=sync
870        cat $(ARCH)-uclibc/root.fs>>$(ARCH)-uclibc/vmlinux.mr3202a
871endif
872ifeq ($(CONFIG_MR3201A),y)
873        dd if=$(ARCH)-uclibc/vmlinux.lzma of=$(ARCH)-uclibc/vmlinux.mr3201a bs=65536 conv=sync
874        cat $(ARCH)-uclibc/root.fs>>$(ARCH)-uclibc/vmlinux.mr3201a
875endif
876ifeq ($(CONFIG_FONERA2200),y)
877        dd if=$(ARCH)-uclibc/vmlinux.lzma of=$(ARCH)-uclibc/vmlinux.fonera bs=65536 conv=sync
878        cat $(ARCH)-uclibc/root.fs>>$(ARCH)-uclibc/vmlinux.fonera
879endif
880ifeq ($(CONFIG_DLM101),y)
881        dd if=$(ARCH)-uclibc/vmlinux.lzma of=$(ARCH)-uclibc/vmlinux.dlm101 bs=65536 conv=sync
882        cat $(ARCH)-uclibc/root.fs>>$(ARCH)-uclibc/vmlinux.dlm101
883endif
884ifeq ($(CONFIG_GWMF54G2),y)
885        dd if=$(ARCH)-uclibc/vmlinux.lzma of=$(ARCH)-uclibc/vmlinux.fonera bs=65536 conv=sync
886        cat $(ARCH)-uclibc/root.fs>>$(ARCH)-uclibc/vmlinux.fonera
887endif
888ifeq ($(CONFIG_EOC5610),y)
889        dd if=$(ARCH)-uclibc/vmlinux.lzma of=$(ARCH)-uclibc/vmlinux.eoc5610 bs=65536 conv=sync
890        cat $(ARCH)-uclibc/root.fs>>$(ARCH)-uclibc/vmlinux.eoc5610
891endif
892ifeq ($(CONFIG_SOLO51),y)
893        dd if=$(ARCH)-uclibc/vmlinux.lzma of=$(ARCH)-uclibc/vmlinux.solo51 bs=65536 conv=sync
894        cat $(ARCH)-uclibc/root.fs>>$(ARCH)-uclibc/vmlinux.solo51
895endif
896
897ifeq ($(CONFIG_WHRAG108),y)
898        dd if=$(ARCH)-uclibc/root.fs of=$(ARCH)-uclibc/root.whr bs=2752512 conv=sync
899        ./tools/trx_n -o $(ARCH)-uclibc/whrag108-firmware.bin $(ARCH)-uclibc/root.whr $(ARCH)-uclibc/lzma_vmlinus
900endif
901ifeq ($(CONFIG_TW6600),y)
902        dd if=$(ARCH)-uclibc/root.fs of=$(ARCH)-uclibc/root.whr bs=2752512 conv=sync
903        ./tools/trx_n -o $(ARCH)-uclibc/whrag108-firmware.bin $(ARCH)-uclibc/root.whr $(ARCH)-uclibc/lzma_vmlinusaw
904endif
905ifeq ($(CONFIG_ALPHA),y)
906        dd if=$(ARCH)-uclibc/root.fs of=$(ARCH)-uclibc/root.alpha bs=6946816 conv=sync
907        ./tools/trx_n -m 80000000 -o $(ARCH)-uclibc/alpha-firmware.bin $(ARCH)-uclibc/root.alpha $(ARCH)-uclibc/vmlinux.bin.l7
908endif
909ifeq ($(CONFIG_USR5453),y)
910        dd if=$(ARCH)-uclibc/root.fs of=$(ARCH)-uclibc/root.usr bs=6815744 conv=sync
911        ./tools/trx_n -m 80000000 -o $(ARCH)-uclibc/usr5453-firmware.bin $(ARCH)-uclibc/root.usr $(ARCH)-uclibc/lzma_vmlinus
912else
913ifneq ($(CONFIG_RCAA01),y)
914ifeq ($(CONFIG_CA8),y)
915        dd if=$(ARCH)-uclibc/lzma_vmlinusca8pro of=$(ARCH)-uclibc/lzma_vmlinusca8pro.fix bs=65536 conv=sync
916        cat $(ARCH)-uclibc/root.fs >> $(ARCH)-uclibc/lzma_vmlinusca8pro.fix
917        ./tools/ca8pro/gen_gzimage_ca8 -o $(ARCH)-uclibc/zImage -k $(ARCH)-uclibc/lzma_vmlinusca8pro.fix
918        ./tools/trx_n -m 80000000 -o $(ARCH)-uclibc/ca8-firmware.bin $(ARCH)-uclibc/lzma_vmlinusca8pro.fix
919endif
920endif
921endif
922ifneq ($(CONFIG_RCAA01),y)
923ifeq ($(CONFIG_CA8PRO),y)
924        dd if=$(ARCH)-uclibc/lzma_vmlinusca8pro of=$(ARCH)-uclibc/lzma_vmlinusca8pro.fix bs=65536 conv=sync
925        cat $(ARCH)-uclibc/root.fs >> $(ARCH)-uclibc/lzma_vmlinusca8pro.fix
926        ./tools/ca8pro/gen_gzimage -o $(ARCH)-uclibc/zImage -k $(ARCH)-uclibc/lzma_vmlinusca8pro.fix
927        ./tools/ca8pro/gen_gzimage_client -o $(ARCH)-uclibc/zImageclient -k $(ARCH)-uclibc/lzma_vmlinusca8pro.fix
928        ./tools/trx_n -m 80000000 -o $(ARCH)-uclibc/ca8pro-firmware.bin $(ARCH)-uclibc/lzma_vmlinusca8pro.fix
929#       dd if=$(ARCH)-uclibc/root.fs of=$(ARCH)-uclibc/root.ca8 bs=2752512 conv=sync
930#       ./tools/trx_n -m 80000000 -o $(ARCH)-uclibc/ca8-firmware.bin $(ARCH)-uclibc/root.ca8 $(ARCH)-uclibc/lzma_vmlinus
931endif
932endif
933ifeq ($(CONFIG_RCAA01),y)
934        dd if=$(ARCH)-uclibc/lzma_vmlinusca8pro of=$(ARCH)-uclibc/lzma_vmlinusca8pro.fix bs=65536 conv=sync
935        cat $(ARCH)-uclibc/root.fs >> $(ARCH)-uclibc/lzma_vmlinusca8pro.fix
936        ./tools/rcaa01/gen_gzimage_rcaa01 -o $(ARCH)-uclibc/zImage -k $(ARCH)-uclibc/lzma_vmlinusca8pro.fix
937        ./tools/trx_n -m 80000000 -o $(ARCH)-uclibc/rcaa01-firmware.bin $(ARCH)-uclibc/lzma_vmlinusca8pro.fix
938endif
939ifeq ($(CONFIG_RDAT81),y)
940        dd if=$(ARCH)-uclibc/lzma_vmlinusca8pro of=$(ARCH)-uclibc/lzma_vmlinusca8pro.fix bs=65536 conv=sync
941        cat $(ARCH)-uclibc/root.fs >> $(ARCH)-uclibc/lzma_vmlinusca8pro.fix
942        ./tools/rdat81/gen_gzimage_rdat81 -o $(ARCH)-uclibc/zImage -k $(ARCH)-uclibc/lzma_vmlinusca8pro.fix
943        ./tools/trx_n -m 80000000 -o $(ARCH)-uclibc/rdat81-firmware.bin $(ARCH)-uclibc/lzma_vmlinusca8pro.fix
944endif
945ifneq ($(CONFIG_EOC5610),y)
946ifeq ($(CONFIG_LS5),y)
947        dd if=$(ARCH)-uclibc/root.fs of=$(ARCH)-uclibc/root.ls5 bs=2883584 conv=sync
948        ./tools/trx_n -o $(ARCH)-uclibc/ls5-firmware.bin $(ARCH)-uclibc/root.ls5 $(ARCH)-uclibc/vmlinux.lzma
949endif
950endif
951ifeq ($(CONFIG_WRK54G),y)
952        ./tools/trx_n -m 80000000 -o $(ARCH)-uclibc/wrk54g-firmware.bin $(ARCH)-uclibc/vmlinux.wrk
953endif
954ifeq ($(CONFIG_MERAKI),y)
955        ./tools/trx_n -m 80000000 -o $(ARCH)-uclibc/meraki-firmware.bin $(ARCH)-uclibc/lzma_vmlinus.meraki
956endif
957ifeq ($(CONFIG_DIR400),y)
958        ./tools/trx_n -m 80000000 -o $(ARCH)-uclibc/dir400-firmware.bin $(ARCH)-uclibc/vmlinux.dir400
959endif
960ifeq ($(CONFIG_DIR300),y)
961        ./tools/trx_n -m 80000000 -o $(ARCH)-uclibc/dir300-firmware.bin $(ARCH)-uclibc/vmlinux.dir300
962endif
963ifeq ($(CONFIG_WRT54G2),y)
964        ./tools/trx_n -m 80000000 -o $(ARCH)-uclibc/wrt54g2-firmware.bin $(ARCH)-uclibc/vmlinux.wrt54g2
965endif
966ifeq ($(CONFIG_RTG32),y)
967        ./tools/trx_n -m 80000000 -o $(ARCH)-uclibc/rtg32-firmware.bin $(ARCH)-uclibc/g32.bin
968endif
969ifeq ($(CONFIG_LS2),y)
970        ./tools/trx_n -m 80000000 -o $(ARCH)-uclibc/ls2-firmware.bin $(ARCH)-uclibc/vmlinux.ls2
971endif
972ifeq ($(CONFIG_MR3202A),y)
973        ./tools/trx_n -m 80000000 -o $(ARCH)-uclibc/mr3202a-firmware.bin $(ARCH)-uclibc/vmlinux.mr3202a
974endif
975ifeq ($(CONFIG_NP25G),y)
976        ./tools/trx_n -m 80000000 -o $(ARCH)-uclibc/np25g-firmware.bin $(ARCH)-uclibc/vmlinux.mr3202a
977endif
978ifeq ($(CONFIG_WPE53G),y)
979        ./tools/trx_n -m 80000000 -o $(ARCH)-uclibc/np25g-firmware.bin $(ARCH)-uclibc/vmlinux.wpe53g
980endif
981ifeq ($(CONFIG_MR3201A),y)
982        ./tools/trx_n -m 80000000 -o $(ARCH)-uclibc/mr3201a-firmware.bin $(ARCH)-uclibc/vmlinux.mr3201a
983endif
984ifeq ($(CONFIG_EOC5610),y)
985        ./tools/trx_n -m 80000000 -o $(ARCH)-uclibc/eoc5610-firmware.bin $(ARCH)-uclibc/vmlinux.eoc5610
986endif
987ifeq ($(CONFIG_SOLO51),y)
988        ./tools/trx_n -m 80000000 -o $(ARCH)-uclibc/solo51-firmware.bin $(ARCH)-uclibc/vmlinux.solo51
989endif
990ifeq ($(CONFIG_GWMF54G2),y)
991        ./tools/trx_n -m 100000000 -o $(ARCH)-uclibc/planex-firmware.bin $(ARCH)-uclibc/vmlinux.fonera
992endif
993ifeq ($(CONFIG_DLM101),y)
994        ./tools/trx_n -m 100000000 -o $(ARCH)-uclibc/dlm101-firmware.bin $(ARCH)-uclibc/vmlinux.dlm101
995endif
996ifeq ($(CONFIG_FONERA2200),y)
997        ./tools/trx_n -o $(ARCH)-uclibc/fonera-firmware.bin -m 100000000 $(ARCH)-uclibc/vmlinux.fonera
998else
999        ./tools/trx_n -o $(ARCH)-uclibc/fonera-firmware.bin -m 100000000 $(ARCH)-uclibc/root.aligned $(ARCH)-uclibc/vmlinux.lzma
1000endif
1001        cp -f tools/nvram $(ARCH)-uclibc
1002ifeq ($(CONFIG_LS2),y)
1003        -tools/ubnt/src/mkfwimage -v LS2.ar2316.DD-WRT -o mips-uclibc/LS2.dd-wrt.bin -i tools/ubnt/ls2-ddwrt.txt
1004endif
1005ifeq ($(CONFIG_BS2),y)
1006        -tools/ubnt/src/mkfwimage -v BS2.ar2316.DD-WRT -o mips-uclibc/BS2.dd-wrt.bin -i tools/ubnt/ls2-ddwrt.txt
1007endif
1008ifeq ($(CONFIG_PICO2),y)
1009        -tools/ubnt/src/mkfwimage -v pS2.ar2316.DD-WRT -o mips-uclibc/pS2.dd-wrt.bin -i tools/ubnt/ps2-ddwrt.txt
1010endif
1011ifeq ($(CONFIG_PICO2HP),y)
1012        -tools/ubnt/src/mkfwimage -v pS2.ar2316.DD-WRT -o mips-uclibc/pS2.dd-wrt.bin -i tools/ubnt/ps2-ddwrt.txt
1013endif
1014ifeq ($(CONFIG_MS2),y)
1015        -tools/ubnt/src/mkfwimage -v MS2.ar2316.DD-WRT -o mips-uclibc/MS2.dd-wrt.bin -i tools/ubnt/ls2-ddwrt.txt
1016endif
1017ifeq ($(CONFIG_LC2),y)
1018        -tools/ubnt/src/mkfwimage -v LC2.ar2316.DD-WRT -o mips-uclibc/LC2.dd-wrt.bin -i tools/ubnt/ls2-ddwrt.txt
1019endif
1020ifeq ($(CONFIG_BS2HP),y)
1021        -tools/ubnt/src/mkfwimage -v BH2.ar2316.DD-WRT -o mips-uclibc/BH2.dd-wrt.bin -i tools/ubnt/ls2-ddwrt.txt
1022endif
1023ifeq ($(CONFIG_NS2),y)
1024        -tools/ubnt/src/mkfwimage -v NS2.ar2316.DD-WRT -o mips-uclibc/NS2.dd-wrt.bin -i tools/ubnt/ls2-ddwrt.txt
1025endif
1026ifeq ($(CONFIG_PS2),y)
1027        -tools/ubnt/src/mkfwimage -v PS2.ar2316.DD-WRT -o mips-uclibc/PS2.dd-wrt.bin -i tools/ubnt/ls2-ddwrt.txt
1028endif
1029ifeq ($(CONFIG_LS5),y)
1030        -tools/ubnt/src/mkfwimage -v LS5.ar2313.DD-WRT -o mips-uclibc/LS5.dd-wrt.bin -i tools/ubnt/ls5-ddwrt.txt
1031        -tools/ubnt/src/mkfwimage -v WS5.ar2313.DD-WRT -o mips-uclibc/WS5.dd-wrt.bin -i tools/ubnt/ls5-ddwrt.txt
1032endif
1033ifeq ($(CONFIG_MS5),y)
1034        -tools/ubnt/src/mkfwimage -v MS5.ar2313.DD-WRT -o mips-uclibc/MS5.dd-wrt.bin -i tools/ubnt/ls5-ddwrt.txt
1035endif
1036ifeq ($(CONFIG_PS5),y)
1037        -tools/ubnt/src/mkfwimage -v PS5.ar2313.DD-WRT -o mips-uclibc/PS5.dd-wrt.bin -i tools/ubnt/ls5-ddwrt.txt
1038endif
1039ifeq ($(CONFIG_NS5),y)
1040        -tools/ubnt/src/mkfwimage -v NS5.ar2313.DD-WRT -o mips-uclibc/NS5.dd-wrt.bin -i tools/ubnt/ls5-ddwrt.txt
1041endif
1042ifeq ($(CONFIG_NS3),y)
1043        -tools/ubnt/src/mkfwimage -v NS3.ar2313.DD-WRT -o mips-uclibc/NS3.dd-wrt.bin -i tools/ubnt/ls5-ddwrt.txt
1044endif
1045ifeq ($(CONFIG_BS5),y)
1046        -tools/ubnt/src/mkfwimage -v BS5.ar2313.DD-WRT -o mips-uclibc/BS5.dd-wrt.bin -i tools/ubnt/ls5-ddwrt.txt
1047endif
1048ifeq ($(CONFIG_PICO5),y)
1049        -tools/ubnt/src/mkfwimage -v pS5.ar2313.DD-WRT -o mips-uclibc/pS5.dd-wrt.bin -i tools/ubnt/ls5-ddwrt.txt
1050endif
1051ifeq ($(CONFIG_LC5),y)
1052        -tools/ubnt/src/mkfwimage -v LC5.ar2313.DD-WRT -o mips-uclibc/LC5.dd-wrt.bin -i tools/ubnt/ls5-ddwrt.txt
1053endif
1054ifeq ($(CONFIG_NP25G),y)
1055        -tools/compex/mkmylofw -B NP25G \
1056                -p0x20000:0x3d0000:alp:0x80041000 \
1057                -b0x20000:0x3d0000::$(ARCH)-uclibc/vmlinux.mr3202a \
1058                $(ARCH)-uclibc/compex-firmware-np25g.bin
1059endif
1060ifeq ($(CONFIG_WPE53G),y)
1061        -tools/compex/mkmylofw -B WPE53G \
1062                -p0x20000:0x3d0000:alp:0x80041000 \
1063                -b0x20000:0x3d0000::$(ARCH)-uclibc/vmlinux.wpe53g \
1064                $(ARCH)-uclibc/compex-firmware-wpe53g.bin
1065endif
1066ifeq ($(CONFIG_RTG32),y)
1067        dd if=$(ARCH)-uclibc/rt32_preloader.bin of=$(ARCH)-uclibc/rt32_preloader.align bs=65536 conv=sync
1068        -tools/g32/mkfwimage -o mips-uclibc/RTG32.dd-wrt.bin -k mips-uclibc/rt32_preloader.align -r mips-uclibc/root.fs
1069endif
1070
1071
1072include rules/all.mk
1073
1074.PHONY: all clean distclean mrproper install package
1075.PHONY: conf mconf oldconf kconf kmconf config menuconfig oldconfig
1076.PHONY: dummy fixkc libnet libpcap
1077
1078
1079
Note: See TracBrowser for help on using the repository browser.