Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Dec 2016 06:09:35 +0100
From:      Bernd Walter <ticso@cicely7.cicely.de>
To:        "John W. Kitz" <John.Kitz@xs4all.nl>
Cc:        Emmanuel Vadot <manu@bidouilliste.com>, "'Ian Lepore'" <ian@freebsd.org>,  freebsd-arm@freebsd.org
Subject:   Re: When first hooking up a cubieboard2...
Message-ID:  <20161215050935.GL313@cicely7.cicely.de>
In-Reply-To: <7fee533d65c2760ffb9c42d5448c3ee9@xs4all.nl>
References:  <585066dd.1c7c630a.8fe44.4233SMTPIN_ADDED_BROKEN@mx.google.com> <CAGtf9xPQq1qGjmHci4n52uXx=E%2ByuHrNkRcuAyDDQvRt8a5rYQ@mail.gmail.com> <1481739755.1889.376.camel@freebsd.org> <1481749803.1889.406.camel@freebsd.org> <20161214225633.160d9d06ddb0ae4a380ccf82@bidouilliste.com> <7fee533d65c2760ffb9c42d5448c3ee9@xs4all.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Dec 15, 2016 at 12:03:06AM +0100, John W. Kitz wrote:
> On 2016-12-14 22:56, Emmanuel Vadot wrote:
> >On Wed, 14 Dec 2016 22:50:19 +0100
> >"John W. Kitz" <John.Kitz@xs4all.nl> wrote:
> >
> >>Ian,
> >>
> >>> On Wed, 2016-12-14 at 20:34 +0100, John W. Kitz wrote:
> >>> > Gents,
> >>> >
> >>> > On Wed, 2016-12-14 at 17:26 +0100, John W. Kitz wrote:
> >>> > >
> >>> > > >
> >>> > > > Ganbold,
> >>> > > >
> >>> > > > >
> >>> > > > >
> >>> > > > > >
> >>> > > > > >
> >>> > > > > > On Wed, Dec 14, 2016 at 5:22 AM, John W. Kitz <John.Kitz@xs4a
> >>> > > > > > ll.n
> >>> > > > > > l> wrote:
> >>> > > > > > Hi,
> >>> > > > > >
> >>> > > > > > When attaching a new cubieboard2 to a FreeBSD system for the
> >>> > > > > > first time I
> >>> > > > > > get:
> >>> > > > > >
> >>> > > > > > "ugen1.2: <USB Developer> at usbus1
> >>> > > > > > umass0: <Mass Storage> on usbus1
> >>> > > > > > umass0:  SCSI over Bulk-Only; quirks = 0x4000
> >>> > > > > > umass0:4:0: Attached to scbus4
> >>> > > > > >
> >>> > > > > > da0 at umass-sim0 bus 0 scbus4 target 0 lun 0
> >>> > > > > > da0: <USB 2.0 USB Flash Driver 0100> Removable Direct Access
> >>> > > > > > SCSI-2
> >>> > > > > > device
> >>> > > > > > da0: 40.000MB/s transfers
> >>> > > > > > da0: Attempt to query device size failed: NOT READY, Medium
> >>> > > > > > not present
> >>> > > > > > da0: quirks=0x2<NO_6_BYTE>
> >>> > > > > >
> >>> > > > > > da1 at umass-sim0 bus 0 scbus4 target 0 lun 1
> >>> > > > > > da1: <USB 2.0 USB Flash Driver 0100> Removable Direct Access
> >>> > > > > > SCSI-2
> >>> > > > > > device
> >>> > > > > > da1: 40.000MB/s transfers
> >>> > > > > > da1: Attempt to query device size failed: NOT READY, Medium
> >>> > > > > > not present
> >>> > > > > > da1: quirks=0x2<NO_6_BYTE>
> >>> > > > > >
> >>> > > > > > da2 at umass-sim0 bus 0 scbus4 target 0 lun 2
> >>> > > > > > da2: <USB 2.0 USB Flash Driver 0100> Removable Direct Access
> >>> > > > > > SCSI-2
> >>> > > > > > device
> >>> > > > > > da2: 40.000MB/s transfers
> >>> > > > > > da2: Attempt to query device size failed: NOT READY, Medium
> >>> > > > > > not present
> >>> > > > > > da2: quirks=0x2<NO_6_BYTE>"
> >>> > > > > >
> >>> > > > > > While looking at the hardware schematic, am I correct in
> >>> > > > > > assuming that
> >>> > > > > > da0 represents the SD card slot, and da1 and da2 represent USB
> >>> > > > > > port 1 and 2 respectively?
> >>> > > > > >
> >>> > > > > > I don't remember the details, but there are 2 USB host ports
> >>> > > > > > exposed on the board, and 1 USB otg port.
> >>> > > > > > SD would be mmcsd0.
> >>> > > > Well not the answer I was looking for, but this is what I got when
> >>> > > > attaching the OTG port of a new cubieboard2 (NOT in FEL mode) to a
> >>> > > > USB port on >an AMD64 / FreeBSD system. Since the messages all
> >>> > > > seem to refer to removable storage devices attached to the same
> >>> > > > bus on which the storage medium itself doesn't seem to be present,
> >>> > > > resulting in the devices being reported as not ready, the only
> >>> > > > thing I could imagine were the SD card slot (I believe using a
> >>> > > > converter it is possible to connect that to a USB port as well)
> >>> > > > and the two other (i.e. non
> >>> > > > OTG)
> >>> > > > USB ports.
> >>> > > >
> >>> > > > Looking into this a bit further is the difference maybe the result
> >>> > > > of a different way of enumerating devices on Linux then on
> >>> > > > FreeBSD?
> >>> > > >
> >>> > > > If not, what conclusion should I draw from this?
> >>> > > >
> >>> > >
> >>> > > Your question actually doesn't make much sense.  I think the best
> >>> > > answer
> >>> > > possible about what you see when you connect a running
> >>> > >
> >>> > > cubieboard2 to a freebsd host is something like...
> >>> > >
> >>> > > What you see is entirely dependent on what software is running on
> >>> > > the
> >>> > cubieboard when you connect it, and questions about what shows up and
> >>> > why > should be addressed to whomever wrote that software.
> >>> >
> >>> > I'm not referring to what I see on the cubieboard2, but as I mentioned
> >>> > to what I'm seeing on the console of an AMD64 / FreeBSD system to
> >>> > which I'm attaching it.
> >>> >
> >>> >
> >>> > If freebsd is what's running on the board, then this is the right
> >>> > place to
> >>> > ask, but you'd have to provide more info about exactly what you're >
> >>> > running (where you got the image or how you built it).  If you're
> >>> > running some linux image then the builder/distributor of that image
> >>> > could answer >the questions.
> >>> >
> >>> > The board is straight out of the box brand spanking new, so AFAIK
> >>> > there's nothing running on it yet.
> >>> >
> >>> > Jk.
> >>
> >>> What you are seeing on the freebsd console is the devices that the
> >>software running on the cubieboard provides.  Even fresh out of the 
> >>box, it
> >>is > running something (presumably some linux or android distro that 
> >>gets
> >>put into the nand flash at the factory).
> >>
> >>> This has nothing to do with freebsd.  You'd see the same thing if you
> >>plugged it into a windows system.
> >>
> >>Thanks for pointing that out; I was already aware of that, but my 
> >>question
> >>was: which storage devices on the board do da0, da1 and da2 represent 
> >>'as
> >>seen', if you will, from and on the FreeBSD system to which it is 
> >>attached?
> >>
> >>Regards, Jk.
> >
> > Probably none.
> > What the software running on the board is doing is called usb gadget
> >mode. It uses the OTG port to act as a device and it seems that it act
> >as some multiple usb disk. But this doesn't mean that the device it's
> >exporting match some device on the board. It could be directory or file
> >on the filesystem.
> 
> Ian,
> 
> The question may not have been related to running FreeBSD on a 
> cubieboard (yet), but it did involve FreeBSD, albeit on AMD64 and a ARM 
> board. That's why I posted it here.

Sure it does involve FreeBSD, but FreeBSD sees whatever the attached device
claims to be.
It claims to be 3 USB mass storage devices, so FreeBSD lists 3 USB mass storage
devices.
But FreeBSD has no clue about what they are intended to be used for and you
can't even read them, since whatever is running on the cubieboard notes
them as not ready.
Unless someone on the list knows what the software delivered on the cubieboard
actually does, you won't get an answer.
This is like plugging an USB memory stick into a FreeBSD computer and asking
on a FreeBSD list what pictures are on the stick.
You'd better ask the person who knows about the USB stick, right?
Well - we could tell you how to read data from the stick and try to find out,
but in this case the da devices are not ready, so even that is impossible.

My own guess (as in starring at my crystal ball), would be that it might
allow writing to an SD card if one would have been inserted.
No idea why it lists 3 da devices though.
Nevertheless this could easily be done with any kind of USB card reader as
well, so nothing important after all.

-- 
B.Walter <bernd@bwct.de> http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20161215050935.GL313>