[U-Boot] [PATCH v4 3/4] configs: define CONFIG_SPL_SIZE_LIMIT

Tom Rini trini at konsulko.com
Sat Jun 8 00:38:21 UTC 2019


On Fri, Jun 07, 2019 at 07:13:47PM -0300, Fabio Estevam wrote:
> Hi Tom and Heinrich,
> 
> On Fri, Jun 7, 2019 at 7:06 PM Tom Rini <trini at konsulko.com> wrote:
> >
> > On Tue, Apr 02, 2019 at 07:19:06PM +0200, Heinrich Schuchardt wrote:
> >
> > > A new configuration variable CONFIG_SPL_SIZE_LIMIT is introduced to define
> > > the board specific maximum size for the SPL file.
> > >
> > > Use Makefile function size_check() to implement the test.
> > >
> > > Depending on the size of CONFIG_SPL_SIZE_LIMIT an error like the following
> > > is thrown:
> > >
> > > spl/u-boot-spl.bin exceeds file size limit:
> > >   limit:  30720 bytes
> > >   actual: 33426 bytes
> > >   excess: 2706 bytes
> > > make: *** [Makefile:1663: spl/u-boot-spl.bin] Error 1
> > >
> > > Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> >
> > Applied to u-boot/master, thanks!
> 
> Just tested this on mx6sabresd_defconfig, where the SPL size limit is
> 68 * 1024, so I passed:
> 
> CONFIG_SPL_SIZE_LIMIT=69632
> 
> but SPL builds without error and the generated size is 76800.
> 
> Any ideas why CONFIG_SPL_SIZE_LIMIT did not catch the SPL size
> overflow for mx6sabresd_defconfig?

So, I hit this too.  SPL_SIZE_LIMIT is hex, not int.  Or rather, Simon's
patch changes it from int to hex, which, yeah, that's wrong.  Thanks for
the report, patch coming up!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190607/c156ec04/attachment.sig>


More information about the U-Boot mailing list