diff options
author | Steffen Trumtrar <s.trumtrar@pengutronix.de> | 2018-07-31 12:44:39 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-08-08 09:22:48 +0200 |
commit | 8a680e3c9b5dd8470b7437654877d5439e9a6407 (patch) | |
tree | d2ca86ad8029b3b70c5754cbdc43618740b5f5d9 /images/Makefile.socfpga | |
parent | 1466d7d0e485fe43258aea423d2e4deba7d83c1e (diff) | |
download | barebox-8a680e3c9b5dd8470b7437654877d5439e9a6407.tar.gz barebox-8a680e3c9b5dd8470b7437654877d5439e9a6407.tar.xz |
ARM: socfpga: Arria10: support programming FPGA in PBL
Some Arria10 boards don't have the FPGA programmed externally.
Instead barebox needs to do that. As the Arria10 has the SDRAM
controller in the FPGA, the first thing we need to do is,
configure the FPGA before the SDRAM can even be used.
It works like this:
1. boot ROM fetches the PBL from MMC
2. read the MBR from MMC (this depends on the setup done by the boot ROM)
3. read the Bitstream from the MMC and program the FPGA
4. re-read the barebox image from MMC, this time with the full barebox
that is appended to the PBL
5. jump into the full barebox
Only supported boot device is eMMC.
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'images/Makefile.socfpga')
-rw-r--r-- | images/Makefile.socfpga | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/images/Makefile.socfpga b/images/Makefile.socfpga index 60b98d1ef2..bba01a38b2 100644 --- a/images/Makefile.socfpga +++ b/images/Makefile.socfpga @@ -13,6 +13,17 @@ quiet_cmd_socfpga_image = SOCFPGA-IMG $@ $(obj)/%.socfpgaimg: $(obj)/% FORCE $(call if_changed,socfpga_image) +ocram-tmp = $(subst $(comma),_,$(dot-target).ocram.tmp) + +quiet_cmd_socfpga_ocram_img ?= SOCFPGA-OCRAM-IMG $@ + cmd_socfpga_ocram_img ?= cat $(obj)/$(patsubst %.socfpga-ocram-img,%.pblb,$(2)) > $(ocram-tmp); \ + $(call size_append, $(obj)/barebox.z) >> $(ocram-tmp); \ + $(objtree)/scripts/socfpga_mkimage -v1 -b -s -o $@ $(ocram-tmp); \ + cat $(obj)/barebox.z >> $@ + +$(obj)/%.socfpga-ocram-img: $(obj)/%.pblb $(obj)/barebox.z FORCE + $(call if_changed,socfpga_ocram_img,$(@F)) + # ----------------------- Cyclone5 based boards --------------------------- pblx-$(CONFIG_MACH_SOCFPGA_ALTERA_SOCDK) += start_socfpga_socdk_xload FILE_barebox-socfpga-socdk-xload.img = start_socfpga_socdk_xload.pblx.socfpgaimg |