U-Boot USB support, status of omap3-dev-usb

713 views
Skip to first unread message

Dirk Behme

unread,
May 30, 2009, 2:59:06 AM5/30/09
to beagl...@googlegroups.com, Steve Sakoman, Khandenahally, Ragha

Thanks to the work of Ragha and Steve, Beagle U-Boot USB development
branch omap3-dev-usb

http://www.sakoman.net/cgi-bin/gitweb.cgi?p=u-boot-omap3.git;a=shortlog;h=refs/heads/omap3-dev-usb

is in sync with mainline again. There were some merge conflicts fixed
by Ragha, so now we are able to sync against mainline again.

Now the question is how to go on?

Concentrate on mainline merge (e.g. bug fixing, coding style clean up,
fix review comments)? Or adding additional features (e.g. adding
ethernet support so user can do tftp boot)? Or?

What do you think?

Best regards

Dirk

Jason Kridner

unread,
May 30, 2009, 7:24:31 AM5/30/09
to beagl...@googlegroups.com

I'm inclined to support getting what works now into the mainline before adding more features.  any clean-up required?

Michael Evans

unread,
May 30, 2009, 7:53:44 AM5/30/09
to beagl...@googlegroups.com
I personally would love to see tftp boot.

> Date: Sat, 30 May 2009 08:59:06 +0200
> From: dirk....@googlemail.com
> To: beagl...@googlegroups.com
> CC: sak...@gmail.com; ra...@ti.com
> Subject: [beagleboard] U-Boot USB support, status of omap3-dev-usb

Ilyes Gouta

unread,
May 30, 2009, 8:00:05 AM5/30/09
to beagl...@googlegroups.com
+1

Ethernet boot + NFS based root filesystem, that would make it for some
real fast development.

-Ilyes

Koen Kooi

unread,
May 30, 2009, 8:18:09 AM5/30/09
to beagl...@googlegroups.com

Op 30 mei 2009, om 08:59 heeft Dirk Behme het volgende geschreven:

>
>
> Thanks to the work of Ragha and Steve, Beagle U-Boot USB development
> branch omap3-dev-usb
>
> http://www.sakoman.net/cgi-bin/gitweb.cgi?p=u-boot-omap3.git;a=shortlog;h=refs/heads/omap3-dev-usb
>
> is in sync with mainline again. There were some merge conflicts fixed
> by Ragha, so now we are able to sync against mainline again.
>
> Now the question is how to go on?

I'd love to see the DFU patches[1] from Diego Dompe get into that git
tree as well.

regards,

Koen

[1] http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/u-boot/files/omap-usb-dev-dfu.patch
[2] http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/u-boot/files/dfu-second-patch.patch

PGP.sig

Ragha

unread,
May 30, 2009, 1:48:26 PM5/30/09
to beagl...@googlegroups.com
On Sat, May 30, 2009 at 6:24 AM, Jason Kridner <jkri...@beagleboard.org> wrote:
> I'm inclined to support getting what works now into the mainline before
> adding more features.  any clean-up required?

I agree to this, as there is a new USB device interface, similar to
Kernel, coming up there [1]

Regards,
-Ragha

[1] http://git.denx.de/?p=u-boot/u-boot-usb.git;a=shortlog;h=refs/heads/cdc

John (USP)

unread,
May 30, 2009, 2:54:05 PM5/30/09
to beagl...@googlegroups.com

> -----Original Message-----
> From: beagl...@googlegroups.com
> [mailto:beagl...@googlegroups.com] On Behalf Of Dirk Behme
> Sent: Friday, May 29, 2009 11:59 PM
> To: beagl...@googlegroups.com
> Cc: Steve Sakoman; Khandenahally, Ragha
> Subject: [beagleboard] U-Boot USB support, status of omap3-dev-usb
>
>
>
Yes, yes, yes. I would like to see Ethernet support. I've used TFTP with
AVR32 and it make development so much more efficient.

Kind Regards,
John

Søren Steen Christensen

unread,
May 30, 2009, 3:34:13 PM5/30/09
to beagl...@googlegroups.com
> > Concentrate on mainline merge (e.g. bug fixing, coding style clean up,
> > fix review comments)? Or adding additional features (e.g. adding
> > ethernet support so user can do tftp boot)? Or?
> Yes, yes, yes. I would like to see Ethernet support. I've used TFTP with
> AVR32 and it make development so much more efficient.

Agree - Main focus should be getting current status checked into official
mainline.

Secondly adding networking support would be great :-) One suggestion: Would
it be an easier path to make networking over USB than supporting all kind of
different USB2Ethernet chips? In that case we could use TFTP over USB?

Best regards
Søren


Dirk Behme

unread,
May 31, 2009, 3:25:23 AM5/31/09
to beagl...@googlegroups.com
Jason Kridner wrote:
> I'm inclined to support getting what works now into the mainline before
> adding more features. any clean-up required?

Clean up: Yes.

http://groups.google.com/group/beagleboard/browse_thread/thread/54f37fcd0b5b053b/165461d26e504557?lnk=gst&q=OMAP3%3A+Clean+up+coding+style#165461d26e504557

could be a starting point. It doesn't apply any more, though.

Tom Rix mentioned to help with mainline integration while working on
Zoom2, btw.

Best regards

Dirk

Michael Evans

unread,
May 31, 2009, 3:31:03 AM5/31/09
to beagl...@googlegroups.com
Over night I've been thinking about TFTP boot complexity...  Seems to me there are some options here:

(1) uboot is aware of the various USB-Ethernet dongles and performs a real TFTP boot.
(2) uboot brings up a CDC gadget on the OTG port and performs TFTP boot over that.
(3) uboot brings up a custom USB device which the host sends a kernel to (similar to a USB Request Firmware)

I'm interested in (1) but that's the most complicated and will potentially bloat u-boot or leave a few people in the dark because their Ethernet dongle wasn't included.  It also means real networking with cables and hubs rather than a direct USB connection to a developer's PC.

People wanting faster development might be thinking of number (2).  Having done something similar in userspace, this can be a little tricky to get working reliably...

(3) would probably the easiest to code, wouldn't have the network stack overhead of (2) and could support cool features like "don't boot yet, give me a uboot prompt".  But then this isn't anything like real TFTP boot... but it would allow developers to do faster development...

------

I am pretty sure I could achieve (1) within Linux - since linux can replace a running kernel with a new one and effectively reboot into it.  I'll have a look at (1) next week as it might only need a couple of days development effort.

The USB attached u-boot console would *really* interest me as it would make field connections considerably easier (you know, and my home made cables suck).

What do other people think...?
> Upgrade to Internet Explorer 8 Optimised for MSN. " Download Now

Dirk Behme

unread,
May 31, 2009, 3:42:01 AM5/31/09
to beagl...@googlegroups.com
Koen Kooi wrote:
>
> Op 30 mei 2009, om 08:59 heeft Dirk Behme het volgende geschreven:
>
>>
>>
>> Thanks to the work of Ragha and Steve, Beagle U-Boot USB development
>> branch omap3-dev-usb
>>
>> http://www.sakoman.net/cgi-bin/gitweb.cgi?p=u-boot-omap3.git;a=shortlog;h=refs/heads/omap3-dev-usb
>>
>>
>> is in sync with mainline again. There were some merge conflicts fixed
>> by Ragha, so now we are able to sync against mainline again.
>>
>> Now the question is how to go on?
>
> I'd love to see the DFU patches[1] from Diego Dompe get into that git
> tree as well.

[1] doesn't apply any more to recent omap3-dev-usb. See below.

Once this is fixed, because of the size of that patch, I would vote
for an omap3-dev-usb-dfu (== omap3-dev-usb + dfu patches).

Opinions?

Dirk


patching file drivers/serial/usbtty.c

patching file drivers/serial/usbtty.h

Hunk #1 succeeded at 82 (offset 2 lines).

can't find file to patch at input line 115

Perhaps you used the wrong -p or --strip option?

The text leading up to this was:

--------------------------

|diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile

|index ab98ac7..16ce383 100644

|--- a/drivers/usb/Makefile

|+++ b/drivers/usb/Makefile

--------------------------

No file to patch. Skipping patch.

1 out of 1 hunk ignored

can't find file to patch at input line 127

Perhaps you used the wrong -p or --strip option?

The text leading up to this was:

--------------------------

|diff --git a/drivers/usb/usbdcore.c b/drivers/usb/usbdcore.c

|index 53ed669..f2ac755 100644

|--- a/drivers/usb/usbdcore.c

|+++ b/drivers/usb/usbdcore.c

--------------------------

No file to patch. Skipping patch.

6 out of 6 hunks ignored

can't find file to patch at input line 196

Perhaps you used the wrong -p or --strip option?

The text leading up to this was:

--------------------------

|diff --git a/drivers/usb/usbdcore_ep0.c b/drivers/usb/usbdcore_ep0.c

|index f6e017d..a916bee 100644

|--- a/drivers/usb/usbdcore_ep0.c

|+++ b/drivers/usb/usbdcore_ep0.c

--------------------------

No file to patch. Skipping patch.

5 out of 5 hunks ignored

patching file drivers/usb/usbdfu.c

patching file include/configs/omap3_beagle.h

Hunk #1 succeeded at 114 (offset 6 lines).

Hunk #2 succeeded at 168 with fuzz 1 (offset -1 lines).

Hunk #3 succeeded at 196 (offset -1 lines).

patching file include/usb_dfu.h

patching file include/usb_dfu_descriptors.h

patching file include/usb_dfu_trailer.h
can't find file to patch at input line 1602
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/include/usbdcore.h b/include/usbdcore.h
|index 206dbbc..e966f34 100644
|--- a/include/usbdcore.h
|+++ b/include/usbdcore.h
--------------------------
No file to patch. Skipping patch.
4 out of 4 hunks ignored
patching file tools/dfu-util/COPYING
patching file tools/dfu-util/Makefile.am
patching file tools/dfu-util/Makefile.in
patching file tools/dfu-util/aclocal.m4
patching file tools/dfu-util/autogen.sh
patching file tools/dfu-util/config.h.in
patching file tools/dfu-util/configure
patching file tools/dfu-util/configure.ac
patching file tools/dfu-util/m4/depcomp
patching file tools/dfu-util/m4/install-sh
patching file tools/dfu-util/m4/missing
patching file tools/dfu-util/src/Makefile.am
patching file tools/dfu-util/src/Makefile.in
patching file tools/dfu-util/src/commands.c
patching file tools/dfu-util/src/commands.h
patching file tools/dfu-util/src/dfu.c
patching file tools/dfu-util/src/dfu.h
patching file tools/dfu-util/src/index.html
patching file tools/dfu-util/src/main.c
patching file tools/dfu-util/src/sam7dfu.c
patching file tools/dfu-util/src/sam7dfu.h
patching file tools/dfu-util/src/usb_dfu.h
patching file tools/mkudfu/Makefile
patching file tools/mkudfu/mkudfu.c
patching file tools/mkudfu/usb_dfu_trailer.h


Frans Meulenbroeks

unread,
May 31, 2009, 4:31:08 AM5/31/09
to beagl...@googlegroups.com
2009/5/31 Michael Evans <horse...@hotmail.com>:
For me 1 is bringing usb host adapter knowledge into u-boot (unless I
misunderstood you).

Simplest solution is probably to let u-boot boot a small kernel which
then via kexecboot or so boots a kernel it gets from tftp.

FM

Michael Evans

unread,
May 31, 2009, 8:29:00 AM5/31/09
to beagl...@googlegroups.com
Exactly what I'm thinking...  A cut down kernel and minimal embedded rootfs to do TFTP boot could probably even fit in the first NAND area (don't remember the size off hand but I remember its pretty small...!).  That would mean you could TFTP boot either just the kernel or the kernel and a rootfs - and all without needing an SD card in the BeagleBoard.

Being a security professional I'm also aware that TFTP/NFS network boot is rather insecure.  That's usually a problem when network card firmware is doing it all... The joy of this approach is that the code is entirely accessible and if you want to check a signature, or download from an SFTP server there's nothing stopping you...

I really like this idea (and my brain is buzzing with lots of ideas) so will put some effort into it next week and post back.  There may be some issues with double initialisation of BeagleBoard hardware by Linux.  From what I've seen I'm not expecting anything serious - but I'm by no means an expert of the BB specific patches...

> Date: Sun, 31 May 2009 10:31:08 +0200

> Subject: [beagleboard] Re: U-Boot USB support, status of omap3-dev-usb

Ihar Hrachyshka

unread,
May 30, 2009, 8:00:47 AM5/30/09
to beagl...@googlegroups.com
On Sat, May 30, 2009 at 2:53 PM, Michael Evans <horse...@hotmail.com> wrote:
> I personally would love to see tftp boot.

Yes, it will ease development.

lecheel

unread,
Jun 4, 2009, 1:51:03 AM6/4/09
to Beagle Board
I got follow after patch DFU
================================
U-Boot 2009.01-00433-g6fc13bd-dirty (Jun 04 2009 -
13:39:59)

I2C:
ready
OMAP3530-GP rev 2, CPU-OPP2
L3-165MHz
OMAP3 Beagle board + LPDDR/
NAND
DRAM: 256
MB
NAND: 256
MiB
MUSB: using high
speed
mtdids not defined, no default
present
mtdids not defined, no default present
mtdids not defined, no default
present
mtdids not defined, no default present
mtdids not defined, no default present
ERROR: usbd_alloc_urb(), 572: F A T A L: malloc(33068) FAILED!!!!
In: serial
Out: serial
Err: serial
Board revision C
Serial #5ac400030000000004013f8901001001
=======================================
there is impossible "setenv stdin usbtty, serial ",...

any hint

Søren Steen Christensen

unread,
Jun 6, 2009, 5:23:54 PM6/6/09
to beagl...@googlegroups.com
> I got follow after patch DFU
> ================================
> ERROR: usbd_alloc_urb(), 572: F A T A L: malloc(33068) FAILED!!!!
> Board revision C
> Serial #5ac400030000000004013f8901001001
> =======================================

Not knowing very much about DFU in u-boot, it seems like you have a failing
malloc-call
- Have your tried to increase your heap size in order for the malloc-call to
succeed?

Best regards
Søren

Dirk Behme

unread,
Jun 7, 2009, 5:19:12 AM6/7/09
to beagl...@googlegroups.com
Hi lecheel,

I'm not sure which U-Boot version and which DFU patches you use? Last
time I tried DFU patches with recent omap3-dev-usb they didn't apply:

http://groups.google.com/group/beagleboard/msg/447f138d7fcd8892

Best regards

Dirk

Btw.: Please consider subscribing to BeagleBoard mailing list so that
list moderator don't have to moderate your mails.

lecheel

unread,
Jun 7, 2009, 7:37:14 AM6/7/09
to Beagle Board
thanks Søren and Dirk
the problem seems I forgot patch the dfu-second-patch
after patch DFU is working happy on beagleboard

right now don't know it's possible using dfu and ttyACM0 at the same
time

after dfu-util download firmware ttyACM0 device still present but
usbtty over ttyACM0 not working anymore

John (USP)

unread,
Jun 17, 2009, 3:25:29 PM6/17/09
to beagl...@googlegroups.com

 

From: beagl...@googlegroups.com [mailto:beagl...@googlegroups.com] On Behalf Of Michael Evans
Sent: Sunday, May 31, 2009 12:31 AM
To: beagl...@googlegroups.com
Subject: [beagleboard] Re: U-Boot USB support, status of omap3-dev-usb

 

Over night I've been thinking about TFTP boot complexity...  Seems to me there are some options here:



(1) uboot is aware of the various USB-Ethernet dongles and performs a real TFTP boot.
(2) uboot brings up a CDC gadget on the OTG port and performs TFTP boot over that.
(3) uboot brings up a custom USB device which the host sends a kernel to (similar to a USB Request Firmware)

I'm interested in (1) but that's the most complicated and will potentially bloat u-boot or leave a few people in the dark because their Ethernet dongle wasn't included.  It also means real networking with cables and hubs rather than a direct USB connection to a developer's PC.

People wanting faster development might be thinking of number (2).  Having done something similar in userspace, this can be a little tricky to get working reliably...

(3) would probably the easiest to code, wouldn't have the network stack overhead of (2) and could support cool features like "don't boot yet, give me a uboot prompt".  But then this isn't anything like real TFTP boot... but it would allow developers to do faster development...

 

Hi Michael,

 

Did you make any progress on supporting TFTP in u-boot?

 

Kind Regards,

John

Michael Evans

unread,
Jun 17, 2009, 3:40:26 PM6/17/09
to beagl...@googlegroups.com
The latest U-Boot already has support for TFTP boot.  However, so far as I'm aware its doesn't support the BeagleBoard's USB controller or the relevant USB ethernet dongles...  Those could be copied across but I've not had a look yet.

I spent most of my time trying to get kexec to work... this would allow a really small linux kernel to boot, do the TFTP to download a new kernel and then boot it.  It would also be a lot easier for people to tweak and modify (e.g. you want SFTP boot... sure... why not!)  Sadly I've parked the kexec for the time being as I'll need to take a look into the kernel source code and try and try and work out how to debug what's going on...

I might take a look tomorrow at the latest U-Boot USB code (they have code for USB keyboard / storage device for example) and see what would be needed to either enable it for BeagleBoard or add some code to support the BeagleBoard's USB controllers.


Mike


From: jsyn...@us-power.com

To: beagl...@googlegroups.com
Subject: [beagleboard] Re: U-Boot USB support, status of omap3-dev-usb
Date: Wed, 17 Jun 2009 12:25:29 -0700

View your Twitter and Flickr updates from one place – Learn more!

Michael Evans

unread,
Jun 17, 2009, 4:05:55 PM6/17/09
to beagl...@googlegroups.com
Choke... update: just been surfing Sakoman's U-Boot GIT repository and it looks like its got support for BeagleBoard's OTG controller and USB gadget device support too... ?!??!!!

No idea if this stuff is working, if its in Sakoman's experimental patches or if its in the main line U-Boot...

but I'll be checking it out first thing tomorrow morning...  (assuming this hangover I'm working on isn't too bad :)


From: horse...@hotmail.com

To: beagl...@googlegroups.com
Subject: [beagleboard] Re: U-Boot USB support, status of omap3-dev-usb
Date: Wed, 17 Jun 2009 20:40:26 +0100

Beyond Hotmail — see what else you can do with Windows Live. Find out more.

John (USP)

unread,
Jun 17, 2009, 6:15:34 PM6/17/09
to beagl...@googlegroups.com

 

From: beagl...@googlegroups.com [mailto:beagl...@googlegroups.com] On Behalf Of Michael Evans
Sent: Wednesday, June 17, 2009 12:40 PM
To: beagl...@googlegroups.com
Subject: [beagleboard] Re: U-Boot USB support, status of omap3-dev-usb

 

The latest U-Boot already has support for TFTP boot.  However, so far as I'm aware its doesn't support the BeagleBoard's USB controller or the relevant USB ethernet dongles...  Those could be copied across but I've not had a look yet.

Yes, I’ve been using TFTP in u-boot for AVR32 to load the Linux Kernel for more than a year. My guess is that the AVR32 has direct Ethernet support so this was easier to support in u-boot. Given that BeagleBoard uses Ethernet via USB, it is a little more difficult to implement. Thanks for looking into this.

Kind Regards

John  

Matthew Warton

unread,
Jun 17, 2009, 7:58:17 PM6/17/09
to beagl...@googlegroups.com
Hi John,

We have patches to U-boot to support DFU over USB from the host, which we use as part of our automated regression testing, but I don't have the time to clean it up and push it upstream.  If you are interested let me know.

Thanks,
Matthew Warton

John (USP)

unread,
Jun 17, 2009, 8:29:37 PM6/17/09
to beagl...@googlegroups.com

 

From: beagl...@googlegroups.com [mailto:beagl...@googlegroups.com] On Behalf Of Matthew Warton
Sent: Wednesday, June 17, 2009 4:58 PM
To: beagl...@googlegroups.com
Subject: [beagleboard] Re: U-Boot USB support, status of omap3-dev-usb

 

Hi John,

 

We have patches to U-boot to support DFU over USB from the host, which we use as part of our automated regression testing, but I don't have the time to clean it up and push it upstream.  If you are interested let me know.

 

Hi Matthew,

 

If it works and I don’t have to program SDCards, I’m will be very appreciative. My preference would be TFTP, but anything is better than programming SDCards.

 

Kind Regards,

John

John (USP)

unread,
Jun 18, 2009, 1:36:32 AM6/18/09
to beagl...@googlegroups.com

 

From: beagl...@googlegroups.com [mailto:beagl...@googlegroups.com] On Behalf Of Matthew Warton


Sent: Wednesday, June 17, 2009 4:58 PM

To: beagl...@googlegroups.com
Subject: [beagleboard] Re: U-Boot USB support, status of omap3-dev-usb

 

Hi John,

 

We have patches to U-boot to support DFU over USB from the host, which we use as part of our automated regression testing, but I don't have the time to clean it up and push it upstream.  If you are interested let me know.

 

Thinking about this, I can also do this with a JTAG emulator. I’ve been working with TI and Ronetix to get their emulators working with the BeagleBoard. Both companies have made significant progress over the last month and will be releasing code shortly that supports Linux Kernel level debugging on the BeagleBoard. I have used both and I will describe my impressions in a separate posting as this is getting off topic.

 

Anyway, I believe I can program NAND Flash with either emulator, but I would like to see if were possible to program SDRAM as this should be much faster.

 

Reply all
Reply to author
Forward
0 new messages