From da47cb736b06ebbebd9c0ee4a39805809c22ace2 Mon Sep 17 00:00:00 2001 From: Pascal Bach Date: Fri, 16 Jan 2015 16:01:06 -0800 Subject: [PATCH] dev-manual: New section on choosing a device manager added. This patch was modified to fit in with the style of the book. (From yocto-docs rev: 7c6c7ac573f92bfc844977e0d7a97ca4aac9bc70) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- .../dev-manual/dev-manual-common-tasks.xml | 109 +++++++++++++++++- 1 file changed, 108 insertions(+), 1 deletion(-) diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml index 5cfc8bec44..c2a361c6bb 100644 --- a/documentation/dev-manual/dev-manual-common-tasks.xml +++ b/documentation/dev-manual/dev-manual-common-tasks.xml @@ -946,7 +946,7 @@ Furthermore, you must use _append instead of the += operator if you want to avoid ordering issues. - The reason for this is because doing so unconditionally appends + The reason for this is because doing so un>+conditionally appends to the variable and avoids ordering problems due to the variable being set in image recipes and .bbclass files with operators like @@ -7587,6 +7587,113 @@ +
+ Selecting a Device Manager + + + The Yocto Project provides multiple ways to manage the device + manager (/dev): + + Persistent and Pre-Populated/dev: + For this case, the /dev directory + is persistent and the required device nodes are created + during the build. + + Use devtmps with a Device Manager: + For this case, the /dev directory + is provided by the kernel as an in-memory file system and + is automatically populated by the kernel at runtime. + Additional configuration of device nodes is done in user + space by a device manager like + udev or + busybox-mdev. + + + + +
+ Using Persistent and Pre-Populated<filename>/dev</filename> + + + To use the static method for device population, you need to + set the + USE_DEVFS + variable to "0" as follows: + + USE_DEVFS = "0" + + + + + The content of the resulting /dev + directory is defined in a Device Table file. + The + IMAGE_DEVICE_TABLES + variable defines the Device Table to use and should be set + in the machine or distro configuration file. + Alternatively, you can set this variable in your + local.conf configuration file. + + + + If you do not define the + IMAGE_DEVICE_TABLES variable, the default + device_table-minimal.txt is used: + + IMAGE_DEVICE_TABLES = "device_table-mymachine.txt" + + + + + The population is handled by the makedevs + utility during image creation: + +
+ +
+ Using <filename>devtmpfs</filename> and a Device Manager + + + To use the dynamic method for device population, you need to + use (or be sure to set) the + USE_DEVFS + variable to "1", which is the default: + + USE_DEVFS = "1" + + With this setting, the resulting /dev + is populated by the kernel using devtmpfs. + Make sure the corresponding kernel configuration variable + CONFIG_DEVTMPFS is set when building + you build a linux kernel. + + + + All devices created by devtmpfs will be + owned by root and have permissions + 0600. + + + + To have more control over the device nodes, you can use a + device manager like udev or + busybox-mdev. + You choose the device manager by defining the + VIRTUAL-RUNTIME_dev_manager variable + in your machine or distro configuration file. + Alternatively, you can set this variable in your + local.conf configuration file: + + VIRTUAL-RUNTIME_dev_manager = "udev" + + # Some alternative values + # VIRTUAL-RUNTIME_dev_manager = "busybox-mdev" + # VIRTUAL-RUNTIME_dev_manager = "systemd" + + +
+
+
Using an External SCM