[Buildroot] [PATCH 2/2] u-boot: add support for full image socfpga mkpimage support

Lionel Flandrin lionel at svkt.org
Mon Feb 13 14:57:16 UTC 2017


On Mon, Feb 13, 2017 at 03:27:47PM +0100, Thomas Petazzoni wrote:
> Hello,

Hello Thomas,

> Thanks for this new iteration!
> 
> On Mon, 13 Feb 2017 14:59:34 +0100, Lionel Flandrin wrote:
> 
> >  ifeq ($(BR2_TARGET_UBOOT_ALTERA_SOCFPGA_IMAGE_CRC),y)
> > +ifeq ($(BR2_TARGET_UBOOT_SPL),y)
> > +UBOOT_CRC_ALTERA_SOCFPGA_INPUT_IMAGES = $(call qstrip,$(BR2_TARGET_UBOOT_SPL_NAME))
> > +UBOOT_CRC_ALTERA_SOCFPGA_HEADER_VERSION = 0
> > +else
> > +UBOOT_CRC_ALTERA_SOCFPGA_INPUT_IMAGES = u-boot-dtb.bin
> > +UBOOT_CRC_ALTERA_SOCFPGA_HEADER_VERSION = 1
> > +endif
> 
> So when the SPL is used, the header version should always be 0, and
> when the full U-Boot is used directly, the header version should always
> be 1 ?
> 
> I thought 0 was for older SoCs, and 1 for newer SoCs. Or are we sure
> that SPL booting will only ever be used on older SoCs, and direct U-Boot
> booting will only be used on newer SoCs ?

Yeah I considered adding an option for selecting the version,
technically it could go either way but in practice I can't think of a
situation where you'd want a v1 header with a SPL or vice versa.

Basically:
Cyclone V/Arria V ->  64K internal RAM + header v0
Arria 10          -> 256K internal RAM + header v1

I believe the main reason for the v1 header is simply to allow file
sizes greater than 64k.

Unless you managed to create a full u-boot build smaller than 64K
you'd never be able to make a v0 image without SPL.

You could technically create a v1 SPL image (which the current
Makefile wouldn't allow) but I'm not sure why anybody would want that.

So I thought adding an option might end up being more confusing than
helpful even if it results in a bit of "magic" in the makefile.


On a completely unrelated tangent: I kept the previous naming
convention for the resulting image, which creates ".crc"
files. Changing this would break build systems that use the SPL images
but I thought it was a rather unexpected extension for these files. My
previous patch used ".mkpimage". Altera uses "-mkpimage.bin".

That being said it might not be worth breaking people's builds over
that.

> Thomas

-- 
Lionel Flandrin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20170213/cb2bc337/attachment-0002.asc>


More information about the buildroot mailing list