From mboxrd@z Thu Jan 1 00:00:00 1970 From: Allen Martin Date: Tue, 29 Jan 2013 19:05:49 -0800 Subject: [U-Boot] CONFIG_DELAY_ENVIRONMENT usage Message-ID: <20130130030549.GA19514@badger> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Simon, I had a question about your CONFIG_DELAY_ENVIRONMENT patch. In the commit description it says: When CONFIG_DELAY_ENVIRONMENT is defined, it is convenient to have a run-time way of enabling loading of the environment. Add this to the fdt as /config/delay-environment. In the code, it's actually reading /config/load-environment, and it defaults to prevent loading environment regardless if CONFIG_DELAY_ENVIRONMENT is set or not: static int should_load_env(void) { #ifdef CONFIG_OF_CONTROL return fdtdec_get_config_int(gd->fdt_blob, "load-environment", 0); #elif defined CONFIG_DELAY_ENVIRONMENT return 0; #else return 1; #endif } The problem I'm seeing is that this regressed environment loading on all boards that use fdt, because none of them have /config/load-environment defined. If I read the commit message correctly, I think the actual intention is: static int should_load_env(void) { #ifdef CONFIG_DELAY_ENVIRONMENT #ifdef CONFIG_OF_CONTROL return fdtdec_get_config_int(gd->fdt_blob, "load-environment", 0); #else return 0; #endif #else return 1; #endif } Is my understanding correct? -Allen -- nvpublic