From: Wolfgang Denk Date: Fri, 30 Nov 2018 14:05:34 +0100 Subject: [U-Boot] [PATCH] pico-imx7d: Increase the CONFIG_ENV_OFFSET size In-Reply-To: <1543571315-6376-1-git-send-email-festevam@gmail.com> References: <1543571315-6376-1-git-send-email-festevam@gmail.com> Message-ID: <20181130130534.43A8F242267@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Fabio, In message <1543571315-6376-1-git-send-email-festevam@gmail.com> you wrote: > The environment size has grown in such a way that it corrupts the > main U-Boot image after a "saveenv" causing a U-Boot hang. > > Fix this problem by increasing the CONFIG_ENV_OFFSET size. Sorry, I can't understand this change. > /* FLASH and environment organization */ > #define CONFIG_ENV_SIZE SZ_8K > > -#define CONFIG_ENV_OFFSET (8 * SZ_64K) > +#define CONFIG_ENV_OFFSET (12 * SZ_64K) The size written to flash should never exceed CONFIG_ENV_SIZE; if it does, then there is some serious bug in the code, which I tend to doubt. And when the environment grows, it would make it necessary to raise CONFIG_ENV_SIZE first - changing the CONFIG_ENV_OFFSET has nothing to do with this per se. Can you please explain which phenomenon you see, and hos this change is supposed to work? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Every revolutionary idea - in science, politics, art, or whatever - evokes three stages of reaction in a hearer: 1. It is completely impossible - don't waste my time. 2. It is possible, but it is not worth doing. 3. I said it was a good idea all along.