source: trunk/openwrt/target/linux/image/brcm/Makefile @ 2562

Last change on this file since 2562 was 2562, checked in by wbx, 11 years ago

create some more bin files for 2.6

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.1 KB
Line 
1include $(TOPDIR)/rules.mk
2
3KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)
4
5lzma-loader-clean:
6        $(MAKE) -C lzma-loader clean
7
8lzma-loader-prepare:
9        $(MAKE) -C lzma-loader prepare
10
11lzma-loader-compile: lzma-loader-prepare
12        $(MAKE) -C lzma-loader compile
13
14ifeq ($(IB),)
15$(KDIR)/vmlinux.lzma: $(KDIR)/vmlinux
16        cat $^ | $(STAGING_DIR)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $@ || (rm -f $@ && false)
17
18$(KDIR)/loader.tmp.gz: compile
19$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx: $(KDIR)/vmlinux.lzma
20endif
21
22ifeq ($(FS),jffs2-8MB)
23TRXALIGN:=-a 0x20000
24endif
25ifeq ($(FS),jffs2-4MB)
26TRXALIGN:=-a 0x10000
27endif
28
29$(KDIR)/loader.tmp.gz:
30        cp $(BUILD_DIR)/loader.gz $@
31        echo -ne "\\x00" >> $@
32
33$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx: $(KDIR)/loader.tmp.gz
34        $(STAGING_DIR)/bin/trx -o $@ $(KDIR)/loader.tmp.gz $(KDIR)/vmlinux.lzma $(TRXALIGN) $(KDIR)/root.$(FS)
35
36ifeq ($(KERNEL),2.6)
37FSNAME:=$(patsubst jffs2-%,jffs2,$(FS))
38
39ifneq ($(FS),jffs2-4MB)
40$(BIN_DIR)/openwrt-wgt634u-$(KERNEL)-$(FSNAME).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx
41        dd if=$(BUILD_DIR)/loader.elf of=$@ bs=131072 conv=sync
42        cat $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx >> $@
43
44$(BIN_DIR)/openwrt-wrt54gs-$(KERNEL)-$(FSNAME).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx
45        $(STAGING_DIR)/bin/addpattern -4 -p W54S -v v4.70.6 -i $< -o $@ -g
46
47install: $(BIN_DIR)/openwrt-wgt634u-$(KERNEL)-$(FSNAME).bin $(BIN_DIR)/openwrt-wrt54gs-$(KERNEL)-$(FSNAME).bin
48
49endif
50$(BIN_DIR)/openwrt-wrt54g3g-$(KERNEL)-$(FSNAME).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx
51        $(STAGING_DIR)/bin/addpattern -4 -p W54F -v v1.99.5 -i $< -o $@ -g
52       
53$(BIN_DIR)/openwrt-wrt54g-$(KERNEL)-$(FSNAME).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx
54        $(STAGING_DIR)/bin/addpattern -4 -p W54G -v v4.20.6 -i $< -o $@ -g
55
56$(BIN_DIR)/openwrt-wrt54gs_v4-$(KERNEL)-$(FSNAME).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx
57        $(STAGING_DIR)/bin/addpattern -4 -p W54s -v v1.05.0 -i $< -o $@ -g
58
59install: $(BIN_DIR)/openwrt-wrt54g-$(KERNEL)-$(FSNAME).bin $(BIN_DIR)/openwrt-wrt54gs_v4-$(KERNEL)-$(FSNAME).bin $(BIN_DIR)/openwrt-wrt54g3g-$(KERNEL)-$(FSNAME).bin
60endif
61
62ifeq ($(KERNEL),2.4)
63FSNAME:=$(patsubst jffs2-%,jffs2,$(FS))
64
65ifeq ($(FS),squashfs)
66$(BIN_DIR)/openwrt-wap54g-$(KERNEL)-$(FSNAME).trx: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx
67        cp $< $@
68        echo -ne '\x01' >> $@
69       
70install: $(BIN_DIR)/openwrt-wap54g-$(KERNEL)-$(FSNAME).trx
71endif
72
73ifneq ($(FS),jffs2-8MB)
74$(BIN_DIR)/openwrt-wrt54g3g-$(KERNEL)-$(FSNAME).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx
75        $(STAGING_DIR)/bin/addpattern -4 -p W54F -v v1.99.5 -i $< -o $@ -g
76       
77$(BIN_DIR)/openwrt-wrt54g-$(KERNEL)-$(FSNAME).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx
78        $(STAGING_DIR)/bin/addpattern -4 -p W54G -v v4.20.6 -i $< -o $@ -g
79
80$(BIN_DIR)/openwrt-wrt54gs_v4-$(KERNEL)-$(FSNAME).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx
81        $(STAGING_DIR)/bin/addpattern -4 -p W54s -v v1.05.0 -i $< -o $@ -g
82
83install: $(BIN_DIR)/openwrt-wrt54g-$(KERNEL)-$(FSNAME).bin $(BIN_DIR)/openwrt-wrt54gs_v4-$(KERNEL)-$(FSNAME).bin $(BIN_DIR)/openwrt-wrt54g3g-$(KERNEL)-$(FSNAME).bin
84endif
85
86ifneq ($(FS),jffs2-4MB)
87$(BIN_DIR)/openwrt-wrt54gs-$(KERNEL)-$(FSNAME).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx
88        $(STAGING_DIR)/bin/addpattern -4 -p W54S -v v4.70.6 -i $< -o $@ -g
89
90install: $(BIN_DIR)/openwrt-wrt54gs-$(KERNEL)-$(FSNAME).bin
91endif
92
93$(BIN_DIR)/openwrt-motorola-$(KERNEL)-$(FS).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx
94        $(STAGING_DIR)/bin/motorola-bin $< $@
95install: $(BIN_DIR)/openwrt-motorola-$(KERNEL)-$(FS).bin
96endif
97
98ifeq ($(IB),)
99clean: lzma-loader-clean
100prepare: lzma-loader-prepare
101compile: lzma-loader-compile
102else
103clean:
104prepare:
105compile:
106endif
107install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx
108install-ib:
109        mkdir -p $(IB_DIR)/staging_dir_$(ARCH)/bin
110        cp -fpR $(STAGING_DIR)/bin/addpattern $(STAGING_DIR)/bin/trx $(STAGING_DIR)/bin/motorola-bin $(IB_DIR)/staging_dir_$(ARCH)/bin
111        mkdir -p $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)
112        cp -fpR $(BUILD_DIR)/loader.gz $(IB_DIR)/build_$(ARCH)/
113        cp -fpR $(BUILD_DIR)/loader.elf $(IB_DIR)/build_$(ARCH)/
114        cp -fpR $(KDIR)/vmlinux.lzma $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/
Note: See TracBrowser for help on using the repository browser.