[PATCH] CRIS update: configuration and build
[linux-2.6/linux-2.6-openrd.git] / arch / cris / arch-v10 / boot / compressed / Makefile
blob6584a44820f416996f4352073a9620e2e4a1b883
2 # create a compressed vmlinuz image from the binary vmlinux.bin file
4 target = $(target_compressed_dir)
5 src = $(src_compressed_dir)
7 CC = gcc-cris -melf $(LINUXINCLUDE)
8 CFLAGS = -O2
9 LD = ld-cris
10 OBJCOPY = objcopy-cris
11 OBJCOPYFLAGS = -O binary --remove-section=.bss
12 OBJECTS = $(target)/head.o $(target)/misc.o
14 # files to compress
15 SYSTEM = $(objtree)/vmlinux.bin
17 all: $(target_compressed_dir)/vmlinuz
19 $(target)/decompress.bin: $(OBJECTS)
20 $(LD) -T $(src)/decompress.ld -o $(target)/decompress.o $(OBJECTS)
21 $(OBJCOPY) $(OBJCOPYFLAGS) $(target)/decompress.o $(target)/decompress.bin
23 # Create vmlinuz image in top-level build directory
24 $(target_compressed_dir)/vmlinuz: $(target) piggy.img $(target)/decompress.bin
25 @echo " COMPR vmlinux.bin --> vmlinuz"
26 @cat $(target)/decompress.bin piggy.img > $(target_compressed_dir)/vmlinuz
27 @rm -f piggy.img
29 $(target)/head.o: $(src)/head.S
30 $(CC) -D__ASSEMBLY__ -traditional -c $< -o $@
32 $(target)/misc.o: $(src)/misc.c
33 $(CC) -D__KERNEL__ -c $< -o $@
35 # gzip the kernel image
37 piggy.img: $(SYSTEM)
38 @cat $(SYSTEM) | gzip -f -9 > piggy.img
40 $(target):
41 mkdir -p $(target)
43 clean:
44 rm -f piggy.img $(objtree)/vmlinuz