android_kernel_xiaomi_sm8350/arch/cris/arch-v10/boot/compressed/Makefile
Mikael Starvik 3e41d6522a [PATCH] CRIS update: configuration and build
Changes to configuration and build system.

* Added v32 sub architecture.
* Use generic hard IRQ.
* Added SMP options.
* Added options to OOPS at NMI and reboot at OOM.
* Made it possible to set objtree.
* Added option to select Kernel GDB serial port.
* Corrected Kconfig usage.
* Added system profiler.

Signed-off-by: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-27 16:25:59 -07:00

46 lines
1.1 KiB
Makefile

#
# create a compressed vmlinuz image from the binary vmlinux.bin file
#
target = $(target_compressed_dir)
src = $(src_compressed_dir)
CC = gcc-cris -melf $(LINUXINCLUDE)
CFLAGS = -O2
LD = ld-cris
OBJCOPY = objcopy-cris
OBJCOPYFLAGS = -O binary --remove-section=.bss
OBJECTS = $(target)/head.o $(target)/misc.o
# files to compress
SYSTEM = $(objtree)/vmlinux.bin
all: $(target_compressed_dir)/vmlinuz
$(target)/decompress.bin: $(OBJECTS)
$(LD) -T $(src)/decompress.ld -o $(target)/decompress.o $(OBJECTS)
$(OBJCOPY) $(OBJCOPYFLAGS) $(target)/decompress.o $(target)/decompress.bin
# Create vmlinuz image in top-level build directory
$(target_compressed_dir)/vmlinuz: $(target) piggy.img $(target)/decompress.bin
@echo " COMPR vmlinux.bin --> vmlinuz"
@cat $(target)/decompress.bin piggy.img > $(target_compressed_dir)/vmlinuz
@rm -f piggy.img
$(target)/head.o: $(src)/head.S
$(CC) -D__ASSEMBLY__ -traditional -c $< -o $@
$(target)/misc.o: $(src)/misc.c
$(CC) -D__KERNEL__ -c $< -o $@
# gzip the kernel image
piggy.img: $(SYSTEM)
@cat $(SYSTEM) | gzip -f -9 > piggy.img
$(target):
mkdir -p $(target)
clean:
rm -f piggy.img $(objtree)/vmlinuz