Skip to contentSkip to conversation

How to disable serial console completely?

U-Boot-Users Sam Song 3 participants 6 messages Oct 2, 2004 – Oct 10, 2004 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Sam Song

author
#1 lore raw

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 at 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_1g/

#2 lore raw

Does setting bootdelay to zero meet your requirements?

Carl

Quoted 75 lines · --- Sam Song

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 at sgj lite_dw_u-boot]#

Quoted 8 lines

Thanks in advance!

=====
Best regards,

Sam

_________________________________________________________

Quoted 7 lines

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_1g/

Quoted 3 lines

-------------------------------------------------------

Quoted 7 lines

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

Quoted 4 lines

_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/u-boot-users

Quoted 1 line

_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

#3 lore raw
Quoted 1 line · In message <[email protected]> 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

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Doubt is a pain too lonely to know that faith is his twin brother.
- Kahlil Gibran
author
#4 lore raw

Wolfgang Denk <[email protected]> ????

Quoted 9 lines
Quoted 2 lines · Carl Riechers

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_1g/

#5 lore raw
Quoted 4 lines · In message <[email protected]> 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.

Quoted 4 lines

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

Signature · 3 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
If God wanted me to touch my toes, he'd have put them on my knees.
author
#6 lore raw

Wolfgang Denk <[email protected]> wrote?

Quoted 4 lines

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_1g/