From: Peter Korsgaard Date: Fri, 08 Feb 2013 21:56:19 +0100 Subject: [Buildroot] [PATCH v3 1/6] Add a post-image script mechanism In-Reply-To: <1360274328-14754-2-git-send-email-thomas.petazzoni@free-electrons.com> (Thomas Petazzoni's message of "Thu, 7 Feb 2013 22:58:43 +0100") References: <1360274328-14754-1-git-send-email-thomas.petazzoni@free-electrons.com> <1360274328-14754-2-git-send-email-thomas.petazzoni@free-electrons.com> Message-ID: <87d2wah6do.fsf@dell.be.48ers.dk> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net >>>>> "Thomas" == Thomas Petazzoni writes: Thomas> Just like we have a post-build script mechanism that gets executed Thomas> after the build of all packages but before the creation of the Thomas> filesystem images, let's introduce a post-image script mechanism, that Thomas> gets executed once all filesystem images have been generated. Thomas> This can for example be used to call a tool building a firmware image Thomas> from different images generated by Buildroot, or automatically extract Thomas> the tarball root filesystem image into some location exported by NFS, Thomas> or any other custom action. Thomas> Signed-off-by: Thomas Petazzoni Thomas> Tested-by: "Yann E. MORIN" Thomas> Acked-by: "Yann E. MORIN" Thomas> Acked-by: Luca Ceresoli Thomas> --- Thomas> v2 -> v3: Thomas> * Change 'script' -> 'scripts' in the config option prompt, as Thomas> suggested by Samuel Martin. Thomas> --- Thomas> Makefile | 9 +++++++++ Thomas> system/Config.in | 18 ++++++++++++++++++ Thomas> 2 files changed, 27 insertions(+) Thomas> diff --git a/Makefile b/Makefile Thomas> index d9e5f24..3996d01 100644 Thomas> --- a/Makefile Thomas> +++ b/Makefile Thomas> @@ -353,6 +353,8 @@ endif Thomas> include fs/common.mk Thomas> +TARGETS+=target-post-image Thomas> + Thomas> TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS)) Thomas> TARGETS_SOURCE:=$(patsubst %,%-source,$(TARGETS) $(BASE_TARGETS)) Thomas> TARGETS_DIRCLEAN:=$(patsubst %,%-dirclean,$(TARGETS)) Thomas> @@ -555,6 +557,13 @@ target-generatelocales: host-localedef Thomas> done Thomas> endif Thomas> +target-post-image: Thomas> +ifneq ($(BR2_ROOTFS_POST_IMAGE_SCRIPT),) This is always true as BR2_ROOTFS_POST_IMAGE_SCRIPT atleast contains "", so I changed this to check for "" like the post-build script and committed, thanks. -- Bye, Peter Korsgaard