public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marcel <korgull@home.nl>
To: u-boot@lists.denx.de
Subject: [U-Boot] {Spam?} u-boot-usb DFU working but need some ideas
Date: Thu, 10 Feb 2011 08:46:48 +0100	[thread overview]
Message-ID: <201102100846.49072.korgull@home.nl> (raw)
In-Reply-To: <m2wrla6c7k.fsf@ohwell.denx.de>

Hi Detlev,

> I am not too familiar with the DFU spec, but I agree with regards to the
> scripting.  I can envision usage scenarios where the downloaded files
> are written to other storage media, so I would much rather leave that up
> to the U-Boot script interpreter.

I did create a new command "dfu" that activates the controller and DFU.
I than used the GPBR register of the AT91 to make u-boot know that it has to 
activate DFU by script. Basically the value of the GPBR register either tells 
u-boot to wait for TFTP or DFU ways to upgrade.
 
> > About the way it currently works :
> > 1) I start u-boot
> > 2) I issue the dfuinit command (new)
> > 3) the host can now download a file to RAM.
> > Any thoughts on what would be the most preferred way to do this ?
> 
> This sequence sounds absolutely feasible.  What exactly is your
> question?

Since I wasn't familiar with DFU either I asked. I implemented it basically on 
the go, so while I was reading the spec. Along the way I found some items 
which I found not very logical for u-boot.
DFU states that the device should expose the normal descriptors + a DFU 
descriptor. I don't do that in my application. Instead I have another way to 
reset my application and tel u-boot to go in DFU mode. I however implemented 
the DFU driver in u-boot such way that it does work with dfu-utils without any 
issues.

Also I upload the full application to RAM first before storing it in NAND. On 
my board this has some limits. The RAM is 128M and NAND 256M, so I can not 
flash the whole NAND yet. The Openmoko driver implements a method that allows 
that, which can be added later of course.

I tested it the whole week and use it now as my main way to upgrade my 
application. Haven't seen it fail once so far, so it looks good.

> > Additionally I think I will implement this as a composite driver so that
> > both (usb)CDC and DFU are available via USB. I have both working, but
> > currently must select it at compile time.
> > My current implementation basically is just DFU as it assumes the
> > application (not u-boot) to be the firmware to be updated, so no need to
> > switch on descriptor layer level.
> > 
> > Any reply on this would be nice, even if my above thoughts are in line.
> > I hope to be able to post my changes in 1-2 weeks. After that my time is
> > extremely limited due to long time travel.
> 
> I'm really looking forward to getting DFU support into U-Boot - having
> lobbyied for it quite a while :)

Great. I hope I can post it and that it will be maintained. It really is a 
nice feature I think.
 
> > If anyone is interested in helping me out posting the changes it would
> > be very much appreciated.
> 
> What help do you need?

I'm on a real deadline for my project. I have to go on business trip end of 
next week and very limited in time. I finished u-boot for my companies products 
and I can post a full diff of it. I was hoping someone could help me out 
testing the patch on their board (either sam9g45 or using at91_udc ) and help 
me to post the changes to u-boot.
I can also post a full diff the the forum, but it's rather large I think. I 
never posted changes before, so I have no idea yet how to do it. I know 
there's reading info about it, but had no time yet to look into it (shame on 
me :-) ).

Best regards,
Marcel

  reply	other threads:[~2011-02-10  7:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-05 21:20 [U-Boot] {Spam?} u-boot-usb DFU working but need some ideas Marcel
2011-02-08 10:40 ` Detlev Zundel
2011-02-10  7:46   ` Marcel [this message]
2011-02-10  8:04     ` Wolfgang Denk
2011-02-10 19:15       ` Marcel
2011-02-10 19:26         ` Wolfgang Denk
2011-02-11 18:30           ` Marcel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201102100846.49072.korgull@home.nl \
    --to=korgull@home.nl \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox