• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/docs/manual/customize-post-image.txt
Thomas De SchampheleireThomas De Schampheleire committed 44a5c46213a31 Aug 2014
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
// -*- mode:doc; -*-
2
// vim: set syntax=asciidoc:
3
​
4
=== Customization _after_ the images have been created
5
​
6
While post-build scripts (xref:rootfs-custom[]) are run _before_
7
building the filesystem image, kernel and bootloader, *post-image
8
scripts* can be used to perform some specific actions _after_ all images
9
have been created.
10
​
11
Post-image scripts can for example be used to automatically extract your
12
root filesystem tarball in a location exported by your NFS server, or
13
to create a special firmware image that bundles your root filesystem and
14
kernel image, or any other custom action required for your project.
15
​
16
To enable this feature, specify a space-separated list of post-image
17
scripts in config option +BR2_ROOTFS_POST_IMAGE_SCRIPT+ (in the +System
18
configuration+ menu). If you specify a relative path, it will be
19
relative to the root of the Buildroot tree.
20
​
21
Just like post-build scripts, post-image scripts are run with the main
22
Buildroot tree as current working directory. The path to the +images+
23
output directory is passed as the first argument to each script. If the
24
config option +BR2_ROOTFS_POST_SCRIPT_ARGS+ is not empty, these
25
arguments will be passed to the script too. All the scripts will be
26
passed the exact same set of arguments, it is not possible to pass
27
different sets of arguments to each script.
28
​
29
Again just like for the post-build scripts, the scripts have access to
30
the environment variables +BR2_CONFIG+, +HOST_DIR+, +STAGING_DIR+,
31
+TARGET_DIR+, +BUILD_DIR+, +BINARIES_DIR+ and +BASE_DIR+.
32
​
33
The post-image scripts will be executed as the user that executes
34
Buildroot, which should normally _not_ be the root user. Therefore, any
35
action requiring root permissions in one of these scripts will require
36
special handling (usage of fakeroot or sudo), which is left to the
37
script developer.
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.