aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2019-03-08 05:30:35 (GMT)
committerMasahiro Yamada <yamada.masahiro@socionext.com>2019-03-13 17:39:11 (GMT)
commitc649bd59b6d43998d8c408e2a2fa1922ce5d8363 (patch)
tree8d8e75632df41c6ac6ff7cdff55025d4d25df77c /arch
parentfc2b47b55f17fd996f7a01975ce1c33c2f2513f6 (diff)
unicore32: simplify linker script generation for decompressor
When I was searching for unneeded $(KCONFIG_CONFIG) usages, I noticed this strange build dependency. It can use $(call if_changed,...) in case ZTEXTADDR and ZBSSADDR are changed, but even a simpler way is to use the pattern rule in scripts/Makefile.build. This is what arch/arm/boot/compressed/Makefile does. I did only build test. I confirmed equivalent vmlinux.lds was generated. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/unicore32/boot/compressed/Makefile5
-rw-r--r--arch/unicore32/boot/compressed/vmlinux.lds.S (renamed from arch/unicore32/boot/compressed/vmlinux.lds.in)0
2 files changed, 1 insertions, 4 deletions
diff --git a/arch/unicore32/boot/compressed/Makefile b/arch/unicore32/boot/compressed/Makefile
index 9aecdd3..150fafc 100644
--- a/arch/unicore32/boot/compressed/Makefile
+++ b/arch/unicore32/boot/compressed/Makefile
@@ -61,7 +61,4 @@ $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/head.o $(obj)/piggy.o \
ZTEXTADDR := 0x03000000
ZBSSADDR := ALIGN(4)
-SEDFLAGS_lds = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/
-$(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in arch/unicore32/boot/Makefile $(KCONFIG_CONFIG)
- @sed "$(SEDFLAGS_lds)" < $< > $@
-
+CPPFLAGS_vmlinux.lds = -DTEXT_START="$(ZTEXTADDR)" -DBSS_START="$(ZBSSADDR)"
diff --git a/arch/unicore32/boot/compressed/vmlinux.lds.in b/arch/unicore32/boot/compressed/vmlinux.lds.S
index d5a3ce2..d5a3ce2 100644
--- a/arch/unicore32/boot/compressed/vmlinux.lds.in
+++ b/arch/unicore32/boot/compressed/vmlinux.lds.S

Privacy Policy