cleanup; replace .PHONY with FORCE; disable gdb by default
[openwrt.git] / target / linux / image / au1000 / Makefile
1 include $(TOPDIR)/rules.mk
2
3 LOADADDR = 0x8108c8f4 # RAM start + 16M
4 KERNEL_ENTRY = 0x80100000 # Default kernel entry in arch/mips/Makefile
5 RAMSIZE = 0x04000000 # 64MB
6
7 LOADER_MAKEOPTS= \
8 KDIR=$(KDIR) \
9 LOADADDR=$(LOADADDR) \
10 KERNEL_ENTRY=$(KERNEL_ENTRY) \
11 RAMSIZE=$(RAMSIZE)
12
13 KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)
14
15 lzma-loader-clean: FORCE
16 $(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) clean
17
18 lzma-loader-prepare: FORCE
19 $(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) prepare
20
21 lzma-loader-compile: $(KDIR)/vmlinux.lzma lzma-loader-prepare
22 $(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) compile
23
24 ifeq ($(IB),)
25 $(KDIR)/vmlinux.lzma: $(KDIR)/vmlinux
26 cat $^ | $(STAGING_DIR)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $@ || (rm -f $@ && false)
27
28 install: $(KDIR)/vmlinux.lzma
29 endif
30
31 ifeq ($(FS),jffs2-8MB)
32
33 $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FSNAME).bin: $(KDIR)/root.$(FS)
34 $(TARGET_CROSS)objcopy -O srec -I binary --adjust-vma 0xbe000000 $(KDIR)/root.$(FS) $(KDIR)/root.srec
35 grep -v S7 $(KDIR)/root.srec > $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img
36 grep -v S0 $(LINUX_DIR)/arch/mips/boot/compressed/images/zImage.flash.srec >> $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img
37
38 install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FSNAME).bin
39 endif
40
41 ifeq ($(FS),tgz)
42
43 $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-rootfs.tar.gz: $(KDIR)/root.tar.gz
44 $(CP) $^ $@
45
46 install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-rootfs.tar.gz
47
48 endif
49
50 ifeq ($(FS),squashfs)
51 $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FSNAME).bin: $(KDIR)/root.$(FS)
52 $(TARGET_CROSS)objcopy -O srec -I binary --adjust-vma 0xbe000000 $(KDIR)/root.$(FS) $(KDIR)/root.srec
53 grep -v S7 $(KDIR)/root.srec > $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img
54 grep -v S0 $(LINUX_DIR)/arch/mips/boot/compressed/images/zImage.flash.srec >> $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img
55
56 endif
57
58 $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz: $(KDIR)/zImage.flash
59 $(CP) $^ $@
60
61 ifeq ($(IB),)
62 clean: lzma-loader-clean
63 prepare: lzma-loader-prepare
64 compile: lzma-loader-compile
65 else
66 clean:
67 prepare:
68 compile:
69 endif
70 install-ib:
71 mkdir -p $(IB_DIR)/staging_dir_$(ARCH)/bin
72 mkdir -p $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)
73 $(CP) $(KDIR)/loader.elf $(IB_DIR)/build_$(ARCH)/
74 $(CP) $(KDIR)/vmlinux.lzma $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/
75 $(TARGET_CROSS)objcopy -O srec -I binary --adjust-vma 0xbe000000 $(KDIR)/loader.elf $(KDIR)/loader.srec
76 grep -v S0 $(KDIR)/loader.srec > $(KDIR)/kernel.srec
This page took 0.040837 seconds and 5 git commands to generate.