Raspberry Pi libbsd experiments

Alan Cudmore alan.cudmore at gmail.com
Fri Sep 16 15:41:04 UTC 2016


This message is just FYI. I just wanted to document some of the tests I ran
on the Pi with Deval's last GSOC rtems-libbsd branch for the Raspberry Pi.
https://github.com/deval-maker/rtems-libbsd/tree/RPi_USB_Ethernet

There are definitely some timing issues.. When I run ping01, I need a delay
between the rtems_bsd_initialize call and the
default_network_ifconfig_hwif0. Without the delay, the network device will
not be initialized before the ifconfig call is made. Sebastian had
mentioned earlier the need to use an event based initialization.
Even with the delay, the ifconfig call ends up waiting for USB messages and
never returns.

Another thing I noticed: If I plug in a USB flash drive into the USB port
of the Pi, the ethernet interface will be recognized, and the mac, and phy
seems to be setup. Without the drive plugged in, the ethernet device will
not fully be initialized. ( see logs below ). This must be a timing issue
as well. I guess having the extra USB drive plugged in causes a delay that
allows the ethernet device to initialize?

The flash drives are recognized, but I'm not sure how close we are to
actually being able to read data from them.

Here are the logs:
1. Running media01 test on the Raspberry Pi Model B with ethernet and 2 USB
flash drives plugged in to the USB ports. Note that I added  #define
RTEMS_BSD_CONFIG_BSP_CONFIG
in default-init.h in the test suite to get the media01 test to recognize
the Raspberry Pi USB devices. This define was in the default-network-init.h
There are extra debug printfs below, as I was trying to figure out how far
the code was getting, and I don't have a debug solution for the Raspberry
Pi yet.
---

*** LIBBSD MEDIA 1 TEST ***
nexus0: <RTEMS Nexus device>
bcm283x_dwcotg0: <DWC OTG 2.0 integrated USB controller (bcm283x)> on nexus0
usbus0 on bcm283x_dwcotg0
usbus0: 480Mbps High Speed USB v2.0
uhub0: <DWCOTG OTG Root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0
uhub0: 1 port with 1 removable, self powered
 in usb_proc_mwait --
 in usb_proc_mwait -- else clause - while loop
 in usb_proc_mwait --
 in usb_proc_mwait -- else clause - while loop
uhub1: <vendor 0x0424 product 0x9514, class 9/0, rev 2.00/2.00, addr 2> on
usbus0
uhub1: MTT enabled
uhub1: 5 ports with 4 removable, self powered
 in usb_proc_mwait --
 in usb_proc_mwait -- else clause - while loop
 in usb_proc_mwait --
 in usb_proc_mwait -- else clause - while loop
smsc0: <vendor 0x0424 product 0xec00, rev 2.00/2.00, addr 3> on usbus0
in ue_queue_command
in ue_queue_command -- calling task? usb_proc_msignal
in ue_queue_command -- setup callback and self pointers
in ue_queue_command --returning
smsc0: chip 0xec00, rev. 0002
miibus0: <MII bus> on smsc0
ukphy0: <Generic IEEE 802.3u media interface> PHY 1 on miibus0
ukphy0:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
ue0: <USB Ethernet> on smsc0
ue0: Ethernet address: 5a:ee:60:74:67:92
 in usb_proc_mwait --
 in usb_proc_mwait -- else clause - while loop
 in usb_proc_mwait --
 in usb_proc_mwait -- else clause - while loop
umass0: <SanDisk Cruzer Fit, class 0/0, rev 2.00/1.27, addr 4> on usbus0
umass0:  SCSI over Bulk-Only; quirks = 0x0000
media listener: event = DISK ATTACH, state = INQUIRY, src = umass-sim
rtems_bsd_sim_attach_worker: OOPS: inquiry failed
 in usb_proc_mwait --
 in usb_proc_mwait -- else clause - while loop
 in usb_proc_mwait --
 in usb_proc_mwait -- else clause - while loop
umass1: <SMI Corporation USB DISK, class 0/0, rev 2.00/11.00, addr 5> on
usbus0
umass1:  SCSI over Bulk-Only; quirks = 0x4000
err: ftpd: Error binding control socket: Address not available
info: ftpd: FTP daemon started (4 sessions max)
info: /dev/pty0../dev/pty4 (5) pseudo-terminals registered.
telnetd:bind: Address not available
telnetd started with stacksize = 32768 and priority = 100

RTEMS Shell on /dev/console. Use 'help' to list commands.
[/] # rtems_bsd_sim_attach_worker: OOPS: test unit ready failed
rtems_bsd_sim_attach_worker: OOPS: read capacity failed
media listener: event = DISK ATTACH, state = FAILED, src = umass-sim
media listener: event = DISK ATTACH, state = INQUIRY, src = umass-sim
rtems_bsd_sim_attach_worker: OOPS: inquiry failed
rtems_bsd_sim_attach_worker: OOPS: test unit ready failed
rtems_bsd_sim_attach_worker: OOPS: read capacity failed
media listener: event = DISK ATTACH, state = FAILED, src = umass-sim

----

2. Same test as above ( media01 ) but without USB flash drives plugged into
the USB ports. See how the ethernet is detected, but not as complete as in
the previous test:
*** LIBBSD MEDIA 1 TEST ***
nexus0: <RTEMS Nexus device>
bcm283x_dwcotg0: <DWC OTG 2.0 integrated USB controller (bcm283x)> on nexus0
usbus0 on bcm283x_dwcotg0
usbus0: 480Mbps High Speed USB v2.0
uhub0: <DWCOTG OTG Root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0
uhub0: 1 port with 1 removable, self powered
 in usb_proc_mwait --
 in usb_proc_mwait -- else clause - while loop
 in usb_proc_mwait --
 in usb_proc_mwait -- else clause - while loop
uhub1: <vendor 0x0424 product 0x9514, class 9/0, rev 2.00/2.00, addr 2> on
usbus0
uhub1: MTT enabled
uhub1: 5 ports with 4 removable, self powered
 in usb_proc_mwait --
 in usb_proc_mwait -- else clause - while loop
 in usb_proc_mwait --
 in usb_proc_mwait -- else clause - while loop
smsc0: <vendor 0x0424 product 0xec00, rev 2.00/2.00, addr 3> on usbus0
in ue_queue_command
in ue_queue_command -- calling task? usb_proc_msignal
in ue_queue_command -- setup callback and self pointers
in ue_queue_command --returning

---
3. media01 test on the Raspberry Pi Zero with a single USB flash drive
plugged in. The Pi Zero just has a single USB port without the hub and
USB/Ethernet device:

*** LIBBSD MEDIA 1 TEST ***
nexus0: <RTEMS Nexus device>
bcm283x_dwcotg0: <DWC OTG 2.0 integrated USB controller (bcm283x)> on nexus0
usbus0 on bcm283x_dwcotg0
usbus0: 480Mbps High Speed USB v2.0
uhub0: <DWCOTG OTG Root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0
uhub0: 1 port with 1 removable, self powered
 in usb_proc_mwait --
 in usb_proc_mwait -- else clause - while loop
 in usb_proc_mwait --
 in usb_proc_mwait -- else clause - while loop
umass0: <SMI Corporation USB DISK, class 0/0, rev 2.00/11.00, addr 2> on
usbus0
umass0:  SCSI over Bulk-Only; quirks = 0x4000
media listener: event = DISK ATTACH, state = INQUIRY, src = umass-sim
rtems_bsd_sim_attach_worker: OOPS: inquiry failed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20160916/172b7f9f/attachment-0001.html>


More information about the devel mailing list