[U-Boot] hush shell script commands(eval)

rudresh rudresh.tk at lntemsys.com
Wed Dec 24 09:29:57 CET 2008


Hi All 
Mary Christmas . Happy New Year. 

I have some query on hush shell script language. 

       I'm using hush shell script to automate the testing for command
exists in U-boot. 
The scripts is as follows 

echo -------------------------------------- 
echo Target Test: 
setenv check 'if imi FE7E0000; then val=1; else val=0; fi' 
print check 
run check 
echo -------------------------- 
echo FRAM Command Test 
echo -------------------------------------- 
setenv check 'if fram; then val_fram=1; else val_fram=0;  fi' 
print check 
run check 
echo -------------------------------------- 
echo $val 
echo $val_fram 
echo ------------------------------------ 
setenv check 'if $val; then echo imi command executes Success; else echo imi
commd Fails; fi' 
print check 
run check 
echo >>>>>>>>>>>>>>>>>>>>>>>> 
setenv check 'if $val_fram; then echo fram command executes Success; else
echo fram commd Fails; fi' 
print check 
run check 
echo END Test 

If i execute this string I’m getting this error. 

check=if ($val); then echo command executes Success; else echo imi commd
Fails; fi 
Unknown command '(0)' - try 'help' 
imi commd Fails 
>>>>>>>>>>>>>>>>>>>>>>>> 
check= if $val_fram; then echo fram command executes Success; else echo fram
commd Fails; fi 
Unknown command '1' - try 'help' 

I’m not able to fix this error. is it not support the constant value in if
then else fi statement?. Is there any alternate method? 

I also trying to use the standalone application, is there any command like
system("command") in u-boot. i want to run command in U-boot using
standalone application.

please help me.

Thanks & Regards, 
Rudresh 
-- 
View this message in context: http://www.nabble.com/Re%3Ahush-shell-script-commands%28eval%29-tp21156593p21156593.html
Sent from the Uboot - Users mailing list archive at Nabble.com.



More information about the U-Boot mailing list