summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile9
-rw-r--r--system/Config.in18
2 files changed, 27 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index d9e5f2408..395d270c9 100644
--- a/Makefile
+++ b/Makefile
@@ -353,6 +353,8 @@ endif
include fs/common.mk
+TARGETS+=target-post-image
+
TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS))
TARGETS_SOURCE:=$(patsubst %,%-source,$(TARGETS) $(BASE_TARGETS))
TARGETS_DIRCLEAN:=$(patsubst %,%-dirclean,$(TARGETS))
@@ -555,6 +557,13 @@ target-generatelocales: host-localedef
done
endif
+target-post-image:
+ifneq ($(BR2_ROOTFS_POST_IMAGE_SCRIPT),"")
+ @$(call MESSAGE,"Executing post-image script\(s\)")
+ @$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_IMAGE_SCRIPT)), \
+ $(s) $(BINARIES_DIR)$(sep))
+endif
+
toolchain-eclipse-register:
./support/scripts/eclipse-register-toolchain `readlink -f $(O)` $(notdir $(TARGET_CROSS)) $(BR2_ARCH)
diff --git a/system/Config.in b/system/Config.in
index fa01d914b..bdd47c560 100644
--- a/system/Config.in
+++ b/system/Config.in
@@ -276,4 +276,22 @@ config BR2_ROOTFS_POST_BUILD_SCRIPT
only argument. Make sure the exit code of those scripts are 0,
otherwise make will stop after calling them.
+config BR2_ROOTFS_POST_IMAGE_SCRIPT
+ string "Custom scripts to run after creating filesystem images"
+ default ""
+ help
+ Specify a space-separated list of scripts to be run after
+ the build has finished and after Buildroot has packed the
+ files into selected filesystem images.
+
+ This can for example be used to call a tool building a
+ firmware image from different images generated by Buildroot,
+ or automatically extract the tarball root filesystem image
+ into some location exported by NFS, or any other custom
+ action.
+
+ These scripts are called with the images directory name as
+ first and only argument. The script is executed from the
+ main Buildroot source directory as the current directory.
+
endmenu