From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Tue, 06 Aug 2013 10:54:49 -0600 Subject: [U-Boot] [PATCH] wandboard: add pxe support, set default boot command like highbank In-Reply-To: References: <1374786812-32303-1-git-send-email-dgilmore@fedoraproject.org> <51FA221D.5090006@denx.de> <51FA9891.9040000@gmail.com> <51FB786E.4010908@denx.de> <20130805052933.59F9B380495@gemini.denx.de> <20130806113751.957DA380DF0@gemini.denx.de> <52011B55.3000506@wwwdotorg.org> Message-ID: <52012A59.8030309@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 08/06/2013 10:18 AM, Otavio Salvador wrote: > On Tue, Aug 6, 2013 at 12:50 PM, Stephen Warren wrote: >> On 08/06/2013 05:37 AM, Wolfgang Denk wrote: >>> Dear Rob Herring, >>> >>> In message you wrote: >>>> >>>>> Why would you ever want to compile this into U-Boot at all? Then any >>>>> changes you need to make mean compiling and installing a new U-Boot, >>>>> which is something you normally don't want to do. >>>> >>>> You may want to have factory default and "user" settings. Building in >>>> the factory settings would be one way to accomplish that. >>> >>> No. Handling these independently, outside of the compiled U-Boot image >>> is as easy, and much more flexible. >>> >>>>> U-Boot is perfectly able to import such settings from text files (or >>>>> text blobs stored somewhere, even attached to the U-Boot image, if you >>>>> want), so just use the text files separately, instead of hard >>>>> compiling them into the code. >>>> >>>> In my case, I don't want to compile the environment into u-boot. But >>>> some people do as I copied my scripts from Tegra which has them >>>> built-in. >> >> We have the *default* environment built-in, which is used when no valid >> environment is found in flash. If there's an environment in flash, it >> gets used rather than the built-in default. > > How can someone 'overwrite' the default environment from system or > when generating a FIT image? If U-Boot is running, you can get back to the default environment by running exactly the commands you wrote below. If you're flashing U-Boot, you could force it to use the default environment when it boots by erasing/corrupting the copy of the environment that's stored in flash (or wherever ENV_IS points) at the same time that you flash the new U-Boot binary. The question of how to get the default environment when generating a FIT image doesn't make sense; generating a FIT image of something (kernel, initrd, DTB?) is entirely unrelated to the environment content that U-Boot uses when running. > I am interested in let my customers to revert back to a sane default running: > > env -f -d -a > saveenv