From mboxrd@z Thu Jan 1 00:00:00 1970 From: Holger Brunck Date: Mon, 02 May 2011 10:22:56 +0200 Subject: [U-Boot] [PATCH 10/30] arm/km: add addbootcount environment variable In-Reply-To: <20110430080955.49AC2D5270E@gemini.denx.de> References: <20110430080955.49AC2D5270E@gemini.denx.de> Message-ID: <4DBE69E0.1060101@keymile.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello, On 04/30/2011 10:09 AM, Wolfgang Denk wrote: > Dear Valentin Longchamp, > > In message you wrote: >> From: Holger Brunck >> >> This environment variable is used to set the bootcount address >> for the kernel. > > "addbootcount" reads to me as "add something to the boot counter". I > do not expect that this has anything to do with an address. Please use > something like "bootcount_addr" (or "bootcnt_addr" or similar) > instead. > >> @@ -106,6 +106,13 @@ int set_km_env(void) >> varaddr = gd->ram_size - CONFIG_KM_RESERVED_PRAM - CONFIG_KM_PHRAM; >> sprintf((char *)buf, "0x%x", varaddr); >> setenv("varaddr", (char *)buf); >> + >> +#ifdef BOOTCOUNT_ADDR >> + unsigned int bootcountaddr; >> + bootcountaddr = gd->ram_size - CONFIG_KM_RESERVED_PRAM; >> + sprintf((char *)buf, "0x%x", bootcountaddr); >> + setenv("bootcountaddr", (char *)buf); >> +#endif > > NAK. We don't allow declarations in the middle of the code. > Ok. >> } >> >> diff --git a/include/configs/km_arm.h b/include/configs/km_arm.h >> index 70113d4..89f9d35 100644 >> --- a/include/configs/km_arm.h >> +++ b/include/configs/km_arm.h >> @@ -64,6 +64,9 @@ >> #define CONFIG_KM_KERNEL_ADDR 0x2000000 /* 4096KBytes */ >> >> #define CONFIG_KM_DEF_ENV_CPU \ >> + "addbootcount=" \ >> + "setenv bootargs ${bootargs} " \ >> + "bootcountaddr=${bootcountaddr}\0" \ > > Argh. Not I see what you mean. Please fix the description,it is > completely misleading. > Ok, I will adapt this. Thanks for reviewing. Best regards Holger Brunck