Skip to contentSkip to conversation

riscv: Fix build dependency for loader

PATCH In review Olof Johansson 3 participants 3 messages Dec 7, 2019 – Dec 9, 2019 RISC-V

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 riscv: Fix build dependency for loader

The Makefile addition for the flat image loader missed an obj prefix.

For most parallel builds this worked out fine, but with -j1 the dependency wasn't fulfilled and thus fails:

arch/riscv/boot/loader.S: Assembler messages:
arch/riscv/boot/loader.S:7: Error: file not found: arch/riscv/boot/Image

Fixes 405fe7aa0dba ("riscv: provide a flat image loader")
Cc Christoph Hellwig <[email protected]>
---
 arch/riscv/boot/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/boot/Makefile +1 -1
index a474f98ce4fae..36db8145f9f46 100644
@@ -24,7 +24,7 @@ $(obj)/Image: vmlinux FORCE
 $(obj)/Image.gz: $(obj)/Image FORCE
 	$(call if_changed,gzip)
 
-loader.o: $(src)/loader.S $(obj)/Image
+$(obj)/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
Signature · 1 line
2.11.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Olof Johansson

The Makefile addition for the flat image loader missed an obj prefix.

For most parallel builds this worked out fine, but with -j1 the dependency wasn't fulfilled and thus fails:

Quoted 6 lines

arch/riscv/boot/loader.S: Assembler messages:
arch/riscv/boot/loader.S:7: Error: file not found: arch/riscv/boot/Image

Fixes 405fe7aa0dba ("riscv: provide a flat image loader")
Cc Christoph Hellwig <[email protected]>

LGTM.

Regards,
Anup

Quoted 20 lines
---
 arch/riscv/boot/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/boot/Makefile +1 -2
index a474f98ce4fae..36db8145f9f46 100644
@@ -24,7 +24,7 @@ $(obj)/Image: vmlinux FORCE
 $(obj)/Image.gz: $(obj)/Image FORCE
        $(call if_changed,gzip)
 
-loader.o: $(src)/loader.S $(obj)/Image
+$(obj)/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
--

2.11.0

#2 lore raw
In reply to Olof Johansson
Quoted 11 lines · Olof Johansson

The Makefile addition for the flat image loader missed an obj prefix.

For most parallel builds this worked out fine, but with -j1 the dependency wasn't fulfilled and thus fails:

arch/riscv/boot/loader.S: Assembler messages:
arch/riscv/boot/loader.S:7: Error: file not found: arch/riscv/boot/Image

Fixes 405fe7aa0dba ("riscv: provide a flat image loader")
Cc Christoph Hellwig <[email protected]>

Thanks, queued for v5.5-rc.

- Paul