分类: LINUX
2008-12-19 11:05:53
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
第二版
一.烧写vivi。
1.把并口线插到pc机的并口,并把并口与JTAG相连,JTAG与开发板的14针JTAT口相连,打开2410.
2.把整个GIVEIO目录拷贝到C:\WINDOWS下,并把该目录下的giveio.sys文件拷贝到c:/windows/system32/drivers下。
3. 在控制面板里,选添加硬件>下一步>选-是我已经连接了此硬件>下一步>选中-添加新的硬件设备>下一步>选中安装我手动从列表选择的硬件>下一步>选择-显示所有设备>选择-从磁盘安装-浏览,指定驱动为C:\WINDOWS\GIVEIO\ giveio.inf文件,点击确定,安装好驱动
4.在d盘新建一目录bootloader,把sjf2410.exe和要烧写的vivi.bin拷贝到该目录下,在命令提示符,进入该目录,运行sjf2410 命令如下:sjf2410.exe /f:vivi
在此后出现的三次要求输入参数,第一次是让选择Flash,选0;第二次是选择jtag对flash的两种功能,也选0;第三次是让选择起始地址,选0。 此后就等待大约3-5分钟的烧写时间,当VIVI 烧写完毕后选择参数2,退出烧写。
二.烧写内核zImage(kernel)
vivi>load flash kernel x 回车
当出现Ready for downloading using xmodem...
点击超级终端任务栏上“传送”下拉菜单中的“发送文件”,选择好镜像文件zImage,Enter,协议为Xmodem,点击“发送”,4分钟左右zImage烧写完毕;
三.烧写根文件系统(root)
vivi>load flash root x 回车
当出现Ready for downloading using xmodem...
点击超级终端任务栏上“传送”下拉菜单中的“发送文件”,选择好镜像文件root.cramfs,协议为Xmodem,点击“发送" ,8分钟左右 root.cramfs烧写完毕;
四.烧写应用程序:用网线连接好2410-S的NIC-1口和PC机的网口,配置IP在同一网段,重启2410-s进入[/mnt/yaffs]下。
[/mnt/yaffs]ifconfig eth0 192.168.0.111 --配置eth0 ip
[/mnt/yaffs]inetd --启动ftp
打开ftp软件(在光盘中flashvivi目录中提供),192.168.0.111,用户名:root,密码:无,连接进入ftp,上传“yaffs.tar”到2410-S的/var下,3分钟左右上传完毕。
这时千万不要重启2410-S,
[/mnt/yaffs]cd .. --转换到/mnt下
[/mnt]rm -rf /yaffs/* --删除/yaffs下文件
[/mnt]cd /var --转到var目录下
[/var]tar xjvf yaffs-2410s-1.0.tar -C /mnt/yaffs --解压yaffs-2410s-1.0.tar到mnt/yaffs目录下,需3分钟左右
启动开发板,进入vivi,对vivi进行分区操作
分区 |
起始地址 |
分区大小 |
分区作用 |
Part0 |
0x0 |
0x00020000 (128k) |
bootloader |
Part1 |
0x00020000 |
0x00010000 (64k) |
bootloader parameters |
Part2 |
0x00030000 |
0x00200000 (2m) |
linux kernel |
Part3 |
0x00230000 |
0x00300000 (3m) |
root filesystem |
Part4 |
0x00530000 |
0x03A00000 (58m) |
yaffs filesystem |
文件
地址空间
标志
存储空间
vivi |
0x00000000 0x00020000 |
o |
128k=0x00020000 |
param |
0x00020000 0x00030000 |
o |
64k=0x00010000 |
kernel |
0x00030000 0x00130000 |
o |
1m=0x00100000 |
root |
0x00130000 0x00330000 |
4 |
2m=0x00200000 |
user |
0x00330000 0x04000000 |
8 |
59m+832k |
A load command is loading binaries to the flash or the ram.
Usage:
load |
This argument is where to load. Availabe values are flash and ram.
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.
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 |
vivi > load flash 0x80000 0xc0000 x |
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 |
is name of a new mtd partiton.
is offset in the mtd device.
is a size of a mtd parition.
is flags of a mtd parition. Available valuse are JFFS2, LOCKED, and BONFS.
Delete a mtd partiton.
part del |
Reset mtd partitions to default values.
part reset |
Save paramter valuse and mtd parition informations to flash permanently.
part save |
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 |
A boot command is boot the linux kernel which is stored in the flash memroy or ram. Usage:
boot |
This argument is where to store the linux kernel image. Availabe values are ram, nor and smc.
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 |
vivi> boot nor 0x80000 |
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> load ram 0x30008000 x |
vivi> load ram 0xA0008000 x |
A flash comamnd manages the flash memory. If you want to erase flash memory,
flash erase [ |