1c0fbcd99SAnup Patel# 2c0fbcd99SAnup Patel# arch/riscv/boot/Makefile 3c0fbcd99SAnup Patel# 4c0fbcd99SAnup Patel# This file is included by the global makefile so that you can add your own 5c0fbcd99SAnup Patel# architecture-specific flags and dependencies. 6c0fbcd99SAnup Patel# 7c0fbcd99SAnup Patel# This file is subject to the terms and conditions of the GNU General Public 8c0fbcd99SAnup Patel# License. See the file "COPYING" in the main directory of this archive 9c0fbcd99SAnup Patel# for more details. 10c0fbcd99SAnup Patel# 11c0fbcd99SAnup Patel# Copyright (C) 2018, Anup Patel. 12c0fbcd99SAnup Patel# Author: Anup Patel <anup@brainfault.org> 13c0fbcd99SAnup Patel# 14c0fbcd99SAnup Patel# Based on the ia64 and arm64 boot/Makefile. 15c0fbcd99SAnup Patel# 16c0fbcd99SAnup Patel 17c0fbcd99SAnup PatelOBJCOPYFLAGS_Image :=-O binary -R .note -R .note.gnu.build-id -R .comment -S 1857a4542cSGeert UytterhoevenOBJCOPYFLAGS_loader.bin :=-O binary 19c0fbcd99SAnup Patel 20*abcdefbeSJisheng Zhangtargets := Image Image.* loader loader.o loader.lds loader.bin 2144c92257SVitaly Wool 22c0fbcd99SAnup Patel$(obj)/Image: vmlinux FORCE 23c0fbcd99SAnup Patel $(call if_changed,objcopy) 24c0fbcd99SAnup Patel 25c0fbcd99SAnup Patel$(obj)/Image.gz: $(obj)/Image FORCE 26c0fbcd99SAnup Patel $(call if_changed,gzip) 27c0fbcd99SAnup Patel 280e72a2f9SOlof Johansson$(obj)/loader.o: $(src)/loader.S $(obj)/Image 29405fe7aaSChristoph Hellwig 30405fe7aaSChristoph Hellwig$(obj)/loader: $(obj)/loader.o $(obj)/Image $(obj)/loader.lds FORCE 31405fe7aaSChristoph Hellwig $(Q)$(LD) -T $(obj)/loader.lds -o $@ $(obj)/loader.o 32405fe7aaSChristoph Hellwig 338083c629SAtish Patra$(obj)/Image.bz2: $(obj)/Image FORCE 348083c629SAtish Patra $(call if_changed,bzip2) 358083c629SAtish Patra 368083c629SAtish Patra$(obj)/Image.lz4: $(obj)/Image FORCE 378083c629SAtish Patra $(call if_changed,lz4) 388083c629SAtish Patra 398083c629SAtish Patra$(obj)/Image.lzma: $(obj)/Image FORCE 408083c629SAtish Patra $(call if_changed,lzma) 418083c629SAtish Patra 428083c629SAtish Patra$(obj)/Image.lzo: $(obj)/Image FORCE 438083c629SAtish Patra $(call if_changed,lzo) 448083c629SAtish Patra 45de59b6edSJisheng Zhang$(obj)/Image.zst: $(obj)/Image FORCE 46de59b6edSJisheng Zhang $(call if_changed,zstd) 47de59b6edSJisheng Zhang 48ab4ce983SLasse Collin$(obj)/Image.xz: $(obj)/Image FORCE 49ab4ce983SLasse Collin $(call if_changed,xzkern) 50ab4ce983SLasse Collin 5137809df4SChristoph Hellwig$(obj)/loader.bin: $(obj)/loader FORCE 5237809df4SChristoph Hellwig $(call if_changed,objcopy) 53f5579340SArd Biesheuvel 54f5579340SArd BiesheuvelEFI_ZBOOT_PAYLOAD := Image 55f5579340SArd BiesheuvelEFI_ZBOOT_BFD_TARGET := elf$(BITS)-littleriscv 56f5579340SArd BiesheuvelEFI_ZBOOT_MACH_TYPE := RISCV$(BITS) 57f5579340SArd Biesheuvel 58f5579340SArd Biesheuvelinclude $(srctree)/drivers/firmware/efi/libstub/Makefile.zboot 59