%.scif: %.srec
$(Q)$(MAKE) $(build)=arch/arm/mach-renesas $@
+%.shdr: %.srec
+ $(Q)$(MAKE) $(build)=arch/arm/mach-renesas $@
+
OBJCOPYFLAGS_u-boot-nodtb.bin := -O binary \
$(if $(CONFIG_X86_16BIT_INIT),-R .start16 -R .resetvec) \
$(if $(CONFIG_MPC85XX_HAVE_RESET_VECTOR),$(if $(CONFIG_OF_SEPARATE),-R .bootpg -R .resetvec))
-Output_Block_Size 16 \
-generate 0x18402010 0x18402014 $(srec_cat_le_cmd) $(CONFIG_SYS_UBOOT_START) 4 \
-generate 0x18402014 0x18402018 $(srec_cat_le_cmd) 0x1ef000 4
+
+quiet_cmd_srec_shdr_cat = SRECCAT $@
+ cmd_srec_shdr_cat = srec_cat -output $@ -M 8 \
+ -Output_Block_Size 16 \
+ -generate 0x18400000 0x18400004 $(srec_cat_le_cmd) 0x00000003 4 \
+ -generate 0x18400004 0x18400008 $(srec_cat_le_cmd) 0x0 4 \
+ -generate 0x18402000 0x18402004 $(srec_cat_le_cmd) 0x6b657963 4 \
+ -generate 0x18402004 0x18402008 $(srec_cat_le_cmd) 0x00010010 4 \
+ -generate 0x18402008 0x1840200c $(srec_cat_le_cmd) 0x0 4 \
+ -generate 0x1840200c 0x18402010 $(srec_cat_le_cmd) 0x34040000 4 \
+ -generate 0x18402010 0x18402014 $(srec_cat_le_cmd) $(CONFIG_SYS_UBOOT_START) 4 \
+ -generate 0x18402014 0x18402018 $(srec_cat_le_cmd) 0x1ef000 4 \
+ -generate 0x18402018 0x1840201c $(srec_cat_le_cmd) 0x0 4 \
+ -generate 0x1840201c 0x18402020 $(srec_cat_le_cmd) 0x0 4
else
ifneq ($(CONFIG_RCAR_GEN4),)
quiet_cmd_srec_cat = SRECCAT $@
u-boot-elf.scif: u-boot-elf.srec u-boot.bin
$(call cmd,srec_cat,$(shell wc -c u-boot-dtb.bin | awk '{printf("0x%08x\n",$$1)}'))
+u-boot-elf.shdr: u-boot-elf.srec u-boot.bin
+ $(call cmd,srec_shdr_cat,$(shell wc -c u-boot-dtb.bin | awk '{printf("0x%08x\n",$$1)}'))
+
# if srec_cat is present build u-boot-spl.scif by default
has_srec_cat = $(call try-run,srec_cat -VERSion,y,n)
INPUTS-$(has_srec_cat) += u-boot-spl.scif