libbsd - USB Host Stack for HID, WirelessLAN

ragu nath ragunath3252 at gmail.com
Wed Aug 26 16:05:34 UTC 2015


Hi Thomas,

There is no need to manually edit the makefile. You can add whatever
files you need from freebsd to libbsd.py file.
I can see, there is already a dev_usb_input module. It is currently
disabled. You can just enable it & add additional files to it if you
need.

Then you run the freebsd-to-rtems.py which will make makefile &
wscript modifications. I was advised to use this method instead of
manually modifying the makefile.

"python freebsd-to-rtems.py -m" command will make the changes.

I am not sure how to get source files from freebsd using the scripts.
What I did was, I copied the necessary files to rtems-libbsd/freebsd
directory. Then I added those files to libbsd.py & ran
freebsd-to-rtems.py. Now you have the source files & makefile changes.
Now you can compile & start your porting work. As mentioned by yurii,
you can see my blog post on
http://ragustechblog.blogspot.in/2015/06/porting-driver-from-freebsd-to-rtems.html
which has some useful details

Note: If I run the freebsd-to-rtems.py script it is copying all the
files from freebsd to rtems. I could not import specific file/files.


Thanks,
Ragunath


>
> Message: 1
> Date: Wed, 26 Aug 2015 15:55:29 +0900
> From: Thomas Kim <thomas73.kim at gmail.com>
> To: Yurii Shevtsov <ungetch at gmail.com>
> Cc: "devel at rtems.org" <devel at rtems.org>
> Subject: Re: libbsd - USB Host Stack for HID, WirelessLAN
> Message-ID:
>         <CADY8aTBTD-ZrquRCUfH_7uk9wyZxWcJhEqigHPMdD69-5UGzRA at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Dear Yurii,
>
> Thank you for your kindly reply.
>
> At this time, I built lastest libbsd successfully.
> Also, I am tring to add USB input files in freebsd\sys\dev\usb\input.
>
> Question 1)
> As I guess, I think that I should modify Makefile, wscript file. also, I
> should modify USB input files(atp.c, uep.c, uhid.c, uknd.c, ums.c, etc)
> according to "Rules for Modifing FreeBSD source".
> Is it correct ?
>
> Question 2)
> As I test freebsd-to-rtems.py, it just move the ported FreeBSD code only
> from FreeBSD 9.2 original code to libbsd Freebsd. that is,
> freebsd-to-rtems.py is not used for changing additional new files from
> FreeBSD 9.2 original code automatically.
> Is it correct ?
>
> Question 3)
> As I check libbsd.py file, there is below definitions.
>   - def dev_usb_input(mm):
>   - def dev_usb_mouse(mm):
>
> Is there how to use libbsd.py for adding new files(source, header files)
> easily ?
> Or, I want to know that libbsd.py file is used for which purpose.
>
> Best Regards,
> Thomas
>
> 2015-08-25 19:19 GMT+09:00 Yurii Shevtsov <ungetch at gmail.com>:
>
>>
>>
>> 2015-08-25 12:10 GMT+03:00 Thomas Kim <thomas73.kim at gmail.com>:
>>
>>> Dear Yurii,
>>>
>>> Thank you very much.
>>>
>>> I want to review freeBSD source code.
>>>
>>> Please let me know where is libbsd's README file. there is not README
>>> file in current tree (https://git.rtems.org/rtems-libbsd/tree/).
>>> I want to check "Rules for Modiying FreeBSD source" in REAME file.
>>>
>> https://github.com/RTEMS/rtems-libbsd/blob/master/libbsd.txt
>>
>>>
>>> Also, I want to compare FreeBSD original code and the modified FreeBSD
>>> code.
>>> I guess that FreeBSD original code version is 8.x.
>>>
>> it's actually 9.2 (from the readme)
>>
>>>
>>> Please let me know how to get FreeBSD original code version which was
>>> used for libbsd porting work.
>>>
>> https://svnweb.freebsd.org/base/release/9.2.0/ It's Subversion
>> https://www.freebsd.org/doc/handbook/svn.html
>>
>>>
>>> Best Regards,
>>> Thomas.
>>>
>>> 2015-08-21 23:57 GMT+09:00 Yurii Shevtsov <ungetch at gmail.com>:
>>>
>>>> Hi)
>>>>
>>>> For porting guide check this blogpost
>>>>
>>>> http://ragustechblog.blogspot.in/2015/06/porting-driver-from-freebsd-to-rtems.html
>>>> Also read libbsd's README, especially "Rules for Modifying FreeBSD
>>>> Source"
>>>>
>>>> Can't say anything specific about USB HID and WLAN. Definitely WLAN will
>>>> require porting libraries with auth protocols (WPA\WEP). About HID, you can
>>>> try searching how input works in RTEMS. Maybe you can implement API in your
>>>> future HID driver
>>>>
>>>>
>>>>
>>>
>>



More information about the devel mailing list