[Buildroot] [PATCH v3 1/6] Add a post-image script mechanism

Peter Korsgaard jacmet at uclibc.org
Fri Feb 8 20:56:19 UTC 2013


>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni at free-electrons.com> 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.petazzoni at free-electrons.com>
 Thomas> Tested-by: "Yann E. MORIN" <yann.morin.1998 at free.fr>
 Thomas> Acked-by: "Yann E. MORIN" <yann.morin.1998 at free.fr>
 Thomas> Acked-by: Luca Ceresoli <luca at lucaceresoli.net>
 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


More information about the buildroot mailing list