We cannot get any information about the issue, since the console cannot be enabled. Now we introduce two ways to get the log info.
1. Using XDB
a) Find the line ” c0574960 b __log_buf” in the file System.map in the build root folder
b) XDB load the log buf from the address c0574960
Note: the address may change after rebuilding the kernel.
2. Using the Low Level debug
a) Enable the Low Level debug in the menuconfig
Kernel hacking --->
[*] Kernel low-level debugging functions
b) Add the code (the red lines) in the file kernel/printk.c
extern void printch(char c);
static void emit_log_char(char c)
{
LOG_BUF(log_end) = c;
log_end++;
if (log_end - log_start > log_buf_len)
log_start = log_end - log_buf_len;
if (log_end - con_start > log_buf_len)
con_start = log_end - log_buf_len;
if (logged_chars <>
logged_chars++;
printch(c);
}
c) Use the new kernel, then you can get the uart info.
Note: if it cannot work, please make sure in the file -- include/asm-arm/arch-pxa/debug-macro.S, there is the right map for UART registers.
沒有留言:
張貼留言