No subject
Kevin Du Huanpeng
u74147 at gmail.com
Tue Oct 7 22:41:03 PDT 2014
Hi,
I find that most xxx_defconfig stop linking when console support set
to CONSOLE_NONE
compile log like:
http://paste.ubuntu.com/8518456/
- - - -
| Symbol: CONSOLE_NONE [=y] |
| Type : boolean |
| Prompt: none |
| Location: |
| -> General Settings |
| -> console support (<choice> [=y]) |
| Defined at common/Kconfig:522 |
| Depends on: <choice> |
- - - -
most error causes by pr_print undefined.
this macro/function is
defined in:
common/console_common.c
declare in:
include/printk.h
when CONSOLE_NONE is defined,
pr_print is not compiled (rid by #ifndef/#endif) with common/console_common.o
but <printk.h> is included allmost anywhere by including <common.h>
- - - -
#ifndef __COMMON_H_
#define __COMMON_H_ 1
#include <stdio.h>
...
#include <asm/common.h>
#include <printk.h>
- - - -
so using pr_print always can past compile because it is declared by
including <common.h>.
but breaks link.
I am confusing with CONSOLE_NONE, what is it mean?
1. the board don't have a console?
is the board still can have a serial port, but not accepts input?
2. where should the debug messages go?
the serial port is not a console but
when CONSOLE_NONE defined, printf just a nothing but return a 0,
but the pr_print() declared but not defined.
- - - -
FILE: include/stdio.h
static inline int printf(const char *fmt, ...)
{
return 0;
}
- - - -
- - - -
duhuanpeng
(+86)13719074147
More information about the barebox
mailing list