[U-Boot-Users] How to disable serial console completely?

Hi,
I'd like to mask serial console totally for system deployment. When I set the console output by '#define CONFIG_8xx_CONS_NONE 1' and made a LCD image, I got the following compiling errors. What should I do next to disable serial console completely?
Yeah, README mentions it a little but not enough, I am afraid. I think there should be a switch in <board.h> to disable the serial console simply. Any idea?
-Map u-boot.map -o u-boot cpu/mpc8xx/libmpc8xx.a(lcd.o): In function `lcd_putc': /home/BK/lite_dw_u-boot/cpu/mpc8xx/lcd.c:535: undefined reference to `serial_putc' cpu/mpc8xx/libmpc8xx.a(lcd.o): In function `lcd_puts': /home/BK/lite_dw_u-boot/cpu/mpc8xx/lcd.c:574: undefined reference to `serial_puts' lib_ppc/libppc.a(board.o): In function `mem_malloc_init': /home/BK/lite_dw_u-boot/lib_ppc/board.c:130: undefined reference to `serial_init' common/libcommon.a(cmd_load.o): In function `do_load_serial_bin': /home/BK/lite_dw_u-boot/common/cmd_load.c:470: undefined reference to `serial_setbrg' /home/BK/lite_dw_u-boot/common/cmd_load.c:498: undefined reference to `serial_setbrg' common/libcommon.a(cmd_nvedit.o): In function `_do_setenv': /home/BK/lite_dw_u-boot/common/cmd_nvedit.c:244: undefined reference to `serial_setbrg' common/libcommon.a(console.o): In function `serial_printf': /home/BK/lite_dw_u-boot/common/console.c:113: undefined reference to `serial_puts' common/libcommon.a(console.o): In function `getc': /home/BK/lite_dw_u-boot/common/console.c:174: undefined reference to `serial_getc' common/libcommon.a(console.o): In function `tstc': /home/BK/lite_dw_u-boot/common/console.c:187: undefined reference to `serial_tstc' common/libcommon.a(console.o): In function `putc': /home/BK/lite_dw_u-boot/common/console.c:204: undefined reference to `serial_putc' common/libcommon.a(console.o): In function `puts': /home/BK/lite_dw_u-boot/common/console.c:222: undefined reference to `serial_puts' common/libcommon.a(devices.o): In function `nulldev_putc': /home/BK/lite_dw_u-boot/common/devices.c:49: undefined reference to `serial_putc' /home/BK/lite_dw_u-boot/common/devices.c:49: undefined reference to `serial_puts' common/libcommon.a(devices.o): In function `nulldev_puts': /home/BK/lite_dw_u-boot/common/devices.c:52: undefined reference to `serial_getc' /home/BK/lite_dw_u-boot/common/devices.c:54: undefined reference to `serial_tstc' make: *** [u-boot] Error 1 [root@sgj lite_dw_u-boot]#
Thanks in advance!
===== Best regards,
Sam
_________________________________________________________ Do You Yahoo!? 150万曲MP3疯狂搜,带您闯入音乐殿堂 http://music.yisou.com/ 美女明星应有尽有,搜遍美图、艳图和酷图 http://image.yisou.com 1G就是1000兆,雅虎电邮自助扩容! http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1...

Does setting bootdelay to zero meet your requirements?
Carl
--- Sam Song samsongshu@yahoo.com.cn wrote:
Hi,
I'd like to mask serial console totally for system deployment. When I set the console output by '#define CONFIG_8xx_CONS_NONE 1' and made a LCD image, I got the following compiling errors. What should I do next to disable serial console completely?
Yeah, README mentions it a little but not enough, I am afraid. I think there should be a switch in <board.h> to disable the serial console simply. Any idea?
-Map u-boot.map -o u-boot
cpu/mpc8xx/libmpc8xx.a(lcd.o): In function `lcd_putc': /home/BK/lite_dw_u-boot/cpu/mpc8xx/lcd.c:535: undefined reference to `serial_putc' cpu/mpc8xx/libmpc8xx.a(lcd.o): In function `lcd_puts': /home/BK/lite_dw_u-boot/cpu/mpc8xx/lcd.c:574: undefined reference to `serial_puts' lib_ppc/libppc.a(board.o): In function `mem_malloc_init': /home/BK/lite_dw_u-boot/lib_ppc/board.c:130: undefined reference to `serial_init' common/libcommon.a(cmd_load.o): In function `do_load_serial_bin': /home/BK/lite_dw_u-boot/common/cmd_load.c:470: undefined reference to `serial_setbrg' /home/BK/lite_dw_u-boot/common/cmd_load.c:498: undefined reference to `serial_setbrg' common/libcommon.a(cmd_nvedit.o): In function `_do_setenv': /home/BK/lite_dw_u-boot/common/cmd_nvedit.c:244: undefined reference to `serial_setbrg' common/libcommon.a(console.o): In function `serial_printf': /home/BK/lite_dw_u-boot/common/console.c:113: undefined reference to `serial_puts' common/libcommon.a(console.o): In function `getc': /home/BK/lite_dw_u-boot/common/console.c:174: undefined reference to `serial_getc' common/libcommon.a(console.o): In function `tstc': /home/BK/lite_dw_u-boot/common/console.c:187: undefined reference to `serial_tstc' common/libcommon.a(console.o): In function `putc': /home/BK/lite_dw_u-boot/common/console.c:204: undefined reference to `serial_putc' common/libcommon.a(console.o): In function `puts': /home/BK/lite_dw_u-boot/common/console.c:222: undefined reference to `serial_puts' common/libcommon.a(devices.o): In function `nulldev_putc': /home/BK/lite_dw_u-boot/common/devices.c:49: undefined reference to `serial_putc' /home/BK/lite_dw_u-boot/common/devices.c:49: undefined reference to `serial_puts' common/libcommon.a(devices.o): In function `nulldev_puts': /home/BK/lite_dw_u-boot/common/devices.c:52: undefined reference to `serial_getc' /home/BK/lite_dw_u-boot/common/devices.c:54: undefined reference to `serial_tstc' make: *** [u-boot] Error 1 [root@sgj lite_dw_u-boot]#
Thanks in advance!
===== Best regards,
Sam
_________________________________________________________
Do You Yahoo!? 150����MP3����ѣ������������ֵ��� http://music.yisou.com/ ��Ů����Ӧ�о��У��ѱ���ͼ����ͼ�Ϳ�ͼ http://image.yisou.com 1G����1000�ף��Ż������������ݣ�
http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1...
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users
_______________________________ Do you Yahoo!? Declare Yourself - Register online to vote today! http://vote.yahoo.com

In message 20041008160339.89228.qmail@web60502.mail.yahoo.com you wrote:
Does setting bootdelay to zero meet your requirements?
This does not diable the serial console. You still get all the output, and if any of the commands in your "bootcmd" definitionis interactive, it will accept input, too.
Best regards,
Wolfgang Denk

Wolfgang Denk wd@denx.de 的正文:
Carl Riechers wrote:
Does setting bootdelay to zero meet your requirements?
This does not diable the serial console. You still get all the output, and if any of the commands in your "bootcmd" definitionis interactive, it will accept input, too.
Thanks for your concern on this point. Actually speaking, I am a little puzzled toward the fact whether to disable serial console or not. Anyway, debugging on spot is a necessary sometimes. I don't want to solve a simple problem with BDI2000 every time.
One good thing is that I can implement above idea on RPXlite DW board in a standalone way. But the bad one is that my custom board must connect a serial line to HOST PC in standalone way or LCD console will directly stop at u-boot command status without any downcounter as if the serial console accepts input. Hardware difference is there is no CPLD on my custom board. Does this make the difference? My hack method is to fix common/main.c to disable any serial input for my board. It worked but I couldn't switch to serial console anymore. So sadly...
Maybe this is also one reason why I'd like to disable serial console completely on my custom board so that I could avoid breaking main.c.
===== Best regards,
Sam
_________________________________________________________ Do You Yahoo!? 150万曲MP3疯狂搜,带您闯入音乐殿堂 http://music.yisou.com/ 美女明星应有尽有,搜遍美图、艳图和酷图 http://image.yisou.com 1G就是1000兆,雅虎电邮自助扩容! http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1...

In message 20041009010345.86505.qmail@web15604.mail.cnb.yahoo.com you wrote:
Thanks for your concern on this point. Actually speaking, I am a little puzzled toward the fact whether to disable serial console or not. Anyway,
As a developer of U-Boot, yo don't want to do that - you always want to have the most convenient access methods available :-)
But there are situation when the end user needs the serial port for other purposes, and U-Boot is prepared to deal wih this situation. If everything else fails you can use netconsole.
Does this make the difference? My hack method is to fix common/main.c to disable any serial input for my board. It worked but I couldn't switch to serial console anymore. So sadly...
No need to hack anything. All necessary defines to shut down the serial console completely are already in place. Just define them in your board config file.
Best regards,
Wolfgang Denk

Wolfgang Denk wd@denx.de wrote:
No need to hack anything. All necessary defines to shut down the serial console completely are already in place. Just define them in your board config file.
After setting CONFIG_AUTOBOOT_KEYED && CONFIG_AUTOBOOT_STOP_STR, I got the expected result. Oops, I come to realise there are so many great things in the box, which need me to discover rather than hack it. No wander you neglected my question at first:-)
Thanks very much.
Also I should thank Carl to pull my thread out of the water. New things learned and two related patches were created as well.
===== Best regards,
Sam
_________________________________________________________ Do You Yahoo!? 150万曲MP3疯狂搜,带您闯入音乐殿堂 http://music.yisou.com/ 美女明星应有尽有,搜遍美图、艳图和酷图 http://image.yisou.com 1G就是1000兆,雅虎电邮自助扩容! http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1...
participants (3)
-
Carl Riechers
-
Sam Song
-
Wolfgang Denk