#allwinner #arm #fel #sunxi

app fel-cli

用于处理 Allwinner 设备 FEL 模式下的 CLI 工具,纯 Rust 实现

6 个版本 (破坏性更新)

0.5.2 2018 年 12 月 29 日
0.4.0 2018 年 10 月 24 日
0.3.0 2017 年 2 月 12 日
0.2.0 2016 年 12 月 11 日
0.1.1 2016 年 12 月 5 日

#2#allwinner

MIT/Apache

37KB
730

FEL 模式下 Allwinner 设备的 CLI 工具

Build Status codecov

基于 sunxi-tools 的工具,用于使用 Allwinner 设备的 FEL 模式。

使用方法

USAGE:
    fel-cli [OPTIONS] [SUBCOMMAND]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -d, --device <bus:addr>    The USB bus and device address of the FEL device

SUBCOMMANDS:
    clear      Clear memory
    dump       Dumps memory region in binary through stdout
    exec       Call function at the given address
    fill       Fill memory with the given byte
    help       Prints this message or the help of the given subcommand(s)
    reset64    RMR request for AArch64 warm boot
    spl        Loads and executes U-Boot SPL. If file additionally contains a
               main U-Boot binary, it will transfer it to memory and print the
               entry point address, in hex
    version    Gets SoC version information
    write      Write data to device memory

从 sunxi-tools 移植

fel-cli 的 CLI 几乎可以完全替代 sunxi-fel 命令,但需要进行一些更改。

  • 一次不能使用多个子命令。
  • 没有 --verbose 选项(目前没有)。
  • --progress 选项目前不支持。
  • hexdump 子命令需要更新为 dump --hex。输出将完全相同。
  • ver[sion] 选项不能指定为 ver。必须完整指定为 version
  • 没有 readreadl 命令。这些命令已经添加到 dump 命令中。默认情况下,dump 命令将以 0x00000000 格式转储一个 32 位字。如果您添加了 <size> 参数,您可以将这些字节数转储。默认情况下,它将数据输出到 stdout,但如果您不想以十六进制形式输出(如前所述,使用 --hex 标志),您可以使用 -o | --out 选项将其输出到文件。
  • 没有 sid 命令,它已添加到 dump 命令中,并可以使用 dump --sid 使用。
  • 在长模式中,-d | --dev选项已被更改为--device。因此,如果您使用-d,无需更改,但如果您使用--dev,则需要将其更改为--device
  • 没有uboot选项。如果您想执行U-Boot二进制文件,可以添加-x--exec标志。如果您想连接多个子命令,U-Boot入口地址将在SPL加载后打印出来(如果没有提供-)。然后,您可以使用exec子菜单在指定地址执行U-Boot。
  • exe[cute]子菜单已被修改为exec
  • 没有[x]gauge输出选项(尚未)。
  • multi[write]现在已集成到write命令中。只需添加更多
    单词或文件到列表:fel-cli write address1 file1 address2 word1 ...
  • 没有writel命令。您可以在write命令中使用32位单词以及文件。只需确保您没有名为整数的文件名(无论是十六进制还是十进制)。

其余选项应按相同方式工作。如果不这样做,请填写一个问题。

许可协议

此代码根据MIT许可协议和Apache许可协议(版本2.0)的条款进行分发。有关详细信息,请参阅LICENSE-APACHE和LICENSE-MIT。

依赖项

~1.5MB
~20K SLoC