linux和android设置默认串口作为console

在设备树中添加节点

chosen {
stdout-path = &uart3;
};

将uart3作为console

aliases {
serial0 = &uart2;
};

chosen {
stdout-path = "serial0:115200n8";
};

将uart2作为节点,并将波特率设置为115200,8个bit位,无奇偶校验

原文地址:https://www.cnblogs.com/zongfanstudy/p/13930180.html