<?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>7238</bug_id>
          
          <creation_ts>2015-01-23 08:38:26 +0000</creation_ts>
          <short_desc>Missing /dev/loop*  devices make some ltp cases failed</short_desc>
          <delta_ts>2015-02-04 08:00:09 +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>BSPs</product>
          <component>bsps-meta-yocto</component>
          <version>1.8</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.8 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Yi Zhao">yi.zhao</reporter>
          <assigned_to name="Saul Wold">sgw</assigned_to>
          <cc>alexandru.c.georgescu</cc>
    
    <cc>bruce.ashfield</cc>
    
    <cc>dvhart</cc>
    
    <cc>ke.zou</cc>
    
    <cc>kexin.hao</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>yi.zhao</cc>
    
    <cc>zhangle.yang</cc>
          
          <qa_contact name="Yi Zhao">yi.zhao</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>Regression (Used to work)</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>48211</commentid>
    <comment_count>0</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2015-01-23 08:38:26 +0000</bug_when>
    <thetext>Image location: http://autobuilder.yoctoproject.org/pub/releases/yocto-1.8_M2.rc1
Git rev: master/d9d5b8b499af3ae01a1e33d0d3969c54c2d4ab1b

Some ltp cases need /dev/loop device, but now there is no such device in beaglebone, mpc8315e-rdb, and edgerouter. 

################
root@beaglebone:~# ls /dev/loop*
ls: cannot access /dev/loop*: No such file or directory
root@beaglebone:~# 
root@beaglebone:~# 
root@beaglebone:~# dd if=/dev/zero of=/opt/test.img bs=1M count=256
tilcdc 4830e000.lcdc: timeout waiting for framedone
256+0 records in
256+0 records out
268435456 bytes (268 MB) copied, 22.2859 s, 12.0 MB/s
root@beaglebone:~# 
root@beaglebone:~# losetup -f
/dev/loop0
root@beaglebone:~# 
root@beaglebone:~# losetup /dev/loop0 /opt/test.img 
losetup: /dev/loop0: failed to set up loop device: No such file or directory
root@beaglebone:~# 
##################

These devices exist in 1.8 M1 build.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48338</commentid>
    <comment_count>1</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2015-01-27 19:06:33 +0000</bug_when>
    <thetext>Have you installed the modules into that system?  Which Image exactly are you 
testing with?  Can you verify if you have a 
/lib/modules/3.14.19-yocto-standar/kernel/drivers/block/loop.ko module 
installed?  Kernel name may be slightly different, but I don;t think so.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48347</commentid>
    <comment_count>2</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2015-01-28 04:33:27 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; Have you installed the modules into that system?  Which Image exactly are
&gt; you 
&gt; testing with?  Can you verify if you have a 
&gt; /lib/modules/3.14.19-yocto-standar/kernel/drivers/block/loop.ko module 
&gt; installed?  Kernel name may be slightly different, but I don;t think so.

I think the root cause is the modules.dep file is empty:
#################
root@beaglebone:~# ls -l /lib/modules/3.14.19-yocto-standard/modules.dep
-rw-r--r-- 1 root root 0 Jan 18 08:04 /lib/modules/3.14.19-yocto-standard/modules.dep
root@beaglebone:~# 
#################

So the modprobe can not work correctly and no modules are loaded when system up. 
#################
root@beaglebone:~# modprobe loop
modprobe: FATAL: Module loop not found.
root@beaglebone:~#
root@beaglebone:~# lsmod
Module                  Size  Used by
root@beaglebone:~#  
#################

After ran &quot;depmod -a&quot; manually. 
##################
root@beaglebone:~# modprobe loop
loop: module loaded
root@beaglebone:~# lsmod
Module                  Size  Used by
loop                   17190  0 
root@beaglebone:~# 
root@beaglebone:~# 
##################

Then reboot the system, some modules are loaded automatically:
###################
root@beaglebone:~# lsmod
Module                  Size  Used by
nls_iso8859_1           3676  1 
nls_cp437               5342  1 
musb_dsps               6762  0 
musb_hdrc              57504  1 musb_dsps
snd_soc_omap            3286  0 
snd_pcm_dmaengine       4789  1 snd_soc_omap
snd_soc_core          157290  1 snd_soc_omap
snd_compress            8065  1 snd_soc_core
regmap_spi              2152  1 snd_soc_core
snd_pcm                83288  3 snd_soc_core,snd_soc_omap,snd_pcm_dmaengine
snd_timer              20042  1 snd_pcm
snd                    49713  4 snd_soc_core,snd_timer,snd_pcm,snd_compress
soundcore               1194  1 snd
omap_rng                5100  0 
rng_core                4307  1 omap_rng
musb_am335x             1416  0 
root@beaglebone:~# 
########################

For a quick check, extract the core-image-sato-sdk tarball for beaglebone, edgerouter or mpc8315e, you could see the modules.dep file is empty in lib/modules/3.14.19-yocto-standard/

BTW: bug 7212 is also caused by the same issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48350</commentid>
    <comment_count>3</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2015-01-28 05:40:15 +0000</bug_when>
    <thetext>Looks like the bug 7228 also related with this issue. Please see bug 7228 comment 2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48460</commentid>
    <comment_count>4</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2015-02-02 09:25:59 +0000</bug_when>
    <thetext>Re-test on 20150201 build: http://autobuilder.yoctoproject.org/pub/nightly/20150201-1/

The modules.dep is not empty. The loop module can modprboe without problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48477</commentid>
    <comment_count>5</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-02-02 13:46:07 +0000</bug_when>
    <thetext>Resolved by fixes ending with http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=3f15d8a807edb02825e32c4d8c924b4465ca5098</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48535</commentid>
    <comment_count>6</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2015-02-04 08:00:09 +0000</bug_when>
    <thetext>Verified with 1.8 M2 rc2 build.
Git rev: master/22c38e2d8a058619e3d05534b5e830b750aa4241</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>