<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>6939</bug_id>
          
          <creation_ts>2014-11-07 18:02:52 +0000</creation_ts>
          <short_desc>microLinux: Add support for configuring out char devices</short_desc>
          <delta_ts>2015-05-18 14:05:08 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>Meta-yocto</product>
          <component>meta-yocto</component>
          <version>1.8</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>OBSOLETE</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.8 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tom Zanussi">tom.zanussi</reporter>
          <assigned_to name="Tom Zanussi">tom.zanussi</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>46868</commentid>
    <comment_count>0</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2014-11-07 18:02:52 +0000</bug_when>
    <thetext>Even with our bare-bones microLinux configuration, we see some character devices that we really don&apos;t need, and which correspond to things that can&apos;t be configured out:

root@galileo:/dev# ls -al
drwxr-xr-x    4 root     root             0 Jan  1 00:00 .
drwxr-xr-x   17 root     root             0 Jan  1 00:00 ..
crw-------    1 root     root        5,   1 Jan  1 00:00 console
crw-------    1 root     root       10,  63 Jan  1 00:00 cpu_dma_latency
crw-rw-rw-    1 root     root        1,   7 Jan  1 00:00 full
prw-------    1 root     root             0 Jan  1 00:00 initctl
crw-------    1 root     root        1,   1 Jan  1 00:00 mem
drwxrwxrwt    2 root     root             0 Jan  1 00:00 mqueue
lrwxrwxrwx    1 root     root            12 Jan  1 00:00 mtab -&gt; /proc/mounts
crw-------    1 root     root       10,  62 Jan  1 00:00 network_latency
crw-------    1 root     root       10,  61 Jan  1 00:00 network_throughput
crw-rw-rw-    1 root     root        1,   3 Jan  1 00:00 null
crw-------    1 root     root        1,   4 Jan  1 00:00 port
crw-rw-rw-    1 root     root        5,   2 Jan  1 00:01 ptmx
crw-------    1 root     root      253,   0 Jan  1 00:00 ptp0
drwxr-xr-x    2 root     root             0 Jan  1 00:00 pts
crw-rw-rw-    1 root     root        1,   8 Jan  1 00:00 random
crw-rw-rw-    1 root     root        5,   0 Jan  1 00:00 tty
crw-------    1 root     root        4,  64 Jan  1 00:00 ttyS0
crw-------    1 root     tty         4,  65 Jan  1 14:09 ttyS1
crw-rw-rw-    1 root     root        1,   9 Jan  1 00:00 urandom
crw-rw-rw-    1 root     root        1,   5 Jan  1 00:00 zero

One example is /dev/mem.  We don&apos;t need it, yet there&apos;s no config option for it.
Adding a CONFIG_DEVMEM saves about 4k text:

add/remove: 0/31 grow/shrink: 1/0 up/down: 151/-4880 (-4729)
function                                     old     new   delta
phys_mem_access_prot_allowed                  39     190    +151
mem_class                                      8       -      -8
__initcall_chr_dev_init5                       8       -      -8
read_null                                     13       -     -13
aio_read_null                                 13       -     -13
write_null                                    14       -     -14
pipe_to_null                                  14       -     -14
write_full                                    18       -     -18
null_lseek                                    21       -     -21
splice_write_null                             23       -     -23
open_port                                     29       -     -29
mmap_zero                                     30       -     -30
mem_devnode                                   48       -     -48
aio_write_null                                52       -     -52
mmap_mem_ops                                  88       -     -88
memory_lseek                                 130       -    -130
memory_open                                  134       -    -134
read_port                                    151       -    -151
write_port                                   152       -    -152
read_iter_zero                               173       -    -173
chr_dev_init                                 193       -    -193
zero_fops                                    232       -    -232
port_fops                                    232       -    -232
null_fops                                    232       -    -232
memory_fops                                  232       -    -232
mem_fops                                     232       -    -232
full_fops                                    232       -    -232
mmap_mem                                     288       -    -288
devlist                                      384       -    -384
read_mem                                     407       -    -407
write_mem                                    425       -    -425
zero_bdi                                     672       -    -672

At minimum, we should do the same for any char device we don&apos;t need, and it may be better to just add a CONFIG_CHAR to turn them all off, but that seems like it may be a much bigger job.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51077</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-05-18 14:05:08 +0000</bug_when>
    <thetext>Tom is tracking this internally now.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>