<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">

  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    
    
    <!--[if gte mso 9]>
    <xml>
      <o:OfficeDocumentSettings>
        <o:AllowPNG/>
        <o:PixelsPerInch>96</o:PixelsPerInch>
     </o:OfficeDocumentSettings>
    </xml>
    <![endif]-->
    
    
    <style type="text/css">* a:hover{cursor:pointer;}</style>
    

    <style>body {-webkit-animation:bugfix infinite 1s;}@-webkit-keyframes bugfix {from {position:relative;}to {position:relative;}}</style>

  </head>

  <body style="word-wrap:normal;  word-break:break-word;">

    <style>a {word-wrap:normal;word-break:break-word;}.background-contain {background-size:contain;}@media only screen and (max-width:600px) {.container {-webkit-text-size-adjust:none !important;}.container,.palm-one-whole {width:100% !important;min-width:100% !important;}.palm-one-half {width:50% !important;min-width:50% !important;box-sizing:border-box;}blockquote .container,blockquote .container div,blockquote .container table {width:auto !important;min-width:0 !important;position:relative !important;}img {max-width:100%;}.border-outer,.border-middle,.border-inner,.inner,[title="separator"] {width:100% !important;}.innercell {padding:8px !important;}.palm-block {display:block !important;}td.palm-one-whole {display:inline-block !important;padding:0;}td.palm-one-whole:first-child:not(:only-child) {margin-bottom:16px;}td.hostname {padding-top:3px !important;}}@media only screen and (min-width:601px) {.preview-card {max-width:600px !important;}}@media only screen and (min-device-width :320px) and (max-device-width :568px),only screen and (min-device-width :768px) and (max-device-width :1024px),only screen and (max-device-width:640px),only screen and (max-device-width:667px),only screen and (max-width:480px){.container {width:100% !important;min-width:100% !important;}.p,.small,li,font[size="2"],font[size="3"] {font-size:1em !important;}}@media only screen and (min-device-width :320px) and (max-device-width :568px),only screen and (min-device-width :768px) and (max-device-width :1024px),only screen and (min-device-width :1224px)  {.message-wrapper {padding-top:6px;}.apple-only[style] {display:block !important;max-height:none !important;line-height:normal !important;overflow:visible !important;height:auto !important;width:100% !important;position:relative !important;}.no-apple {display:none !important;}form {font-size:inherit;}input[type="text"] {height:43px;padding-left:4px !important;}button:hover {cursor:pointer;}}@media only screen and (min-device-width :1224px)  {.apple-mail-form {display:block !important;background-color:white !important;}}* [office365] .outlook-com-hidden {display:none !important;}* [office365] .outlook-com-button {display:block;}* [office365] .outlook-com-only {display:block !important;max-height:none !important;line-height:normal !important;overflow:visible !important;height:auto !important;width:100% !important;position:relative !important;}</style>

    
    <!--[if (gte mso 9)|(IE)]>
    
    <style>a,body {font-family:'Calibri',Arial,sans-serif;}img {border:none !important;-ms-interpolation-mode:bicubic;}td {mso-line-height-rule:exactly !important;}.mso-card-inner table {border-collapse:collapse !important;mso-table-lspace:0pt;mso-table-rspace:0pt;vertical-align:top;}.outlook-com-only {display:none !important;font-size:0 !important;}#mso-one-whole {width:100% !important;}.border-outer,.border-middle,.border-inner {border:none !important;}.border-middle,.border-inner {width:100% !important;}.mso-border-outer,.mso-border-middle,.mso-border-inner {padding:1px;}.mso-border-outer {background-color:rgb(245,255,255);}.mso-border-middle {background-color:rgb(223,246,255);}.mso-border-inner {background-color:rgb(153,176,225);}</style>
    
    <![endif]-->
    

    <table class="container" lang="container" border="0" cellpadding="0" cellspacing="0" valign="top" style="width:100%;  margin-top:6px;">
      <tr>
        <td valign="top" class="message-wrapper" style="line-height: 1.31;  color: #222;  font-family: arial, sans-serif;">

          <!--[if mso]><table  border="0" cellpadding="0" cellspacing="0" valign="top" style="border-collapse:separate;"><tr><td valign="top"><![endif]-->
            <div>Hello everyone, </div><div><br></div><div>As per the conversation at IRC I booted the testsuit with turning USB and ethernet on. Also I ran FreeBSD on my Pi and got the bootup log as suggested by Alan and Chris. Here are some observations. </div><div><br></div><div>1. After turning on USB in u-boot, I was getting power on USB devices atached. (One of the device I have, has a LED idicator.) But as soon the testsuit (init01) starts, the power to USB goes off. And didn't start afterwords. </div><div><br></div><div>2. I am adding relevant part of the FreeBSD boot log of my Pi. </div><div>(Lines marked with “*” are the ones also coming in my testsuit.)</div><div><br></div><div>------------------------------------------------------------------------------------------------------</div><div>*bcm283x_dwcotg0: <DWC OTG 2.0 integrated USB controller (bcm283x)> mem 0x980000-0x99ffff on simplebus0</div><div>*usbus0 on bcm283x_dwcotg0</div><div>fb0: <BCM2835 VT framebuffer driver> on ofwbus0</div><div>fbd0 on fb0</div><div>VT: initialize with new VT driver “fb”.</div><div>fb0: 656x416(656x416@0,0) 24bpp</div><div>fb0: fbswap: 1, pitch 1968, base 0x1eaac000, screen_size 818688</div><div>cryptosoft0: <software crypto></div><div>Timecounters tick every 10.000 msec</div><div>*usbus0: 480Mbps High Speed USB v2.0</div><div>bcm2835_cpufreq0: ARM 700MHz, Core 250MHz, SDRAM 400MHz, Turbo OFF</div><div>ugen0.1: <DWCOTG> at usbus0</div><div>*uhub0: <DWCOTG OTG Root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0</div><div>mmcsd0: 8GB <SDHC SL08G 8.0 SN D00568A8 MFG 07/2015 by 3 SD> at mmc0 41.6MHz/4bit/65535-block</div><div>Trying to mount root from ufs:/dev/ufs/rootfs [rw]...</div><div>warning: no time-of-day clock registered, system time will not be set accurately</div><div>*uhub0: 1 port with 1 removable, self powered</div><div>ugen0.2: <vendor 0x0424> at usbus0</div><div>#uhub1: <vendor 0x0424 product 0x9514, class 9/0, rev 2.00/2.00, addr 2> on usbus0</div><div>#uhub1: MTT enabled</div><div>Growing root partition to fill device</div><div>GEOM_PART: mmcsd0s2 was automatically resized.</div><div>  Use `gpart commit mmcsd0s2` to save changes or `gpart undo mmcsd0s2` to revert them.</div><div>mmcsd0s2 resized</div><div>#uhub1: 5 ports with 4 removable, self powered</div><div>mmcsd0s2a resized</div><div>super-block backups (for fsck_ffs -b #) at:</div><div> 2062528, 2578112, 3093696, 3609280, 4124864, 4640448,ugen0.3: <vendor 0x0424> at usbus0</div><div>smsc0: <vendor 0x0424 product 0xec00, rev 2.00/2.00, addr 3> on usbus0</div><div>smsc0: chip 0xec00, rev. 0002</div><div>miibus0: <MII bus> on smsc0</div><div>ukphy0: <Generic IEEE 802.3u media interface> PHY 1 on miibus0</div><div>ukphy0:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto</div><div>ue0: <USB Ethernet> on smsc0</div><div>ue0: Ethernet address: b8:27:eb:06:16:f9</div><div> 5156032,ugen0.4: <vendor 0x0846> at usbus0</div><div> 5671616,</div><div> 6187200, 6702784, 7218368,ugen0.5: <SanDisk> at usbus0</div><div>umass0: <SanDisk Cruzer Blade, class 0/0, rev 2.10/1.00, addr 5> on usbus0</div><div>umass0:  SCSI over Bulk-Only; quirks = 0xc100</div><div>umass0:0:0: Attached to scbus0</div><div>da0 at umass-sim0 bus 0 scbus0 target 0 lun 0</div><div>da0: <SanDisk Cruzer Blade 1.00> Removable Direct Access SPC-4 SCSI device</div><div>da0: Serial Number 4C530001020307111083</div><div>...</div><div>------------------------------------------------------------------------------------------------------</div><div><br></div><div><br></div><div>The Lines with “#” are related to the usb_ethernet controller driver. Detection of the second “uhub” child (uhub1) seems the key thing here. After that smsc, miibus and ukphy gets initialised. In my test suit I am not getting the “uhub1:” part. Which have 5 ports with 4 removable, i.e. 1 Ethernet and 4 USB. </div><div>I double checked the USB base adderess and the irq number.       </div><div><br></div><div>In the line “uhub1: 5 ports with 4 removable, self powered”, does “self powered” mean that it should be On by default for getting detected ? If that is true, How can we switch On something in RTEMS ? Also what can switch off the USB, which was already On by uboot ? </div><div><br></div><div>It looks like the “ugen” module finds that device and then gives control to “uhub” (in the freebsd boot log). But ugen is disabled in RTEMS. Anything in this direction ?</div><div><br></div><div>code link: https://github.com/deval-maker/rtems-libbsd/commit/91f4c1ef04267c6186e38e23e571e7806016480c.</div><img align="left" width="0" height="0" style="border:0; width:0px; height:0px;" src="https://app.mixmax.com/api/track/v2/hgEZffpTtwR09Bk4S/ISbvNmLslWYtdGQyV2ah1mLsFmdlRmI/IyZy9mLz1WZ0JHQsVmdlRmI/IyZy9mLz1WZ0JHQsVmdlRWLz1WZ0JnI?sc=false" alt="">
          <!--[if mso]></td></tr></table><![endif]-->
        </td>
      </tr>
    </table>

    <div>
<div>
  <p data-m-apply-default-font="true"><br></p>
  <div class="gmail_extra">
    <p data-m-apply-default-font="true"><br></p>
    <div class="gmail_quote">
      On Wed, Jul 13, 2016 5:41 AM, Chris Johns <span dir="ltr"> <a href="mailto:chrisj@rtems.org" target="_blank">chrisj@rtems.org</a></span>
 wrote:<br>
      <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
        <u></u>
        <p>On 12/07/2016 23:32, Alan Cudmore wrote:</p><p>> I'm not sure what I did to get the extra debug messages. When I run the</p><p>> usb01 example, I just see:</p><p>> nexus0: <RTEMS Nexus device></p><p>></p><p>> I will have to read up on how the libbsd drivers are used, and what</p><p>> needs to be done to set them up in nexus-devices.h</p><p>></p><p><br></p><p>I would work backwards from one of the prints you are not seeing.</p><p><br></p><p>One way to work out the issue is to directly check the missing prints statements in the module of code. If you add '--show-commands' to the waf configure command line the commands used to build the code are printed. If you then change in to the build directory, cut and paste the command to build the source you are interested and add '-save-temps' you will get the pre-processed output. Check the .i file and if there are no print statements you know a define controlling it is missing. You will then need to track the headers to find it. Once found add the option to the '--freebsd-options' list.</p><p><br></p><p>Note, if you create an error in the source, eg add 'x' anywhere, the build will stop on the file of interest. This speeds up getting to the command line you are interested in. Remove the error once you have the command.</p><p><br></p><p>> Chris: do you know if it would help to boot FreeBSD on the Pi to see the</p><p>> messages and look at what drivers are used?</p><p><br></p><p>I tend to try and boot FreeBSD if possible and check the messages and what is detected match. I am doing this on the Beckhoff PC hardware at the moment.</p><p><br></p><p>Chris</p><p><br></p>
      </blockquote>
    </div>
  </div>
</div>
</div>
    <br><br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Deval Shah</div><div>Graduate Student,</div><div><div style="font-size:12.8px">B.E. (Hons.) Electrical and Electronics Engineering<br></div><div style="font-size:12.8px"><a href="http://www.bits-pilani.ac.in/hyderabad/" style="color:rgb(17,85,204);font-size:12.8px" target="_blank">BITS Pilani Hyderabad Campus</a></div></div><img src="https://ci6.googleusercontent.com/proxy/DM4ysm5iWy-VSyRJGngrP-z6n2Z5XzVZwL905zdiU5ZSKYJ3Vg0iY1QgCVWw2VCOS0oTQVlwML0czhuk9-5b0dg8Z5I1ZDsv2QP_jJmBhXYgneE2ZGo-9OI9qWrx_Amt0UhbdY0U7Na09rarzmNIXgAYEtScNlXT5oXNl-yaRS8=s0-d-e1-ft#https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcQrfqfQ2BeDwbmyqDm6xXZtDzweCXlsUaVTjJkCOsZ3eyztVIs8dg"><br></div><div><a href="https://github.com/deval-maker">Github Profile</a></div></div>
  </body>
</html>