| Submitter | Thomas Petazzoni |
|---|---|
| Date | Feb. 6, 2013, 9:49 p.m. |
| Message ID | <1360187346-30258-3-git-send-email-thomas.petazzoni@free-electrons.com> |
| Download | mbox | patch |
| Permalink | /patch/218772/ |
| State | Superseded |
| Headers | show |
Comments
Hi Thomas, 2013/2/6 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>: > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> > Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr> > --- > v1->v2: > * Fix typos noticed by Yann. > --- > 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 fa04d85..f1d336a 100644 > --- a/docs/manual/customize-rootfs.txt > +++ b/docs/manual/customize-rootfs.txt > @@ -55,3 +55,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 you 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 space-separated 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+. Nothing about how these post-image scripts are run (no fakeroot, and so on). Regards,
Dear Samuel Martin, On Thu, 7 Feb 2013 15:26:24 +0100, Samuel Martin wrote: > > diff --git a/docs/manual/customize-rootfs.txt > > b/docs/manual/customize-rootfs.txt index fa04d85..f1d336a 100644 > > --- a/docs/manual/customize-rootfs.txt > > +++ b/docs/manual/customize-rootfs.txt > > @@ -55,3 +55,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 you 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 space-separated 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+. > > Nothing about how these post-image scripts are run (no fakeroot, and > so on). I am not sure what you would like to see added exactly. Since they are executed outside of fakeroot, then they are just executed after the filesystem images are created, and that's it, no? Of course, if those scripts were executed inside fakeroot, it should be mentioned clearly. But since it's not the case, is it important to mention that they are executed outside of fakeroot? We could give a lot of things that those scripts do /not/ do, no? My feeling is that it would add confusion, but I don't have a strong feeling about this. Or maybe you were thinking about something else than just "These scripts are executed outside of the fakeroot environment" ? Best regards, Thomas
Thomas, 2013/2/7 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>: [...] > I am not sure what you would like to see added exactly. Since they are > executed outside of fakeroot, then they are just executed after the > filesystem images are created, and that's it, no? > > Of course, if those scripts were executed inside fakeroot, it should be > mentioned clearly. But since it's not the case, is it important to > mention that they are executed outside of fakeroot? We could give a lot > of things that those scripts do /not/ do, no? My feeling is that it > would add confusion, but I don't have a strong feeling about this. > > Or maybe you were thinking about something else than just "These > scripts are executed outside of the fakeroot environment" ? My point is that these scripts will most likely try to do things that requires root permissions; so it may be good to warn the user that this should be handled by the scripts themselves. Regards,
Patch
diff --git a/docs/manual/customize-rootfs.txt b/docs/manual/customize-rootfs.txt index fa04d85..f1d336a 100644 --- a/docs/manual/customize-rootfs.txt +++ b/docs/manual/customize-rootfs.txt @@ -55,3 +55,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 you 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 space-separated 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+.