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

相关推荐
QQ511008285几秒前
基于区块链的个人医疗咨询挂号信息系统vue
前端·vue.js·区块链
项目帮几秒前
Java毕设选题推荐:基于springboot区块链的电子病历数据共享平台设计与实现【附源码、mysql、文档、调试+代码讲解+全bao等】
java·spring boot·课程设计
心有—林夕20 分钟前
两个事务间的传播机制
java·事务
疯狂成瘾者23 分钟前
什么是多 Agent,多Agent是如何协作的?
java
he___H30 分钟前
Spring中的设计模式
java·spring·设计模式
liuyao_xianhui37 分钟前
优选算法_最小基因变化_bfs_C++
java·开发语言·数据结构·c++·算法·哈希算法·宽度优先
做一个AK梦38 分钟前
计算机系统概论知识点(软件设计师)
java·开发语言
東雪木1 小时前
Java学习——一访问修饰符(public/protected/default/private)的权限控制本质
java·开发语言·学习·java面试
两点王爷1 小时前
docker 创建和使用存储卷相关内容
java·docker·容器
boonya1 小时前
Embedding模型与向量维度动态切换完整方案
java·数据库·embedding·动态切换大模型