summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAriel D'Alessandro <ariel.dalessandro@collabora.com>2021-09-30 10:31:17 -0300
committerStefano Babic <sbabic@denx.de>2021-10-21 13:59:26 +0200
commit56ced770999bd14cd940e07239f4197852460142 (patch)
treec6341fa474860245a5d6cb26b14d08a94165fa2e /tools
parentb5a2a764547d478a3ea513bcc8c463c041ca8696 (diff)
downloadu-boot-56ced770999bd14cd940e07239f4197852460142.tar.gz
u-boot-56ced770999bd14cd940e07239f4197852460142.tar.bz2
u-boot-56ced770999bd14cd940e07239f4197852460142.zip
tools: imx8m_image: Support ddr3 firmware
Some boards use ddr3, not ddr4, so we need to check ddr3 firmware. Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/imx8m_image.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/imx8m_image.sh b/tools/imx8m_image.sh
index ba60104443..4ab3116ee0 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