工具/软件:
您好、TI 专家
现在、我们应该在 u-boot-spl 中禁用网络安全的注销。
我们跟踪了 printf 函数将调用 putc 函数以在控制台中注销。
我们使用基于 SDK 10.01 的 u-boot-spl 源代码为 ti-u-boot-2024.04/。
我们发现 printf 函数在 lib/tiny-printf.c 中定义
但我们找不到 putc 函数的定义位置。
所以我不明白如何能够成功构建映像。
如何禁用 u-boot-spl 中的日志输出?
谢谢
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
工具/软件:
您好、TI 专家
现在、我们应该在 u-boot-spl 中禁用网络安全的注销。
我们跟踪了 printf 函数将调用 putc 函数以在控制台中注销。
我们使用基于 SDK 10.01 的 u-boot-spl 源代码为 ti-u-boot-2024.04/。
我们发现 printf 函数在 lib/tiny-printf.c 中定义
但我们找不到 putc 函数的定义位置。
所以我不明白如何能够成功构建映像。
如何禁用 u-boot-spl 中的日志输出?
谢谢
从 79d8deb5582ff7881b3b2cfa926401bf24bcd0c6 开始、星期一、9 月 17 日 00:00:00,2001 年
出发地:“Toby.jin"</s>“
日期:2025 年 9 月 11 日星期四 17:09:05 +0800
主题:[补丁 2/4]在引导期间禁用注销
——
common/board_f.c | 1 +
configs/am62ax_evm_a53_defconfig | 1 +
lib/tiny-printf.c | 2 +-
3 个文件已更改、3 个插入 (+)、1 个删除 (-)
diff -git a/common/board_f.c b/common/board_f.c
索引 442b8349..e77252B0 100644
/common/board_f.c
++ b/common/board_f.c
@@–320、6 +320、7 @@μ W _weak int arch_cpu_init (void)
__weak int mach_cpu_init (void)
{
+ gd->flags |= GD_FLG_disable_console;
返回 0;
}
diff -git a/configs/am62ax_evm_a53_defconfig b/configs/am62ax_evm_a53_defconfig
索引 fbb4d933..e4da907a 100644.
-- a/configs/am62ax_evm_a53_defconfig
++ b/configs/am62ax_evm_a53_defconfig
@@–147、6 +147、7 @@ CONFIG_AVB_BUF_SIZE=0x00200000
CONFIG_CMD_AVB=y
config_fit_print=n
CONFIG_MISC_INIT_R=y
+CONFIG_DISABLE_CONSOLE=y
#include
#include
diff -git a/lib/tiny-printf.c b/lib/tiny-printf.c
索引 9a70c609..d09b43af 100644.
--- a/lib/tiny-printf.c
++ b/lib/tiny-printf.c
@@–329、7 +329、7 @@中止:
#if CONFIG_IS_ENABLED (printf)
静态 void putc_normal (struct printf_info *info、char ch)
{
- putc(ch);
+// putc(ch);
}
int vprintf (const char *fmt、va_list va)
--
2.17.1.
---a/configs/am62ax_evm_a53_defconfig
++ b/configs/am62ax_evm_a53_defconfig
@@–147、6 +147、7 @@ CONFIG_AVB_BUF_SIZE=0x00200000
CONFIG_CMD_AVB=y
config_fit_print=n
CONFIG_MISC_INIT_R=y
+CONFIG_DISABLE_CONSOLE=y
此文件 am62ax_evm_a53_defconfig 仅影响 A53 SPL/U-Boot、但不影响 R5 SPL。 因此、要在 R5 SPL 中禁用控制台消息、您还需要在 configs/am62ax_evm_r5_defconfig 中添加“config_disable_console=y"。“。
尊敬的 Jin:
使用以下 U-Boot 补丁、我可以禁用所有 U-Boot 控制台消息。 (仅打印两条来自 ATF 的线路)。
e2e.ti.com/.../u_2D00_boot_2D00_2025_2D00_01_2D00_suppress_2D00_console_2D00_message.diff