From: Markus Mayer <mmayer@broadcom.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] system/Config.in: introduce pre-build script
Date: Tue, 21 Jan 2020 15:09:56 -0800 [thread overview]
Message-ID: <20200121230956.23129-2-mmayer@broadcom.com> (raw)
In-Reply-To: <20200121230956.23129-1-mmayer@broadcom.com>
We introduce the concept of a pre-build script that works similar to
the already existing post-build and post-image scripts.
The pre-build script(s) are executed before the build commences. This
allows a user to run some preperatory tasks prior to the build.
Signed-off-by: Markus Mayer <mmayer@broadcom.com>
---
Makefile | 3 +++
system/Config.in | 10 ++++++++++
2 files changed, 13 insertions(+)
diff --git a/Makefile b/Makefile
index a58ca7821d2d..9bf9f1aa05ee 100644
--- a/Makefile
+++ b/Makefile
@@ -579,6 +579,9 @@ $(BUILD_DIR)/buildroot-config/auto.conf: $(BR2_CONFIG)
.PHONY: prepare
prepare: $(BUILD_DIR)/buildroot-config/auto.conf
+ @$(foreach s, $(call qstrip,$(BR2_ROOTFS_PRE_BUILD_SCRIPT)), \
+ $(call MESSAGE,"Executing pre-build script $(s)"); \
+ $(EXTRA_ENV) $(s) $(TARGET_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
.PHONY: world
world: target-post-image
diff --git a/system/Config.in b/system/Config.in
index c8c5be40e096..7b890aed1abb 100644
--- a/system/Config.in
+++ b/system/Config.in
@@ -518,6 +518,16 @@ config BR2_ROOTFS_OVERLAY
They are copied as-is into the rootfs, excluding files ending
with ~ and .git, .svn and .hg directories.
+config BR2_ROOTFS_PRE_BUILD_SCRIPT
+ string "Custom scripts to run before commencing the build"
+ default ""
+ help
+ Specify a space-separated list of scripts to be run before the
+ build commences.
+
+ This gives users the opportunity to do board-specific
+ preparations before starting the build.
+
config BR2_ROOTFS_POST_BUILD_SCRIPT
string "Custom scripts to run before creating filesystem images"
default ""
--
2.17.1
next prev parent reply other threads:[~2020-01-21 23:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-21 23:09 [Buildroot] [PATCH 0/1] system/Config.in: introduce pre-build script Markus Mayer
2020-01-21 23:09 ` Markus Mayer [this message]
2022-01-06 10:53 ` [Buildroot] [PATCH 1/1] " Arnout Vandecappelle
2020-02-02 9:04 ` [Buildroot] [PATCH 0/1] " Thomas Petazzoni
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=20200121230956.23129-2-mmayer@broadcom.com \
--to=mmayer@broadcom.com \
--cc=buildroot@busybox.net \
/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