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) <arnout@mind.be>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
diff --git a/Makefile b/Makefile
index 6f8ed0e..98db8b1 100644
--- a/Makefile
+++ b/Makefile
@@ -501,6 +501,13 @@
echo "PRETTY_NAME=\"Buildroot $(BR2_VERSION)\"" \
) > $(TARGET_DIR)/etc/os-release
+ @for dir in $(call qstrip,$(BR2_ROOTFS_OVERLAY)); do \
+ $(call MESSAGE,"Copying overlay $${dir}"); \
+ rsync -a \
+ --exclude .svn --exclude .git --exclude .hg --exclude '*~' \
+ $${dir}/ $(TARGET_DIR); \
+ done
+
ifneq ($(BR2_ROOTFS_POST_BUILD_SCRIPT),"")
@$(call MESSAGE,"Executing post-build script\(s\)")
@$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_BUILD_SCRIPT)), \