customize-device-permission-tables.txt 1.3 KB

123456789101112131415161718192021222324252627282930
  1. // -*- mode:doc; -*-
  2. // vim: set syntax=asciidoc:
  3. [[customize-device-permission]]
  4. ==== Setting file permissions and ownership and adding custom devices nodes
  5. Sometimes it is needed to set specific permissions or ownership on files
  6. or device nodes. For example, certain files may need to be owned by
  7. root. Since the post-build scripts are not run as root, you cannot do
  8. such changes from there unless you use an explicit fakeroot from the
  9. post-build script.
  10. Instead, Buildroot provides support for so-called _permission tables_.
  11. To use this feature, set config option +BR2_ROOTFS_DEVICE_TABLE+ to a
  12. space-separated list of permission tables, regular text files following
  13. the xref:makedev-syntax[makedev syntax].
  14. If you are using a static device table (i.e. not using +devtmpfs+,
  15. +mdev+, or +(e)udev+) then you can add device nodes using the same
  16. syntax, in so-called _device tables_. To use this feature, set config
  17. option +BR2_ROOTFS_STATIC_DEVICE_TABLE+ to a space-separated list of
  18. device tables.
  19. As shown in xref:customize-dir-structure[], the recommended location for
  20. such files is +board/<company>/<boardname>/+.
  21. It should be noted that if the specific permissions or device nodes are
  22. related to a specific application, you should set variables
  23. +FOO_PERMISSIONS+ and +FOO_DEVICES+ in the package's +.mk+ file instead
  24. (see xref:generic-package-reference[]).