From eaa90c75a6b4981dbbb15e3ebf851c056bf015c9 Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Sun, 02 Jun 2024 00:36:41 +0800
Subject: [PATCH] Build:IGKBoard-All: Update bootloader shell script for i.MX8MM Board

---
 bootloader/build.sh |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/bootloader/build.sh b/bootloader/build.sh
index 90be466..8548b78 100755
--- a/bootloader/build.sh
+++ b/bootloader/build.sh
@@ -92,6 +92,10 @@
 
         export FMW_IMX=firmware-imx-8.21
 
+    elif [[ $BSP_VER =~ 5.15.71 ]] ;  then
+
+        export FMW_IMX=firmware-imx-8.18
+
     fi
 
     export FMWS="$FMW_IMX"
@@ -136,6 +140,7 @@
         IMXBOOT_TARGETS=flash_ddr4_evk
         IMXBOOT_DTB=imx8mm-ddr4-evk.dtb
         MKIMG_BIN_PATH=$PRJ_PATH/imx-mkimage/iMX8M/
+        IMXBOOT_ARGS="REV=A2"
 
     fi
 }
@@ -369,11 +374,17 @@
         pr_info "Copy DDR4 firmware to $MKIMG_BIN_PATH"
 
         cp $FMW_PATH/firmware-imx-*/firmware/hdmi/cadence/signed_hdmi_imx8m.bin $MKIMG_BIN_PATH
+
+        # IGKBoard-IMX8MP Board
         cp $FMW_PATH/firmware-imx-*/firmware/ddr/synopsys/lpddr4_pmu_train_[1-2]d_imem_202006.bin $MKIMG_BIN_PATH
         cp $FMW_PATH/firmware-imx-*/firmware/ddr/synopsys/lpddr4_pmu_train_[1-2]d_dmem_202006.bin $MKIMG_BIN_PATH
+
+        # STCRBoard-IMX8MM Board
+        cp $FMW_PATH/firmware-imx-*/firmware/ddr/synopsys/ddr4_imem_[1-2]d*.bin $MKIMG_BIN_PATH
+        cp $FMW_PATH/firmware-imx-*/firmware/ddr/synopsys/ddr4_dmem_[1-2]d*.bin $MKIMG_BIN_PATH
     fi
 
-    make SOC=$IMX_BOOT_SOC_TARGET $IMXBOOT_TARGETS
+    make SOC=$IMX_BOOT_SOC_TARGET $IMXBOOT_ARGS $IMXBOOT_TARGETS
 
     cp $MKIMG_BIN_PATH/flash.bin u-boot-${BOARD}.imx
     chmod a+x u-boot-${BOARD}.imx

--
Gitblit v1.9.1