From: Dalon L Westergreen <dalon.westergreen@linux.intel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 2/2] spl: socfpga: stratix10: add hex file output for spl image
Date: Thu, 06 Sep 2018 06:49:15 -0700 [thread overview]
Message-ID: <705152dca08523a6ddad700fd3edb559a26675aa.camel@linux.intel.com> (raw)
In-Reply-To: <CAAh8qsxM0rQzpewXw1DcniKc9bzH_o6MA0KZYwJTKWM4ofj-hQ@mail.gmail.com>
On Thu, 2018-09-06 at 07:51 +0200, Simon Goldschmidt wrote:
> On Thu, Sep 6, 2018 at 5:04 AM Dalon Westergreen <dwesterg@gmail.com> wrote:
>
> Stratix10 requires a hex image of the spl for boot. The heximage is added to
> the FPGA configuration image and loaded tothe processor memory by the
> configuration engine.
> Although not running a Stratix10, I also need a hex image for spl toboot
> unconfigured CycloneV devices.However, for this, it is enough to objcopy u-
> boot.spl.sfp to hex andadd the resulting file to the FPGA configuration image.
> Quartus does complain about the format a bit, but it does work. Isthis
> different for Stratix10?
The difference is that in stratix10 the SDM loads the spl image into the HPS
onchip ram. The SPL image is actually a part of the fpga configuration
image. The tool that adds the image to the fpga configuration image validates
its address span, so using objcopy on the binary requires a --change-
address. Since the file is always needed for stratix10, it seems prudent to
generate it as part of the build.
> Simon
>
> v2: -> add CONFIG_OF_EMBED to include dtb in elf -> generate hex from elf
> source
> Signed-off-by: Dalon Westergreen <dwesterg@gmail.com>---
> configs/socfpga_stratix10_defconfig | 1 +
> scripts/Makefile.spl | 6 ++++++ 2 files changed, 7
> insertions(+)
> diff --git a/configs/socfpga_stratix10_defconfig
> b/configs/socfpga_stratix10_defconfigindex dceadff439..17cc732cbe 100644---
> a/configs/socfpga_stratix10_defconfig+++
> b/configs/socfpga_stratix10_defconfig@@ -56,3 +56,4 @@ CONFIG_DM_USB=y
> CONFIG_USB_DWC2=y CONFIG_USB_STORAGE=y
> CONFIG_USE_TINY_PRINTF=y+CONFIG_OF_EMBED=ydiff --git a/scripts/Makefile.spl
> b/scripts/Makefile.splindex 76d08fd92b..b09bd40b2a 100644---
> a/scripts/Makefile.spl+++ b/scripts/Makefile.spl@@ -190,6 +190,7 @@ endif
> ifdef CONFIG_ARCH_SOCFPGA ALL-$(CONFIG_TARGET_SOCFPGA_GEN5) +=
> $(obj)/$(SPL_BIN).sfp ALL-$(CONFIG_TARGET_SOCFPGA_ARRIA10) +=
> $(obj)/$(SPL_BIN).sfp+ALL-$(CONFIG_TARGET_SOCFPGA_STRATIX10) +=
> $(obj)/$(SPL_BIN).hex endif
> ifdef CONFIG_ARCH_SUNXI@@ -299,6 +300,11 @@ OBJCOPYFLAGS_u-boot-x86-16bit-
> spl.bin := -O binary -j .start16 -j .resetvec $(obj)/u-boot-x86-16bit-spl.bin:
> $(obj)/u-boot-spl FORCE $(call if_changed,objcopy)
> +OBJCOPYFLAGS_$(SPL_BIN).hex = -O ihex++$(obj)/$(SPL_BIN).hex:
> $(obj)/$(SPL_BIN) FORCE+ $(call if_changed,objcopy)+ LDFLAGS_$(SPL_BIN)
> += -T u-boot-spl.lds $(LDFLAGS_FINAL)
> # Avoid 'Not enough room for program headers' error on binutils 2.28
> onwards.--2.17.1
> _______________________________________________U-Boot mailing listU-
> Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot_______________________________________________U-Boot
> mailing listU-Boot at lists.denx.dehttps://lists.denx.de/listinfo/u-boot
next prev parent reply other threads:[~2018-09-06 13:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-06 3:02 [U-Boot] [PATCH v2 1/2] spl: socfpga: only gen5 devices and arria10 require sfp image Dalon Westergreen
2018-09-06 3:02 ` [U-Boot] [PATCH v2 2/2] spl: socfpga: stratix10: add hex file output for spl image Dalon Westergreen
2018-09-06 5:51 ` Simon Goldschmidt
2018-09-06 13:49 ` Dalon L Westergreen [this message]
2018-09-06 10:09 ` Marek Vasut
2018-09-06 13:39 ` Dalon L Westergreen
2018-09-06 13:41 ` Marek Vasut
2018-09-06 17:40 ` Dalon L Westergreen
2018-09-06 18:16 ` Marek Vasut
2018-09-06 21:26 ` Dalon L Westergreen
2018-09-06 21:56 ` Marek Vasut
2018-09-07 16:15 ` Dalon L Westergreen
2018-09-07 16:25 ` Marek Vasut
2018-09-07 16:40 ` Dalon L Westergreen
2018-09-07 17:36 ` Marek Vasut
2018-09-07 18:02 ` Westergreen, Dalon
2018-09-07 18:17 ` Marek Vasut
2018-09-06 10:08 ` [U-Boot] [PATCH v2 1/2] spl: socfpga: only gen5 devices and arria10 require sfp image Marek Vasut
2018-09-06 13:30 ` Dalon L Westergreen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=705152dca08523a6ddad700fd3edb559a26675aa.camel@linux.intel.com \
--to=dalon.westergreen@linux.intel.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox