Skip to content

buildroot: drop the inert BR2_EXTERNAL_DIRS=.. from the build - #336

Merged
daniel-rossier merged 1 commit into
mainfrom
fix/buildroot-drop-dead-br2-external-dirs
Sep 25, 2026
Merged

daniel-rossier merged 1 commit into
mainfrom
fix/buildroot-drop-dead-br2-external-dirs

Conversation

@daniel-rossier

Copy link
Copy Markdown
Contributor

BR2_EXTERNAL_DIRS is generated by buildroot from BR2_EXTERNAL. Passing it on
the make command line registers no external tree: BR2_EXTERNAL_NAMES and
BR2_EXTERNAL_MKS stay empty, and the package infrastructure iterates over
BR2_EXTERNAL_NAMES — the Makefile says so itself at line 1237.

Its only two consumers are out of reach here:

  • the %_defconfig rule (Makefile:1027), which this invocation does not target —
    do_configure runs make O=… BR2_DL_DIR=… <plat>_defconfig with no such
    variable;
  • -include $(foreach dir,$(BR2_EXTERNAL_DIRS),$(wildcard $(dir)/docs/*/*.mk))
    (Makefile:1272) — there is no docs/ under the output directory.

Evidence: diffing the complete make variable database (make printvars VARS='%')
with and without the flag gives one differing line out of 314601 — the
variable itself. Nothing derives from it.

The rootfs overlays and post_image.sh are reached by the defconfig through
$(BASE_DIR)/board/…, not by any br2-external mechanism. Keeping the flag only
invites the misreading that board/ is a BR2_EXTERNAL tree; it is not.

🤖 Generated with Claude Code

BR2_EXTERNAL_DIRS is generated by buildroot from BR2_EXTERNAL; passing it on
the command line registers no external tree. BR2_EXTERNAL_NAMES and
BR2_EXTERNAL_MKS stay empty, and the package infrastructure iterates over
BR2_EXTERNAL_NAMES, not over BR2_EXTERNAL_DIRS.

Its only two consumers are out of reach here: the %_defconfig rule, which
this invocation does not target (do_configure passes no such variable), and
an include of $(dir)/docs/*/*.mk, which does not exist under the output
directory. Diffing the complete make variable database with and without the
flag shows a single difference out of 314601 entries: the variable itself.

The rootfs overlays and post_image.sh are reached by the defconfig through
$(BASE_DIR)/board/..., not by any br2-external mechanism.
@daniel-rossier
daniel-rossier merged commit 3966a8d into main Sep 25, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant