From: Tom Rini Date: Wed, 16 Sep 2015 07:53:49 -0400 Subject: [U-Boot] [PATCH] Revert "env_eeprom: Assign default environment during board_init_f" In-Reply-To: <55F9569A.4010401@keymile.com> References: <55F7E667.1040802@keymile.com> <20150915165437.GH26226@bill-the-cat> <55F9569A.4010401@keymile.com> Message-ID: <20150916115349.GT26226@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, Sep 16, 2015 at 01:46:34PM +0200, Ludger Dreier wrote: > Hi Tom, > > Am 2015-09-15 18:54, schrieb Tom Rini: > > Was there perhaps some sort of init ordering issue in a board which > > did have EEPROM used as the backing store for env? I could see a > > case where perhaps (and Ludger, can you test this as well please?) > > the problem is that for env_eeprom env_init() needs to just default > > to the built-in (like it's basically doing today) and > > env_relocate_spec() needs to do the read, check which is valid, etc, > > etc, dance which it is _not_ doing today. > > as I understand your idea, the code from both versions of env_init > (redundant env and non-redunant) which is framed by > "#ifdef ENV_IS_EMBEDDED" may potentially be moved to, or called by > env_relocate_spec. I think this could work. If this ok for you, > I can come up with a tested proposal. But this would need some days. Roughly speaking, yes. env_init() should just be the "use the default built-in env" code and env_relocate_spec() should do all of the hard work that env_init() used to do. -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: