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
)
10 OBJCOPY
= objcopy-cris
11 OBJCOPYFLAGS
= -O binary
--remove-section
=.bss
12 OBJECTS
= $(target
)/head.o
$(target
)/misc.o
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
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
38 @cat
$(SYSTEM
) | gzip
-f
-9 > piggy.img
44 rm -f piggy.img
$(objtree
)/vmlinuz