The default debug console is ttymxc0.
Modify console port to ttymxc1 in bootargs_base variable of uboot environmental configure, as follow:
setenv bootargs_base 'setenv bootargs console=ttymxc1,115200 enable_wait_mode=off video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24'
The OS is hung after “cat /dev/ttymxc0”.
Could I switch the debug console port without modifying these code, as follow.
In uboot:
1. #define CONFIG_UART_BASE_ADDR UART1_BASE_ADDR
2. static void setup_uart(void)
{
/* UART1 TXD */
mxc_iomux_v3_setup_pad(MX6Q_PAD_CSI0_DAT10__UART1_TXD);
/* UART1 RXD */
mxc_iomux_v3_setup_pad(MX6Q_PAD_CSI0_DAT11__UART1_RXD);
}
In Kernel:
3. uart_clk = clk_get_sys("imx-uart.0", NULL);
4. early_console_setup(UART1_BASE_ADDR, uart_clk);
Solved! Go to Solution.
Base on my knowledge. The number of console is related to your HW UART port and kernel load sequency.
So the code midification is needed. It can't be changed just by the u-boot parameters.
Charles
This discussion is closed since no activity. If you still need help, please feel free to reply with an update to this discussion, or create another discussion.
Thanks,
Yixing
Charles
Had your issue got resolved? If yes, we are going to close the discussion in 3 days. If you still need help, please feel free to reply with an update to this discussion.
Thanks,
Yixing
If it is necessary to modifying the code, what is variable "console=" used for?
It has decided the used UART port in the begin of u-boot and kernel
It seems redundant about passing "console=" to kernel
Charles
Had your issue got resolved? If yes, we are going to close the discussion in 3 days. If you still need help, please feel free to reply with an update to this discussion.
Thanks,
Yixing
I don't think my question get really solved.
The solution Linda supplied is work, but it still need to modify code
I'd like to know if I could switch console(uart) via the setting of the variable "console=" without modifying any code.
I tried it before, I set "console=ttymxc1", but the OS is hung after“cat /dev/ttymxc0”.
So, I think ttymxc0 driver is not relly released while the setting is "console=ttymxc1"
Base on my knowledge. The number of console is related to your HW UART port and kernel load sequency.
So the code midification is needed. It can't be changed just by the u-boot parameters.
Charles
I will ask one of Freescale AE to help you.
Thanks,
Yixing
Hi, Jimmy
So, not only uboot environment variables need to be adjusted, but also some codes for debug console port switch should be modified , is it right?
Why can I not switch consoles by uboot environment variables?
I think consoles would be reinitialized in the kernel.
Do you have any idea about this?
right.
ttymxc0 is UART1
ttymxc1 is UART2