fix tgz building
[openwrt.git] / target / linux / image / brcm / Makefile
1 include $(TOPDIR)/rules.mk
2
3 KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-brcm
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 $(KDIR)/vmlinux.lzma: $(KDIR)/vmlinux
15 cat $^ | $(STAGING_DIR)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $@ || (rm -f $@ && false)
16
17 ifeq ($(FS),jffs2-8MB)
18 TRXALIGN:=-a 0x20000
19 endif
20 ifeq ($(FS),jffs2-4MB)
21 TRXALIGN:=-a 0x10000
22 endif
23 $(BIN_DIR)/openwrt-brcm-$(KERNEL)-$(FS).trx: $(KDIR)/vmlinux.lzma
24 $(STAGING_DIR)/bin/trx -o $@ $(BUILD_DIR)/loader.gz $(KDIR)/vmlinux.lzma $(TRXALIGN) $(KDIR)/root.$(FS)
25
26
27 ifeq ($(KERNEL),2.4)
28 FSNAME:=$(patsubst jffs2-%,jffs2,$(FS))
29
30 ifneq ($(FS),jffs2-8MB)
31 $(BIN_DIR)/openwrt-wrt54g-$(FSNAME).bin: $(BIN_DIR)/openwrt-brcm-$(KERNEL)-$(FS).trx
32 $(STAGING_DIR)/bin/addpattern -4 -p W54G -v v4.20.6 -i $< -o $@ -g
33
34 install: $(BIN_DIR)/openwrt-wrt54g-$(FSNAME).bin
35 endif
36
37 ifneq ($(FS),jffs2-4MB)
38 $(BIN_DIR)/openwrt-wrt54gs-$(FSNAME).bin: $(BIN_DIR)/openwrt-brcm-$(KERNEL)-$(FS).trx
39 $(STAGING_DIR)/bin/addpattern -4 -p W54S -v v4.70.6 -i $< -o $@ -g
40
41 install: $(BIN_DIR)/openwrt-wrt54gs-$(FSNAME).bin
42 endif
43
44 $(BIN_DIR)/openwrt-motorola-$(FS).bin: $(BIN_DIR)/openwrt-brcm-$(KERNEL)-$(FS).trx
45 $(STAGING_DIR)/bin/motorola-bin $< $@
46 install: $(BIN_DIR)/openwrt-motorola-$(FS).bin
47 endif
48
49 clean: lzma-loader-clean
50 prepare: lzma-loader-prepare
51 compile: lzma-loader-compile
52 install: compile $(BIN_DIR)/openwrt-brcm-$(KERNEL)-$(FS).trx
53
This page took 0.050161 seconds and 5 git commands to generate.