xref: /linux/arch/arm64/boot/Makefile (revision 45dd403da851124412d32e3193c21de4a51d29da)
18c2c3df3SCatalin Marinas#
28c2c3df3SCatalin Marinas# arch/arm64/boot/Makefile
38c2c3df3SCatalin Marinas#
48c2c3df3SCatalin Marinas# This file is included by the global makefile so that you can add your own
58c2c3df3SCatalin Marinas# architecture-specific flags and dependencies.
68c2c3df3SCatalin Marinas#
78c2c3df3SCatalin Marinas# This file is subject to the terms and conditions of the GNU General Public
88c2c3df3SCatalin Marinas# License.  See the file "COPYING" in the main directory of this archive
98c2c3df3SCatalin Marinas# for more details.
108c2c3df3SCatalin Marinas#
118c2c3df3SCatalin Marinas# Copyright (C) 2012, ARM Ltd.
128c2c3df3SCatalin Marinas# Author: Will Deacon <will.deacon@arm.com>
138c2c3df3SCatalin Marinas#
148c2c3df3SCatalin Marinas# Based on the ia64 boot/Makefile.
158c2c3df3SCatalin Marinas#
168c2c3df3SCatalin Marinas
17f8fa70f3SMark RutlandOBJCOPYFLAGS_Image :=-O binary -R .note -R .note.gnu.build-id -R .comment -S
18f8fa70f3SMark Rutland
199f6a503dSJisheng Zhangtargets := Image Image.bz2 Image.gz Image.lz4 Image.lzma Image.lzo Image.zst
208c2c3df3SCatalin Marinas
218c2c3df3SCatalin Marinas$(obj)/Image: vmlinux FORCE
228c2c3df3SCatalin Marinas	$(call if_changed,objcopy)
238c2c3df3SCatalin Marinas
240723c05fSOlof Johansson$(obj)/Image.bz2: $(obj)/Image FORCE
250723c05fSOlof Johansson	$(call if_changed,bzip2)
260723c05fSOlof Johansson
278c2c3df3SCatalin Marinas$(obj)/Image.gz: $(obj)/Image FORCE
288c2c3df3SCatalin Marinas	$(call if_changed,gzip)
298c2c3df3SCatalin Marinas
300723c05fSOlof Johansson$(obj)/Image.lz4: $(obj)/Image FORCE
310723c05fSOlof Johansson	$(call if_changed,lz4)
320723c05fSOlof Johansson
330723c05fSOlof Johansson$(obj)/Image.lzma: $(obj)/Image FORCE
340723c05fSOlof Johansson	$(call if_changed,lzma)
350723c05fSOlof Johansson
360723c05fSOlof Johansson$(obj)/Image.lzo: $(obj)/Image FORCE
370723c05fSOlof Johansson	$(call if_changed,lzo)
389f6a503dSJisheng Zhang
399f6a503dSJisheng Zhang$(obj)/Image.zst: $(obj)/Image FORCE
409f6a503dSJisheng Zhang	$(call if_changed,zstd)
41c37b830fSArd Biesheuvel
42c37b830fSArd BiesheuvelEFI_ZBOOT_PAYLOAD	:= Image
43c37b830fSArd BiesheuvelEFI_ZBOOT_BFD_TARGET	:= elf64-littleaarch64
44c37b830fSArd BiesheuvelEFI_ZBOOT_MACH_TYPE	:= ARM64
45538bc0f4SArd BiesheuvelEFI_ZBOOT_FORWARD_CFI	:= $(CONFIG_ARM64_BTI_KERNEL)
46c37b830fSArd Biesheuvel
47*45dd403dSArd BiesheuvelEFI_ZBOOT_OBJCOPY_FLAGS	= --add-symbol zboot_code_size=0x$(shell \
48*45dd403dSArd Biesheuvel				$(NM) vmlinux|grep _kernel_codesize|cut -d' ' -f1)
49*45dd403dSArd Biesheuvel
50c37b830fSArd Biesheuvelinclude $(srctree)/drivers/firmware/efi/libstub/Makefile.zboot
51