diff options
author | Christoph Hellwig <hch@lst.de> | 2019-10-28 13:10:42 +0100 |
---|---|---|
committer | Paul Walmsley <paul.walmsley@sifive.com> | 2019-11-17 15:17:39 -0800 |
commit | 405fe7aa0dbaa6cb8cfe62771eee67076d30aca1 (patch) | |
tree | ff3c0f7b7c06d02cb87a148db3e2a1a3ddf28124 /arch/riscv/boot/Makefile | |
parent | 6bd33e1ece528f67646db33bf97406b747dafda0 (diff) | |
download | linux-stable-405fe7aa0dbaa6cb8cfe62771eee67076d30aca1.tar.gz linux-stable-405fe7aa0dbaa6cb8cfe62771eee67076d30aca1.tar.bz2 linux-stable-405fe7aa0dbaa6cb8cfe62771eee67076d30aca1.zip |
riscv: provide a flat image loader
This allows just loading the kernel at a pre-set address without
qemu going bonkers trying to map the ELF file.
Contains a contribution from Aurabindo Jayamohanan to reuse the
PAGE_OFFSET definition.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Anup Patel <anup@brainfault.org>
[paul.walmsley@sifive.com: fixed checkpatch issue; minor commit
message fix]
Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
Diffstat (limited to 'arch/riscv/boot/Makefile')
-rw-r--r-- | arch/riscv/boot/Makefile | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/riscv/boot/Makefile b/arch/riscv/boot/Makefile index 0990a9fdbe5d..433ccbcabb23 100644 --- a/arch/riscv/boot/Makefile +++ b/arch/riscv/boot/Makefile @@ -16,7 +16,7 @@ OBJCOPYFLAGS_Image :=-O binary -R .note -R .note.gnu.build-id -R .comment -S -targets := Image +targets := Image loader $(obj)/Image: vmlinux FORCE $(call if_changed,objcopy) @@ -24,6 +24,11 @@ $(obj)/Image: vmlinux FORCE $(obj)/Image.gz: $(obj)/Image FORCE $(call if_changed,gzip) +loader.o: $(src)/loader.S $(obj)/Image + +$(obj)/loader: $(obj)/loader.o $(obj)/Image $(obj)/loader.lds FORCE + $(Q)$(LD) -T $(obj)/loader.lds -o $@ $(obj)/loader.o + install: $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ $(obj)/Image System.map "$(INSTALL_PATH)" |