1 # SPDX-License-Identifier: GPL-2.0
3 # linux/arch/m32r/boot/compressed/Makefile
5 # create a compressed vmlinux image from the original vmlinux
8 targets
:= vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 \
9 vmlinux.bin.lzma head.o misc.o piggy.o vmlinux.lds
11 OBJECTS
= $(obj
)/head.o
$(obj
)/misc.o
14 # IMAGE_OFFSET is the load offset of the compression loader
16 #IMAGE_OFFSET := $(shell printf "0x%08x" $$[$(CONFIG_MEMORY_START)+0x2000])
17 #IMAGE_OFFSET := $(shell printf "0x%08x" $$[$(CONFIG_MEMORY_START)+0x00400000])
21 $(obj
)/vmlinux
: $(obj
)/vmlinux.lds
$(OBJECTS
) $(obj
)/piggy.o FORCE
24 $(obj
)/vmlinux.bin
: vmlinux FORCE
25 $(call if_changed
,objcopy
)
27 $(obj
)/vmlinux.bin.gz
: $(obj
)/vmlinux.bin FORCE
28 $(call if_changed
,gzip
)
30 $(obj
)/vmlinux.bin.bz2
: $(obj
)/vmlinux.bin FORCE
31 $(call if_changed
,bzip2
)
33 $(obj
)/vmlinux.bin.lzma
: $(obj
)/vmlinux.bin FORCE
34 $(call if_changed
,lzma
)
36 CFLAGS_misc.o
+= -fpic
39 LDFLAGS_piggy.o
:= -r
--format binary
--oformat elf32-m32r-linux
-T
41 LDFLAGS_piggy.o
:= -r
--format binary
--oformat elf32-m32r
-T
44 OBJCOPYFLAGS
+= -R .empty_zero_page
46 suffix-
$(CONFIG_KERNEL_GZIP
) = gz
47 suffix-
$(CONFIG_KERNEL_BZIP2
) = bz2
48 suffix-
$(CONFIG_KERNEL_LZMA
) = lzma
50 $(obj
)/piggy.o
: $(obj
)/vmlinux.scr
$(obj
)/vmlinux.bin.
$(suffix-y
) FORCE