summaryrefslogtreecommitdiffstats
path: root/support/misc
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2012-11-17 03:52:14 +0000
committerPeter Korsgaard <jacmet@sunsite.dk>2012-11-17 17:12:49 +0100
commit9226a9907c4eb0fffab777f50e88b74aa14d1737 (patch)
tree10f2f5d570f20e6643aa60a0148947c28cbe6cfa /support/misc
parentee3a96137b6cbb8f970c540c61f75300a44ea803 (diff)
downloadbuildroot-novena-9226a9907c4eb0fffab777f50e88b74aa14d1737.tar.gz
buildroot-novena-9226a9907c4eb0fffab777f50e88b74aa14d1737.zip
Warn the user about the usage of output/target as the root filesystem
A very common mistake done by our users is that they use output/target/ directory as their root filesystem. Even though this is loudly documented in our Buildroot manual, people don't read documentation, so it is not sufficient. This patch adds a text file named output/target/THIS_IS_NOT_YOUR_ROOT_FILESYSTEM which explains why output/target isn't appropriate to use as the root filesystem. The process is: * At the beginning of the build, right after the skeleton has been copied, support/misc/target-dir-warning.txt is copied to output/target/THIS_IS_NOT_YOUR_ROOT_FILESYSTEM * In the filesystem images creation code, this file is removed before launching fakeroot, and restored right after that, so that this file is not present in the generated root filesystem images. Note that the file has not been added to the default skeleton for two reasons: * It would have annoying to have in our source tree a file named in capital letters inside system/skeleton/ * The proposed way works even if the user uses a custom skeleton. [Peter: fixed typo] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Juha Lumme <juha.lumme@gmail.com> Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'support/misc')
-rw-r--r--support/misc/target-dir-warning.txt29
1 files changed, 29 insertions, 0 deletions
diff --git a/support/misc/target-dir-warning.txt b/support/misc/target-dir-warning.txt
new file mode 100644
index 000000000..90f88414b
--- /dev/null
+++ b/support/misc/target-dir-warning.txt
@@ -0,0 +1,29 @@
+Warning!
+========
+
+This directory does *not* contain the root filesystem that you can use
+on your embedded system. Since Buildroot does not run as root, it
+cannot create device files and set the permissions and ownership of
+files correctly in this directory to make it usable as a root
+filesystem.
+
+For that reason, do *not* use the contents of this directory to mount
+your root filesystem over NFS or copy the contents of this directory
+to a SD card or USB key, thinking it will work as the root filesystem
+for your embedded system. It will simply *not* work.
+
+Instead, if you need a usable root filesystem, please select one of
+the filesystem image formats available in the Buildroot configuration
+interface (make menuconfig or others) in the "Filesystem images"
+sub-menu. If you want to get a filesystem image that you can easily
+extract to your SD card or to some directory exposed through NFS,
+please use the "tar the root filesystem" option. It will generate a
+images/rootfs.tar image in your Buildroot output directory, which you
+can extract as root:
+
+ sudo tar -C /destination/of/extraction -xf images/rootfs.tar
+
+Those image files are created using the contents of the target/
+directory, but there is a post-processing step to create device files
+and set owernship/permissions properly even if Buildroot does not run
+as root.