[U-Boot-Users] How do you test a bit set/clear from U-Boot command line/script?

Tolunay Orkun listmember at orkun.us
Thu Apr 27 01:25:13 CEST 2006


Wolfgang Denk wrote:
> In message <444FDD08.2010101 at orkun.us> you wrote:
>   
>> I know I can compare a simple value using itest command. e.g.
>>
>> itest *4000 -eq 1234 && echo 'Addr 4000 contains 1234'
>>
>> Now my problem is how can I test a bit of 32 bit quantity (say bit 4) 
>> stored at location 4000? This is a question about general hush/u-boot 
>> shell capability? It is a generic question...
>>     
>
> At the moment there is  no  command  that  implements  this.  As  you
> probaly  are aware, the "itest" command just implements the following
> operations:
>   
I did hope there was some clever way to do this using existing commands.

> Feel free to add new commands for AND, OR, and XOR...
>   
I will send a patch. I am not sure how OR or XOR could be useful 
though... We do not support multiple operations or store computed 
expression results anywhere.


Tolunay





More information about the U-Boot mailing list