b8d59bec22a31e3faafc77db97dc7fa8fa79fa15
Commite6195c5304(Makefile: fix use of many br2-external trees) fixed a slowdown with many br2-external trees. In doing so, it changed the type of the %_defconfig rule: the stem is no longer present in the prerequisites, so it changes from a pattern rule to an implicit pattern rule [0]. It is not unusual to name the build directory after the defconfig that is being built, so we may end up with a build directory named meh_defconfig. Beforee6195c5304, the pattern rule would not match [1], but now it does, which causes somewhat-cryptic build failures: Makefile:1015: *** "Can't find /some/path/meh_defconfig". Stop. The issue is that we have this set of rules and assignments (elided and reordered for legibility): all: world world: target-post-image target-post-image: staging-finalize staging-finalize: $(STAGING_DIR_SYMLINK) $(STAGING_DIR_SYMLINK): | $(BASE_DIR) BASE_DIR := $(CANONICAL_O) CANONICAL_O := $(shell mkdir -p $(O) >/dev/null 2>&1)$(realpath $(O)) So, there is a rule that (eventually) has a dependency on $(O), but we have no rule that provides it explicitly, so the %_defconfig rule kicks in, with the stem as "/some/path/meh". When the loop searches all the ".../configs/" directories for a file named ".../configs/%_defconfig", it actually looks for a file named ".../configs//some/path/meh_defconfig" and that indeed never matches anything. The solution is to provide an actual rule for $(BASE_DIR), so that the implicit rule does not kick in. [0] Terminology and behaviour in make is hard, so the terms we used here may be wrong or incorrectly used, and/or the explanations for the behaviour be wrong or incomplete... Still, the reasoning stands, and the root cause is the removal of the stem in the RHS of the rule (adding one back does fix the issue). [1] not sure how the prerequisite was solved beforee6195c5304, though... Fixes:e6195c5304Reported-by: Romain Naour <romain.naour@gmail.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Cc: Nevo Hed <nhed+buildroot@starry.com> Cc: Peter Korsgaard <peter@korsgaard.com> Tested-by: Sebastian Weyer <sebastian.weyer@smile.fr> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> (cherry picked from commit5bd2cafc32) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Buildroot is a simple, efficient and easy-to-use tool to generate embedded Linux systems through cross-compilation. The documentation can be found in docs/manual. You can generate a text document with 'make manual-text' and read output/docs/manual/manual.text. Online documentation can be found at http://buildroot.org/docs.html To build and use the buildroot stuff, do the following: 1) run 'make menuconfig' 2) select the target architecture and the packages you wish to compile 3) run 'make' 4) wait while it compiles 5) find the kernel, bootloader, root filesystem, etc. in output/images You do not need to be root to build or run buildroot. Have fun! Buildroot comes with a basic configuration for a number of boards. Run 'make list-defconfigs' to view the list of provided configurations. Please feed suggestions, bug reports, insults, and bribes back to the buildroot mailing list: buildroot@buildroot.org You can also find us on #buildroot on OFTC IRC. If you would like to contribute patches, please read https://buildroot.org/manual.html#submitting-patches
Description
Languages
Makefile
62.9%
Python
18.3%
C
8.6%
Shell
6.2%
PHP
1.4%
Other
2.2%