[U-Boot] Depending on an .o file in other directory in Kbuild?
Tuomas Tynkkynen
tuomas at tuxera.com
Fri Mar 23 16:38:46 UTC 2018
Hi,
I finally managed to track down the parallel make issue in helloworld.efi:
(previous posting at https://www.mail-archive.com/u-boot@lists.denx.de/msg268726.html):
make[2]: *** No rule to make target 'lib/efi_loader/helloworld.efi', needed by '__build'. Stop.
The problematic make rule seems to be this from scripts/Makefile.lib:
$(obj)/%_efi.so: $(obj)/%.o arch/$(ARCH)/lib/$(EFI_CRT0) \
arch/$(ARCH)/lib/$(EFI_RELOC)
$(call cmd,efi_ld)
So if I understood the recursive make in Kbuild correctly, during
the build of the lib/efi_loader/ subdirectory, rules from other
makefiles aren't visible (in this case the rules in arch/arm/lib/).
That is, the build usually works because arch/arm/lib/ has been
built by the time make descends into lib/efi_loader/ and the
$(EFI_CRT0) and $(EFI_RELOC) have already been built. But
when the order is swapped around due to parallel make, the
build fails.
I have no idea how this should be done correctly in Kbuild,
so if anybody else knows how to fix this, help is appreciated!
Thanks,
-Tuomas
More information about the U-Boot
mailing list