xref: /linux/arch/arm64/boot/Makefile (revision 3a39d672e7f48b8d6b91a09afa4b55352773b4b5)
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
197a23b027SSimon Glasstargets := Image Image.bz2 Image.gz Image.lz4 Image.lzma Image.lzo \
20*181e71f6SLasse Collin	Image.zst Image.xz image.fit
218c2c3df3SCatalin Marinas
228c2c3df3SCatalin Marinas$(obj)/Image: vmlinux FORCE
238c2c3df3SCatalin Marinas	$(call if_changed,objcopy)
248c2c3df3SCatalin Marinas
250723c05fSOlof Johansson$(obj)/Image.bz2: $(obj)/Image FORCE
260723c05fSOlof Johansson	$(call if_changed,bzip2)
270723c05fSOlof Johansson
288c2c3df3SCatalin Marinas$(obj)/Image.gz: $(obj)/Image FORCE
298c2c3df3SCatalin Marinas	$(call if_changed,gzip)
308c2c3df3SCatalin Marinas
310723c05fSOlof Johansson$(obj)/Image.lz4: $(obj)/Image FORCE
320723c05fSOlof Johansson	$(call if_changed,lz4)
330723c05fSOlof Johansson
340723c05fSOlof Johansson$(obj)/Image.lzma: $(obj)/Image FORCE
350723c05fSOlof Johansson	$(call if_changed,lzma)
360723c05fSOlof Johansson
370723c05fSOlof Johansson$(obj)/Image.lzo: $(obj)/Image FORCE
380723c05fSOlof Johansson	$(call if_changed,lzo)
399f6a503dSJisheng Zhang
409f6a503dSJisheng Zhang$(obj)/Image.zst: $(obj)/Image FORCE
419f6a503dSJisheng Zhang	$(call if_changed,zstd)
42c37b830fSArd Biesheuvel
43*181e71f6SLasse Collin$(obj)/Image.xz: $(obj)/Image FORCE
44*181e71f6SLasse Collin	$(call if_changed,xzkern)
45*181e71f6SLasse Collin
467a23b027SSimon Glass$(obj)/image.fit: $(obj)/Image $(obj)/dts/dtbs-list FORCE
477a23b027SSimon Glass	$(call if_changed,fit)
487a23b027SSimon Glass
49c37b830fSArd BiesheuvelEFI_ZBOOT_PAYLOAD	:= Image
50c37b830fSArd BiesheuvelEFI_ZBOOT_BFD_TARGET	:= elf64-littleaarch64
51c37b830fSArd BiesheuvelEFI_ZBOOT_MACH_TYPE	:= ARM64
52538bc0f4SArd BiesheuvelEFI_ZBOOT_FORWARD_CFI	:= $(CONFIG_ARM64_BTI_KERNEL)
53c37b830fSArd Biesheuvel
5497ba4416SMasahiro YamadaEFI_ZBOOT_OBJCOPY_FLAGS	= --add-symbol zboot_code_size=0x$$( \
5545dd403dSArd Biesheuvel				$(NM) vmlinux|grep _kernel_codesize|cut -d' ' -f1)
5645dd403dSArd Biesheuvel
57c37b830fSArd Biesheuvelinclude $(srctree)/drivers/firmware/efi/libstub/Makefile.zboot
58