在PandaBoard ES上启用denx u-boot 2015.04的调试模式



我想为denx u-boot 2015.04启用调试模式。但是,我在config.mk中找不到-DDEBUG开关或类似的东西。我还试图通过将#define DEBUG添加到arch/arm/cpu/armv7中的几个[emif-common.c](https://github.com/malvira/uboot/blob/master/arch/arm/cpu/armv7/omap-common/emif-common.c)文件来在本地启用调试,但没有成功。

为我添加:

#ifndef DEBUG
#define DEBUG
#endif

在文件/include/common.h中工作。

从U-boot v2023.01开始,添加以下内容:

 --- a/include/common.h
 +++ b/include/common.h
 @@ -12,6 +12,8 @@
  #ifndef __COMMON_H_
  #define __COMMON_H_    1
 
 +#define LOG_DEBUG
 +
  #ifndef __ASSEMBLY__       /* put C only stuff in this section */
  #include <config.h>
  #include <errno.h>

然后使用以下更改重新编译u-boot.itb:

make CROSS_COMPILE=aarch64-linux-gnu- u-boot.itb

注意:u-boot-tpl.bin等其他部分不应使用此更改进行编译,否则您将得到:

aarch64-linux-gnu-ld.bfd: arch/arm/lib/reset.o: in function `do_reset':
/u-boot/arch/arm/lib/reset.c:42: undefined reference to `reset_cpu'
/u-boot/arch/arm/lib/reset.c:42:(.text.do_reset+0x24): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `reset_cpu'

最新更新