From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Holler Date: Thu, 14 Aug 2014 23:44:18 +0200 Subject: [U-Boot] [PATCH 1/4] Add option -r to env import to allow import of text files with CRLF as line endings In-Reply-To: <53ED2BA4.5060300@wwwdotorg.org> References: <1405352998-7707-1-git-send-email-holler@ahsoftware.de> <1405352998-7707-2-git-send-email-holler@ahsoftware.de> <53D9761D.8050304@wwwdotorg.org> <20140731195130.GT19374@bill-the-cat> <53DA9F98.9050506@wwwdotorg.org> <53EC7265.2080909@ahsoftware.de> <53ECDA9F.4000604@wwwdotorg.org> <53ED1307.9020207@wwwdotorg.org> <20140814205349.GI19374@bill-the-cat> <53ED2BA4.5060300@wwwdotorg.org> Message-ID: <53ED2DB2.5090801@ahsoftware.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Am 14.08.2014 23:35, schrieb Stephen Warren: > On 08/14/2014 02:53 PM, Tom Rini wrote: >> On Thu, Aug 14, 2014 at 01:50:31PM -0600, Stephen Warren wrote: >> >> [snip] >>> uenv.txt is the opposite; it's very U-Boot specific, and more about >>> internal implementation details of U-Boot. In particular, I only see >>> a use-case for uenv.txt on systems that have nowhere to store the >>> U-Boot environment other than in some filesystem. That's the reason >>> the RPi port loads uenv.txt, so the environment can be modified >>> somehow. Perhaps there's an ENV_IS_IN_FAT that could be used instead >>> on the Pi? For example, none of the Tegra boards use uEnv.txt since >>> "saveenv" to flash works there. >> >> Even with ENV_IS_IN_FAT you need to be in U-Boot to modify the >> environment (fw_setenv/printenv should be adaptable easily enough I >> would hope, but aren't today). uEnv.txt is the way for a user to pop >> the SD card into their PC, tweak the env as needed (or fiddle some >> bits), eject the card and boot their target. > > What, you don't link binary-editing the file to fix the CRC? :-P That reminds me that I thought about adding uEnv.sha1 (and CMD_SHA1) to have the same protection (or even better through sha1) as boot.cmd for environments where it makes sense. So in regard to "untrustworthy" sd-cards most boards. ;) Regards, Alexander Holler