From: Wolfgang Denk Date: Tue, 28 Apr 2009 09:13:05 +0200 Subject: [U-Boot] [PATCH] tools/envcrc: add --binary option to export embedded env In-Reply-To: <200904271955.08919.vapier@gentoo.org> References: <1239015670-28314-1-git-send-email-vapier@gentoo.org> <20090427221558.E3B0583420E8@gemini.denx.de> <200904271955.08919.vapier@gentoo.org> Message-ID: <20090428071305.0DFCB83420E8@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 Mike Frysinger, In message <200904271955.08919.vapier@gentoo.org> you wrote: > > > Should we not rather use 0xFF for padding - given that the envrionment > > is frequently stored in NOR flash? > > i would love to (and with the Blackfin stuff, i do just that), but the problem > is that there is no way of forcing the embedded environment to 0xff pad that i > know of ... You mean in the code? Well, if you're using a separate section for it (like the ppcenv section) this should be straightforward using the `=FILLEXP' output section attribute for the linker. > so, to keep the most common behavior from changing (the char[] env is embedded > in the .data section padded with 0x00), the padding defaults to 0x00. this > way `envcrc` outputs the right value (see common/Makefile). > > for people (like me) who are using --binary to extract the env blob, we can do > --binary=0xff and get what you're talking about. > > i could extend the behavior so that using plain "--binary" is the same thing > as "--binary=0xff" ... OK. I guess you want to suggest that I accept this patch as is, and we address the gap filling with 0xFF in a separate patch? ;-) Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel 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 "Morality is one thing. Ratings are everything." - A Network 23 executive on "Max Headroom"