Patchwork [2/5] docs/manual: mention the new post-image mechanism

login
register
mail settings
Submitter Thomas Petazzoni
Date Jan. 16, 2013, 7:09 p.m.
Message ID <1358363393-29977-3-git-send-email-thomas.petazzoni@free-electrons.com>
Download mbox | patch
Permalink /patch/212991/
State Changes Requested
Headers show

Comments

Thomas Petazzoni - Jan. 16, 2013, 7:09 p.m.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 docs/manual/customize-rootfs.txt |   15 +++++++++++++++
 1 file changed, 15 insertions(+)
Yann E. MORIN - Jan. 16, 2013, 8:06 p.m.
Thomas, All,

On Wednesday 16 January 2013 Thomas Petazzoni wrote:
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  docs/manual/customize-rootfs.txt |   15 +++++++++++++++
>  1 file changed, 15 insertions(+)

Why did you split the doc-patch out of the feature-patch?

I would expect that documentation is committed in the same changeset as
the feature (or bug-fix) it relates to.

Regards,
Yann E. MORIN.
Thomas Petazzoni - Jan. 16, 2013, 9:42 p.m.
Dear Yann E. MORIN,

On Wed, 16 Jan 2013 21:06:06 +0100, Yann E. MORIN wrote:
> Thomas, All,
> 
> On Wednesday 16 January 2013 Thomas Petazzoni wrote:
> > Signed-off-by: Thomas Petazzoni
> > <thomas.petazzoni@free-electrons.com> ---
> >  docs/manual/customize-rootfs.txt |   15 +++++++++++++++
> >  1 file changed, 15 insertions(+)
> 
> Why did you split the doc-patch out of the feature-patch?
> 
> I would expect that documentation is committed in the same changeset
> as the feature (or bug-fix) it relates to.

Simply because not having the documentation doesn't prevent the feature
from working, but it makes the patch smaller, so easier to review, in
my opinion.

Thomas
Yann E. MORIN - Jan. 25, 2013, 6:50 p.m.
On Wednesday 16 January 2013 Thomas Petazzoni wrote:
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  docs/manual/customize-rootfs.txt |   15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/docs/manual/customize-rootfs.txt b/docs/manual/customize-rootfs.txt
> index 6399699..66e38dc 100644
> --- a/docs/manual/customize-rootfs.txt
> +++ b/docs/manual/customize-rootfs.txt
> @@ -50,3 +50,18 @@ there are a few ways to customize the resulting target filesystem.
>    target root filesystem in +package/customize/source+, and then
>    enable this special package in the configuration system. _This
>    method is marked as deprecated_.
> +
> +Note also that if want to perform some specific actions *after* all

...if you want...

> +filesystem images have been created (for example to automatically
> +extract your root filesystem tarball in a location exported by your
> +NFS server, or to create a special firmware image that bundles your
> +root filesystem and kernel image, or any other custom action), you can
> +specify a list of scripts in the +BR2_ROOTFS_POST_IMAGE_SCRIPT+

... a space-separated list...

> +configuration option. Each of those scripts will be called, with the
> +path to the +images+ output directory as first and unique argument,
> +and will be executed with the main Buildroot source directory as the
> +current directory. Also, just like for the _post-build scripts_
> +mentionned above, you also have access to the following environment
> +variables from your _post-image scripts_: +BUILDROOT_CONFIG+,
> ++HOST_DIR+, +STAGING_DIR+, +TARGET_DIR+, +BINARIES_DIR+ and
> ++BASE_DIR+.

With those changes:
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Luca Ceresoli - Jan. 29, 2013, 4:27 p.m.
Thomas Petazzoni wrote:
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>   docs/manual/customize-rootfs.txt |   15 +++++++++++++++
>   1 file changed, 15 insertions(+)
>
> diff --git a/docs/manual/customize-rootfs.txt b/docs/manual/customize-rootfs.txt
> index 6399699..66e38dc 100644
> --- a/docs/manual/customize-rootfs.txt
> +++ b/docs/manual/customize-rootfs.txt
> @@ -50,3 +50,18 @@ there are a few ways to customize the resulting target filesystem.
>     target root filesystem in +package/customize/source+, and then
>     enable this special package in the configuration system. _This
>     method is marked as deprecated_.
> +
> +Note also that if want to perform some specific actions *after* all
> +filesystem images have been created (for example to automatically
> +extract your root filesystem tarball in a location exported by your
> +NFS server, or to create a special firmware image that bundles your
> +root filesystem and kernel image, or any other custom action), you can
> +specify a list of scripts in the +BR2_ROOTFS_POST_IMAGE_SCRIPT+
> +configuration option. Each of those scripts will be called, with the
> +path to the +images+ output directory as first and unique argument,
> +and will be executed with the main Buildroot source directory as the
> +current directory. Also, just like for the _post-build scripts_
> +mentionned above, you also have access to the following environment

s/mentionned/mentioned/

With that fix:
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>

Patch

diff --git a/docs/manual/customize-rootfs.txt b/docs/manual/customize-rootfs.txt
index 6399699..66e38dc 100644
--- a/docs/manual/customize-rootfs.txt
+++ b/docs/manual/customize-rootfs.txt
@@ -50,3 +50,18 @@  there are a few ways to customize the resulting target filesystem.
   target root filesystem in +package/customize/source+, and then
   enable this special package in the configuration system. _This
   method is marked as deprecated_.
+
+Note also that if want to perform some specific actions *after* all
+filesystem images have been created (for example to automatically
+extract your root filesystem tarball in a location exported by your
+NFS server, or to create a special firmware image that bundles your
+root filesystem and kernel image, or any other custom action), you can
+specify a list of scripts in the +BR2_ROOTFS_POST_IMAGE_SCRIPT+
+configuration option. Each of those scripts will be called, with the
+path to the +images+ output directory as first and unique argument,
+and will be executed with the main Buildroot source directory as the
+current directory. Also, just like for the _post-build scripts_
+mentionned above, you also have access to the following environment
+variables from your _post-image scripts_: +BUILDROOT_CONFIG+,
++HOST_DIR+, +STAGING_DIR+, +TARGET_DIR+, +BINARIES_DIR+ and
++BASE_DIR+.