diff options
author | Mike Baker <mbm@openwrt.org> | 2006-11-28 20:14:41 +0000 |
---|---|---|
committer | Mike Baker <mbm@openwrt.org> | 2006-11-28 20:14:41 +0000 |
commit | c3c4dfb57beebd26c0534698b8687c2c7c94e1f5 (patch) | |
tree | 6ffc51e355fb56df1c38449e6c16711d0b27a29c /target/linux/brcm-2.6/image/lzma-loader/src/Makefile | |
parent | 16edf83d62c8a8bc446b5d9a74de27c2dd4f3d8b (diff) | |
download | mtk-20170518-c3c4dfb57beebd26c0534698b8687c2c7c94e1f5.zip mtk-20170518-c3c4dfb57beebd26c0534698b8687c2c7c94e1f5.tar.gz mtk-20170518-c3c4dfb57beebd26c0534698b8687c2c7c94e1f5.tar.bz2 |
move target/image/platform to target/linux/platform/image platform directories are now self contained
SVN-Revision: 5669
Diffstat (limited to 'target/linux/brcm-2.6/image/lzma-loader/src/Makefile')
-rw-r--r-- | target/linux/brcm-2.6/image/lzma-loader/src/Makefile | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/target/linux/brcm-2.6/image/lzma-loader/src/Makefile b/target/linux/brcm-2.6/image/lzma-loader/src/Makefile new file mode 100644 index 0000000..85a8646 --- /dev/null +++ b/target/linux/brcm-2.6/image/lzma-loader/src/Makefile @@ -0,0 +1,77 @@ +# +# Makefile for Broadcom BCM947XX boards +# +# Copyright 2001-2003, Broadcom Corporation +# All Rights Reserved. +# +# THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY +# KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM +# SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS +# FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. +# +# Copyright 2004 Manuel Novoa III <mjn3@codepoet.org> +# Modified to support bzip'd kernels. +# Of course, it would be better to integrate bunzip capability into CFE. +# +# Copyright 2005 Oleg I. Vdovikin <oleg@cs.msu.su> +# Cleaned up, modified for lzma support, removed from kernel +# + +TEXT_START := 0x80001000 +BZ_TEXT_START := 0x80300000 + +OBJCOPY := $(CROSS_COMPILE)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S + +CFLAGS = -D__KERNEL__ -Wall -Wstrict-prototypes -Wno-trigraphs -Os \ + -fno-strict-aliasing -fno-common -fomit-frame-pointer -G 0 -mno-abicalls -fno-pic \ + -ffunction-sections -pipe -mlong-calls -fno-common \ + -mabi=32 -march=mips32 -Wa,-32 -Wa,-march=mips32 -Wa,-mips32 -Wa,--trap +CFLAGS += -DLOADADDR=$(TEXT_START) -D_LZMA_IN_CB + +ASFLAGS = $(CFLAGS) -D__ASSEMBLY__ -DBZ_TEXT_START=$(BZ_TEXT_START) + +SEDFLAGS := s/BZ_TEXT_START/$(BZ_TEXT_START)/;s/TEXT_START/$(TEXT_START)/ + +OBJECTS := head.o data.o + +all: loader.gz loader.elf + +# Don't build dependencies, this may die if $(CC) isn't gcc +dep: + +install: + +loader.gz: loader + gzip -nc9 $< > $@ + +loader.elf: loader.o + cp $< $@ + +loader: loader.o + $(OBJCOPY) $< $@ + +loader.o: loader.lds $(OBJECTS) + $(LD) -static --gc-sections -no-warn-mismatch -T loader.lds -o $@ $(OBJECTS) + +loader.lds: loader.lds.in Makefile + @sed "$(SEDFLAGS)" < $< > $@ + +data.o: data.lds decompress.image + $(LD) -no-warn-mismatch -T data.lds -r -o $@ -b binary decompress.image -b elf32-tradlittlemips + +data.lds: + @echo "SECTIONS { .data : { code_start = .; *(.data) code_stop = .; }}" > $@ + +decompress.image: decompress + $(OBJCOPY) $< $@ + +decompress: decompress.lds decompress.o LzmaDecode.o + $(LD) -static --gc-sections -no-warn-mismatch -T decompress.lds -o $@ decompress.o LzmaDecode.o + +decompress.lds: decompress.lds.in Makefile + @sed "$(SEDFLAGS)" < $< > $@ + +mrproper: clean + +clean: + rm -f loader.gz loader decompress *.lds *.o *.image |