Uboot and kernel modify and print the serial port and ubootkernel serial port

Source: Internet
Author: User

Uboot and kernel modify and print the serial port and ubootkernel serial port

Here I use s5pv210, which originally outputs COM2. Now I want to change it to COM0 output, to view the uboot command line information and the kernel startup information, we should make the following changes:

1. Changes to uboot

We modify the corresponding configuration file. Here, because it is s5pv210 Development Board, my configuration file is x210_sd.h (9ding Development Board)

Find

//#define CONFIG_SERIAL3          1/* we use UART2 on SMDKC110 */

Change

#define CONFIG_SERIAL0          1/* we use UART0 on SMDKC110 */
Cause: Find this string in the register definition file of our corresponding Development Board: (I am here at s5pc110. h)
#if defined(CONFIG_SERIAL1)#define ELFIN_UART_CONSOLE_BASE (ELFIN_UART_BASE + ELFIN_UART0_OFFSET)#elif defined(CONFIG_SERIAL2)#define ELFIN_UART_CONSOLE_BASE (ELFIN_UART_BASE + ELFIN_UART1_OFFSET)#elif defined(CONFIG_SERIAL3)#define ELFIN_UART_CONSOLE_BASE (ELFIN_UART_BASE + ELFIN_UART2_OFFSET)#elif defined(CONFIG_SERIAL4)#define ELFIN_UART_CONSOLE_BASE (ELFIN_UART_BASE + ELFIN_UART3_OFFSET)#else#define ELFIN_UART_CONSOLE_BASE (ELFIN_UART_BASE + ELFIN_UART0_OFFSET)#endif

Therefore, we only need to define the corresponding CONFIG_SERIAL to make the modification successful.

2. Modify linux kernel (the premise here is that you find the. config file in ls-)

First, make menuconfig

System Type  --->    (2) S3C UART to use for low-level messages 
Modify
System Type  --->    (0) S3C UART to use for low-level messages 
Then make-j4 (multi-thread kernel compilation)

3. Modify the tags parameter passed by uboot to linux kernel

Enter the uboot command line and print the information

mtdpart=80000 400000 3000000baudrate=115200ethaddr=00:40:5c:26:0a:5bbootdelay=3filesize=37B800fileaddr=30008000gatewayip=192.168.0.1netmask=255.255.255.0ipaddr=192.168.0.120serverip=192.168.0.119bootcmd=tftp 30008000 zImage-qt; bootm 30008000bootargs=console=ttySAC2,115200 root=/dev/mmcblk0p2 rw init=/linuxrc rootfstype=ext3

Here, we can change console = ttySAC2 in bootargs to ttySAC0.

set 'console=ttySAC0,115200 root=/dev/mmcblk0p2 rw init=/linuxrc rootfstype=ext3'save

Now, we have modified the serial port printing information of uboot and kernel.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.