[U-Boot-Users] CFG_CMD_.... configuration space running out!!

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?

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

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

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

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

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

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
participants (3)
-
Jon Diekema
-
Robin Gilks
-
Wolfgang Denk