Navigation

    全志在线开发者论坛

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

    【FAQ】全志R329如何解决Tina双系统uboot校验rootfs失败的问题?

    其它全志芯片讨论区
    r329 r328 r818 faq 技术支持
    1
    1
    1364
    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.
    • q1215200171
      budbool LV 9 last edited by

      问题描述

      内核双备份系统安全固件启动失败,有如下log:

      Hit any key to stop autoboot: 0
      [06.393]partinfo: name boot1, start 0xe00, size 0x7800
      [06.989]begin to verify rootfs
      get part: rootfs info failed
      bootm - boot application image from memory
      Usage:
      bootm [addr [arg …]]

      boot application image stored in memory

      问题分析

      从log中看,提示没有找到名字为rootfs的分区信息。

      此问题原因:由于Tina默认当前是但系统,uboot校验rootfs时直接指定的rootfs的分区名“rootfs”。但是客户是双系统,rootfs有两个分区,分区名为rootfs1与rootfs2,而这里直接指定rootfs,会造成找不到对应的分区信息。

      解决办法

      不直接指定,从evn环境变量中获取当前要启动的rootfs分区。在tina/lichee/brandy-2.0/u-boot-2018/加入如下补丁:

      diff --git a/cmd/bootm.c b/cmd/bootm.c
      index f4071e026e..0a267b4251 100644
      --- a/cmd/bootm.c
      +++ b/cmd/bootm.c
      @@ -231,6 +231,7 @@ int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
                      struct sunxi_image_verify_pattern_st verify_pattern = {
                              0x1000, 0x100000, -1
                      };
      +               char *rootfs_name = env_get("root_partition");
                      char *s = env_get("rootfs_per_MB");
                      if (strcmp(s, "full") == 0) {
                              full = 1;
      @@ -246,7 +247,7 @@ int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
      
                              full = 0;
                      }
      -               if (sunxi_verify_partion(&verify_pattern, "rootfs", "rootfs", full) != 0) {
      +               if (sunxi_verify_partion(&verify_pattern, rootfs_name, "rootfs", full) != 0) {
                              return -1;
                      }
      
      1 Reply Last reply Reply Quote Share 0
      • Referenced by  q1215200171 q1215200171 
      • Referenced by  q1215200171 q1215200171 
      • Referenced by  q1215200171 q1215200171 
      • Referenced by  q1215200171 q1215200171 
      • Referenced by  q1215200171 q1215200171 
      • 1 / 1
      • First post
        Last post

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

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