public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] arm: mx6: specify SPL padding
Date: Tue, 15 Nov 2016 11:12:01 -0500	[thread overview]
Message-ID: <20161115161201.GU27304@bill-the-cat> (raw)
In-Reply-To: <1479203961.1664.16.camel@toradex.com>

On Tue, Nov 15, 2016 at 09:59:22AM +0000, Max Krummenacher wrote:
> Hi Stefan
> 
> On Mon, 2016-11-14 at 18:06 -0800, Stefan Agner wrote:
> > From: Stefan Agner <stefan.agner@toradex.com>
> > 
> > When building SPL with eMMC boot support, specify standard padding
> > for payload to match the load sector during boot. This allows to
> > use the u-boot-with-spl.imx build target to generate a direcly
> > flashable image which can be flashed using:
> > 
> > ? dd if=u-boot-with-spl.imx of=/dev/mmcblk0 bs=512 skip=2
> > 
> > Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
> > 
> > ---
> > 
> > ?include/configs/imx6_spl.h | 6 ++++++
> > ?1 file changed, 6 insertions(+)
> > 
> > diff --git a/include/configs/imx6_spl.h b/include/configs/imx6_spl.h
> > index 76d1ca0..ca3ed19 100644
> > --- a/include/configs/imx6_spl.h
> > +++ b/include/configs/imx6_spl.h
> > @@ -42,6 +42,12 @@
> > ?#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION	1
> > ?#define
> > CONFIG_SYS_MONITOR_LEN??(CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS/2*1024)
> > ?#define CONFIG_SPL_ABORT_ON_RAW_IMAGE
> > +/*
> > + * SPL starts at 1KB (ROM offset), hence we need to pad SPL up to
> > 68KB so
> > + * that payload (U-Boot) will be at 69KB (sector 138) on the eMMC/SD
> > card.
> > + * Required for targets such as u-boot-with-spl.imx.
> > + */
> > +#define CONFIG_SPL_PAD_TO			0x11000
> > ?#endif
> > ?
> > ?/* SATA support */
> 
> This has been brought up already:
> https://www.mail-archive.com/u-boot at lists.denx.de/msg228246.html
> I agreed with Marek that this might disrupt other boot sources
> (NOR/SPI/ ...) which may or may not decide to use another offset
> between SPL and U-Boot.
> Thus it is advisable to move that define to the individual board
> configuration where one knows for what boot device one wants to
> use the combined u-boot-with-spl.imx binary.

I'm going to have to disagree with Marek here then.  Looking over the
explanation in include/configs/imx6_spl.h we have:
1KiB up front "wasted" for a partition table
4KiB up next for the ROM-mandated header
64KiB for SPL itself, which is our max size, unconditionally set above
this bit of context.  But it is the lowest common denominator in terms
of IRAM size in the families.

Which brings us to the SPL_PAD_TO above, 68KiB.  We cannot go lower than
this.  No one is changing any of this either today nor setting
SPL_PAD_TO so
u-boot-with-spl.imx isn't usable today.  None of this breaks using
separate files.

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

  reply	other threads:[~2016-11-15 16:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-15  2:06 [U-Boot] [PATCH] arm: mx6: specify SPL padding Stefan Agner
2016-11-15  9:59 ` Max Krummenacher
2016-11-15 16:12   ` Tom Rini [this message]
2016-11-15 17:42     ` Stefan Agner
2016-11-15 18:04       ` Marek Vasut
2016-11-15 18:04         ` Stefan Agner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161115161201.GU27304@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox