oceanw_1991 2022-07-26 12:05 采纳率: 50%
浏览 602
已结题

linux移植 启动失败,提示"Timed out waiting for device dev-ttyS0.device"

问题遇到的现象和发生背景

linux 移植(boot+kenerl+rootfs),烧录镜像后后串口监控启动信息
1.切换控制台失败;
[ TIME ] Timed out waiting for device dev-ttyS0.device. [DEPEND] Dependency failed for Serial Getty on ttyS0.

问题相关代码,请勿粘贴截图

[ OK ] Stopped Getty on tty1.
[ OK ] Started Getty on tty1.
[ OK ] Stopped Getty on tty1.
[ OK ] Started Getty on tty1.
[ OK ] Stopped Getty on tty1.
[ OK ] Started Getty on tty1.
[ OK ] Stopped Getty on tty1.
[ OK ] Started Getty on tty1.
[ TIME ] Timed out waiting for device dev-ttyS0.device.
[DEPEND] Dependency failed for Serial Getty on ttyS0.
[ OK ] Reached target Login Prompts.
[ OK ] Reached target Multi-User System.
Starting Update UTMP about System Runlevel Changes.
[ OK ] Started Update UTMP about System Runlevel Changes.

我的解答思路和尝试过的方法

尝试过网上推荐的方法,无效果
Steps

  1. First copy the template:

    cp /usr/lib/systemd/system/serial-getty@.service /etc/systemd/system/serial-getty@ttyS0.service

  2. Then edit the file and modify the agetty line:
    [Service]
    ExecStart=-/sbin/agetty --keep-baud 115200,38400,9600 %I $TERM <-- Change this parameter
    Type=idle
  3. Create a symlink:

    ln -s /etc/systemd/system/serial-getty@ttyS0.service /etc/systemd/system/getty.target.wants/

  • 写回答

0条回答 默认 最新

    报告相同问题?

    问题事件

    • 系统已结题 8月3日
    • 创建了问题 7月26日

    悬赏问题

    • ¥30 STM32 INMP441无法读取数据
    • ¥100 求汇川机器人IRCB300控制器和示教器同版本升级固件文件升级包
    • ¥15 用visualstudio2022创建vue项目后无法启动
    • ¥15 x趋于0时tanx-sinx极限可以拆开算吗
    • ¥500 把面具戴到人脸上,请大家贡献智慧
    • ¥15 任意一个散点图自己下载其js脚本文件并做成独立的案例页面,不要作在线的,要离线状态。
    • ¥15 各位 帮我看看如何写代码,打出来的图形要和如下图呈现的一样,急
    • ¥30 c#打开word开启修订并实时显示批注
    • ¥15 如何解决ldsc的这条报错/index error
    • ¥15 VS2022+WDK驱动开发环境