[yocto] [yocto-docs][PATCH 2/2] dev-manual: Add section about /dev population

Rifenbark, Scott M scott.m.rifenbark at intel.com
Mon Jan 19 08:22:15 PST 2015


Pascal, 

Thanks for catching this.  This was a result of cutting-and-pasting text in from the patch.  I did not apply the patch in an automated fashion as there was some rewriting to do.  So my hand-transposing missed those characters that were present in the email from which I was referencing.  I removed them out and will republish the text later today.  The commit to get them out is http://git.yoctoproject.org/cgit/cgit.cgi/yocto-docs/commit/?id=3ffbebd6c638e9f5b334dfef1d4e0bcc698ae810.

Thanks,
Scott

>-----Original Message-----
>From: Bach, Pascal [mailto:pascal.bach at siemens.com]
>Sent: Monday, January 19, 2015 12:30 AM
>To: Rifenbark, Scott M; yocto at yoctoproject.org
>Subject: RE: [yocto] [yocto-docs][PATCH 2/2] dev-manual: Add section about
>/dev population
>
>Hi Scott
>
>Thanks. I had a look at the commits and it looks like commit
>7c6c7ac573f92bfc844977e0d7a97ca4aac9bc70 also introduced a strange change
>on line 946 of dev-manual-common-tasks.xml.
>
>See: https://git.yoctoproject.org/cgit/cgit.cgi/yocto-
>docs/commit/?id=7c6c7ac573f92bfc844977e0d7a97ca4aac9bc70
>
>Pascal
>
>> -----Original Message-----
>> From: Rifenbark, Scott M [mailto:scott.m.rifenbark at intel.com]
>> Sent: Samstag, 17. Januar 2015 01:05
>> To: Bach, Pascal; yocto at yoctoproject.org
>> Subject: RE: [yocto] [yocto-docs][PATCH 2/2] dev-manual: Add section
>> about /dev population
>>
>> Pascal,
>>
>> I have applied this patch with some editing.  Also, applied the patch
>> that added the USE_DEVFS variable to the ref-manual.
>>
>> Thanks,
>> Scott
>>
>> >-----Original Message-----
>> >From: yocto-bounces at yoctoproject.org [mailto:yocto-
>> >bounces at yoctoproject.org] On Behalf Of Pascal Bach
>> >Sent: Wednesday, January 07, 2015 6:58 AM
>> >To: yocto at yoctoproject.org
>> >Subject: [yocto] [yocto-docs][PATCH 2/2] dev-manual: Add section
>> >about /dev population
>> >
>> >Signed-off-by: Pascal Bach <pascal.bach at siemens.com>
>> >---
>> > .../dev-manual/dev-manual-common-tasks.xml         |  104
>> >++++++++++++++++++++
>> > 1 file changed, 104 insertions(+)
>> >
>> >diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml
>> >b/documentation/dev-manual/dev-manual-common-tasks.xml
>> >index 17d725b..9072586 100644
>> >--- a/documentation/dev-manual/dev-manual-common-tasks.xml
>> >+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
>> >@@ -7582,6 +7582,110 @@ Gateways via their Web
>> >Interfaces</ulink>"</emphasis>
>> >         </section>
>> >     </section>
>> >
>> >+    <section id="selecting-dev-manager">
>> >+        <title>Selecting a Device Manager</title>
>> >+
>> >+        <para>
>> >+            Yocto provides multiple ways to manage
>> <filename>/dev</filename>
>> >+            <itemizedlist>
>> >+                <listitem><para>
>> >+                <emphasis>Persistent and pre populated
>> ><filename>/dev</filename>:</emphasis>
>> >+                in this case the <filename>/dev</filename> directory
>> is persistent
>> >+                and the required device nodes are created at build
>> time.
>> >+                </para></listitem>
>> >+
>> >+                <listitem><para>
>> >+                <emphasis>Use <filename>devtmps</filename> with a
>> device
>> >manager:</emphasis>
>> >+                in this case the <filename>/dev</filename> 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
>> >+                <filename>udev</filename> or <filename>busybox-
>> >mdev</filename>.
>> >+                </para></listitem>
>> >+            </itemizedlist>
>> >+        </para>
>> >+
>> >+        <section id="static-dev-management">
>> >+            <title>Use Persistent and pre-populated
>> ><filename>/dev</filename></title>
>> >+
>> >+            <para>
>> >+                To use the static method for device population the
>> variable
>> >+                <ulink url='&YOCTO_DOCS_REF_URL;#var-
>> >USE_DEVFS'><filename>USE_DEVFS</filename></ulink>
>> >+                needs to be set to 0.
>> >+
>> >+                <literallayout class='monospaced'>
>> >+     USE_DEVFS = "0"
>> >+                </literallayout>
>> >+            </para>
>> >+
>> >+            <para>
>> >+                The content of the resulting
>> >+ <filename>/dev</filename>
>> directory
>> >+                is defined in a Device Table file. The device table
>> >+ to
>> use is defined by
>> >the variable
>> >+                <ulink url='&YOCTO_DOCS_REF_URL;#var-
>>
>>IMAGE_DEVICE_TABLES'><filename>IMAGE_DEVICE_TABLES</filename></
>ul
>> >ink> and should be set
>> >+                in the <ulink url='&YOCTO_DOCS_REF_URL;#var-
>> >MACHINE'><filename>MACHINE</filename></ulink>,
>> >+                <ulink url='&YOCTO_DOCS_REF_URL;#var-
>> >DISTRO'><filename>DISTRO</filename></ulink>
>> >+                or <filename>local.conf</filename> configuration file.
>> >+            </para>
>> >+
>> >+            <para>
>> >+                If nothing is defined the default
>> <filename>device_table-
>> >minimal.txt</filename> is used.
>> >+            </para>
>> >+
>> >+            <para>
>> >+                The population is handled by the
>> <filename>makedevs</filename>
>> >utility
>> >+                during image creation.
>> >+
>> >+                <literallayout class='monospaced'>
>> >+     IMAGE_DEVICE_TABLES = "device_table-mymachine.txt"
>> >+                </literallayout>
>> >+
>> >+            </para>
>> >+        </section>
>> >+
>> >+        <section id="devtmps-dev-management">
>> >+            <title>Use <filename>devtmpfs</filename> and a device
>> >manager</title>
>> >+
>> >+            <para>
>> >+                To use the dynamic method for device population the
>> variable
>> >+                <ulink url='&YOCTO_DOCS_REF_URL;#var-
>> >USE_DEVFS'><filename>USE_DEVFS</filename></ulink>
>> >+                needs to be set to 1. This is the default.
>> >+
>> >+                <literallayout class='monospaced'>
>> >+     USE_DEVFS = "1"
>> >+                </literallayout>
>> >+
>> >+                This way the resulting <filename>/dev</filename> is
>> populated by
>> >the kernel
>> >+                using <filename>devtmpfs</filename>. Make sure the
>> >corresponding
>> >+                kernel configuration variable
>> ><filename>CONFIG_DEVTMPFS</filename> is set
>> >+                when building a linux kernel.
>> >+
>> >+            </para>
>> >+            <para>
>> >+                All devices created by <filename>devtmpfs</filename>
>> will be
>> >+                owned by <filename>root</filename> and have
>> permissions
>> ><filename>0600</filename>.
>> >+
>> >+                To have more control over the device nodes a device
>> manager like
>> >+                <filename>udev</filename> or <filename>busybox-
>> >mdev</filename>
>> >+                can be used.
>> >+
>> >+                The device manager to use is defined by the variable
>> >+                <filename>VIRTUAL-RUNTIME_dev_manager</filename> and
>> >should be set
>> >+                in the <ulink url='&YOCTO_DOCS_REF_URL;#var-
>> >MACHINE'><filename>MACHINE</filename></ulink>,
>> >+                <ulink url='&YOCTO_DOCS_REF_URL;#var-
>> >DISTRO'><filename>DISTRO</filename></ulink>
>> >+                or <filename>local.conf</filename> configuration file.
>> >+
>> >+                <literallayout class='monospaced'>
>> >+
>> >+     VIRTUAL-RUNTIME_dev_manager = "udev"
>> >+
>> >+     # Some alternative values
>> >+     # VIRTUAL-RUNTIME_dev_manager = "busybox-mdev"
>> >+     # VIRTUAL-RUNTIME_dev_manager = "systemd"
>> >+                </literallayout>
>> >+            </para>
>> >+        </section>
>> >+    </section>
>> >+
>> >     <section id="platdev-appdev-srcrev">
>> >         <title>Using an External SCM</title>
>> >
>> >--
>> >1.7.10.4
>> >
>> >--
>> >_______________________________________________
>> >yocto mailing list
>> >yocto at yoctoproject.org
>> >https://lists.yoctoproject.org/listinfo/yocto



More information about the yocto mailing list