guowenxue
2024-07-17 35deaefe2a198508903c5657a0fa7cb2ad60f56d
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
}
@@ -160,7 +165,7 @@
            # Download source code packet
            if [ ! -s $TARBALL_PATH/$src.tar.xz ] ; then
                wget $BSP_URL/bsp/$BSP_VER/$src.tar.xz -P $TARBALL_PATH
                wget $BSP_URL/imx/bsp/$BSP_VER/$src.tar.xz -P $TARBALL_PATH
            fi
            # decompress source code packet
@@ -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