[PATCH v2] Makefile: socfpga: Generate spl/u-boot-splx4.sfp with 4 SPL images
Ang, Chee Hong
chee.hong.ang at intel.com
Tue Aug 11 13:34:06 CEST 2020
> On 8/11/20 10:01 AM, Chee Hong Ang wrote:
> > Generate spl/u-boot-splx4.sfp which consist of 4 SPL images required
> > for booting up Cyclone5/Arria10.
> >
> > For Cyclone5 using NAND flash image layout for 128 KB memory blocks,
> > 'make u-boot-with-nand-spl.sfp' to generate spl/u-boot-nand-splx4.sfp
> > which contains four 128KB SPL images (each 64KB SPL is followed by
> > 64KB of zero-padding).
> >
> > Signed-off-by: Chee Hong Ang <chee.hong.ang at intel.com>
> > ---
>
> What changed between V1 and V2 ? Changelog is missing.
In V2, 'make u-boot-with-nand-spl.sfp' will generate spl/u-boot-nand-splx4.sfp which contains 4 x (SPL + 64KB padding).
Commit message already mentioned how to generate this SFP file with 64Kb padding for each SPL in SFP.
>
> > Makefile | 11 +++++++----
> > 1 file changed, 7 insertions(+), 4 deletions(-)
> >
> > diff --git a/Makefile b/Makefile
> > index 4483a9b..f4631f1 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -1582,8 +1582,9 @@ u-boot.spr: spl/u-boot-spl.img u-boot.img FORCE
> > ifneq ($(CONFIG_ARCH_SOCFPGA),) quiet_cmd_socboot = SOCBOOT $@
> > cmd_socboot = cat spl/u-boot-spl.sfp spl/u-boot-spl.sfp \
> > - spl/u-boot-spl.sfp spl/u-boot-spl.sfp \
> > - u-boot.img > $@ || rm -f $@
> > + spl/u-boot-spl.sfp \
> > + spl/u-boot-spl.sfp > spl/u-boot-splx4.sfp ; \
> > + cat spl/u-boot-splx4.sfp u-boot.img > $@ || rm -f $@
> > u-boot-with-spl.sfp: spl/u-boot-spl.sfp u-boot.img FORCE
> > $(call if_changed,socboot)
>
> Also, now that I look at it, if you want to generate some new target, it
> should be a Makefile target, just like u-boot-with-spl.sfp is a Makefile target.
> So then you can do make <target>.
There is already a target 'u-boot-with-nand-spl.sfp' in Makefile:
u-boot-with-nand-spl.sfp: spl/u-boot-spl.sfp u-boot.img FORCE
$(call if_changed,socnandboot)
V2 patch contains the following changes as well which are missing in this email thread:
@@ -1592,8 +1593,10 @@ cmd_socnandboot = dd if=/dev/zero of=spl/u-boot-spl.pad bs=64 count=1024 ; \
cat spl/u-boot-spl.sfp spl/u-boot-spl.pad \
spl/u-boot-spl.sfp spl/u-boot-spl.pad \
spl/u-boot-spl.sfp spl/u-boot-spl.pad \
- spl/u-boot-spl.sfp spl/u-boot-spl.pad \
- u-boot.img > $@ || rm -f $@ spl/u-boot-spl.pad
+ spl/u-boot-spl.sfp \
+ spl/u-boot-spl.pad > spl/u-boot-nand-splx4.sfp ; \
+ cat spl/u-boot-nand-splx4.sfp u-boot.img > $@ || \
+ rm -f $@ spl/u-boot-spl.pad
u-boot-with-nand-spl.sfp: spl/u-boot-spl.sfp u-boot.img FORCE
$(call if_changed,socnandboot)
More information about the U-Boot
mailing list