[U-Boot-Users] [PATCH] Add flash programming counter]

Jerry Van Baren gerald.vanbaren at ge.com
Fri Mar 7 17:09:18 CET 2008


Wolfgang Denk wrote:
> In message <47D15301.8060601 at ge.com> you wrote:
>> I was too terse.  The problem is that I added a progress bar. 
>> Previously, the printout sequence was:
>>    Writing to Flash...
>> followed by an indeterminate wait, followed by the string "done." which 
>> formed the composite:
>>    Writing to Flash... done.
> 
> That's what it shall remain: a single line of text.
> 
>> I added a progress bar, but the progress bar needs to be on a new line. 
> 
> Please don't.
> 
> Best regards,
> Wolfgang Denk

There is no way to add an end marker without using a new line (or use 
'\r' which is really unacceptable, and more justifiably so).  Since we 
are settling in on having 50 (?probably want to use a #define) dots 
unless there are fewer than 50 units to be written, I suppose we can 
live without a end marker.  Sigh, the end marker was the fun part.

I also contend that it was a useful part even if you /know/ that there 
will be 50 dots because the human eye cannot count dots at a glance.

Illustration:

Tell me at a glance how close this is to completion[1]:
Writing to Flash..............................

Now tell me here:
Writing to Flash
                                                   v
..............................

With an added parameter to the flash write routine (which would serve 
double duty to suppress the progress dots), I can condense the above 
into two lines.  This is still 100% more lines than Wolfgang demands, 
but I think it has sufficient value to pay its freight.

Writing to Flash                                  v
..............................

Best regards,
gvb

[1] Answer: 60% done, 40% remaining for all the examples.




More information about the U-Boot mailing list