From: Kory Maincent via buildroot <buildroot@buildroot.org>
To: buildroot@buildroot.org
Cc: Kory Maincent <kory.maincent@bootlin.com>,
thomas.petazzoni@bootlin.com,
Ricardo Martincoski <ricardo.martincoski@datacom.com.br>
Subject: [Buildroot] [PATCH] utils/docker-run: Support BR2_EXTERNAL with relative paths
Date: Mon, 15 Jun 2026 12:39:29 +0000 [thread overview]
Message-ID: <20260615123930.447-1-kory.maincent@bootlin.com> (raw)
The docker-run script did not handle the BR2_EXTERNAL environment variable,
preventing use of external trees in Docker builds.
Add support by converting relative paths to absolute, mounting the directory
into the container, and passing the variable to the Docker environment.
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
---
utils/docker-run | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/utils/docker-run b/utils/docker-run
index 27c169db72..6e9693edd6 100755
--- a/utils/docker-run
+++ b/utils/docker-run
@@ -97,6 +97,12 @@ if [ "${BR2_DL_DIR}" ]; then
docker_opts+=( --env BR2_DL_DIR )
fi
+if [ "${BR2_EXTERNAL}" ]; then
+ BR2_EXTERNAL_DIR="$(cd "${MAIN_DIR}"; readlink -e "${BR2_EXTERNAL}")"
+ mountpoints+=( "${BR2_EXTERNAL_DIR}" )
+ docker_opts+=( --env BR2_EXTERNAL )
+fi
+
# shellcheck disable=SC2013 # can't use while-read because of the assignment
for dir in $(printf '%s\n' "${mountpoints[@]}" |LC_ALL=C sort -u); do
docker_opts+=( --mount "type=bind,src=${dir},dst=${dir}" )
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next reply other threads:[~2026-06-15 12:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-15 12:39 Kory Maincent via buildroot [this message]
2026-06-15 18:07 ` [Buildroot] [PATCH] utils/docker-run: Support BR2_EXTERNAL with relative paths Fiona Klute via buildroot
2026-06-18 16:14 ` Kory Maincent via buildroot
2026-06-18 16:35 ` Kory Maincent via buildroot
2026-06-18 18:22 ` Fiona Klute via buildroot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260615123930.447-1-kory.maincent@bootlin.com \
--to=buildroot@buildroot.org \
--cc=kory.maincent@bootlin.com \
--cc=ricardo.martincoski@datacom.com.br \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox