Specify console in device tree chosen/stdout-path

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

Specify console in device tree chosen/stdout-path

3,462 次查看
craigmcqueenir
Contributor IV

I have an imx8mm based system. I'm using Yocto dunfell with meta-freescale providing kernel 5.4.107.

I am trying to simplify the kernel command line, and remove kernel-specific parameters that would better be specified in the device tree. The main items are (a) console; (b) earlycon; and (c) root. It would be better if these were defined in the device tree, rather than in U-Boot environment variables which are not so easily changed with a kernel upgrade.

Currently the kernel command line for my board includes

console=ttymxc2,115200 earlycon=ec_imx6q,0x30880000,115200

and that works. But it would be better if the console were defined in the device tree.

The device tree specifies the console in node chosen/stdout-path. I had it set to

 

    stdout-path = &uart3;

 

 

But that doesn't work (when console=... is removed from kernel command line). After reading the docs, I changed it to:

 

    stdout-path = "serial2:115200n8";

 

 

That also doesn't work. Looking at /proc/consoles, the console gets set to ttymxc0 instead of ttymxc2.

 

I found these, but they are not recent, and I haven't worked out if they're still relevant:

 

0 项奖励
回复
3 回复数

1,425 次查看
gigli_korg
Contributor II

Hi everybody,
@craigmcqueenir: have you solved in this way?

0 项奖励
回复

1,400 次查看
craigmcqueenir
Contributor IV

No, I haven't found a solution.

3,451 次查看
jamesbone
NXP TechSupport
NXP TechSupport

 

You can take a look into our Linux Porting Guide.  sect.1.4 Debugging, please check uboot/drivers/serial/serial_mxc.c

 

0 项奖励
回复