Makefile: build asm-generic before building scripts
cover Makefile: build asm-generic before building scripts
Hi all,
Last week I came across the issue that building "dtbs" for ARM in a recent (3.9-rcX) kernel fails if it's done in a clean tree, right after "make xxx_defconfig". I am quite certain that this used to work in 3.8. The error is "asm/types.h not found". The problem does not happen if "zImage" is built first and "dtbs" is built second.
Eventually, I found that the root cause seems to be that "asm-generic" is not a dependency for "dtbs" or, rather, "scripts" in the top-level makefile. Building target "zImage" will implicitly build "asm-generic", and subsequent "dtbs" builds will therefore succeed.
The proposed patch adds "asm-generic" as dependency of the "scripts" target. I don't know if the proposed solution is the best possible. It does, however, work for me.
Regards,
-Markus
A message that is not in the archive (sent off-list or not yet received): 1363739254-9425-1-git-send-email-mmayer-dY08KVG/lbpWk0Htik3J/[email protected]
PATCH 1/1 Makefile: build asm-generic before building scripts
DTC requires devicetable-offsets.o, which in turn needs asm/types.h to be present or else it will fail to build.
[...]
CC scripts/mod/devicetable-offsets.s
In file included from include/linux/types.h:5:0,
from include/linux/mod_devicetable.h:11, from scripts/mod/devicetable-offsets.c:2:include/uapi/linux/types.h:4:23: fatal error: asm/types.h:
No such file or directory
--- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
@@ -513,7 +513,7 @@ ifeq ($(KBUILD_EXTMOD),) # Carefully list dependencies so we do not try to build scripts twice # in parallel PHONY += scripts -scripts: scripts_basic include/config/auto.conf include/config/tristate.conf +scripts: asm-generic scripts_basic include/config/auto.conf include/config/tristate.conf $(Q)$(MAKE) $(build)=$(@) # Objects we will link into vmlinux / subdirs we need to visit
Signature · 1 line
1.7.9.5