[U-Boot] uboot auto restart on dm355,why?
yaojin liu
lanmanck at gmail.com
Tue Jul 27 14:16:05 CEST 2010
Now i found that it is the problem of TSTC().
How did it happen?
2010/7/27 yaojin liu <lanmanck at gmail.com>
> hi ,all.
> I cannot use the nand flash, so i decide to load the uboot through UART,and
> it works.
> but it seems not stable , when i type help or printenv(or use the autoboot
> delay, see followings), it will restart. but command "boot" or "setenv"(when
> i uncomment autoboot delay) are ok.
> I don't have a emulator,and don't know how it goes.
> I guess it is the ENV cause the problem,here are the macro i defined:
>
> #if 0
> #define CONFIG_SYS_USE_NAND
> #define CFG_DAVINCI_STD_NAND_LAYOUT
> //#define CONFIG_SYS_NAND_PAGE_2K
>
> #define CONFIG_NAND_DAVINCI
> #undef CONFIG_ENV_IS_IN_FLASH
> #define CONFIG_SYS_NO_FLASH
> #define CONFIG_ENV_IS_IN_NAND /* U-Boot env in NAND Flash */
> //#define CONFIG_ENV_SECT_SIZE 0x40000 /* Env sector Size */
> #define CONFIG_ENV_OFFSET 0x30000 /* environment starts here*/
> #endif
>
> #define CONFIG_SYS_NO_FLASH
> #define CONFIG_ENV_IS_NOWHERE /*env readonly*/
> #define CONFIG_ENV_IS_IN_NVRAM
> #define CONFIG_ENV_ADDR 0x82000000
> #define CONFIG_ENV_SIZE SZ_16K
> //#define CONFIG_ENV_SIZE SZ_256K
>
> #define CONFIG_SYS_NAND_BASE 0x02000000
> //#define CONFIG_SYS_NAND_HW_ECC
> //#define CFG_DAVINCI_STD_NAND_LAYOUT
> //#define CONFIG_SYS_NAND_4BIT_HW_ECC
> //#define CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST /**/
> #define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND devices=2 */
> #define CONFIG_MASK_CLE 0x10 /
> #define CONFIG_MASK_ALE 0x08
>
> #define CONFIG_SYS_NAND_BASE_LIST
> {CONFIG_SYS_NAND_BASE,CONFIG_SYS_NAND_BASE + 0x4000}
>
> #define CONFIG_SKIP_LOWLEVEL_INIT /* U-Boot is loaded by a bootloader */
> #define CONFIG_SKIP_RELOCATE_UBOOT /* to a proper address, init done */
> #define DEF_BOOTM ""
>
> /////////////////////////////and here is the output://////////////////
> DM3xx=>>: U-Boot 2009.03 ( 7??? 15 2010 - 14:12:54)
> DM3xx=>>: I2C: ready
> DM3xx=>>: DRAM: 128 MB
> DM3xx=>>: NOT ENV_IS_EMBEDDED
> DM3xx=>>: Using default environment
> DM3xx=>>: In: serial
> DM3xx=>>: Out: serial
> DM3xx=>>: Err: serial
> DM3xx=>>: ARM Clock :- 216MHz
> DM3xx=>>: DDR Clock :- 171MHz
> DM3xx=>>: MTD Layout:
> DM3xx=>>: UBL=0x0000-0x3FFF(16KB),Uboot=0x4000-0x33FFF(176+env.16KB)
> DM3xx=>>: Kernel=0x34000-0x2B3FFF(2.5MB),FS=0x2B4000-0x3FFFFFF (61.2MB
>
> DM3xx=>>: Hit any key to stop autoboot: 3 BOOTME
> DM3xx=>>: BOOTME
> DM3xx=>>: BOOTME
> DM3xx=>>: BOOTME
> DM3xx=>>: BOOTME
> ........
> and then it comes to the reboot procedure .BOOTME is the first string when
> boot from UART.
>
> /////////////////so i comment some code int static __inline__ int
> abortboot(int bootdelay):
> #if 0
> while ((bootdelay > 0) && (!abort))
> {
> int i;
>
> --bootdelay;
> /* delay 100 * 10ms */
> for (i=0; !abort && i<100; ++i)
> {
> if (tstc())
> { /* we got a key press */
> abort = 1; /* don't auto boot */
> bootdelay = 0; /* no more delay */
> #ifdef CONFIG_MENUKEY
> menukey = getc();
> #else
> (void) getc(); /* consume input */
> #endif
> break;
> } //if
> udelay(10000);
> } //for
>
> printf("\b\b\b%2d ", bootdelay);
> }//end while
> #endif
>
> ///////////////// now it will not restart anymore. but when i type help or
> printenv ,it will restart again.
> WHY? anyone can show me how to define the env when not using nand or nor
> flash?
>
> regards!
>
More information about the U-Boot
mailing list