Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    哪吒-Tina-编译出来的固件无法正常启动,用官方提供的固件可以正常启动

    MR Series
    3
    5
    2196
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      GSD_ZCM LV 4 last edited by

      源码在编译过程中没有出现错误,有提示编译成功和Pack成功。但是烧写到板子上时,出现如下错误
      异常启动日志
      [ 4.072880] VFS: Mounted root (ext4 filesystem) readonly on device 179:7.
      [ 4.080959] devtmpfs: error mounting -2
      [ 4.085513] Freeing unused kernel memory: 184K
      [ 4.090467] This architecture does not have kernel memory protection.
      [ 4.097718] Run /sbin/init as init process
      [ 4.102345] Kernel panic - not syncing: Requested init /sbin/init failed (error -2).
      [ 4.110987] CPU: 0 PID: 1 Comm: swapper Not tainted 5.4.61 #1
      [ 4.117388] Call Trace:
      [ 4.120125] [<ffffffe0000303fa>] walk_stackframe+0x0/0xa0
      [ 4.126144] [<ffffffe0000305dc>] show_stack+0x2a/0x34
      [ 4.131776] [<ffffffe00065693a>] dump_stack+0x20/0x28
      [ 4.137407] [<ffffffe0000353a2>] panic+0xee/0x2b6
      [ 4.142655] [<ffffffe00066a2c2>] kernel_init+0x8a/0xee
      [ 4.148383] [<ffffffe00002f018>] ret_from_exception+0x0/0xc
      [ 4.154599] ---[ end Kernel panic - not syncing: Requested init /sbin/init failed (error -2). ]---

      正常启动日志(官方提供的固件)
      [ 4.074016] VFS: Mounted root (ext4 filesystem) readonly on device 179:7.
      [ 4.082744] devtmpfs: mounted
      [ 4.086339] Freeing unused kernel memory: 184K
      [ 4.091293] This architecture does not have kernel memory protection.
      [ 4.098547] Run /sbin/init as init process
      [ 4.174475] init: Console is alive
      [ 4.178532] init: - watchdog -
      [ 4.182074] init: - preinit -
      formating /dev/by-name/UDISK to ext4
      mke2fs 1.46.4 (18-Aug-2021)

      请问前辈们,这种问题怎么解决呢?我网上找了资料,说时文件系统出问题,但不清楚如何解决

      A 1 Reply Last reply Reply Quote Share 0
      • C
        chengwei_peng LV 6 last edited by

        内核在挂载完rootfs之后,将会执行第一个用户程序的,这个程序是在cmdline中通过init=来执行第一个执行的应用程序,而你现在的是执行/sbin/init来执行,但是rootfs中却是没有这个文件,所以启动失败,内核就panic。你要不就将第一个进程命名为/sbin/init,要不就修改env.cfg中的init信息,让第一个用户进程执行其他存在的可执行文件。

        G 1 Reply Last reply Reply Quote Share 0
        • A
          Apollo5520 LV 5 @GSD_ZCM last edited by

          @gsd_zcm 试试用root用户编译,在打包rootfs时候要用到mount和umount指令,这是需要root权限的

          G 1 Reply Last reply Reply Quote Share 0
          • G
            GSD_ZCM LV 4 @Apollo5520 last edited by

            @apollo5520 是的前辈,我的确是加了sudo 编译后 ,固件加载不报错了。

            1 Reply Last reply Reply Quote Share 0
            • G
              GSD_ZCM LV 4 @chengwei_peng last edited by

              @chengwei_peng 谢谢前辈,讲解的好详细

              1 Reply Last reply Reply Quote Share 0
              • 1 / 1
              • First post
                Last post

              Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

              行为准则 | 用户协议 | 隐私权政策