[U-Boot] strange behaviors with setexpr syntax error and '==' != '-eq"
Clément Péron
peron.clem at gmail.com
Tue Sep 26 14:23:01 UTC 2017
Hi,
I write a script on u-boot but i found 2 strange behaviors.
The first one is when I try to do a mask from a memory address and
store it to an env variable.
=> setexpr toto *{loadaddr} & 0xFF
syntax error
=> setexpr toto *{loadaddr} & 0x3F
syntax error
=> setexpr toto 0x3F & *{loadaddr}
syntax error
The second one is the difference between '==' and '-eq'
=> setenv a 1
=> setenv b 2
=> if test ${a} -eq ${b}; then echo toto; fi;
=> if test ${a} == ${b}; then echo toto; fi;
toto
Which doesn't seem logic.
Could you please explain me these behaviors ?
Thanks,
Clement
More information about the U-Boot
mailing list