aboutsummaryrefslogtreecommitdiff
path: root/Kbuild
diff options
context:
space:
mode:
authorMasahiro Yamada2020-04-17 16:21:37 +0900
committerTom Rini2020-04-28 15:44:31 -0400
commitf34d0ad82e51df9dbd5f80bc0f17c3542de2bc0e (patch)
tree4a6a63f161c378285a6a9f73c1398deffff2c595 /Kbuild
parent221c4d982698d9f537237108f779b8174ce24c87 (diff)
kbuild: SPL/TPL: generate separate asm-offsets.h for SPL and TPL
Currently generic-asm-offsets.h and asm-offsets.h are generated based on U-Boot proper config options. The same asm-offsets headers are used for building U-Boot SPL/TPL, which causes potential offset mismatch if U-Boot proper has different config options from U-Boot SPL/TPL. This commit adds: spl/include/generated/(generic-)asm-offsets.h tpl/include/generated/(generic-)asm-offsets.h spl/include/generated/(generic-)asm-offsets.h is generated if CONFIG_SPL=y, and included when building SPL. tpl/include/generated/(generic-)asm-offsets.h is generated if CONFIG_TPL=y, and included when building TPL. They are created before Kbuild descends into SPL/TPL object directories and builds $(obj)/dts/dt-platdata.o because $(obj)/dts/dt-platdata.c includes a bunch of headers. Prepend -I$(obj)/include to $(UBOOTINCLUDE) so (generic-)asm-offsets.h is searched in {spl,tpl}/include/generated/. Requested-by: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Tested-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'Kbuild')
-rw-r--r--Kbuild4
1 files changed, 2 insertions, 2 deletions
diff --git a/Kbuild b/Kbuild
index 6014f7c34ac..1eac0915947 100644
--- a/Kbuild
+++ b/Kbuild
@@ -10,7 +10,7 @@ generic-offsets-file := include/generated/generic-asm-offsets.h
always := $(generic-offsets-file)
targets := lib/asm-offsets.s
-$(obj)/$(generic-offsets-file): lib/asm-offsets.s FORCE
+$(obj)/$(generic-offsets-file): $(obj)/lib/asm-offsets.s FORCE
$(call filechk,offsets,__GENERIC_ASM_OFFSETS_H__)
#####
@@ -25,5 +25,5 @@ targets += arch/$(ARCH)/lib/asm-offsets.s
CFLAGS_asm-offsets.o := -DDO_DEPS_ONLY
-$(obj)/$(offsets-file): arch/$(ARCH)/lib/asm-offsets.s FORCE
+$(obj)/$(offsets-file): $(obj)/arch/$(ARCH)/lib/asm-offsets.s FORCE
$(call filechk,offsets,__ASM_OFFSETS_H__)