aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris/arch-v10/boot/compressed
diff options
context:
space:
mode:
authorJesper Nilsson <jesper.nilsson@axis.com>2007-11-30 10:10:30 -0500
committerJesper Nilsson <jesper.nilsson@axis.com>2008-02-08 05:06:25 -0500
commit1333a694836cb7e561b1b70d60ccceb8fabeead2 (patch)
tree6fbdfc5ba05a94b39d45c3158b6f406381ce029c /arch/cris/arch-v10/boot/compressed
parent87f5a7f7033ce4bbad082983332bbce43e849c84 (diff)
CRIS v10: Update boot/compressed Kbuild makefile.
- Remove old specific targets, use more generic ones instead. - Use if_changed to avoid creating new images when no change. - Use EXTRA_CFLAGS instead of CFLAGS.
Diffstat (limited to 'arch/cris/arch-v10/boot/compressed')
-rw-r--r--arch/cris/arch-v10/boot/compressed/Makefile48
1 files changed, 19 insertions, 29 deletions
diff --git a/arch/cris/arch-v10/boot/compressed/Makefile b/arch/cris/arch-v10/boot/compressed/Makefile
index 6584a44820f4..17ba271b226e 100644
--- a/arch/cris/arch-v10/boot/compressed/Makefile
+++ b/arch/cris/arch-v10/boot/compressed/Makefile
@@ -1,45 +1,35 @@
1# 1#
2# create a compressed vmlinuz image from the binary vmlinux.bin file 2# arch/cris/arch-v10/boot/compressed/Makefile
3# 3#
4target = $(target_compressed_dir)
5src = $(src_compressed_dir)
6 4
7CC = gcc-cris -melf $(LINUXINCLUDE) 5CC = gcc-cris -melf $(LINUXINCLUDE)
8CFLAGS = -O2 6EXTRA_CFLAGS = -O2
9LD = ld-cris 7LD = ld-cris
8LDFLAGS = -T $(obj)/decompress.ld
9OBJECTS = $(obj)/head.o $(obj)/misc.o
10OBJCOPY = objcopy-cris 10OBJCOPY = objcopy-cris
11OBJCOPYFLAGS = -O binary --remove-section=.bss 11OBJCOPYFLAGS = -O binary --remove-section=.bss
12OBJECTS = $(target)/head.o $(target)/misc.o
13 12
14# files to compress 13quiet_cmd_image = BUILD $@
15SYSTEM = $(objtree)/vmlinux.bin 14cmd_image = cat $(obj)/decompress.bin $(obj)/piggy.gz > $@
16 15
17all: $(target_compressed_dir)/vmlinuz 16targets := vmlinux piggy.gz decompress.o decompress.bin
18 17
19$(target)/decompress.bin: $(OBJECTS) 18$(obj)/decompress.o: $(OBJECTS) FORCE
20 $(LD) -T $(src)/decompress.ld -o $(target)/decompress.o $(OBJECTS) 19 $(call if_changed,ld)
21 $(OBJCOPY) $(OBJCOPYFLAGS) $(target)/decompress.o $(target)/decompress.bin
22 20
23# Create vmlinuz image in top-level build directory 21$(obj)/decompress.bin: $(obj)/decompress.o FORCE
24$(target_compressed_dir)/vmlinuz: $(target) piggy.img $(target)/decompress.bin 22 $(call if_changed,objcopy)
25 @echo " COMPR vmlinux.bin --> vmlinuz"
26 @cat $(target)/decompress.bin piggy.img > $(target_compressed_dir)/vmlinuz
27 @rm -f piggy.img
28 23
29$(target)/head.o: $(src)/head.S 24$(obj)/head.o: $(obj)/head.S .config
30 $(CC) -D__ASSEMBLY__ -traditional -c $< -o $@ 25 @$(CC) -D__ASSEMBLY__ -traditional -c $< -o $@
31 26
32$(target)/misc.o: $(src)/misc.c 27$(obj)/misc.o: $(obj)/misc.c .config
33 $(CC) -D__KERNEL__ -c $< -o $@ 28 @$(CC) -D__KERNEL__ -c $< -o $@
34 29
35# gzip the kernel image 30$(obj)/vmlinux: $(obj)/piggy.gz $(obj)/decompress.bin FORCE
31 $(call if_changed,image)
36 32
37piggy.img: $(SYSTEM) 33$(obj)/piggy.gz: $(obj)/../Image FORCE
38 @cat $(SYSTEM) | gzip -f -9 > piggy.img 34 $(call if_changed,gzip)
39
40$(target):
41 mkdir -p $(target)
42
43clean:
44 rm -f piggy.img $(objtree)/vmlinuz
45 35