Freescale u-boot 开启DEBUG或添加打印信息后无法正常运行(I.MX 6Q)

背景:

直接在bootlaoder中编译生成u-boot.bin下载到RAM中运行,u-boot无法正常运行。

在u-boot中添加代码(不含打印)可以直接在RAM中加载运行,只要添加了puts或者printf就无法正常运行。

解决:

不要直接使用u-boot.bin,使用xxx.imx标识的u-boot。若环境是android,那在android体系下,进行编译最好。

原因:

     The difference between u-boot.bin and u-boot.imx is the IVT header. 
 and put it in front of u-boot.bin. This IVT header is for our boot ROM to
 identify the u-boot's location & function etc...

     The parameter "imximage" means telling mkimage tool to generate a
 imx uboot image, which means to put a header defined by image_type_params,
 it is actually u-boot.bin with a imx IVT header which include header, DCD/plugin.
 For more detail, you can refer to:
 tools/imximage.c

    ROM will read first IVT header to identify which mode need to execute,
DCD or PLUG, if DCD mode, then where to find the DRAM config data,
and after DRAM configured, where to read the reset uboot image and where to
put this image, in which DRAM address etc.

    The Image Vector Table (IVT) is the data structure that the ROM reads from
components to perform a successful boot.

    The IVT includes the program image entry point, a pointer to Device 
Configuration Data (DCD) and other pointers used by the ROM during the boot process.
The ROM locates the IVT at a fixed address that is determined by the boot 
device connected to the Chip. The IVT offset from the base address and
initial load region size for each boot device type is defined in the 
table below. The location of the IVT is the only fixed requirement 
determined by the contents of the IVT.

这里写图片描述
这里写图片描述

猜你喜欢

转载自blog.csdn.net/lugandong/article/details/49252187