[U-Boot] In U-Boot-2013-01, __stringify is not working

Balaji N balajinp82 at gmail.com
Thu May 30 12:09:09 CEST 2013


In U-Boot-2013-01 version & P3041 board, __stringify is not working.
Enabled the DEBUG mode and got the output as:

*** Warning - bad CRC, using default environment

Destroy Hash Table: 3ffa9b90 table = 00000000
Create Hash Table: N=221
INSERT: table 3ffa9b90, filled 1/223 rv 3fe2f858 ==> name="bootcmd"
value="setenv bootargs root=/dev/$bdev rw console=$consoledev,$baudrate $o"
INSERT: table 3ffa9b90, filled 2/223 rv 3fe2eef8 ==> name="ramboot"
value="setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate $oth"
INSERT: table 3ffa9b90, filled 3/223 rv 3fe2f2f4 ==> name="nfsboot"
value="setenv bootargs root=/dev/nfs rw nfsroot=$serverip:$rootpath ip=$ip"
Bad trap at PC: 3ff7efc8, SR: 21200, vector=d00
NIP: 3FF7EFC8 XER: 20000000 LR: 3FF7F03C REGS: 3fe2bd30 TRAP: 0d00 DAR:
61646486
MSR: 00021200 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 00

GPR00: 00000000 3FE2BE20 3FE2DF30 0000013E 0000000A FFFFFFFF FFFFFFFF
00000000
GPR08: FFFFFFFF 3FE2E5A8 FFFFFF0D 3FE2BE20 42002042 CB3D6461 00000000
3FE2E59C
GPR16: 3FE2E5A6 3FFA0651 3FFA0669 3FFA06C7 3FFA0696 00000000 00000000
3FE2BE30
GPR24: 00000000 3FE2E820 3FE2E338 3FE2E5A9 00000000 3FFA9B90 3FFA5280
61646472
Call backtrace:
3FF7F03C DEADBEEF
Exception in kernel pc 3ff7efc8 signal 0
### ERROR ### Please RESET the board ###

In file include/env_default.h,

the environment variable is defines as:

#ifdef DEFAULT_ENV_INSTANCE_EMBEDDED
env_t environment __PPCENV__ = {
        ENV_CRC,        /* CRC Sum */
#ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT
        1,              /* Flags: valid */
#endif
        {
#elif defined(DEFAULT_ENV_INSTANCE_STATIC)
static char default_environment[] = {
#else
const uchar default_environment[] = {
#endif
#ifdef  CONFIG_ENV_CALLBACK_LIST_DEFAULT
        ENV_CALLBACK_VAR "=" CONFIG_ENV_CALLBACK_LIST_DEFAULT "\0"
#endif
#ifdef  CONFIG_ENV_FLAGS_LIST_DEFAULT
        ENV_FLAGS_VAR "=" CONFIG_ENV_FLAGS_LIST_DEFAULT "\0"
#endif
#ifdef  CONFIG_BOOTARGS
        "bootargs="     CONFIG_BOOTARGS                 "\0"
#endif
#ifdef  CONFIG_BOOTCOMMAND
        "bootcmd="      CONFIG_BOOTCOMMAND              "\0"
#endif
#ifdef  CONFIG_RAMBOOTCOMMAND
        "ramboot="      CONFIG_RAMBOOTCOMMAND           "\0"
#endif
#ifdef  CONFIG_NFSBOOTCOMMAND
        "nfsboot="      CONFIG_NFSBOOTCOMMAND           "\0"
#endif
#if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >= 0)
        "bootdelay="    __stringify(CONFIG_BOOTDELAY)   "\0"
#endif
#if defined(CONFIG_BAUDRATE) && (CONFIG_BAUDRATE >= 0)
        "baudrate="     __stringify(CONFIG_BAUDRATE)    "\0"
#endif

For first 3 environment variable, it is working fine. When it reaches the
environment variable
"bootdelay="    __stringify(CONFIG_BOOTDELAY)   "\0"

it gets corrupted.

-Thanks,
Balaji N


More information about the U-Boot mailing list