From: Vadim Kochan <vadim4j@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [RFC 1/1] infra/pkg-generic: Add rootfs post gen hook
Date: Mon, 15 Apr 2019 03:26:35 +0300 [thread overview]
Message-ID: <20190415002635.3656-1-vadim4j@gmail.com> (raw)
Add ability to generate image by custom package, and one of the
way to do it - is to add new $(PKG)_ROOTFS_POST_GEN_HOOK which will be
called after rootfs image is ready. This allows to have easier
alternative to post-image script in form of package, which might be
just selected by the user (or this package might be automatically
selected already already).
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
---
fs/common.mk | 1 +
package/pkg-generic.mk | 2 ++
2 files changed, 3 insertions(+)
diff --git a/fs/common.mk b/fs/common.mk
index 4ad51fdd0a..3288406af6 100644
--- a/fs/common.mk
+++ b/fs/common.mk
@@ -152,6 +152,7 @@ ifneq ($$(ROOTFS_$(2)_COMPRESS_CMD),)
PATH=$$(BR_PATH) $$(ROOTFS_$(2)_COMPRESS_CMD) $$@ > $$@$$(ROOTFS_$(2)_COMPRESS_EXT)
endif
$$(foreach hook,$$(ROOTFS_$(2)_POST_GEN_HOOKS),$$(call $$(hook))$$(sep))
+ $$(foreach hook,$$(ROOTFS_POST_GEN_HOOKS),$$(call $$(hook))$$(sep))
rootfs-$(1)-show-depends:
@echo $$(ROOTFS_$(2)_DEPENDENCIES)
diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index a83813e28d..332e3c3cc1 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -724,6 +724,7 @@ $(2)_PRE_LEGAL_INFO_HOOKS ?=
$(2)_POST_LEGAL_INFO_HOOKS ?=
$(2)_TARGET_FINALIZE_HOOKS ?=
$(2)_ROOTFS_PRE_CMD_HOOKS ?=
+$(2)_ROOTFS_POST_GEN_HOOKS ?=
ifeq ($$($(2)_TYPE),target)
ifneq ($$(HOST_$(2)_KCONFIG_VAR),)
@@ -1052,6 +1053,7 @@ PACKAGES_USERS += $$($(2)_USERS)$$(sep)
endif
TARGET_FINALIZE_HOOKS += $$($(2)_TARGET_FINALIZE_HOOKS)
ROOTFS_PRE_CMD_HOOKS += $$($(2)_ROOTFS_PRE_CMD_HOOKS)
+ROOTFS_POST_GEN_HOOKS += $$($(2)_ROOTFS_POST_GEN_HOOKS)
ifeq ($$($(2)_SITE_METHOD),svn)
DL_TOOLS_DEPENDENCIES += svn
--
2.14.1
next reply other threads:[~2019-04-15 0:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-15 0:26 Vadim Kochan [this message]
2019-04-15 6:58 ` [Buildroot] [RFC 1/1] infra/pkg-generic: Add rootfs post gen hook Thomas Petazzoni
2019-04-15 7:33 ` Vadim Kochan
2019-04-15 7:58 ` yann.morin at orange.com
2019-04-15 8:42 ` Vadym Kochan
2019-04-15 8:53 ` yann.morin at orange.com
2019-04-15 9:08 ` Vadym Kochan
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=20190415002635.3656-1-vadim4j@gmail.com \
--to=vadim4j@gmail.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