From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hebbar, Gururaja Date: Thu, 21 Jul 2011 13:58:40 +0530 Subject: [U-Boot] u-boot environment variable parsing Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, I need one clarification regarding Environment variable declaration & its usage. #define CONFIG_EXTRA_ENV_SETTINGS \ "brd_mem=62M\0" \ "bootargs_defaults=setenv bootargs " \ "console=${console} " \ "mem=${brd_mem}\0" \ "mmc_args=run bootargs_defaults;" \ "setenv bootargs $(bootargs) " \ "root=${mmc_root} " \ "rootfstype=${mmc_root_fs_type} ip=${ip_method}\0" \ "nand_args=run bootargs_defaults;" \ "setenv bootargs ${bootargs} " \ "root=${nand_root} noinitrd " \ "rootfstype=${nand_root_fs_type} ip=${ip_method}\0" \ The question here is mmc_args re-uses variable bootargs as $(bootargs) & nand_args re-uses it as ${bootargs}. Note the difference in curly & flower brackets. "run mmc_args" fails for me however nand_args runs properly. My question is 1. Which is correct? 2. What is the difference between the two? I have seen few boards using both methods. Thanks in advance Regards Gururaja