项目作者: hyphop

项目描述 :
uboot extra commands
高级语言: C
项目地址: git://github.com/hyphop/uboot-extra.git
创建时间: 2019-08-01T04:09:02Z
项目社区:https://github.com/hyphop/uboot-extra

开源协议:

下载


uboot extra

script

simple plain script run from mem without mkimage wrappers

script is cool alternative for autoscript and source , we can
use one script command for plain script and wrapped scripts!

sintax and parsing

  1. #!script - script must begin from this marker
  2. ##END## - its end marker - after this lines all strings ignored
  3. '\0' - its same end marker
  4. 72bytes - mkimage header parsed

script parsed by run_command_list

how to install it

just add next line to Makefile

  1. obj-y += cmd_script.o

uboot usage

  1. script [addr] [bytes] [nochk] [silent] - run script starting at addr
  2. bytes - read bytes (hex) limit
  3. nochk - no check #!script header
  4. silent - be silent

uboot usage examples

  1. script 0x1000000 - simple run from addr 0x1000000
  2. script 0x1000000 32 - same but only fist 32 bytes
  3. script 0x1000000 $filesize - same but limited by file size value
  4. script 0x1000000 $filesize nochk - same but without $!script header check
  5. script 0x1000000 $filesize nochk silent - same but silent
  6. # tftp script usage
  7. ADDR=0x1000000; tftp $ADDR test.script && script $ADDR $filesize
  8. # usage as files
  9. ADDR=100000; ext4load mmc 1:5 $ADDR dhcp.cmd_test.script; script $ADDR $filesize
  10. # spi flash usage
  11. ADDR=100000; sf read $ADDR $SCRIPT_OFFSET $SCRIPT_BYTES; script $ADDR

AUTHOR

  1. ## hyphop ## for Khadas