Re: Updates and Problems on "Raspberry Pi USB and Ethernet Support" Project

2016-07-11 Thread Chris Johns

On 12/07/2016 14:41, Deval Shah wrote:

The problem with the RaspberryPi_USB was that due to some other updates
in mainline, I was not getting the device_printfs. So I switched back to
the old repo of mine.


It would help if you could please debug this. It is easy to do. Just add 
a printf in the syslog function and see if it is bring called. If it is 
being called please check the values and logic for the priority, again 
some simple prints should show this.


Thanks
Chris
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: Updates and Problems on "Raspberry Pi USB and Ethernet Support" Project

2016-07-11 Thread Deval Shah
I am sorry, I forgot to mention those details.

I have added --freebsd-options=bootverbose,verbose_sysinit,bus_debug for
more log, while configuring waf.

There are two branches currently. RaspberryPi_USB and rpi_usb. Both are
same as far as my added code is concerned. rpi_usb has a different starting
point and not updated while the other one is up to date.

The problem with the RaspberryPi_USB was that due to some other updates in
mainline, I was not getting the device_printfs. So I switched back to the
old repo of mine.

Also, I am surprised how you are getting the device_printfs on my latest
code. https://lists.rtems.org/pipermail/devel/2016-July/015557.html

Regards,
Deval Shah

On Tue, Jul 12, 2016 at 7:05 AM, Alan Cudmore 
wrote:

> Hi Deval,
>
> What code do I need to add to try your test?
>
> I am using the items git head kernel, and your rtems-libbsd
> RaspberryPi_USB branch.
> When I run init01 on my Pi Zero, I get the output below.
>
> Alan
>
> *** LIBBSD INIT 1 TEST ***
> nexus0: 
> bcm283x_dwcotg0:  on
> nexus0
> usbus0 on bcm283x_dwcotg0
> usbus0: 480Mbps High Speed USB v2.0
> uhub0:  on usbus0
> Sleeping to see what happens
> uhub0: 1 port with 1 removable, self powered
>
>
>
> On Jul 11, 2016, at 10:37 AM, Deval Shah  wrote:
>
> Hello all,
>
> I am trying to add usb_ethernet (smsc) driver for raspberry pi for both
> USB and Ethernet support.
> Now I have added the required files. But the USB device is not getting
> power. To get the compilation error-less, I have applied a hack.
>
> if_smsc.c is using the function “usbd_m_copy_in” which is present in the
> file sys/dev/usb/usb_busdma.c. But due to this macro #if USB_HAVE_MBUF the
> function was not getting compiled. So I have commented out the macro and
> let the function compile.
>
> Now ideally I should have used the DMA controller. Here I don't know the
> status of DMA's functions and their usage. Any pointers on that ?
> I believe the problem is secondary for the USB to function. Anyhow the USB
> devices should get the power if the code is added. I suspect there is no
> proper linking between the drivers. (i.e. dwcotg, bcm283x_dwcotg, ushub,
> smsc, uhub, usb.) I would like some insights on how these interact.
>
> I have added following lines in the nexus-devices.h file under
> Raspberry-pi-BSP.
>
> SYSINIT_DRIVER_REFERENCE(bcm283x_dwcotg, nexus);
> SYSINIT_DRIVER_REFERENCE(smsc, uhub);
> SYSINIT_DRIVER_REFERENCE(smsc, uether);
> SYSINIT_DRIVER_REFERENCE(smsc, usb);
> SYSINIT_DRIVER_REFERENCE(smsc, ether);
> SYSINIT_DRIVER_REFERENCE(smsc, miibus);
>
> I am also attaching the log of INIT01 Test.
>
> I need help at this point. I am kind of stuck here.
>
> Thank you in advance.
> Deval Shah
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
>
>


-- 
Deval Shah
Graduate Student,
B.E. (Hons.) Electrical and Electronics Engineering
BITS Pilani Hyderabad Campus 

Github Profile 
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Updates and Problems on "Raspberry Pi USB and Ethernet Support" Project

2016-07-11 Thread Alan Cudmore
Hi Deval,

What code do I need to add to try your test? 

I am using the items git head kernel, and your rtems-libbsd RaspberryPi_USB 
branch.
When I run init01 on my Pi Zero, I get the output below. 

Alan

*** LIBBSD INIT 1 TEST ***
nexus0: 
bcm283x_dwcotg0:  on nexus0
usbus0 on bcm283x_dwcotg0
usbus0: 480Mbps High Speed USB v2.0
uhub0:  on usbus0
Sleeping to see what happens
uhub0: 1 port with 1 removable, self powered



> On Jul 11, 2016, at 10:37 AM, Deval Shah  wrote:
> 
> Hello all,
> 
> I am trying to add usb_ethernet (smsc) driver for raspberry pi for both USB 
> and Ethernet support.
> Now I have added the required files. But the USB device is not getting power. 
> To get the compilation error-less, I have applied a hack.
> 
> if_smsc.c is using the function “usbd_m_copy_in” which is present in the file 
> sys/dev/usb/usb_busdma.c. But due to this macro #if USB_HAVE_MBUF the 
> function was not getting compiled. So I have commented out the macro and let 
> the function compile.
> 
> Now ideally I should have used the DMA controller. Here I don't know the 
> status of DMA's functions and their usage. Any pointers on that ?
> I believe the problem is secondary for the USB to function. Anyhow the USB 
> devices should get the power if the code is added. I suspect there is no 
> proper linking between the drivers. (i.e. dwcotg, bcm283x_dwcotg, ushub, 
> smsc, uhub, usb.) I would like some insights on how these interact.
> 
> I have added following lines in the nexus-devices.h file under 
> Raspberry-pi-BSP.
> 
> SYSINIT_DRIVER_REFERENCE(bcm283x_dwcotg, nexus);
> SYSINIT_DRIVER_REFERENCE(smsc, uhub);
> SYSINIT_DRIVER_REFERENCE(smsc, uether);
> SYSINIT_DRIVER_REFERENCE(smsc, usb);
> SYSINIT_DRIVER_REFERENCE(smsc, ether);
> SYSINIT_DRIVER_REFERENCE(smsc, miibus);
> 
> I am also attaching the log of INIT01 Test.
> 
> I need help at this point. I am kind of stuck here.
> 
> Thank you in advance.
> Deval Shah
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Updates and Problems on "Raspberry Pi USB and Ethernet Support" Project

2016-07-11 Thread Deval Shah
Hello all,


I am trying to add usb_ethernet (smsc) driver for raspberry pi for both USB
and Ethernet support.

Now I have added the required files. But the USB device is not getting
power. To get the compilation error-less, I have applied a hack.


if_smsc.c is using the function “usbd_m_copy_in” which is present in the
file sys/dev/usb/usb_busdma.c. But due to this macro #if USB_HAVE_MBUF the
function was not getting compiled. So I have commented out the macro and
let the function compile.


Now ideally I should have used the DMA controller. Here I don't know the
status of DMA's functions and their usage. Any pointers on that ?

I believe the problem is secondary for the USB to function. Anyhow the USB
devices should get the power if the code is added. I suspect there is no
proper linking between the drivers. (i.e. dwcotg, bcm283x_dwcotg, ushub,
smsc, uhub, usb.) I would like some insights on how these interact.


I have added following lines in the nexus-devices.h file under
Raspberry-pi-BSP.


SYSINIT_DRIVER_REFERENCE(bcm283x_dwcotg, nexus);

SYSINIT_DRIVER_REFERENCE(smsc, uhub);

SYSINIT_DRIVER_REFERENCE(smsc, uether);

SYSINIT_DRIVER_REFERENCE(smsc, usb);

SYSINIT_DRIVER_REFERENCE(smsc, ether);

SYSINIT_DRIVER_REFERENCE(smsc, miibus);


I am also attaching the log of INIT01 Test.


I need help at this point. I am kind of stuck here.


Thank you in advance.

Deval Shah
*** LIBBSD INIT 1 TEST ***
VERBOSE_SYSINIT: DDB not enabled, symbol lookups disabled.
subsystem 88
   0xa7fb0(0)... done.
subsystem 100
   0x8fd74(0)... done.
   0x1ba34(0)... done.
   0x8de24(0)... done.
subsystem 180
   0x8f1f8(0x112678)... done.
   0x8f1f8(0x112798)... done.
   0x8f1f8(0x112788)... done.
   0x8f1f8(0x1128fc)... done.
   0x8f1f8(0x11292c)... done.
   0x8f1f8(0x1129d0)... done.
   0x8f1f8(0x112a50)... done.
   0x8f1f8(0x112a70)... done.
   0x8f1f8(0x112b6c)... done.
   0x8f1f8(0x112534)... done.
   0x8f1f8(0x112b8c)... done.
   0x8f1f8(0x112bac)... done.
   0x8f1f8(0x1131c0)... done.
   0x8f1f8(0x113380)... done.
   0x8f1f8(0x113350)... done.
   0x8f1f8(0x113340)... done.
   0x8f1f8(0x113330)... done.
   0x8f1f8(0x113534)... done.
   0x8f1f8(0x113554)... done.
   0x8f1f8(0x11387c)... done.
   0x8f1f8(0x113d48)... done.
   0x8f1f8(0x114274)... done.
   0x8f1f8(0x114264)... done.
   0x8f1f8(0x114254)... done.
   0x8f1f8(0x114244)... done.
   0x8f1f8(0x114d44)... done.
   0x8f1f8(0x115b60)... done.
   0x8f1f8(0x115e68)... done.
   0x8f1f8(0x116690)... done.
   0x8f1f8(0x116680)... done.
   0x8f1f8(0x116670)... done.
   0x8f1f8(0x116660)... done.
   0x8f1f8(0x117728)... done.
   0x8f1f8(0x112524)... done.
   0x8f1f8(0x117ac8)... done.
   0x8f1f8(0x11838c)... done.
   0x8f1f8(0x1183ac)... done.
   0x8f1f8(0x1183cc)... done.
   0x8f1f8(0x1183ec)... done.
   0x8f1f8(0x11836c)... done.
   0x8f1f8(0x112514)... done.
   0x8f1f8(0x1186f4)... done.
   0x8f1f8(0x1186e4)... done.
   0x8f1f8(0x11877c)... done.
   0x8f1f8(0x1188ec)... done.
   0x8f1f8(0x118938)... done.
   0x8f1f8(0x1189ac)... done.
   0x8f1f8(0x118a0c)... done.
   0x8f1f8(0x118a5c)... done.
   0x8f1f8(0x118a8c)... done.
   0x8f1f8(0x118c44)... done.
   0x8f1f8(0x118ec4)... done.
   0x8f1f8(0x1191f8)... done.
   0x8f1f8(0x1192c8)... done.
   0x8f1f8(0x119498)... done.
   0x8f1f8(0x1124cc)... done.
   0x8f1f8(0x1194f8)... done.
   0x19188(0)... done.
   0x1a9ac(0)... done.
subsystem 1b0
   0x90368(0x115064)... done.
   0x8f638(0x11892c)... done.
   0x8f638(0x1142e0)... done.
   0x8f638(0x118970)... done.
   0x8f638(0x118360)... done.
   0x90368(0x118994)... done.
   0x8f638(0x112c20)... done.
   0x8f638(0x1166fc)... done.
   0x8f638(0x112c0c)... done.
   0x90844(0x1133f8)... done.
   0x8f638(0x118abc)... done.
   0x8f638(0x118b58)... done.
   0x90368(0x118c84)... done.
   0x8f638(0x113e84)... done.
   0x8f638(0x118cac)... done.
   0x8f638(0x118dbc)... done.
   0x8f638(0x114d74)... done.
   0x8f638(0x11922c)... done.
   0x90368(0x1176dc)... done.
   0x8f638(0x112aa0)... done.
   0x8f638(0x118814)... done.
   0x8f638(0x118830)... done.
   0x8f638(0x118824)... done.
   0x9e73c(0)... done.
   0x1fbc0(0)... done.
   0x9af88(0)... done.
subsystem 1c0
   0x1f0c4(0)... done.
subsystem 200
   0x19d38(0)... done.
   0x9aefc(0)... done.
subsystem 220
   0x98fd8(0)... done.
   0x90c80(0)... done.
subsystem 230
   0x8bd50(0)... done.
subsystem 270
   0x99db0(0)... done.
   0x196c0(0)... done.
subsystem 281
   0x3ce80(0)... done.
   0x1b598(0)... done.
subsystem 300
   0x30940(0)... done.
   0x308bc(0)... done.
   0x19de8(0x1135d4)... done.
   0x35f18(0)... done.
subsystem 310
   0x19de8(0x112830)... make_device:1743: root at no device as unit 0
devclass_find_internal:950: looking for root
devclass_find_internal:960: creating root
devclass_add_device:1672: (null) in devclass root
devclass_alloc_unit:1586: unit 0 in devclass root
devclass_alloc_unit:1645: now: unit 0 in devclass root
devclass_find_internal:950: looking for root
done.
  

Re: libbsd / waf: Broken --show-commands support

2016-07-11 Thread Christian Mauderer


Am 09.07.2016 um 06:45 schrieb Chris Johns:
> On 8/07/2016 6:34 PM, Christian Mauderer wrote:
>>
>> I'm currently trying to port pf to libbsd. While doing that, I wanted to
>> check some of the compiler calls using the waf configure option
>> --show-commands. With the option set, every call went wrong.
>>
>> I was able to track the problem down to the patches introduced with the
>> long command line support. It seems that the command is joined for
>> printing it and than the joined version is given to a python Popen call.
>> As far as I understand the python documentation, Popen expects an array.
> 
> Thanks for this, yes my change to print the number of options broken the
> code.
> 
>> The attached patch fixes this by using a temporary variable for the
>> string that gets printed. Could you review the patch to check that it
>> doesn't break the long command line support again?
> 
> I have built libbsd on MinGW64 and it works so this should be tested.
> 
> I have updated rtems_waf and libbsd.
> 
> Thanks
> Chris
> 

Hello Chris,

thank you for testing and applying the patch.

Kind regards,
Christian

-- 

embedded brains GmbH
Christian Mauderer
Dornierstr. 4
D-82178 Puchheim
Germany
email: christian.maude...@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.
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel