<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p>Hi <span style="color: rgb(51, 51, 51); font-size: 17px; white-space: nowrap;">Christian Mauderer, Hi all,</span></p>
<p><span style="color: rgb(51, 51, 51); font-size: 17px; white-space: nowrap;"><br>
</span></p>
<div id="Signature"></div>
<div>I understand what you mean, i will update my RTEMS-libbsd to the newest branch.
<div>I already pull over the host controller driver files(am335x_musb.c am335x_usbss.c umass.c)from freebsd and make them compilable in rtems-libbsd. The umass.c is driver for <span>storage device.</span></div>
<div><span style="font-size: 12pt;">And i already add the host controller and driver to nexus-devices.h(</span><span style="font-size: 12pt;">RTEMS_BSD_DEFINE_NEXUS_DEVICE(musbotg,0 , RTEMS_ARRAY_SIZE(musbotg_res), &musbotg_res[0]);</span><span style="font-size: 12pt;">).</span></div>
</div>
<div><span style="font-size: 12pt;"><br>
</span></div>
<div><span style="font-size: 12pt;">Now uhub usbus and <span>musbotg can </span></span><span style="font-size: 12pt;">mount on nexus bus.</span></div>
<div><span style="font-size: 12pt;">the issue is: it can not find the new device(such as U disk)</span></div>
<div><span style="font-size: 12pt;">So i compare with the FreeBSD boot log info, and the only difference is FreeBSD enable the
<span>USB_HAVE_UGEN, so i guess if it is <span>necessary</span></span></span></div>
<div><span style="font-size: 12pt;"><span><span>to enable the macro <span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">USB_HAVE_UGEN.</span></span></span></span></div>
<div><span style="font-size: 12pt;"><span><span><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;"><br>
</span></span></span></span></div>
<div><span style="font-size: 12pt;"><span><span><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">Thank you for your suggestions.</span></span></span></span></div>
<div><span style="font-size: 12pt;"><span><span><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;"><br>
</span></span></span></span></div>
<div><span style="font-size: 12pt;"><span><span><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">Best regards</span></span></span></span></div>
<div><span style="font-size: 12pt;"><span><span><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">Sichen Zhao</span></span></span></span></div>
<div><br>
</div>
<br>
<div style="color: rgb(0, 0, 0);">
<div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Christian Mauderer <christian.mauderer@embedded-brains.de><br>
<b>Sent:</b> Wednesday, April 19, 2017 2:02 PM<br>
<b>To:</b> Sichen Zhao; RTEMS<br>
<b>Subject:</b> Re: GSOC 2017 RTEMS-libbsd issue</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText"><br>
Am 19.04.2017 um 07:45 schrieb Christian Mauderer:<br>
> Am 18.04.2017 um 17:10 schrieb Sichen Zhao:<br>
>><br>
>> Hi all,<br>
>><br>
>> I am working on my goal of GSOC 2017 project: Beaglebone black bsp<br>
>> improvement.<br>
>><br>
>><br>
>> And i have some issue about the RTEMS-libbsd:<br>
>><br>
>> if i switch on the macro USB_HAVE_UGEN in the<br>
>> /rtemsbsd/include/rtems/bsd/local/opt_usb.h, <br>
>><br>
>> There are lots of errors when compile code. <br>
>><br>
>><br>
>><br>
>><br>
>> So the macro USB_HAVE_UGEN should keep unable? I see the FreeBSD on BBB<br>
>> enable the USB_HAVE_UGEN.<br>
>><br>
>><br>
>> Thanks<br>
>><br>
>> Sichen Zhao<br>
>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> devel mailing list<br>
>> devel@rtems.org<br>
>> <a href="http://lists.rtems.org/mailman/listinfo/devel" id="LPlnk180482" previewremoved="true">
http://lists.rtems.org/mailman/listinfo/devel</a><br>
>><br>
> <br>
> Hello Sichen,<br>
> <br>
> I only read the introduction of the man page (see [1]) but as far as I<br>
> can tell, ugen is a generic USB driver in FreeBSD. I think it would be<br>
> useful if you want to get some generic device Information similar to the<br>
> ones you can get with lsusb in linux. From the look of it, I would<br>
> expect that you also would need it for a library like libusb (which is<br>
> used for example in OpenOCD to get a direct access to the hardware<br>
> without any special drivers).<br>
> <br>
> Normally you should not need it if there is a special driver for your<br>
> USB device in the kernel. For example, if you want to attach a USB mass<br>
> storage stick, you won't need it.<br>
> <br>
> Basically for porting the BBB USB support to libbsd, I would expect that<br>
> you have to pull over the host controller driver files from freebsd and<br>
> make them compilable in rtems-libbsd. Then you would have to add the<br>
> host controller and device drivers to nexus-devices.h. After that, it's<br>
> quite possible that you can already use some of the examples like<br>
> testsuite/media01. If you need any help or details on that process, feel<br>
> free to ask.<br>
> <br>
> Kind regards<br>
> <br>
> Christian Mauderer<br>
> <br>
> <br>
> [1]<br>
> <a href="https://www.freebsd.org/cgi/man.cgi?query=ugen&manpath=FreeBSD+11.0-RELEASE+and+Ports" id="LPlnk560509" previewremoved="true">
https://www.freebsd.org/cgi/man.cgi?query=ugen&manpath=FreeBSD+11.0-RELEASE+and+Ports</a><br>
> <br>
<br>
By the way: I noted that the libbsd in your github repo is from December<br>
2016. There have been quite some changes since then including a mayor<br>
update to the FreeBSD head of 2016-08-23 and two smaller ones to more<br>
recent FreeBSD head versions. Also the WLAN support has been added since<br>
then. You might should consider an update if you still work with this<br>
version.<br>
<br>
-- <br>
--------------------------------------------<br>
embedded brains GmbH<br>
Christian Mauderer<br>
Dornierstr. 4<br>
D-82178 Puchheim<br>
Germany<br>
email: christian.mauderer@embedded-brains.de<br>
Phone: +49-89-18 94 741 - 18<br>
Fax: +49-89-18 94 741 - 08<br>
PGP: Public key available on request.<br>
<br>
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.<br>
</div>
</span></font></div>
</div>
</body>
</html>