RT-AC66 3.0.0.4.374.130 core
[tomato.git] / release / src-rt-6.x / linux / linux-2.6 / arch / cris / arch-v32 / boot / compressed / Makefile
blob9f77eda914ba7448a9f38d515876566d0f338f29
2 # lx25/arch/cris/arch-v32/boot/compressed/Makefile
4 # create a compressed vmlinux image from the original vmlinux files and romfs
7 target = $(target_compressed_dir)
8 src = $(src_compressed_dir)
10 CC = gcc-cris -mlinux -march=v32 -I $(TOPDIR)/include
11 CFLAGS = -O2
12 LD = gcc-cris -mlinux -march=v32 -nostdlib
13 OBJCOPY = objcopy-cris
14 OBJCOPYFLAGS = -O binary --remove-section=.bss
15 OBJECTS = $(target)/head.o $(target)/misc.o
17 # files to compress
18 SYSTEM = $(objtree)/vmlinux.bin
20 all: vmlinuz
22 $(target)/decompress.bin: $(OBJECTS)
23 $(LD) -T $(src)/decompress.ld -o $(target)/decompress.o $(OBJECTS)
24 $(OBJCOPY) $(OBJCOPYFLAGS) $(target)/decompress.o $(target)/decompress.bin
26 $(objtree)/vmlinuz: $(target) piggy.img $(target)/decompress.bin
27 cat $(target)/decompress.bin piggy.img > $(objtree)/vmlinuz
28 rm -f piggy.img
29 cp $(objtree)/vmlinuz $(src)
31 $(target)/head.o: $(src)/head.S
32 $(CC) -D__ASSEMBLY__ -c $< -o $@
34 # gzip the kernel image
36 piggy.img: $(SYSTEM)
37 cat $(SYSTEM) | gzip -f -9 > piggy.img
39 clean:
40 rm -f piggy.img $(objtree)/vmlinuz vmlinuz.o decompress.o decompress.bin $(OBJECTS)