屏蔽内核启动打印
程序员文章站
2022-03-07 11:36:36
...
修改kernel/printk.c文件,找到
/*
* Call the console drivers on a range of log_buf
*/
static void __call_console_drivers(unsigned start, unsigned end)
{
struct console *con;
for_each_console(con) {
if (exclusive_console && con != exclusive_console)
continue;
//if ((con->flags & CON_ENABLED) && con->write &&
// (cpu_online(smp_processor_id()) ||
// (con->flags & CON_ANYTIME)))
// con->write(con, &LOG_BUF(start), end - start);
}
}
将最后四行注释掉。
上一篇: Apollo的感知融合模块解析
下一篇: 内核-strcpy