move lzma loader source in cvs
[openwrt.git] / target / linux / image / brcm / Makefile
1 include $(TOPDIR)/rules.mk
2
3 KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)
4
5 lzma-loader-clean:
6 $(MAKE) -C lzma-loader clean
7
8 lzma-loader-prepare:
9 $(MAKE) -C lzma-loader prepare
10
11 lzma-loader-compile: lzma-loader-prepare
12 $(MAKE) -C lzma-loader compile
13
14 ifeq ($(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 $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx: $(KDIR)/vmlinux.lzma compile
19 endif
20
21 ifeq ($(FS),jffs2-8MB)
22 TRXALIGN:=-a 0x20000
23 endif
24 ifeq ($(FS),jffs2-4MB)
25 TRXALIGN:=-a 0x10000
26 endif
27 $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx:
28 $(STAGING_DIR)/bin/trx -o $@ $(BUILD_DIR)/loader.gz $(KDIR)/vmlinux.lzma $(TRXALIGN) $(KDIR)/root.$(FS)
29
30 ifeq ($(KERNEL),2.6)
31 FSNAME:=$(patsubst jffs2-%,jffs2,$(FS))
32
33 $(BIN_DIR)/openwrt-wgt634u-2.6-$(FSNAME).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx
34 dd if=$(BUILD_DIR)/loader-0.04/loader.o of=$@ bs=65536 conv=sync
35 cat $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx >> $@
36
37 install: $(BIN_DIR)/openwrt-wgt634u-2.6-$(FSNAME).bin
38 endif
39
40 ifeq ($(KERNEL),2.4)
41 FSNAME:=$(patsubst jffs2-%,jffs2,$(FS))
42
43 ifneq ($(FS),jffs2-8MB)
44 $(BIN_DIR)/openwrt-wrt54g-$(FSNAME).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx
45 $(STAGING_DIR)/bin/addpattern -4 -p W54G -v v4.20.6 -i $< -o $@ -g
46
47 install: $(BIN_DIR)/openwrt-wrt54g-$(FSNAME).bin
48 endif
49
50 ifneq ($(FS),jffs2-4MB)
51 $(BIN_DIR)/openwrt-wrt54gs-$(FSNAME).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx
52 $(STAGING_DIR)/bin/addpattern -4 -p W54S -v v4.70.6 -i $< -o $@ -g
53
54 install: $(BIN_DIR)/openwrt-wrt54gs-$(FSNAME).bin
55 endif
56
57 $(BIN_DIR)/openwrt-motorola-$(FS).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx
58 $(STAGING_DIR)/bin/motorola-bin $< $@
59 install: $(BIN_DIR)/openwrt-motorola-$(FS).bin
60 endif
61
62 ifeq ($(IB),)
63 clean: lzma-loader-clean
64 prepare: lzma-loader-prepare
65 compile: lzma-loader-compile
66 else
67 clean:
68 prepare:
69 compile:
70 endif
71 install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx
72 install-ib:
73 mkdir -p $(IB_DIR)/staging_dir_$(ARCH)/bin
74 cp -dpR $(STAGING_DIR)/bin/addpattern $(STAGING_DIR)/bin/trx $(STAGING_DIR)/bin/motorola-bin $(IB_DIR)/staging_dir_$(ARCH)/bin
75 mkdir -p $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)
76 cp -dpR $(BUILD_DIR)/loader.gz $(IB_DIR)/build_$(ARCH)/
77 cp -dpR $(KDIR)/vmlinux.lzma $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/
This page took 0.056139 seconds and 5 git commands to generate.