Change debug UART

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Change debug UART

跳至解决方案
11,888 次查看
niklasmolin
Senior Contributor I

Hi.

I have a custom board, based on the SabreSD image.

I need to change the debug UART from UART1 to UART2 and wonder how I do this in an easy way (using Yocto)?

This also includes changing the UART when starting uboot.

I have done following changes (u-boot):

mx6sabresd.h:

Changed CONFIG_MXC_UART_BASE -> UART2_BASE

CONFIG_CONSOLE>_DEV -> "ttymxc1"

What is CONFIG_MACH_TYPE used for, do I need to change this if I have a i.mx6D instead of Q?

In defconfig I changed

CONFIG_DEBUG_IMX_UART_PORT=2

and CONFIG_CMDLINE to use ttymxc1 instead of ttymxc0

Best regards,

Niklas

标签 (2)
0 项奖励
1 解答
5,201 次查看
niklasmolin
Senior Contributor I

I found the problem.

First I have a to change the SERIAL_CONSOLE in the machine.conf file.

But I also had a problem when setting up my iomux (there was a conflict when setting up the pin for the UART, some old stuff that was using the same pin was also setup).

Now it's working.

在原帖中查看解决方案

0 项奖励
8 回复数
5,200 次查看
pyraohms
Contributor III

Which build trees are you using?

Do you think that you can help me with this, using imx6ul?

Thanks

0 项奖励
5,200 次查看
wangvictor
Contributor III

I'm not quite sure the meaning of build tree.

I think i'm using imx6sabresd.

But i believe that it has the same path to modify the file.

I had change some files here.

1. <yocto>/source/meta-fsl-arm/conf/machine/include/imx6sabresd-common.inc

      SERIAL_CONSOLE = "115200 ttymxc1"

2.<Your Project>/tmp/work/imx6qsabresd-poky-linux-gnueabi/u-boot-imx/2015.04-r0/git/include/configs/imx6sabresd.h

      CONFIG_MXC_UART_BASE  UART2_BASE
      CONFIG_CONSOLE_DEV      "ttymxc1"

3.<Your Project>/tmp/work/imx6qsabresd-poky-linux-gnueabi/u-boot-imx/2015.04-r0/git/include/configs/imx6sabre_common.h

      CONFIG_CONS_INDEX              2

4.<Your Project>/tmp/work/imx6qsabresd-poky-linux-gnueabi/u-boot-imx/2015.04-r0/git/board/freescale/mx6sabresd/mx6sabresd.c

      static iomux_v3_cfg_t const uart1_pads[]

P.S You have to change the ping define of your TX and RX in step 4

Hope this help you!

0 项奖励
5,200 次查看
pyraohms
Contributor III

How do i go about compiling the manually edited files to create a .sdcard file?

Thank you!

0 项奖励
5,200 次查看
niklasmolin
Senior Contributor I

I managed to fix the uboot.

Did the changes in mx6sabresd.h and also added iomux for UART2.

Now the u-boot is using UART2 instead of UART1.

0 项奖励
5,200 次查看
niklasmolin
Senior Contributor I

When I change in mx6sabresd.h (UART base to 1 and CONSOLE_DEV to ttymxc1) I can see the u-boot on UART2.

But as soon as the Linux image starts, I can't see anything in the console.

If I change the cable to UART1, I can eventually see the login: prompt (I also get: "Poky (Yocto Project Reference Distro) 1.5.1 imx6qsabresd /dev/ttymxc0" before the login prompt ).

But I won't see the Linux boot up in the prompt.

If I change the UART base to 2 and CONSOLE_DEV ttymxc0, then I won't see anything from u-boot, but I soon as the Linux image starts, then I can see the bootup sequence from from the Linux image..

It seems like it still uses /dev/ttymxc0 in the Linux image.

Where do I change which ttymxc port it should use in the Linux image?

If I change the UART base to 1 and CONSOLE_DEV ttymxc0, then I can see the whole Linux boot sequence on UART1.

What needs to be changed to be able to see the Linux bootup sequence in UART2 and that ttymcx is changed to 1 in the linux image?

Thanks,

Niklas

0 项奖励
5,202 次查看
niklasmolin
Senior Contributor I

I found the problem.

First I have a to change the SERIAL_CONSOLE in the machine.conf file.

But I also had a problem when setting up my iomux (there was a conflict when setting up the pin for the UART, some old stuff that was using the same pin was also setup).

Now it's working.

0 项奖励
5,200 次查看
wangvictor
Contributor III

Sorry for asking this question again.

I wanna know where is the machine.conf.

0 项奖励
5,200 次查看
pyraohms
Contributor III

Indeed, where is the machine.conf?

0 项奖励