How can I change the serial port of am335x to normal serial port, and change the serial port of am335x to normal serial port?

Source: Internet
Author: User

How can I change the serial port of am335x to normal serial port, and change the serial port of am335x to normal serial port?

Today, the customer needs to change the general debug serial port to the general serial port. Requirements:

1. In the SPL stage, debugging information cannot be printed or entered.

2. The uboot stage cannot contain printed information or input.

3. the kernel cannot be printed or input.

4. The file system cannot print or enter debugging information.

I.

In the SPL stage, we mainly configure ARM core, including the interrupt vector table, cache, MMU, and so on. We also configure the clock, uart, timer, and DDR, to remove the serial port debugging in the SPL phase, refer to uboot/board/ti/am335x/board. the s_init () (a typical initialization function) function in the c file directly shields the preloader_console_init () function. UBOOT starts to output debugging information through the serial port after the function initializes the console (console, so as long as you do not initialize the console, the serial port is still a common serial port.

II.

In the uboot stage, we also need to initialize various peripheral modules, including the SPL stage, in addition to the peripherals that the DDR thinks, so even if we do not initialize the console in the SPL stage, we will continue to do this in the uboot stage. You can see uboot/arch/arm/lib/board. c's init_fnc_t * init_sequence [] struct. All functions in this struct will be loaded and initialized. So find the console function here and shield it from serial_init, lele_init_f, and onsole_init_r.

III.

In start kernel ...... then, uboot will pass the environment variables to the kernel, and the kernel will make relevant configurations according to the environment variables. Therefore, remove the console value in UBOOT or change ttyO0 to ttyONLL, source code in uboot/include/configs/am335x_evm.h is about 66 lines? "Console = ttyONULL, 115200n8 \ 0 "\.

4.

In the file system, the system will automatically run the inittab in the/etc/path to load getty, so that the debug serial port can be logged into the file system for debugging. So we need to remove the following line of command: "ttyO0: respawn:/sbin/getty-L? TtyO0 115200 vt100 # GENERIC_SERIAL"

5.

After you change the debugging serial port to a common serial port, if you need to perform some debugging, you can log on to the Board through the network (ssh). This problem may occur:

When debugging the serial port login, you only need to enter "root" to log on successfully. You do not need a password. When you log on via ssh, you will be prompted to enter the password, and the entered password is incorrect. This is because two parameters in/etc/ssh/sshd_config are not paired. You must allow automatic login by clearing the password and password. The following configuration is required:

PasswordAuthentication yes

PermitEmptyPasswords yes

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.