[Buildroot] [git commit] fs/common: add <fs>_POST_GEN_HOOKS support

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Mon Aug 10 18:56:05 UTC 2015


commit: http://git.buildroot.net/buildroot/commit/?id=15a53b93a034af78c1a3d62510a2abe5a91e4f8f
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

The common filesystem infrastructure already supports a
<fs>_PRE_GEN_HOOKS variable, which allows filesystem makefiles to
register some actions to be done before the root filesystem image is
generated.

This commit adds a similiar <fs>_POST_GEN_HOOKS variable, which will
allow filesystem makefiles to do some actions after the filesystem
image has been generated. It will initially be used by the iso9660
filesystem to delete the temporary directory it creates.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
Signed-off-by: Noé Rubinstein <nrubinstein at aldebaran.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998 at free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
---
 fs/common.mk |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/fs/common.mk b/fs/common.mk
index ad1bcf3..528e194 100644
--- a/fs/common.mk
+++ b/fs/common.mk
@@ -16,6 +16,9 @@
 #  ROOTFS_$(FSTYPE)_PRE_GEN_HOOKS, a list of hooks to call before
 #  generating the filesystem image
 #
+#  ROOTFS_$(FSTYPE)_POST_GEN_HOOKS, a list of hooks to call after
+#  generating the filesystem image
+#
 #  ROOTFS_$(FSTYPE)_POST_TARGETS, the list of targets that should be
 #  run after running the main filesystem target. This is useful for
 #  initramfs, to rebuild the kernel once the initramfs is generated.
@@ -96,6 +99,7 @@ endif
 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))
 
 rootfs-$(1)-show-depends:
 	@echo $$(ROOTFS_$(2)_DEPENDENCIES)


More information about the buildroot mailing list