Skip to contentSkip to conversation

CFG_CMD_.... configuration space running out!!

U-Boot-Users Robin Gilks 3 participants 7 messages Dec 17, 2003 – Jan 4, 2004

lore
Share & tools
lore
#0 lore raw

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?

Signature · 5 lines
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
#1 lore raw
Quoted 6 lines · Robin Gilks

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.
******************************************

#2 lore raw
Quoted 25 lines · Jon Diekema
Quoted 6 lines · Robin Gilks

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.

Quoted 6 lines

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 :-))

Signature · 5 lines
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
#3 lore raw
Quoted 8 lines · In message <[email protected]> you wrote:
Quoted 5 lines

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

Signature · 4 lines
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
#4 lore raw

Hi Wolfgang

Quoted 7 lines · Wolfgang Denk
Quoted 5 lines · In message <[email protected]> you wrote:
Quoted 4 lines

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

Quoted 7 lines
Quoted 2 lines

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!!

Signature · 5 lines
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
#5 lore raw
Quoted 5 lines · In message <[email protected]> you wrote:
Quoted 3 lines

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.

Quoted 2 lines

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.

Quoted 4 lines

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?

Quoted 1 line

Happy New Year!!

Thanks, the same to you!

Best regards,

Wolfgang Denk

Signature · 4 lines
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
#6 lore raw
In reply to Jon Diekema
Quoted 6 lines · In message <[email protected]> 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.

Quoted 3 lines
<addr>.l  4 byte addr
<addr>.w  2 byte addr
<addr>.b  1 byte addr

Use this, if you must have something like it.

Quoted 4 lines

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

Signature · 4 lines
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.