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 1720d38f7cSTobias KlauserKCOV_INSTRUMENT := n 1820d38f7cSTobias Klauser 19c0fbcd99SAnup PatelOBJCOPYFLAGS_Image :=-O binary -R .note -R .note.gnu.build-id -R .comment -S 20*44c92257SVitaly WoolOBJCOPYFLAGS_xipImage :=-O binary -R .note -R .note.gnu.build-id -R .comment -S 21c0fbcd99SAnup Patel 222c42bcbbSKefeng Wangtargets := Image Image.* loader loader.o loader.lds loader.bin 23*44c92257SVitaly Wooltargets := Image Image.* loader loader.o loader.lds loader.bin xipImage 24*44c92257SVitaly Wool 25*44c92257SVitaly Woolifeq ($(CONFIG_XIP_KERNEL),y) 26*44c92257SVitaly Wool 27*44c92257SVitaly Woolquiet_cmd_mkxip = $(quiet_cmd_objcopy) 28*44c92257SVitaly Woolcmd_mkxip = $(cmd_objcopy) 29*44c92257SVitaly Wool 30*44c92257SVitaly Wool$(obj)/xipImage: vmlinux FORCE 31*44c92257SVitaly Wool $(call if_changed,mkxip) 32*44c92257SVitaly Wool @$(kecho) ' Physical Address of xipImage: $(CONFIG_XIP_PHYS_ADDR)' 33*44c92257SVitaly Wool 34*44c92257SVitaly Woolendif 35c0fbcd99SAnup Patel 36c0fbcd99SAnup Patel$(obj)/Image: vmlinux FORCE 37c0fbcd99SAnup Patel $(call if_changed,objcopy) 38c0fbcd99SAnup Patel 39c0fbcd99SAnup Patel$(obj)/Image.gz: $(obj)/Image FORCE 40c0fbcd99SAnup Patel $(call if_changed,gzip) 41c0fbcd99SAnup Patel 420e72a2f9SOlof Johansson$(obj)/loader.o: $(src)/loader.S $(obj)/Image 43405fe7aaSChristoph Hellwig 44405fe7aaSChristoph Hellwig$(obj)/loader: $(obj)/loader.o $(obj)/Image $(obj)/loader.lds FORCE 45405fe7aaSChristoph Hellwig $(Q)$(LD) -T $(obj)/loader.lds -o $@ $(obj)/loader.o 46405fe7aaSChristoph Hellwig 478083c629SAtish Patra$(obj)/Image.bz2: $(obj)/Image FORCE 488083c629SAtish Patra $(call if_changed,bzip2) 498083c629SAtish Patra 508083c629SAtish Patra$(obj)/Image.lz4: $(obj)/Image FORCE 518083c629SAtish Patra $(call if_changed,lz4) 528083c629SAtish Patra 538083c629SAtish Patra$(obj)/Image.lzma: $(obj)/Image FORCE 548083c629SAtish Patra $(call if_changed,lzma) 558083c629SAtish Patra 568083c629SAtish Patra$(obj)/Image.lzo: $(obj)/Image FORCE 578083c629SAtish Patra $(call if_changed,lzo) 588083c629SAtish Patra 5937809df4SChristoph Hellwig$(obj)/loader.bin: $(obj)/loader FORCE 6037809df4SChristoph Hellwig $(call if_changed,objcopy) 6137809df4SChristoph Hellwig 62c0fbcd99SAnup Patelinstall: 63c0fbcd99SAnup Patel $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ 64c0fbcd99SAnup Patel $(obj)/Image System.map "$(INSTALL_PATH)" 65c0fbcd99SAnup Patel 66c0fbcd99SAnup Patelzinstall: 67c0fbcd99SAnup Patel $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ 68c0fbcd99SAnup Patel $(obj)/Image.gz System.map "$(INSTALL_PATH)" 69