manual/user guide/customization: rework section on rootfs customization
PATCH v2 1/1 manual/user guide/customization: rework section on rootfs customization
This patch reworks the section on root filesystem customization as follows:
- use labeled list instead of bulleted list to clarify the different methods
- move rootfs overlay and post-build scripts to the top and label them as recommended.
- split post-image to a separate section, as it is not related to the target filesystem customization
- line up post-build and post-image explanations, for example regarding working directory of the script
- general expansion of some of the explanation
- general rewording
---
v2: add missing file (noticed by Yann)
docs/manual/customize-post-image.txt | 37 ++++++ docs/manual/customize-rootfs.txt | 153 ++++++++++++++------------ docs/manual/customize.txt | 2 + 3 files changed, 121 insertions(+), 71 deletions(-)
docs/manual/customize-post-image.txt new file +37 -0
@@ -0,0 +1,37 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +=== Customization _after_ the images have been created + +While post-build scripts (xref:rootfs-custom[]) are run _before_ +building the filesystem image, kernel and bootloader, *post-image +scripts* can be used to perform some specific actions _after_ all images +have been created. + +Post-image scripts can for example be used 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 required for your project. + +To enable this feature, specify a space-separated list of post-image +scripts in config option +BR2_ROOTFS_POST_IMAGE_SCRIPT+ (in the +System +configuration+ menu). If you specify a relative path, it will be +relative to the root of the Buildroot tree. + +Just like post-build scripts, post-image scripts are run with the main +Buildroot tree as current working directory. The path to the +images+ +output directory is passed as the first argument to each script. If the +config option +BR2_ROOTFS_POST_SCRIPT_ARGS+ is not empty, these +arguments will be passed to the script too. All the scripts will be +passed the exact same set of arguments, it is not possible to pass +different sets of arguments to each script. + +Again just like for the post-build scripts, the scripts have access to +the environment variables +BR2_CONFIG+, +HOST_DIR+, +STAGING_DIR+, ++TARGET_DIR+, +BUILD_DIR+, +BINARIES_DIR+ and +BASE_DIR+. + +The post-image scripts will be executed as the user that executes +Buildroot, which should normally _not_ be the root user. Therefore, any +action requiring root permissions in one of these scripts will require +special handling (usage of fakeroot or sudo), which is left to the +script developer.
docs/manual/customize-rootfs.txt +82 -71
167 lines not on this page · raw message
docs/manual/customize.txt +2 -0
@@ -40,6 +40,8 @@ include::customize-rootfs.txt[] +include::customize-post-image.txt[] + include::customize-store.txt[] include::customize-packages.txt[]
PATCH v2 1/1 manual/user guide/customization: rework section on rootfs customization
Quoted 13 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas De Schampheleire <[email protected]> writes:
This patch reworks the section on root filesystem customization as follows:
- use labeled list instead of bulleted list to clarify the different methods
- move rootfs overlay and post-build scripts to the top and label them as recommended.
- split post-image to a separate section, as it is not related to the target filesystem customization
- line up post-build and post-image explanations, for example regarding working directory of the script
- general expansion of some of the explanation
- general rewording
Quoted 4 lines
Signed-off-by Thomas De Schampheleire <[email protected]>---
v2: add missing file (noticed by Yann)
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard