From 7f86089292e4fa7e6a7b1907611bd007153f452a Mon Sep 17 00:00:00 2001 From: "Arnout Vandecappelle (Essensium/Mind)" Date: Tue, 5 Feb 2013 07:16:00 +0000 Subject: target/generic: add filesystem overlay option The filesystem overlay is a tree that is copied over the target fs after building everything - which is currently usually done in the post-build script. [Peter: don't ignore missing directories] Signed-off-by: Arnout Vandecappelle (Essensium/Mind) Acked-by: Luca Ceresoli Signed-off-by: Peter Korsgaard --- docs/manual/customize-rootfs.txt | 17 +++++++++++------ docs/manual/customize-store.txt | 13 +++++-------- 2 files changed, 16 insertions(+), 14 deletions(-) (limited to 'docs') diff --git a/docs/manual/customize-rootfs.txt b/docs/manual/customize-rootfs.txt index 6399699bd..fa04d85e2 100644 --- a/docs/manual/customize-rootfs.txt +++ b/docs/manual/customize-rootfs.txt @@ -24,6 +24,12 @@ there are a few ways to customize the resulting target filesystem. skeleton are copied to output/target before any package installation. +* Create a filesystem overlay: a tree of files that are copied directly + over the target filesystem after it has been built. Set + +BR2_ROOTFS_OVERLAY+ to the top of the tree. +.git+, +.svn+, + +.hg+ directories and files ending with +~+ are excluded. + _Among these first 3 methods, this one should be preferred_. + * In the Buildroot configuration, you can specify the path to a *post-build script*, that gets called 'after' Buildroot builds all the selected software, but 'before' the rootfs packages are @@ -31,12 +37,11 @@ there are a few ways to customize the resulting target filesystem. specify the location of your post-build script. This option can be found in the +System configuration+ menu. The destination root filesystem folder is given as the first argument to this script, - and this script can then be used to copy programs, static data or - any other needed file to your target filesystem. You should, - however, use this feature with care. Whenever you find that a - certain package generates wrong or unneeded files, you should fix - that package rather than work around it with a post-build cleanup - script. _Among these first 3 methods, this one should be preferred_. + and this script can then be used to remove or modify any file in your + target filesystem. You should, however, use this feature with care. + Whenever you find that a certain package generates wrong or unneeded + files, you should fix that package rather than work around it with a + post-build cleanup script. You may also use these variables in your post-build script: - +BUILDROOT_CONFIG+: the path to the Buildroot .config file - +HOST_DIR+, +STAGING_DIR+, +TARGET_DIR+: see diff --git a/docs/manual/customize-store.txt b/docs/manual/customize-store.txt index b6e3d0813..298b5e96a 100644 --- a/docs/manual/customize-store.txt +++ b/docs/manual/customize-store.txt @@ -136,15 +136,12 @@ you can skip the steps that are not relevant for your use case. 1. Create +board///fs-overlay/+ and fill it with additional files you need on your rootfs, e.g. +board///fs-overlay/etc/inittab+. + Set +BR2_ROOTFS_OVERLAY+ + to +board///fs-overlay+. 1. Create a post-build script - +board///post-build.sh+. It should contain - the following command: -+ ------------- -rsync -a --exclude .empty --exclude '*~' ${0%/*}/fs-overlay $1 ------------- -+ -1. Set +BR2_ROOTFS_POST_BUILD_SCRIPT+ to +board///post-build.sh+ + +board///post-build.sh+. Set + +BR2_ROOTFS_POST_BUILD_SCRIPT+ to + +board///post-build.sh+ 1. If additional setuid permissions have to be set or device nodes have to be created, create +board///device_table.txt+ and add that path to +BR2_ROOTFS_DEVICE_TABLE+. -- cgit v1.2.3