f551b84bee5d8e2067750bcd588e05291f8c8521
[openwrt.git] / openwrt / 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
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
31 ifeq ($(KERNEL),2.4)
32 FSNAME:=$(patsubst jffs2-%,jffs2,$(FS))
33
34 ifneq ($(FS),jffs2-8MB)
35 $(BIN_DIR)/openwrt-wrt54g-$(FSNAME).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx
36 $(STAGING_DIR)/bin/addpattern -4 -p W54G -v v4.20.6 -i $< -o $@ -g
37
38 install: $(BIN_DIR)/openwrt-wrt54g-$(FSNAME).bin
39 endif
40
41 ifneq ($(FS),jffs2-4MB)
42 $(BIN_DIR)/openwrt-wrt54gs-$(FSNAME).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx
43 $(STAGING_DIR)/bin/addpattern -4 -p W54S -v v4.70.6 -i $< -o $@ -g
44
45 install: $(BIN_DIR)/openwrt-wrt54gs-$(FSNAME).bin
46 endif
47
48 $(BIN_DIR)/openwrt-motorola-$(FS).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx
49 $(STAGING_DIR)/bin/motorola-bin $< $@
50 install: $(BIN_DIR)/openwrt-motorola-$(FS).bin
51 endif
52
53 ifeq ($(IB),)
54 clean: lzma-loader-clean
55 prepare: lzma-loader-prepare
56 compile: lzma-loader-compile
57 install: compile $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx
58 else
59 clean:
60 prepare:
61 compile:
62 install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx
63 endif
64 install-ib:
65 mkdir -p $(IB_DIR)/staging_dir_$(ARCH)/bin
66 cp -dpR $(STAGING_DIR)/bin/addpattern $(STAGING_DIR)/bin/trx $(STAGING_DIR)/bin/motorola-bin $(IB_DIR)/staging_dir_$(ARCH)/bin
67 mkdir -p $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)
68 cp -dpR $(BUILD_DIR)/loader.gz $(IB_DIR)/build_$(ARCH)/
69 cp -dpR $(KDIR)/vmlinux.lzma $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/
This page took 0.04194 seconds and 3 git commands to generate.