Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas De Schampheleire <patrickdepinguin@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 06 of 13] manual/user guide/customization: add section on device/permission tables
Date: Thu, 18 Sep 2014 21:39:29 +0200	[thread overview]
Message-ID: <38c4c958d5d944cad16b.1411069169@localhost> (raw)
In-Reply-To: <patchbomb.1411069163@localhost>

This patch adds basic documentation on device and permission tables, a topic
which was currently not yet covered in the manual.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>

---
 docs/manual/customize-device-permission-tables.txt |  30 ++++++++++++++
 docs/manual/customize-rootfs.txt                   |   2 +
 docs/manual/customize.txt                          |   4 +
 3 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/docs/manual/customize-device-permission-tables.txt b/docs/manual/customize-device-permission-tables.txt
new file mode 100644
--- /dev/null
+++ b/docs/manual/customize-device-permission-tables.txt
@@ -0,0 +1,30 @@
+// -*- mode:doc; -*-
+// vim: set syntax=asciidoc:
+
+[[customize-device-permission]]
+==== Setting file permissions and ownership and adding custom devices nodes
+
+Sometimes it is needed to set specific permissions or ownership on files
+or device nodes. For example, certain files may need to be owned by
+root.  Since the post-build scripts are not run as root, you cannot do
+such changes from there unless you use an explicit fakeroot from the
+post-build script.
+
+Instead, Buildroot provides support for so-called _permission tables_.
+To use this feature, set config option +BR2_ROOTFS_DEVICE_TABLE+ to a
+space-separated list of permission tables, regular text files following
+the xref:makedev-syntax[makedev syntax].
+
+If you are using a static device table (i.e. not using +devtmpfs+,
++mdev+, or +(e)udev+) then you can add device nodes using the same
+syntax, in so-called _device tables_. To use this feature, set config
+option +BR2_ROOTFS_STATIC_DEVICE_TABLE+ to a space-separated list of
+device tables.
+
+As shown in xref:customize-dir-structure[], the recommended location for
+such files is +board/<company>/<boardname>/+.
+
+It should be noted that if the specific permissions or device nodes are
+related to a specific application, you should set variables
++FOO_PERMISSIONS+ and +FOO_DEVICES+ in the package's +.mk+ file instead
+(see xref:generic-package-reference[]).
diff --git a/docs/manual/customize-rootfs.txt b/docs/manual/customize-rootfs.txt
--- a/docs/manual/customize-rootfs.txt
+++ b/docs/manual/customize-rootfs.txt
@@ -97,3 +97,5 @@
 This method is not recommended because it duplicates the entire
   skeleton, which prevents taking advantage of the fixes or improvements
   brought to the default skeleton in later Buildroot releases.
+
+include::customize-device-permission-tables.txt[]
diff --git a/docs/manual/customize.txt b/docs/manual/customize.txt
--- a/docs/manual/customize.txt
+++ b/docs/manual/customize.txt
@@ -16,6 +16,10 @@
      +BR2_ROOTFS_POST_BUILD_SCRIPT+)
   ** running arbitrary commands prior to generating the filesystem image
      (using +BR2_ROOTFS_POST_BUILD_SCRIPT+)
+  ** setting file permissions and ownership (using
+     +BR2_ROOTFS_DEVICE_TABLE+)
+  ** adding custom devices nodes (using
+     +BR2_ROOTFS_STATIC_DEVICE_TABLE+)
 * running arbitrary commands after generating the filesystem image
   (using +BR2_ROOTFS_POST_IMAGE_SCRIPT+)
 * adding project-specific patches to some packages (using

  parent reply	other threads:[~2014-09-18 19:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-18 19:39 [Buildroot] [PATCH 00 of 13] manual: improvements in 'Project-specific customization' section Thomas De Schampheleire
2014-09-18 19:39 ` [Buildroot] [PATCH 01 of 13] manual: move 'Creating your own board support' from User to Developer guide Thomas De Schampheleire
2014-09-18 19:39 ` [Buildroot] [PATCH 02 of 13] manual/developer guide: minor rework of 'adding board support' section Thomas De Schampheleire
2014-09-18 19:39 ` [Buildroot] [PATCH 03 of 13] manual/user guide/customization: move section on storing configuration Thomas De Schampheleire
2014-09-18 19:39 ` [Buildroot] [PATCH 04 of 13] manual/user guide/customization: rework " Thomas De Schampheleire
2014-09-18 19:39 ` [Buildroot] [PATCH 05 of 13] manual/user guide/customization: re-order introduction Thomas De Schampheleire
2014-09-18 19:39 ` Thomas De Schampheleire [this message]
2014-09-18 19:39 ` [Buildroot] [PATCH 07 of 13] manual/user guide/customization: add section on users tables Thomas De Schampheleire
2014-09-18 19:39 ` [Buildroot] [PATCH 08 of 13] manual/user guide/customization: rename section 'Customizing packages' Thomas De Schampheleire
2014-09-18 19:39 ` [Buildroot] [PATCH 09 of 13] manual/user guide/customization: change recommendation for package paths Thomas De Schampheleire
2014-09-18 19:39 ` [Buildroot] [PATCH 10 of 13] manual/user guide/customization: add section on project-specific packages Thomas De Schampheleire
2014-09-18 19:39 ` [Buildroot] [PATCH 11 of 13] manual/user guide/customization: refer to dir structure from rootfs section Thomas De Schampheleire
2014-09-18 19:39 ` [Buildroot] [PATCH 12 of 13] manual/user guide/customization: rework 'step-by-step instructions' Thomas De Schampheleire
2014-09-18 19:39 ` [Buildroot] [PATCH 13 of 13] manual/user guide/customization: add section on layered customization Thomas De Schampheleire
2014-09-18 20:03 ` [Buildroot] [PATCH 00 of 13] manual: improvements in 'Project-specific customization' section Thomas Petazzoni
2014-09-19  6:40   ` Thomas De Schampheleire
2014-09-21 17:42 ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=38c4c958d5d944cad16b.1411069169@localhost \
    --to=patrickdepinguin@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox