public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] CFG_CMD_.... configuration space running out!!
@ 2003-12-17 23:08 Robin Gilks
  2003-12-18  2:07 ` Jon Diekema
  0 siblings, 1 reply; 7+ messages in thread
From: Robin Gilks @ 2003-12-17 23:08 UTC (permalink / raw)
  To: u-boot

Greetings

The number of commands being added to U-Boot seems in danger of 
overflowing the selection mechanism. Are there any plans to expand the 
process to more than 64 bits/commands that are agregated into 
CONFIG_COMMANDS or should there be individual defines to turn commands 
on/off.

The reason I ask is that I've just implemented a bash style 'test' 
command so I can check the values of memory locations with conditional 
code during boot and I note there are only 2 bits left!!

Note:
test syntax as per binary integer comparisons with the option of a unary 
indirection operator on either expression.
eg. 'test *40000 -eq 12345678'
checks location 40000 for the value 12345678. I've only implemented 32 
bit word indirection - does anyone think it useful to provide half-word 
and byte as well - in which case what should the syntax look like?


-- 
Robin Gilks
Senior Design Engineer          Phone: (+64)(3) 357 1569
Tait Electronics                Fax  :  (+64)(3) 359 4632
PO Box 1645 Christchurch        Email : robin.gilks at tait.co.nz
New Zealand

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot-Users] CFG_CMD_.... configuration space running out!!
  2003-12-17 23:08 [U-Boot-Users] CFG_CMD_.... configuration space running out!! Robin Gilks
@ 2003-12-18  2:07 ` Jon Diekema
  2003-12-18  4:20   ` Robin Gilks
  2003-12-19 20:46   ` Wolfgang Denk
  0 siblings, 2 replies; 7+ messages in thread
From: Jon Diekema @ 2003-12-18  2:07 UTC (permalink / raw)
  To: u-boot

On Thu, 2003-12-18 at 07:08, Robin Gilks wrote:
> test syntax as per binary integer comparisons with the option of a unary 
> indirection operator on either expression.
> eg. 'test *40000 -eq 12345678'
> checks location 40000 for the value 12345678. I've only implemented 32 
> bit word indirection - does anyone think it useful to provide half-word 
> and byte as well - in which case what should the syntax look like?

How about using something similar to what the i2c commands use?

<addr>.4  4 byte addr
<addr>.2  2 byte addr
<addr>.1  1 byte addr

or maybe

<addr>.l  4 byte addr
<addr>.w  2 byte addr
<addr>.b  1 byte addr

If .<byte-size> isn't specified, then default to the .4 or .l
address size.

Potential examples:

test *40000.4 -eq 12345678
test *40000   -eq 12345678
test *40000.2 -eq 1234
test *40000.1 -eq 12




******************************************
The information contained in, or attached to, this e-mail, may contain confidential information and is intended solely for the use of the individual or entity to whom they are addressed and may be subject to legal privilege.  If you have received this e-mail in error you should notify the sender immediately by reply e-mail, delete the message from your system and notify your system manager.  Please do not copy it for any purpose, or disclose its contents to any other person.  The views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company.  The recipient should check this e-mail and any attachments for the presence of viruses.  The company accepts no liability for any damage caused, directly or indirectly, by any virus transmitted in this email.
******************************************

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot-Users] CFG_CMD_.... configuration space running out!!
  2003-12-18  2:07 ` Jon Diekema
@ 2003-12-18  4:20   ` Robin Gilks
  2003-12-19 20:49     ` Wolfgang Denk
  2003-12-19 20:46   ` Wolfgang Denk
  1 sibling, 1 reply; 7+ messages in thread
From: Robin Gilks @ 2003-12-18  4:20 UTC (permalink / raw)
  To: u-boot

Jon Diekema wrote:
> On Thu, 2003-12-18 at 07:08, Robin Gilks wrote:
> 
>>test syntax as per binary integer comparisons with the option of a unary 
>>indirection operator on either expression.
>>eg. 'test *40000 -eq 12345678'
>>checks location 40000 for the value 12345678. I've only implemented 32 
>>bit word indirection - does anyone think it useful to provide half-word 
>>and byte as well - in which case what should the syntax look like?
> 
> 
> How about using something similar to what the i2c commands use?
> 
> <addr>.4  4 byte addr
> <addr>.2  2 byte addr
> <addr>.1  1 byte addr
> 
> or maybe
> 
> <addr>.l  4 byte addr
> <addr>.w  2 byte addr
> <addr>.b  1 byte addr
> 
> If .<byte-size> isn't specified, then default to the .4 or .l
> address size.
> 
> Potential examples:
> 
> test *40000.4 -eq 12345678
> test *40000   -eq 12345678
> test *40000.2 -eq 1234
> test *40000.1 -eq 12

As it happens, the simple_strtoul() parsing is quite happy with a 
trailing '.' so either should code up easily enough. Thanks for the input...

Last day before the break tomorrow so we'll see what gets done :-))


-- 
Robin Gilks
Senior Design Engineer          Phone: (+64)(3) 357 1569
Tait Electronics                Fax  :  (+64)(3) 359 4632
PO Box 1645 Christchurch        Email : robin.gilks at tait.co.nz
New Zealand

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot-Users] CFG_CMD_.... configuration space running out!!
  2003-12-18  2:07 ` Jon Diekema
  2003-12-18  4:20   ` Robin Gilks
@ 2003-12-19 20:46   ` Wolfgang Denk
  1 sibling, 0 replies; 7+ messages in thread
From: Wolfgang Denk @ 2003-12-19 20:46 UTC (permalink / raw)
  To: u-boot

In message <1071713256.2552.10.camel@smoke.cideas.com> you wrote:
> 
> How about using something similar to what the i2c commands use?
> 
> <addr>.4  4 byte addr
> <addr>.2  2 byte addr
> <addr>.1  1 byte addr

Please don't.

> <addr>.l  4 byte addr
> <addr>.w  2 byte addr
> <addr>.b  1 byte addr

Use this, if you must have something like it.

> test *40000.4 -eq 12345678
> test *40000   -eq 12345678
> test *40000.2 -eq 1234
> test *40000.1 -eq 12

No.

First: don't call this command "test" if it does not what  the  shell
command "test" does - we might have a hush "test" command soon.

Second, if you really want to do this, make the ".X" suffix  on  thew
COMMAND name, but never on the arguments.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Always try to do things in chronological order; it's  less  confusing
that way.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot-Users] CFG_CMD_.... configuration space running out!!
  2003-12-18  4:20   ` Robin Gilks
@ 2003-12-19 20:49     ` Wolfgang Denk
  2004-01-04 22:21       ` Robin Gilks
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Denk @ 2003-12-19 20:49 UTC (permalink / raw)
  To: u-boot

In message <3FE12B12.7070509@tait.co.nz> you wrote:
>
> > test *40000.4 -eq 12345678
> > test *40000   -eq 12345678
> > test *40000.2 -eq 1234
> > test *40000.1 -eq 12
> 
> As it happens, the simple_strtoul() parsing is quite happy with a 
> trailing '.' so either should code up easily enough. Thanks for the input...

Do NOT do it this way. Command modifiers on the arguments is silly.

I will reject anything like that.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
It is dangerous to be right on a subject  on  which  the  established
authorities are wrong.                                    -- Voltaire

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot-Users] CFG_CMD_.... configuration space running out!!
  2003-12-19 20:49     ` Wolfgang Denk
@ 2004-01-04 22:21       ` Robin Gilks
  2004-01-04 23:03         ` Wolfgang Denk
  0 siblings, 1 reply; 7+ messages in thread
From: Robin Gilks @ 2004-01-04 22:21 UTC (permalink / raw)
  To: u-boot

Hi Wolfgang

Wolfgang Denk wrote:
> In message <3FE12B12.7070509@tait.co.nz> you wrote:
> 
>>>test *40000.4 -eq 12345678
>>>test *40000   -eq 12345678
>>>test *40000.2 -eq 1234
>>>test *40000.1 -eq 12
>>
>>As it happens, the simple_strtoul() parsing is quite happy with a 
>>trailing '.' so either should code up easily enough. Thanks for the input...
> 
> 
> Do NOT do it this way. Command modifiers on the arguments is silly.
> 
> I will reject anything like that.

I'm not modifying the command but I _AM_ modifying the parameters to it. 
  The idea was to be able to specify the width of either the left- or 
right-hand-side of the test expression (or both).

What I'll do instead is (as you also suggested to avoid future clashes) 
is change the name and make the command do a test of specified width (as 
defined by a command modifier) - it will still do what I wanted but not 
in the same flexible way I had envisaged.

Happy New Year!!

-- 
Robin Gilks
Senior Design Engineer          Phone: (+64)(3) 357 1569
Tait Electronics                Fax  :  (+64)(3) 359 4632
PO Box 1645 Christchurch        Email : robin.gilks at tait.co.nz
New Zealand

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot-Users] CFG_CMD_.... configuration space running out!!
  2004-01-04 22:21       ` Robin Gilks
@ 2004-01-04 23:03         ` Wolfgang Denk
  0 siblings, 0 replies; 7+ messages in thread
From: Wolfgang Denk @ 2004-01-04 23:03 UTC (permalink / raw)
  To: u-boot

In message <3FF891D7.9090005@tait.co.nz> you wrote:
> 
> > Do NOT do it this way. Command modifiers on the arguments is silly.
> > I will reject anything like that.
> 
> I'm not modifying the command but I _AM_ modifying the parameters to it. 

Yes, that was what I was saying: this is silly, and will be rejected.

>   The idea was to be able to specify the width of either the left- or 
> right-hand-side of the test expression (or both).

Makes no sense to me.  It's  incompatible  to  any  kind  of  command
interpreter / shell I've ever seen.

> What I'll do instead is (as you also suggested to avoid future clashes) 
> is change the name and make the command do a test of specified width (as 
> defined by a command modifier) - it will still do what I wanted but not 
> in the same flexible way I had envisaged.

Synopsis?

> Happy New Year!!

Thanks, the  same to you!

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Houston, Tranquillity Base here.  The Eagle has landed.
                                                    -- Neil Armstrong

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-01-04 23:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-17 23:08 [U-Boot-Users] CFG_CMD_.... configuration space running out!! Robin Gilks
2003-12-18  2:07 ` Jon Diekema
2003-12-18  4:20   ` Robin Gilks
2003-12-19 20:49     ` Wolfgang Denk
2004-01-04 22:21       ` Robin Gilks
2004-01-04 23:03         ` Wolfgang Denk
2003-12-19 20:46   ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox