From mboxrd@z Thu Jan 1 00:00:00 1970 From: Max Krummenacher Date: Tue, 15 Nov 2016 09:59:22 +0000 Subject: [U-Boot] [PATCH] arm: mx6: specify SPL padding In-Reply-To: <20161115020612.32725-1-stefan@agner.ch> References: <20161115020612.32725-1-stefan@agner.ch> Message-ID: <1479203961.1664.16.camel@toradex.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Stefan On Mon, 2016-11-14 at 18:06 -0800, Stefan Agner wrote: > From: Stefan Agner > > 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 > > --- > > ?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. Max P.S. Sorry for the noise to your individual mail addresses, I had issues getting to the mailinglist through gmane.