Hi Masahiro-san, On Fri, 2014-03-28 at 15:36 +0900, Masahiro Yamada wrote: > Hi Alexey, > > This may be the similar discussion to > http://u-boot.10912.n7.nabble.com/U-Boot-could-not-cross-compile-u-boot-tools-td174911.html
It looks not that relevant to me. For example even before switching U-Boot to Kbuild it was not possible to build host tools simply without patching sources/headers or configuring real target. Or I might be missing something here. > Providing a separate make target seems preferable. > > Maybe like this? > > To build host tools just execute: > ===== > make tools-only > ===== Fully agree. I thought about it right after I sent you initial patch. > And I am not happy about adding ifdef to everywhere. So do I. But I don't see other way around unfortunately. > > So, how about a patch like this? > > > > > diff --git a/Makefile b/Makefile > index c744718..12e1075 100644 > --- a/Makefile > +++ b/Makefile > @@ -409,7 +409,7 @@ timestamp_h := include/generated/timestamp_autogenerated.h > > no-dot-config-targets := clean clobber mrproper distclean \ > help %docs check% coccicheck \ > - ubootversion backup > + ubootversion backup tools-only > > config-targets := 0 > mixed-targets := 0 > @@ -1128,6 +1128,9 @@ checkarmreloc: u-boot > env: scripts_basic > $(Q)$(MAKE) $(build)=tools/$@ > > +tools-only: scripts_basic > + $(Q)$(MAKE) $(build)=tools > + > tools-all: export HOST_TOOLS_ALL=y > tools-all: env tools ; > Doesn't work for me: ======== $ make tools-only HOSTCC scripts/basic/fixdep HOSTCC tools/aisimage.o HOSTCC tools/crc32.o HOSTCC tools/default_image.o HOSTCC tools/dumpimage.o In file included from include/version.h:11:0, from tools/dumpimage.c:11: include/timestamp.h:11:47: fatal error: generated/timestamp_autogenerated.h: No such file or directory #include "generated/timestamp_autogenerated.h" ^ compilation terminated. make[1]: *** [tools/dumpimage.o] Error 1 make: *** [tools-only] Error 2 ======== -Alexey _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot