From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-oi0-x232.google.com ([2607:f8b0:4003:c06::232]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Xbk1b-0008QU-Cv for barebox@lists.infradead.org; Wed, 08 Oct 2014 05:42:59 +0000 Received: by mail-oi0-f50.google.com with SMTP id i138so6501192oig.9 for ; Tue, 07 Oct 2014 22:42:37 -0700 (PDT) MIME-Version: 1.0 Date: Wed, 8 Oct 2014 13:42:36 +0800 Message-ID: From: Kevin Du Huanpeng List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: most xxx_defconfig stop linking when console support set to CONSOLE_NONE To: "barebox@lists.infradead.org" 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 ( [=y]) | | Defined at common/Kconfig:522 | | Depends on: | - - - - 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 is included allmost anywhere by including - - - - #ifndef __COMMON_H_ #define __COMMON_H_ 1 #include ... #include #include - - - - so using pr_print always can past compile because it is declared by including . 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 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox