下载
中文
注册

boot_tool工具介绍

命令功能

boot_tool命令用于查询和设置启动相关信息。

命令格式

boot_tool get -h用于显示查询命令帮助信息。

boot_tool set -h用于显示设置命令帮助信息。

boot_tool -h用于显示boot_tool命令帮助信息。

boot_tool get boot_sel用于查询启动介质信息,例如SD卡。

boot_tool get partition_map用于查询启动介质中启动镜像分区信息。

boot_tool get upgrade_control_info用于查询启动介质中升级控制信息。

boot_tool get image_info用于查询启动介质中启动镜像信息。

boot_tool set clear_force_recover用于清除强制恢复出厂标志。

boot_tool set swap_region用于主备文件系统场景下切换启动分区。

boot_tool set clear_reset_count用于清除CPU启动计数信息。

boot_tool set force_recover_flag用于设置强制恢复出厂标志。

参数说明

类型

描述

-h

帮助信息

boot_sel

启动介质信息

partition_map

启动介质中启动镜像分区信息

upgrade_control_info

启动介质中升级控制信息

image_info

启动介质中启动镜像信息

clear_force_recover

清除强制恢复出厂标志

swap_region

主备文件系统场景下切换启动分区

clear_reset_count

清除CPU启动计数信息

force_recover_flag

设置强制恢复出厂标志

使用指南

boot_tool命令必须使用root用户执行。切换root用户请参考使用PuTTY登录设备(网口方式)

使用示例

  • 示例1:显示查询命令帮助信息。

    boot_tool get -h

    回显示例如下:

    Usage: boot_tool get Options...
            -h                              : This command's help information.
            boot_sel                        : Query boot media information, such as eMMC, SD, and M.2 SSD.
            partition_map                   : Query the boot partition table information.
            upgrade_control_info            : Query upgrade control information.
            image_info                      : Query boot image information.
  • 示例2:显示设置命令帮助信息。

    boot_tool set -h

    回显示例如下:

    Usage: boot_tool set Options...
            -h                              : This command's help information.
            clear_force_recover             : Clear the forcible factory restoration flag.
            swap_region                     : Switch the boot partition in the active/standby file system scenario.
            clear_reset_count               : Clear reset count.
            force_recover_flag              : Set the forcible factory restoration flag.
  • 示例3:显示boot_tool命令帮助信息。

    boot_tool -h

    回显示例如下:

    Usage: boot_tool <Command|-h> [Options...]
    boot_tool Command:
            -h                              : This command's help information.
            get                             : Query boot information.
            set                             : Set boot information.
  • 示例4:查询启动介质信息。

    boot_tool get boot_sel

    回显示例如下:
    boot from SD
  • 示例5:查询启动介质中启动镜像分区信息。

    boot_tool get partition_map

    回显示例如下:

    partition map info  :
    partition count     : 7
    partition map       : 0xdf
  • 示例6:查询启动介质中升级控制信息。

    boot_tool get upgrade_control_info

    回显示例如下:

    boot upgrade control info     :
    force_recover_flag            : 0x0
    upgrade_part_count            : 4
    ###########################################################
    RAW_DATA     control info     :
    upgrade_type                  : 0
    upgrade_status                : 0x0
    upgrade_part_flag             : 0x0
    ###########################################################
    RECOVER      control info     :
    upgrade_type                  : 0
    upgrade_status                : 0x0
    upgrade_part_flag             : 0x0
    ###########################################################
    RECOVER_DATA control info     :
    upgrade_type                  : 0
    upgrade_status                : 0x0
    upgrade_part_flag             : 0x0
    ###########################################################
    ROOTFS       control info     :
    upgrade_type                  : 0
    upgrade_status                : 0x0
    upgrade_part_flag             : 0x0
    ###########################################################
  • 示例7:查询启动介质中启动镜像信息。

    boot_tool get image_info

    回显示例如下:

    ###########################################################
    boot_a   info       :
    partition_name      : /dev/mmcblk1p1
    component_count     : 3
    component_type      : 0
    component_name      : kernel
    data_size           : 29098496
    component_type      : 1
    component_name      : dtb
    data_size           : 528384
    component_type      : 2
    component_name      : tee
    data_size           : 1831100
    ###########################################################
    boot_b   info       :
    partition_name      : /dev/mmcblk1p1
    component_count     : 3
    component_type      : 0
    component_name      : kernel
    data_size           : 29098496
    component_type      : 1
    component_name      : dtb
    data_size           : 528384
    component_type      : 2
    component_name      : tee
    data_size           : 1831100
    ###########################################################
  • 示例8:清除强制恢复出厂标志。

    boot_tool set clear_force_recover

    回显示例如下:
    Clear force recover flag success.
  • 示例9:主备文件系统场景下切换启动分区。

    boot_tool set swap_region

    回显示例如下:
    Set switch_region ok.
  • 示例10:清除CPU启动计数信息。

    boot_tool set clear_reset_count

    回显示例如下:
    Set clear_reset_count ok.
  • 示例11:设置强制恢复出厂标志。

    boot_tool set force_recover_flag

    回显示例如下:
    The device does not support this operation.

    当前不支持设置强制恢复出厂标志。