uboot 打开log 的 方法

uboot 版本

commit f919c3a889f0ec7d63a48b5d0ed064386b0980bd (HEAD -> v2024.10, tag: v2024.10)

Author: Tom Rini <trini@konsulko.com>

Date: Mon Oct 7 08:54:35 2024 -0600

Prepare v2024.10

Signed-off-by: Tom Rini <trini@konsulko.com>

开启的选项:

CONFIG_DEBUG_UART=y

git diff include/log.h

diff --git a/include/log.h b/include/log.h

index fc0d598447..908f9c015f 100644

--- a/include/log.h

+++ b/include/log.h

@@ -184,6 +184,7 @@ int _log_buffer(enum log_category_t cat, enum log_level_t level,

#define log_io(_fmt...) log(LOG_CATEGORY, LOGL_DEBUG_IO, ##_fmt)

#define log_cont(_fmt...) log(LOGC_CONT, LOGL_CONT, ##_fmt)

+#define LOG_DEBUG

#ifdef LOG_DEBUG

#define _LOG_DEBUG LOGL_FORCE_DEBUG

#ifndef DEBUG

没有开启log时:

No serial driver found

resetting ...

reset not supported yet

ERROR ### Please RESET the board

开启log打印之后

spl_early_init

size=30, ptr=30, limit=4000: 801dc000

common/malloc_simple.c:26-alloc_simple() size=30, ptr=60, limit=4000: common/malloc_simple.c:47-malloc_simple() 801dc030

common/malloc_simple.c:26-alloc_simple() size=98, ptr=f8, limit=4000: common/malloc_simple.c:47-malloc_simple() 801dc060

drivers/core/lists.c:216-lists_bind_fdt() bind node chosen

drivers/core/lists.c:221-lists_bind_fdt() Device 'chosen' has no compatible string

common/malloc_simple.c:26-alloc_simple() size=30, ptr=128, limit=4000: common/malloc_simple.c:47-malloc_simple() 801dc0f8

No serial driver found

resetting ...

reset not supported yet

ERROR ### Please RESET the board

相关推荐
高兴达几秒前
Spring boot入门工程
java·spring boot·后端
萧曵 丶2 分钟前
Spring @TransactionalEventListener
java·数据库·spring·事务·transactional·异步
笑衬人心。2 分钟前
HTTPS详解:原理 + 加解密过程 + 面试问答
java·网络协议·http·面试·https
蓝澈11214 分钟前
弗洛伊德(Floyd)算法-各个顶点之间的最短路径问题
java·数据结构·动态规划
再见晴天*_*13 分钟前
logback 日志不打印
java·服务器·logback
伍哥的传说15 分钟前
鸿蒙系统(HarmonyOS)应用开发之手势锁屏密码锁(PatternLock)
前端·华为·前端框架·harmonyos·鸿蒙
yugi98783817 分钟前
前端跨域问题解决Access to XMLHttpRequest at xxx from has been blocked by CORS policy
前端
幽络源小助理21 分钟前
SpringBoot基于JavaWeb的城乡居民基本医疗信息管理系统
java·spring boot·学习
欧阳有财24 分钟前
[java八股文][Mysql面试篇]日志
java·mysql·面试
浪裡遊28 分钟前
Sass详解:功能特性、常用方法与最佳实践
开发语言·前端·javascript·css·vue.js·rust·sass