@@ -1606,8 +1606,14 @@ spl/u-boot-splx4.sfp: spl/u-boot-spl.sfp FORCE
$(call if_changed,gensplx4)
quiet_cmd_socboot = SOCBOOT $@
-cmd_socboot = cat spl/u-boot-splx4.sfp u-boot.img > $@ || { rm -f $@; false; }
-u-boot-with-spl.sfp: spl/u-boot-splx4.sfp u-boot.img FORCE
+cmd_socboot = $(OBJCOPY) -I binary -O binary --gap-fill=0x0 \
+ --pad-to=$(CONFIG_SPL_PAD_TO) \
+ spl/u-boot-spl.sfp spl/u-boot-spl.sfp && \
+ cat spl/u-boot-spl.sfp spl/u-boot-spl.sfp \
+ 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)
quiet_cmd_gensplpadx4 = GENSPLPADX4 $@