From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Wed, 14 Mar 2012 17:02:27 -0700 Subject: [U-Boot] SPI flash writing In-Reply-To: References: <4F5F9103.1030807@keymile.com> <201203131611.31287.vapier@gentoo.org> <20120313201752.GM5050@titan.lakedaemon.net> <201203131635.53765.vapier@gentoo.org> Message-ID: <20120315000227.GA13363@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 Tue, Mar 13, 2012 at 10:31:02PM +0100, Falauto, Gerlando wrote: > > >-----Original Message----- > >From: Mike Frysinger [mailto:vapier at gentoo.org] > >Sent: Tue 13.03.2012 21:35 > >To: Jason Cooper > >Cc: Falauto, Gerlando; u-boot; Brunck, Holger > >Subject: Re: [U-Boot] SPI flash writing > > >On Tuesday 13 March 2012 16:17:52 Jason Cooper wrote: > >> On Tue, Mar 13, 2012 at 04:11:29PM -0400, Mike Frysinger wrote: > >> > On Tuesday 13 March 2012 14:25:07 Gerlando Falauto wrote: > >> > > 2) an out-of-boundary-check againts the flash size so at least a > >> > > warning is issued when you use too big a size value > >> > > >> > i'm not sure about this. if you want to do size checking, then enable > >> > the hush shell and do it in a script. > >> > >> Is there a programatic way to get the size of the flash at runtime from > >> the hush script? > > >no. question is, do you really need that ? sounds like you know ahead of > >time how big the space is for u-boot, so the size of the flash doesn't matter. > > Can't the same command also be used for burning something *other than* u-boot (e.g. a kernel, config section, or something like that)? > So the size of the flash *does matter*, doesn't it? How about using mtdparts which I think will tell you when you're going to write something larger than the defined partition? If it doesn't, that would be a handy thing to add (and be a general feature too). -- Tom