]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - arch/m32r/boot/compressed/Makefile
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[mirror_ubuntu-bionic-kernel.git] / arch / m32r / boot / compressed / Makefile
CommitLineData
b2441318 1# SPDX-License-Identifier: GPL-2.0
1da177e4 2#
a556bec9 3# linux/arch/m32r/boot/compressed/Makefile
1da177e4
LT
4#
5# create a compressed vmlinux image from the original vmlinux
6#
7
337214e8
HT
8targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 \
9 vmlinux.bin.lzma head.o misc.o piggy.o vmlinux.lds
1da177e4
LT
10
11OBJECTS = $(obj)/head.o $(obj)/misc.o
12
13#
14# IMAGE_OFFSET is the load offset of the compression loader
15#
16#IMAGE_OFFSET := $(shell printf "0x%08x" $$[$(CONFIG_MEMORY_START)+0x2000])
17#IMAGE_OFFSET := $(shell printf "0x%08x" $$[$(CONFIG_MEMORY_START)+0x00400000])
18
19LDFLAGS_vmlinux := -T
20
21$(obj)/vmlinux: $(obj)/vmlinux.lds $(OBJECTS) $(obj)/piggy.o FORCE
22 $(call if_changed,ld)
1da177e4
LT
23
24$(obj)/vmlinux.bin: vmlinux FORCE
25 $(call if_changed,objcopy)
26
27$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
28 $(call if_changed,gzip)
29
337214e8
HT
30$(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE
31 $(call if_changed,bzip2)
32
33$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
34 $(call if_changed,lzma)
35
1da177e4
LT
36CFLAGS_misc.o += -fpic
37
38ifdef CONFIG_MMU
39LDFLAGS_piggy.o := -r --format binary --oformat elf32-m32r-linux -T
40else
41LDFLAGS_piggy.o := -r --format binary --oformat elf32-m32r -T
42endif
43
44OBJCOPYFLAGS += -R .empty_zero_page
45
df12aef6
GU
46suffix-$(CONFIG_KERNEL_GZIP) = gz
47suffix-$(CONFIG_KERNEL_BZIP2) = bz2
48suffix-$(CONFIG_KERNEL_LZMA) = lzma
337214e8 49
a556bec9 50$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix-y) FORCE
1da177e4 51 $(call if_changed,ld)