[U-Boot-Users] Implementation of serial console redirection in uboot

I am using Uboot as my boot loader.
Actually here I want to do console redirection through USB port.
So that I have to modify console redirection via serial code to console redirection via of USB
To do that first I want to know how serial console redirection is done in the UBOOT code. i.e., how in uboot the "serial console redirection" is implemented.
For console redirection(serial) there should be some code, somewhere in the UBoot. I want to know how and where(in file,in which function) the console redirection is implemented. [I have found how the configuration is done for console redirection]
Thanks yaso

yasothabalanr@gmail.com wrote in message news:22587334.1242731184650886880.JavaMail.nabble@isper.nabble.com...
I am using Uboot as my boot loader.
Actually here I want to do console redirection through USB port.
So that I have to modify console redirection via serial code to console redirection via of USB
To do that first I want to know how serial console redirection is done in the UBOOT code. i.e., how in uboot the "serial console redirection" is implemented.
For console redirection(serial) there should be some code, somewhere in the UBoot. I want to know how and where(in file,in which function) the console redirection is implemented. [I have found how the configuration is done for console redirection]
You have posted the same question several times. I have already responded to you. In case you deleted the email, see http://article.gmane.org/gmane.comp.boot-loaders.u-boot/30132
File common/console.c and common/devices.c contain everything. When you device_register(), you're inserting a new item into the devlist. When you set the stdin, stdout, or stderr you're calling console_setfile() which assigns a function pointer for each I/O function. When u-boot wants to read or display a character it follows the function pointer stored in global data.
Please read my previous posting. Use lcd.c as an example. Write 4 new functions that implement getc, tstc, putc, and puts. Register these as I/O using device_register() and choose them by setting stdin, stdout, and stderr.
-joey
participants (2)
-
Joey Oravec
-
yasothabalanr@gmail.com