]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
tools: imx8m_image: Support ddr3 firmware
authorAriel D'Alessandro <ariel.dalessandro@collabora.com>
Thu, 30 Sep 2021 13:31:17 +0000 (10:31 -0300)
committerStefano Babic <sbabic@denx.de>
Thu, 21 Oct 2021 11:59:26 +0000 (13:59 +0200)
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

index ba6010444353acb04f80bb5b6f6affa48a8792bb..4ab3116ee003153635acaded32f295b599be1567 100755 (executable)
@@ -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