[U-Boot] Unable to run scripts with autoscr command

Detlev Zundel dzu at denx.de
Fri Feb 17 16:31:41 CET 2012


Hi Asif,

> Im using u-boot version U-Boot 1.3.4 (Dec  9 2010 - 17:45:52)
> DM365-IPNC-1.0.14 on a davinci_dm365 board,

what is the "DM365-IPNC-1.0.14" version about?  I cannot see such a
version (or tag) in mainline U-Boot.

> I'm trying to run script under U-boot using "autoscr" command, since I
> don't see any "source" command ported into this version of U-boot yet,

Yes, it was renamed at some point:

commit 74de7aefd79690bae8cf5a5120f5962d444be089
Author: Wolfgang Denk <wd at denx.de>
Date:   Wed Apr 1 23:34:12 2009 +0200

    Add "source" command; prepare removal of "autoscr" command
    
    According to the doc/feature-removal-schedule.txt, the "autoscr"
    command will be replaced by the "source" command in approximately 6
    months from now.
    
    This patch prepares this change and starts a 6 month transition
    period as follows:
    
    - The new "source" command has been added, which implements exactly
      the same functionlaity as the old "autoscr" command before
    - The old "autoscr" command name is kept as an alias for compatibility
    - Command sequences, script files atc. have been adapted to use the
      new "source" command
    - Related environment variables ("autoscript", "autoscript_uname")
      have *not* been adapted yet; these will be renamed resp. removed in
      a separate patch when the support for the "autoscr" command get's
      finally dropped.
    
    Signed-off-by: Wolfgang Denk <wd at denx.de>

[dzu at pollux u-boot-testing (master)]$ git describe --contains 74de7aefd79690bae8cf5a5120f5962d444be089
v2009.06-rc1~110
[dzu at pollux u-boot-testing (master)]$ 

So indeed, this cannot be in your version 1.3.4

> but autoscr isn't executing commands like -if -then -while in the script,
> gives the following error: *Unknown command 'if' - try 'help'*
>
>
> *After this I tried enabling the hush shell by setting the following in the
> config file for respective board,*

This is indeed the problem, the used shell is not powerful enough to do
such scripting.  Using the hush shell will indeed solve the original
problem.

>
> #define CFG_HUSH_PARSER
> #define CFG_PROMPT_HUSH_PS2     "=> "
> #undef CONFIG_BOOT_RETRY_TIME
> #undef CONFIG_RESET_TO_RETRY
> #define CONFIG_AUTOSCRIPT               1
> #define CONFIG_CMD_AUTOSCRIPT
>
> *but after this when I reboot the board, I get indefinite repetative
> display of the u-boot prompt as below:*
>
> Jumping to entry point at 0x81080000
> DM36x initialization passed!
> TI UBL Base Version: 1.50
> Boot Loader BootMode = NAND
> Starting NAND Copy...
> Valid magicnum, 0xA1ACED66, found in block 0x00000008.
> Boot Mode Task Completed
>
> IPNC UBL Version: 1.1.0
> Platform: DM365
>
> Jumping to entry point at 0x81080000
> DM36x initialization passed!
> TI UBL Base Version: 1.50
> Boot Loader BootMode = NAND
> Starting NAND Copy...
> Valid magicnum, 0xA1ACED66, found in block 0x00000008.
> Boot Mode Task Completed
>
> IPNC UBL Version: 1.1.0
> Platform: DM365
>
> Jumping to entry point at 0x81080000
> DM36x initialization passed!
> TI UBL Base Version: 1.50
> Boot Loader BootMode = NAND
> Starting NAND Copy...
> Valid magicnum, 0xA1ACED66, found in block 0x00000008.
> Boot Mode Task Completed
>
> IPNC UBL Version: 1.1.0
> Platform: DM365
>
> Jumping to entry point at 0x81080000
> DM36x initialization passed!
> TI UBL Base Version: 1.50
> Boot Loader BootMode = NAND
> Starting NAND Copy...
> Valid magicnum, 0xA1ACED66, found in block 0x00000008.
> Boot Mode Task Completed
>
> IPNC UBL Version: 1.1.0
> Platform: DM365
>
> Jumping to entry point at 0x81080000
> DM36x initialization passed!
> TI UBL Base Version: 1.50
> Boot Loader BootMode = NAND
> Starting NAND Copy...
> Valid magicnum, 0xA1ACED66, found in block 0x00000008.
> Boot Mode Task Completed
>
> IPNC UBL Version: 1.1.0
> Platform: DM365
>
> .......
>
> what might be the problem, early help would be much appreciated.

It seems that by changing your configuration somehow the increase in
code size has broken the compilation.

Did you see any errors or warnings while compiling?

On the other hand, davinci_dm365evm is a supported configuration in
mainline, so why not try current code.  This way we would be in a much
better position to help you.

Thanks
  Detlev

-- 
Wissenschaft ohne Verstand ist doppelte Narrheit.
                                    --- Baltasar Gracian
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de


More information about the U-Boot mailing list