主题 : vivi命令详解——初学者荐 复制链接 | 浏览器收藏 | 打印
会当凌绝顶,一览众山小!
级别: 总版主
UID: 2
精华: 17
发帖: 1653
金钱: 13840 两
威望: 5365 点
贡献值: 17 点
综合积分: 3646 分
注册时间: 2008-01-01
最后登录: 2021-01-27
楼主  发表于: 2008-03-09 14:39

 vivi命令详解——初学者荐

管理提醒: 本帖被 qq2440 执行取消置顶操作(2009-08-07)
在超级终端界面中键入任意键(除enter外)进入vivi命令界面
vivi>
输入help 可以见到开发板上的vivi 支持的命令
vivi> help
Usage:
      cpu [{cmds}]                            -- Manage cpu clocks
      bon [{cmds}]                            -- Manage the bon file system
      reset                                    -- Reset the system
      param [set|show|save|reset]              -- set/get parameter
      part [add|del|show|reset]                -- Manage MTD partitions
      mem [{cmds}]                            -- Manage Memory
      load {...}                              -- Load a file to RAM/Flash
      go <addr> <a0> <a1> <a2> <a3>            -- jump to <addr>
      dump <addr> <length>                    -- Display (hex dump) a range of memory.

      call <addr> <a0> <a1> <a2> <a3>          -- jump_with_return to <addr>
      boot [{cmds}]                            -- Booting linux kernel
      help [{cmds}]                            -- Help about help?
      display <vga|pal>                        -- Set the display format


      flash [{cmds}]                          -- Manage Flash memory
      wince [rewrite]                                  -- boot wince from ethernet or f
lash by eboot

      os <linux|wince>                        -- set the default os



mem命令 mem系列命令用于对系统的内存进行操作
vivi> mem help
'mem' command usage:
----------command parameter list-----------
mem size -- probe dram size
mem read <addr> -- read a word(4bytes) from special dram address
mem write <addr> <vlaue> -- write a word(4bytes) into special dram
address
mem test <start_addr> <size> [<quiet>] -- memory test
-----------sub command list-------------
mem cmp <dst_addr> <src_addr> <length> -- compare
mem copy <dst_addr> <src_addr> <length> -- copy memory from
<src_addr> to <dst_a
ddr>
mem info -- display memory infomation
mem reset -- reset memory control register
mem search <start_addr> <end_addr> <value> -- search memory address
that contain value in the special memory address range

vivi>mem info
RAM Information:               
Default ram size: 64M                   
Real ram size      : 64M
Free memory        : 61M

RAM mapped to              : 0x30000000 - 0x34000000    (SDRAM映射的地址范围)
Flash memory mapped to    : 0x10000000 - 0x12000000    (Flash映射的地址范围)
Available memory region : 0x30000000 - 0x33de4000      (用户可以使用的有效的内存区域地址范围)
Stack base address        : 0x33debffc      (栈的基地址)
Current stack pointer      : 0x33debc78      (当前栈指针的值)

Memory control register vlaues      (S3C2410的内存控制寄存器的当前值)
        BWSCON = 0x22111d10
      BANKCON0 = 0x00000700
      BANKCON1 = 0x00000700
      BANKCON2 = 0x00001f7c
      BANKCON3 = 0x00000700
      BANKCON4 = 0x00000700
      BANKCON5 = 0x00000700
      BANKCON6 = 0x00018001
      BANKCON7 = 0x00018001
      REFRESH = 0x008e01e9
      BANKSIZE = 0x000000b1
        MRSRB6 = 0x00000020
        MRSRB7 = 0x00000020
vivi>


load命令
load 命令下载程序到存储器中(Flash或者 RAM中)过 load help 可
以显示系统对 load系列命令的帮助提示 
vivi>
load help
Usage:
    load <flash|ram> [ <partname> | <addr> <size> ] <x|y|z|t>

        关键字参数 flash 和 ram 用于选择目标介质是 Flash还是 RAM
到 Flash 中还是先要下载到 RAM 中(临时下载到 SDRAM 的起始地址处
0x30000000保存一下,然后再转写入 FLASH),然后再通过 Flash驱动程
序提供的写操作,将数据写入到 Flash中选择了 flash 参数,那名
到底是对 NOR Flash操作还是对 NAND Flash操作,这取决于 bootloader
编译的过程中,所进行的配置,这就要看配置的时候将MTD设备配置成NOR
Flash还是 NAND Flash 
        参数 partname 和 addr size二者选其一,partname是 vivi的 MTD分区表中
的分区名 MTD分区的起始地址;addr和
size是让用户自己选择下载的目标存储区域,而不是使用 vivi的 MTD分区,
addr表示下载的目标地址,size表示下载的文件大小,单位字节,size参数
不一定非要指定得和待下载的文件大小一样大,但是一定要大于等于待下载
的文件的字节数 
        关键字参数 x y 和 z 分别表示从 PC主机上下载文件到 ARMer9系统中,
采用哪种串行文件传送协议,x表示采用XModem协议,y表示采用Ymodem协议,z表示采用 ZModem协议请注意目前该 bootloader    vivi 还没有
实现 ZModem协议,所以该参数只能选择 x和 y 

          关键字参数t应该是开发板vivi增加的,是tftp下载!很好用的!速度比jtag要快多了!
开发板的vivi eboot烧写都要通过load命令
如:要烧写eboot.nb0到flash的eboot分区,首先在超级中断进入vivi的shell,输入
load    flash    eboot    t
使用交叉网线连好PC与开发板,把eboot.nb0拷贝到于mtftp.exe同一目录下,在windows命令行输入
mytftp    -i      192.168.0.15    PUT    eboot.nb0
等待烧写完成即可


    param命令    param系列命令用于对 bootloader的参数进行操作 通过 param help可以
显示系统对 param系列命令的帮助提示 

vivi>param help
Usage:
param help                        -- Help aout 'param' command
param reset                        -- Reset parameter table to default table
param save                        -- Save parameter table to flash memeory
param set <name> <value>          -- Reset value of parameter
param set linux_cmd_line "..."    -- set boot parameter
param set wince_part_name "..."            -- set the name of partition wich wince
will be stored in
param show                        -- Display parameter table
vivi>

友善之臂淘宝直销店:http://shop34928758.taobao.com

手机:13560352861(杨工),QQ:10108270
级别: 新手上路
UID: 926
精华: 0
发帖: 16
金钱: 160 两
威望: 16 点
贡献值: 0 点
综合积分: 32 分
注册时间: 2008-06-22
最后登录: 2008-08-23
1楼  发表于: 2008-06-22 15:24
改天有机会一点把vivi给剖析了
级别: 新手上路
UID: 2485
精华: 0
发帖: 7
金钱: 70 两
威望: 25 点
贡献值: 0 点
综合积分: 14 分
注册时间: 2008-11-20
最后登录: 2010-10-19
2楼  发表于: 2008-11-28 10:36
.2.1. load command
A load command is loading binaries to the flash or the ram.

Usage: load <media_type> [ <partname> | <addr> <size> ] <x|y|z>




<media_type>
This argument is where to load. Availabe values are flash and ram.

[ <partname> ] or [ <addr> <size> ]
This arguement determines location where to load a binary. If you want to use pre-defined mtd partiton informations, just type a partition name. Otherwise you specify an address and a size.

<x|y|z>
This arguement determines the file transfer protocol. I shy that the vivi only supprot xmodem curruntly. So, Available value is "x".


For exampe, you load zImage to flash memroy. vivi > load flash kernel x

or you specify an address and a size. vivi > load flash 0x80000 0xc0000 x




--------------------------------------------------------------------------------

3.2.2. part command
The vivi has mtd partiton informations for the vivi. This informatin not related to mtd partition informations of mtd device drivers. The vivi uses partition informations when load a binary, boot the linux kernel, erase flash memroy, etc...

Avalilable commands are:

Display mtd partition informations. part show



Add a new mtd partition. part add <name> <offset> <size> <flag>




<name>
is name of a new mtd partiton.

<offset>
is offset in the mtd device.

<size>
is a size of a mtd parition.

<flag>
is flags of a mtd parition. Available valuse are JFFS2, LOCKED, and BONFS.


Delete a mtd partiton. part del <partname>



Reset mtd partitions to default values. part reset



Save paramter valuse and mtd parition informations to flash permanently. part save




--------------------------------------------------------------------------------

3.2.3. param command
The vivi has some parameter values. For example, the "boot_delay " paramter determines how long wait keystroek when the vivi is in the autoboot mode. I'm sorry that this feature is in progress. So all listed parameter is not available.

Here, I give several tips for you.

If you change the "linxu command line", vivi> param set linux_cmd_line "you wish.."



If you want to see paramters, vivi> param show



If you want to wait a long time when recevie file via xmodem, vivi> param set xmodem_initial_timeout 3000000



If you want to boot imediately when a hardware reset, vivi> param set boot_delay 100000




--------------------------------------------------------------------------------

3.2.4. boot command
A boot command is boot the linux kernel which is stored in the flash memroy or ram. Usage: boot <media_type> [ <partname> | <addr> <size> ]




<media_type>
This argument is where to store the linux kernel image. Availabe values are ram, nor and smc.

[ <partname> ] or [ <addr> <size> ]
This arguement determines location where to store the linux kernel. If you want to use pre-defined mtd partiton information, just type a partition name. Otherwise you shuld specify an address and a size.


Note that all argument is optional. If you omit all argument (just type boot), all arguments is parsing from pre-defined mtd parititon information called "kernel" For example, vivi> boot

the vivi read the linux kernel binary from the "kernel" mtd parititons. vivi> boot nor 0x80000

the vivi read the linux kernel binary form the nor flash memory. the offset is 0x80000 and the size is default value (0xc0000).

Ocassionally, you want to test the kernel on the ram (not store kernel to flash). you can do it on the vivi On the SA-1110 based machine, vivi> load ram 0xc0008000 x
vivi> boot ram

On the S3C2410 based machine, vivi> load ram 0x30008000 x
vivi> boot ram

On the PXA-240 based machine, vivi> load ram 0xA0008000 x
vivi> boot ram

the vivi boot the linux kernel from the ram.


--------------------------------------------------------------------------------

3.2.5. flash command
A flash comamnd manages the flash memory. If you want to erase flash memory, flash erase [ <partname> | <offset> <size> ]
级别: 侠客
UID: 21258
精华: 1
发帖: 120
金钱: 655 两
威望: 131 点
贡献值: 1 点
综合积分: 260 分
注册时间: 2010-05-13
最后登录: 2018-06-14
3楼  发表于: 2010-07-11 20:37
终于见到了vivi最早的命令了,个人感觉友善改的supervivi变成傻瓜式的了,方便了我们开发,但没有vivi和u-boot的通用性。象go,boot这种命令才是开发用的命令呢