[U-Boot] Patch to mkenvimage to handle text files with length that exceed env size

Tom Rini trini at konsulko.com
Sat Mar 28 19:10:41 CET 2015


On Thu, Mar 12, 2015 at 11:52:49AM -0400, Brian McFarland wrote:

> The current head revision of mkenvimage
> (e72be8947e129f5ab274c0a9f235d2cc0014b2ea) will prevent you from creating
> an env image from a text file that is larger than the env length specified
> by the '-s' option.  That doesn't make sense given that the tool now allows
> comments and blank lines.  This patch removes that limitation and allows
> longer text files to be used.
> 
> I don't have time / desire at the moment to figure out "patman" and could
> really care less if this is adopted up stream.  Just figured I would share
> in case anybody else finds it useful enough to take time to do a proper
> patch.
> 
> >From 39ff30190c2bf687861f4b4b33230f1944fb64f9 Mon Sep 17 00:00:00 2001
> From: Brian McFarland <bmcfarland at rldrake.com>
> Date: Thu, 12 Mar 2015 11:37:19 -0400
> Subject: [PATCH] In mkenvimage, removed the check that prevented using a
>  source text file larger than the output environment image.  Instead, the main
>  parsing loop checks to see if the environment buffer is full, and quits if it
>  is.  After the main parse loop, a second loop swallows comments and
>  whitespace until either the EOF is reached or more env vars are found, in
>  which case an error will be thrown.
> 

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150328/a0de2341/attachment.sig>


More information about the U-Boot mailing list