summaryrefslogtreecommitdiffstats
path: root/docs/manual/customize-directory-structure.txt
diff options
context:
space:
mode:
authorThomas De Schampheleire <patrickdepinguin@gmail.com>2014-09-18 21:39:36 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-09-21 19:41:12 +0200
commit9e540c7517b4317399b87bef5da208096184d193 (patch)
tree9d4c6f888787ac070dcdab34818043c589c1ae38 /docs/manual/customize-directory-structure.txt
parent680641105df77f6253070fd5736a5badf0dce93d (diff)
downloadbuildroot-9e540c7517b4317399b87bef5da208096184d193.tar.gz
buildroot-9e540c7517b4317399b87bef5da208096184d193.zip
manual/user guide/customization: add section on layered customization
Inspired by some text in the 'project-specific patches' section, this patch adds a separate section on layering customizations by providing multiple post-build scripts, multiple rootfs overlays, etc. Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'docs/manual/customize-directory-structure.txt')
-rw-r--r--docs/manual/customize-directory-structure.txt51
1 files changed, 51 insertions, 0 deletions
diff --git a/docs/manual/customize-directory-structure.txt b/docs/manual/customize-directory-structure.txt
index ce2b0d7596..0be3f77e50 100644
--- a/docs/manual/customize-directory-structure.txt
+++ b/docs/manual/customize-directory-structure.txt
@@ -56,3 +56,54 @@ Details on the files shown above are given further in this chapter.
Note: if you choose to place this structure outside of the Buildroot
tree using +BR2_EXTERNAL+, the <company> and possibly <boardname>
components may be superfluous and can be left out.
+
+==== Implementing layered customizations
+
+It is quite common for a user to have several related projects that partly
+need the same customizations. Instead of duplicating these
+customizations for each project, it is recommended to use a layered
+customization approach, as explained in this section.
+
+Almost all of the customization methods available in Buildroot, like
+post-build scripts and root filesystem overlays, accept a
+space-separated list of items. The specified items are always treated in
+order, from left to right. By creating more than one such item, one for
+the common customizations and another one for the really
+project-specific customizations, you can avoid unnecessary duplication.
+Each layer is typically embodied by a separate directory inside
++board/<company>/+. Depending on your projects, you could even introduce
+more than two layers.
+
+An example directory structure for where a user has two customization
+layers 'common' and 'fooboard' is:
+
+-----
++-- board/
+ +-- <company>/
+ +-- common/
+ | +-- post_build.sh
+ | +-- rootfs_overlay/
+ | | +-- ...
+ | +-- patches/
+ | +-- ...
+ |
+ +-- fooboard/
+ +-- linux.config
+ +-- busybox.config
+ +-- <other configuration files>
+ +-- post_build.sh
+ +-- rootfs_overlay/
+ | +-- ...
+ +-- patches/
+ +-- ...
+-----
+
+For example, if the user has the +BR2_GLOBAL_PATCH_DIR+ configuration
+option set as:
+
+-----
+BR2_GLOBAL_PATCH_DIR="board/<company>/common/patches board/<company>/fooboard/patches"
+-----
+
+then first the patches from the 'common' layer would be applied,
+followed by the patches from the 'fooboard' layer.
OpenPOWER on IntegriCloud