ms-iot / imx-iotcore

Windows 10 IoT Core BSP for NXP i.MX Processors
MIT License
64 stars 40 forks source link

Problem while building flash.bin for NXPEVK_iMX8M_Mini_2GB #128

Closed ShiaujiuanChen closed 5 years ago

ShiaujiuanChen commented 5 years ago

Build NXPEVK_iMX8M_Mini_2GB flash.bin according to the steps of Building and Updating Firmware for ARM64

Linux environment: Linux Virtual Machine

U-Boot

make _imx8mm_evk_ntdefconfig make

Arm Trusted Firmware

make PLAT=imx8mm SPD=opteed bl31

OP-TEE OS

make PLATFORM=imx PLATFORM_FLAVOR=mx8mmevk \ CFG_TEE_CORE_DEBUG=y CFG_TEE_CORE_LOG_LEVEL=3 CFG_UART_BASE=0x30890000 \ CFG_RPMB_FS=y CFG_RPMB_TESTKEY=y CFG_RPMB_WRITE_KEY=y CFG_REE_FS=n \ CFG_TA_DEBUG=y CFG_TEE_CORE_TA_TRACE=1 CFG_TEE_TA_LOG_LEVEL=2 \ CFG_IMXCRYPT=y CFG_CORE_HEAP_SIZE=98304

Imx-mkimage

cp ../../firmware-imx-8.1/firmware/ddr/synopsys/lpddr4_pmutrain*.bin . cp ../../firmware-imx-8.1/firmware/hdmi/cadence/signed_hdmi_imx8m.bin . cp ../../optee_os/out/arm-plat-imx/tee.bin . cp ../../imx-atf/build/imx8mm/release/bl31.bin . cp ../../u-boot/u-boot-nodtb.bin . cp ../../u-boot/spl/u-boot-spl.bin . cp ../../u-boot/arch/arm/dts/fsl-imx8mm-evk.dtb . cp ../../u-boot/tools/mkimage .

make SOC=_iMX8MM flash_spluboot

What are the problems with these steps?

neilsh-msft commented 5 years ago

There are two issues: 1: ATF reserves the UART we use for boot output and kernel debugging for trust zone. Apply the following patch to ATF: index aa1c336e..db97553a 100644 --- a/plat/imx/imx8mm/imx8mm_bl31_setup.c +++ b/plat/imx/imx8mm/imx8mm_bl31_setup.c @@ -310,8 +310,8 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,

    /* Assign M4 to domain 1 */
    mmio_write_32(IMX_RDC_BASE + 0x204, 0x1);

2: mkimage for imx8mm should not have signed_hdmi_imx8m.bin. The iMX8M Mini platform does not have an integrated HDMI controller on the SOC. Remove the file from your mkimage directory and rebuild.

ShiaujiuanChen commented 5 years ago

Hi, @neilsh-msft ,

Thank you very much.