u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
* [PATCH] tools: imx8m_image: Support ddr3 firmware
@ 2021-09-30 13:31 Ariel D'Alessandro
  2021-10-14 12:14 ` Ariel D'Alessandro
  2021-10-21 14:13 ` sbabic
  0 siblings, 2 replies; 4+ messages in thread
From: Ariel D'Alessandro @ 2021-09-30 13:31 UTC (permalink / raw)
  To: u-boot; +Cc: peng.fan

Some boards use ddr3, not ddr4, so we need to check ddr3 firmware.

Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
---
 tools/imx8m_image.sh | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tools/imx8m_image.sh b/tools/imx8m_image.sh
index ba601044435..4ab3116ee00 100755
--- a/tools/imx8m_image.sh
+++ b/tools/imx8m_image.sh
@@ -41,6 +41,13 @@ if [ $post_process = 1 ]; then
 		cat spl/u-boot-spl-pad.bin ddr4_1d_fw.bin ddr4_2d_fw.bin > spl/u-boot-spl-ddr.bin
 		rm -f ddr4_1d_fw.bin ddr4_2d_fw.bin ddr4_imem_1d_pad.bin ddr4_dmem_1d_pad.bin ddr4_imem_2d_pad.bin spl/u-boot-spl-pad.bin
 	fi
+	if [ -f ddr3_imem_1d.bin ]; then
+		objcopy -I binary -O binary --pad-to 0x8000 --gap-fill=0x0 ddr3_imem_1d.bin ddr3_imem_1d_pad.bin
+		cat ddr3_imem_1d_pad.bin ddr3_dmem_1d.bin > ddr3_1d_fw.bin
+		dd if=spl/u-boot-spl.bin of=spl/u-boot-spl-pad.bin bs=4 conv=sync
+		cat spl/u-boot-spl-pad.bin ddr3_1d_fw.bin > spl/u-boot-spl-ddr.bin
+		rm -f ddr3_1d_fw.bin ddr3_imem_1d_pad.bin spl/u-boot-spl-pad.bin
+	fi
 fi
 
 exit 0
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-21 14:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-30 13:31 [PATCH] tools: imx8m_image: Support ddr3 firmware Ariel D'Alessandro
2021-10-14 12:14 ` Ariel D'Alessandro
2021-10-21  8:05   ` Stefano Babic
2021-10-21 14:13 ` sbabic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).