GSOC 2017 RTEMS-libbsd issue

Kirspel, Kevin Kevin-Kirspel at idexx.com
Wed Apr 19 11:56:25 UTC 2017


I have recently posted patches for TTY and USB serial support for FREEBSD.  I was going to take a stab at supporting UGEN as well.  The USB mouse and keyboard drivers need it as well.  The TTY patches contain some support needed for UGEN but there is more required.  Let me take a look at it today to see how much more effort it would take to get the baseline UGEN compiling (in usb_dev.c).

Kevin Kirspel
Electrical Engineer - Sr. Staff
Idexx Roswell
235 Hembree Park Drive
Roswell GA 30076
Tel: (770)-510-4444 ext. 81642
Direct: (770)-688-1642
Fax: (770)-510-4445

From: devel [mailto:devel-bounces at rtems.org] On Behalf Of Sichen Zhao
Sent: Wednesday, April 19, 2017 7:06 AM
To: Christian Mauderer <christian.mauderer at embedded-brains.de>; RTEMS <devel at rtems.org>
Subject: Re: GSOC 2017 RTEMS-libbsd issue


Hi Christian Mauderer, Hi all,


I understand what you mean, i will update my RTEMS-libbsd to the newest branch.
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 storage device.
And i already add the host controller and driver to nexus-devices.h(RTEMS_BSD_DEFINE_NEXUS_DEVICE(musbotg,0 , RTEMS_ARRAY_SIZE(musbotg_res), &musbotg_res[0]);).

Now uhub usbus and musbotg can mount on nexus bus.
the issue is: it can not find the new device(such as U disk)
So i compare with the FreeBSD boot log info, and the only difference is FreeBSD enable the USB_HAVE_UGEN, so i guess if it is necessary
to enable the macro USB_HAVE_UGEN.

Thank you for your suggestions.

Best regards
Sichen Zhao


________________________________
From: Christian Mauderer <christian.mauderer at embedded-brains.de<mailto:christian.mauderer at embedded-brains.de>>
Sent: Wednesday, April 19, 2017 2:02 PM
To: Sichen Zhao; RTEMS
Subject: Re: GSOC 2017 RTEMS-libbsd issue


Am 19.04.2017 um 07:45 schrieb Christian Mauderer:
> Am 18.04.2017 um 17:10 schrieb Sichen Zhao:
>>
>> Hi all,
>>
>> I am working on my goal of GSOC 2017 project: Beaglebone black bsp
>> improvement.
>>
>>
>> And i have some issue about the RTEMS-libbsd:
>>
>> if i switch on the macro USB_HAVE_UGEN in the
>> /rtemsbsd/include/rtems/bsd/local/opt_usb.h,
>>
>> There are lots of errors when compile code.
>>
>>
>>
>>
>> So the macro USB_HAVE_UGEN should keep unable? I see the FreeBSD on BBB
>> enable the USB_HAVE_UGEN.
>>
>>
>> Thanks
>>
>> Sichen Zhao
>>
>>
>>
>> _______________________________________________
>> devel mailing list
>> devel at rtems.org<mailto:devel at rtems.org>
>> http://lists.rtems.org/mailman/listinfo/devel<https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.rtems.org_mailman_listinfo_devel&d=DwMGaQ&c=2do6VJGs3LvEOe4OFFM1bA&r=HDiJ93ANMEQ32G5JGdpyUxbdebuwKHBbeiHMr3RbR74&m=fBosmEYCuSEO6a7cKLNINnD7xmpULdLTtLnjuyse-Fk&s=1pIVlv0zFLnMyU1n6F32PFn3oCKUf1wH1MY-6g5kHsE&e=>
>>
>
> Hello Sichen,
>
> I only read the introduction of the man page (see [1]) but as far as I
> can tell, ugen is a generic USB driver in FreeBSD. I think it would be
> useful if you want to get some generic device Information similar to the
> ones you can get with lsusb in linux. From the look of it, I would
> expect that you also would need it for a library like libusb (which is
> used for example in OpenOCD to get a direct access to the hardware
> without any special drivers).
>
> Normally you should not need it if there is a special driver for your
> USB device in the kernel. For example, if you want to attach a USB mass
> storage stick, you won't need it.
>
> Basically for porting the BBB USB support to libbsd, I would expect that
> you have to pull over the host controller driver files from freebsd and
> make them compilable in rtems-libbsd. Then you would have to add the
> host controller and device drivers to nexus-devices.h. After that, it's
> quite possible that you can already use some of the examples like
> testsuite/media01. If you need any help or details on that process, feel
> free to ask.
>
> Kind regards
>
> Christian Mauderer
>
>
> [1]
> https://www.freebsd.org/cgi/man.cgi?query=ugen&manpath=FreeBSD+11.0-RELEASE+and+Ports<https://urldefense.proofpoint.com/v2/url?u=https-3A__www.freebsd.org_cgi_man.cgi-3Fquery-3Dugen-26manpath-3DFreeBSD-2B11.0-2DRELEASE-2Band-2BPorts&d=DwMGaQ&c=2do6VJGs3LvEOe4OFFM1bA&r=HDiJ93ANMEQ32G5JGdpyUxbdebuwKHBbeiHMr3RbR74&m=fBosmEYCuSEO6a7cKLNINnD7xmpULdLTtLnjuyse-Fk&s=goBcp4AwRgGY3uAfm2qr2XOn45-x0NzWfk0JTjj1Gic&e=>
>

By the way: I noted that the libbsd in your github repo is from December
2016. There have been quite some changes since then including a mayor
update to the FreeBSD head of 2016-08-23 and two smaller ones to more
recent FreeBSD head versions. Also the WLAN support has been added since
then. You might should consider an update if you still work with this
version.

--
--------------------------------------------
embedded brains GmbH
Christian Mauderer
Dornierstr. 4
D-82178 Puchheim
Germany
email: christian.mauderer at embedded-brains.de<mailto:christian.mauderer at embedded-brains.de>
Phone: +49-89-18 94 741 - 18
Fax:   +49-89-18 94 741 - 08
PGP: Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20170419/19c2090c/attachment-0002.html>


More information about the devel mailing list