Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4568564
  • 博文数量: 385
  • 博客积分: 21208
  • 博客等级: 上将
  • 技术积分: 4393
  • 用 户 组: 普通用户
  • 注册时间: 2006-09-30 13:40
文章分类

全部博文(385)

文章存档

2015年(1)

2014年(3)

2012年(16)

2011年(42)

2010年(1)

2009年(2)

2008年(34)

2007年(188)

2006年(110)

分类: LINUX

2006-12-10 16:30:14

开发板买自

minicom 配置


在~/.bashrc文件里加上
MINICOM="-8 -m "  #这样使minicom显示中文
export MINICOM

设置波特率为115200bps,  无硬件流控。 保存为vga2410
以后minicom  -o vga2410 即可。



0:修改板子的默认ip地址
只需要修改/usr/etc下的rc.local脚本,
将“ifconfig eth0 192.168.0.15 up”这句命令修改为您要的ip地址即可

1:在上位机开通ftp服务之后,即可在下位机使用
    wget ftp://192.168.1.221/hello.txt
其中上位机是以匿名用户通过ftp协议取得文件的。 文件hello.txt放在上位机Rh9中的/var/ftp/目录之下。

2:在上位机配置nfs服务之后,可以直接在下位机挂载
    mount –o nolock  192.168.1.221:/2410    /mnt
之后就可在上位机的共享出来的目录/2410/下进行开发程序,在下位机的/mnt目录之下即可执行可执行程序。



MC2410E的bootloader就是vivi

如何烧写bootloader可以参考手册中的vivi一节

修改板子的网络设置:
vivi> param set ip  59.69.75.186
vivi>param set host 59.69.74.87
vivi>param set  gw  59.69.75.1
vivi>param save

1如果有可以运行的vivi,则先将要烧写的vivi放在/var/ftp目录之下
进入vivi>  提示符之下,输入load  flash vivi t  , 等待
同时在Rh9中另开一个终端,
cd   /var/ftp  
tftp   192.168.1.225  (板子IP)
tftp >put  vivi
此时在minicom中可看到烧写成功
2
D:\>sjf2410  /f:vivi




                   
                    support@brightide.com



+------------------------------------+
|     SEC JTAG FLASH(SJF) v 0.4      |
|     (S3C2410X & SMDK2410 B/D)      |
+------------------------------------+
Usage: SJF /f: /d=
Which adaptor do you use:
0: wiggler      1: sjf
your choice is:0
> S3C2410X(ID=0x0032409d) is detected.

[SJF Main Menu]
 0:K9S1208 prog      1:28F128J3A prog    2:AM29LV800 Prog    3:Memory Rd/Wr

 4:HY29lv160bt    5:AM29lv160dt      6:AM29lv160db        7:SST39vf160
 8:Exit
Select the function to test:0

[K9S1208 NAND Flash JTAG Programmer]
K9S1208 is detected. ID=0xec76
 0:K9S1208 Program      1:K9S1208 Pr BlkPage   2:Exit
Select the function to test :0

[SMC(K9S1208V0M) NAND Flash Writing Program]

Source size:0h~13a53h

Available target block number: 0~4095
Input target block number:0
target start block number     =0
target size        (0x4000*n) =0x14000
STATUS:Eppppppppppppppppppppppp
ppppppppppppppppppppppp
ppppppppppppppppppppppp
ppppppppppppppppppppppp
ppppppppppppppppppppppp








未烧写内核和根文件系统之前的启动信息

2410E DEVELOP KIT
                                                                                
VIVI version 0.1.4 (root@Rhvd) (gcc version 2.95.2 20000516 (release) [Rebel.co6MMU table base address = 0x33DFC000
Succeed memory mapping.
NAND device: Manufacture ID: 0xec, Chip ID: 0x76 (Samsung K9D1208V0M)
Found saved vivi parameters.
CS8900 - type: 630e, rev: a00
CS8900 - status: ad6 (EEPROM present)
Setting MAC address...
Display format changed to VGA 640X480 mode
Press Return to start the LINUX now, any other key for vivi
Copy linux kernel from 0x00030000 to 0x30008000, size = 0x001c0000 ... done
zImage magic = 0x016f2818
Setup linux parameters at 0x30000100
linux command line is: "noinitrd root=/dev/mtdblock/3 init=/linuxrc console=tty"MACH_TYPE = 193
NOW, Booting Linux......
Uncompressing Linux.............................................................Linux version 2.4.18-rmk7-pxa1 (root@Rhvd) (gcc version 2.95.2 20000516 (releas5CPU: ARM/CIRRUS Arm920Tsid(wb) revision 0
Machine: Br-MC2410
On node 0 totalpages: 16384
zone(0): 16384 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: noinitrd root=/dev/mtdblock/3 init=/linuxrc console=ttyS0
TCNTB4 = 15625
Console: colour dummy device 80x30
Calibrating delay loop... 99.73 BogoMIPS
Memory: 64MB = 64MB total
Memory: 62268KB available (1617K code, 504K data, 76K init)
Dentry-cache hash table entries: 8192 (order: 4, 65536 bytes)
Inode-cache hash table entries: 4096 (order: 3, 32768 bytes)
Mount-cache hash table entries: 1024 (order: 1, 8192 bytes)
Buffer-cache hash table entries: 4096 (order: 2, 16384 bytes)
Page-cache hash table entries: 16384 (order: 4, 65536 bytes)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
CPU clock = 200.000 Mhz, HCLK = 100.000 Mhz, PCLK = 50.000 Mhz
Initializing S3C2410 buffer pool for DMA workaround
check your kernel config.
USB Function Character Driver Interface - 0.5, (C) 2001, Extenex Corp.
usbctl: Opened for usb-char
usbctl: Started for usb-char
Starting kswapd
devfs: v1.10 (20020120) Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
JFFS2 version 2.1. (C) 2001, 2002 Red Hat, Inc., designed by Axis Communication.ttyS%d0 at I/O 0x50000000 (irq = 52) is a S3C2410
ttyS%d1 at I/O 0x50004000 (irq = 55) is a S3C2410
ttyS%d2 at I/O 0x50008000 (irq = 58) is a S3C2410
Console: switching to colour frame buffer device 80x60
Installed S3C2410 frame buffer
pty: 16 Unix98 ptys configured
s3c2410-ts initialized
S3C2410 Real Time Clock Driver v0.1
block: 128 slots per queue, batch=32
eth0: cs8900 rev K(3.3 Volts) found at 0xd0000300
cs89x0 media RJ-45, IRQ 36
Linux video capture interface: v1.00
SCSI subsystem driver Revision: 1.00
request_module[scsi_hostadapter]: Root fs not mounted
UDA1341 audio driver initialized
NAND device: Manufacture ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MB 3,3V)
Creating 6 MTD partitions on "NAND 64MB 3,3V":
0x00000000-0x00020000 : "S3C2410 flash partition : loader"
0x00020000-0x00030000 : "S3C2410 flash partition : param"
0x00030000-0x001f0000 : "S3C2410 flash partition : kernel"
0x00200000-0x00600000 : "S3C2410 flash partition : root"
0x00600000-0x04000000 : "S3C2410 flash partition : usr"
0x00000000-0x00020000 : "S3C2410 flash partition : loader"
usb.c: registered new driver hub
usb-ohci.c: USB OHCI at membase 0xe9000000, IRQ 26
usb.c: new USB bus registered, assigned bus number 1
hub.c: USB hub found
hub.c: 2 ports detected
usb.c: registered new driver hiddev
usb.c: registered new driver hid
hid-core.c: v1.8 Andreas Gal, Vojtech Pavlik
hid-core.c: USB HID support drivers
Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
USB Mass Storage support registered.
mice: PS/2 mouse device common for all mice
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 4096 bind 4096)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
NetWinder Floating Point Emulator V0.95 (c) 1998-1999 Rebel.com
IrCOMM protocol (Dag Brattli)
VFS: Mounted root (cramfs filesystem).
Mounted devfs on /dev
Freeing init memory: 76K
mount /etc as ramfs
re-create the /etc/mtab entries
yaffs: dev is 7940 name is "1f:04"
MMC/SD Slot initialized
MMC detect-eint is not pull up by internal resister
MMC detect-eint's pull up resister is enabled
console=/dev/co顂ole
init started:  BusyBox v0.60.3 (2002.05.13-08:36+0000) multi-c鵯l binary
Starting pid 21, console /dev/console: '/etc/init.d/rcS'
SIOCDELRT: No such process
Cannot open /dev/input/mouse0 (No such file or directory)
Create pluginlibman in libqpe
Use QPEApplication's PluginLibraryManager
inserting Documents at -1
found obex lib
inserting Applications at 0
inserting Games at 1
inserting Settings at 2
addAppLnk: No view for type Application. Can't add app Suspend!
Create pluginlibman in libqpe
Use QPEApplication's PluginLibraryManager
QuickLauncher running
Registered QPE/QuickLauncher-45
Waiting for enter to start '/bin/sh' (pid 47, terminal /dev/console)
                                                                               
Please press Enter to activate this console.
Starting pid 47, console /dev/console: '/bin/sh'
                                                                               
                                                                               
BusyBox v0.60.3 (2002.05.13-08:36+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
                                                                               
#
                                                                               
                                                                               
                                                                               
    ?.睿科技
                                                                               
                                                                               
MC2410E DEVELOP KIT
                                                                               
VIVI version 0.1.4 (root@Rhvd) (gcc version 2.95.2 20000516 (release) [Rebel.co6MMU table base address = 0x33DFC000
Succeed memory mapping.
NAND device: Manufacture ID: 0xec, Chip ID: 0x76 (Samsung K9D1208V0M)
Found saved vivi parameters.
CS8900 - type: 630e, rev: a00
CS8900 - status: ad6 (EEPROM present)
Setting MAC address...
Display format changed to VGA 640X480 mode
Press Return to start the LINUX now, any other key for vivi
type "help" for help.
vivi>               part show
mtdpart info. (5 partitions)
name              offset        size        flag
------------------------------------------------
vivi            : 0x00000000    0x00020000     0  128k
param           : 0x00020000    0x00010000     0   64k
kernel          : 0x00030000    0x001c0000     0    1M+768k
root            : 0x00200000    0x00400000     0    4M
usr             : 0x00600000    0x03a00000     0   58M
vivi>

至于用户程序,我们提供的usr分区是可写的,用户只要将程序拷贝到usr分区下就已经烧写到了flash中。可以通过网络或者u盘的方式来拷贝。
 


2410E DEVELOP KIT
                                                                               
VIVI version 0.1.4 (root@Rhvd) (gcc version 2.95.2 20000516 (release) [Rebel.co6MMU table base address = 0x33DFC000
Succeed memory mapping.
NAND device: Manufacture ID: 0xec, Chip ID: 0x76 (Samsung K9D1208V0M)
Found saved vivi parameters.
CS8900 - type: 630e, rev: a00
CS8900 - status: ad6 (EEPROM present)
Setting MAC address...
Display format changed to VGA 640X480 mode
Press Return to start the LINUX now, any other key for vivi
type "help" for help.
vivi>      param show
Number of parameters: 19
name                    :          hex             integer
-------------------------------------------------------------
mach_type               :       000000c1                  193
media_type              :       00000003                    3
boot_mem_base           :       30000000            805306368
baudrate                :       0001c200               115200
xmodem_one_nak          :       00000000                    0
xmodem_initial_timeout  :       000493e0               300000
xmodem_timeout          :       000f4240              1000000
ymodem_initial_timeout  :       0016e360              1500000
boot_delay              :       00300000              3145728
os                      :       LINUX
display                 :       VGA 640X480
ip                      :       192.168.1.225
host                    :       192.168.0.1
gw                      :       192.168.0.1
mask                    :       255.255.255.0
wincesource             :       00000000                    0
wincedeploy             :       00000001                    1
mac                     :       00:00:c0:ff:ee:08
wince part name: wince
Linux command line: noinitrd root=/dev/mtdblock/3 init=/linuxrc console=ttyS0
vivi> param set host  192.168.1.221
Change 'host' value. 0xc0a80001(-1062731775) to 0xc0a801dd(-1062731299)
vivi> param set gw 192.168.1.1
Change 'gw' value. 0xc0a80001(-1062731775) to 0xc0a80101(-1062731519)
vivi> param show
Number of parameters: 19
name                    :          hex             integer
-------------------------------------------------------------
mach_type               :       000000c1                  193
media_type              :       00000003                    3
boot_mem_base           :       30000000            805306368
baudrate                :       0001c200               115200
xmodem_one_nak          :       00000000                    0
xmodem_initial_timeout  :       000493e0               300000
xmodem_timeout          :       000f4240              1000000
ymodem_initial_timeout  :       0016e360              1500000
boot_delay              :       00300000              3145728
os                      :       LINUX
display                 :       VGA 640X480
ip                      :       192.168.1.225
host                    :       192.168.1.221
gw                      :       192.168.1.1
mask                    :       255.255.255.0
wincesource             :       00000000                    0
wincedeploy             :       00000001                    1
mac                     :       00:00:c0:ff:ee:08
wince part name: wince
Linux command line: noinitrd root=/dev/mtdblock/3 init=/linuxrc console=ttyS0
vivi>

[分享]将Linux(kernel、root和usr)烧入开发板的过程

以下为得到了kernel、root和usr 镜像文件后,对 ARM FLASH 进行写入操作步骤:
vivi> part show
mtdpart info. (5 partitions)
name              offset        size        flag
vivi            : 0x00000000    0x00020000     0  128k
param           : 0x00020000    0x00010000     0   64k
kernel          : 0x00030000    0x001c0000     0    1M+768k
root            : 0x00200000    0x00400000     0    4M
usr             : 0x00600000    0x03a00000     0   58M
vivi> part erase kernel

Found block size = 0x001c0000
Erasing...    ... done
vivi> part erase root
Found block size = 0x00400000
Erasing...    ... done
vivi> part erase usr
Found block size = 0x03a00000
Erasing...    ... done

cramfs文件系统的烧写方法
在 PC 机,Windows 系统下:
1、  准备好kernel、root和usr三个镜像文件(开发板中的相关文件名称为):
zImage-cramfs-20060117、root_china.cramfs和usr.cramfs.usbmouse
存放在C:\下。
2、  将ftp通信程序tftp.exe(原来的名称为mytftp.exe)也拷贝到C:\下
3、  打开超级终端(使用com1口;“每秒位数”为115200,“数据位“为“8”,“奇偶校验” 为无,“停止位”为“1”,“数据流控制”为“无”)

在 ARM 开发板上将网线和串口线与PC机相连接,并打开开发板电源。
在 PC 机,超级终端下:

4、使用命令: load  flash  kernel | root | usr  t 出现如下提示:
在 PC 机,命令提示符C:\盘符下:
5、分别使用命令:

tftp  -i  192.168.0.15  PUT  zImage-cramfs-20060117
tftp  -i  192.168.0.15  PUT  root_china.cramfs
tftp  -i  192.168.0.15  PUT  usr.cramfs.usbmouse


yaffs文件系统的烧写方法
在 crams 文件系统安装成功的前提下,执行一下操作:
在 PC 机,Windows 系统下:

1.准备好kernel、root和usr三个 yaffs 镜像文件(开发板中的相关文件名称为):
zImage-yaffs-20060117、root_china.yaffs和usr.yaffs.usbmouse;还有ARM LINUX下烧写 yaffs 文件系统镜像的工具 mkyaffs 存放在C:\下;

2. 将ftp通信程序tftp.exe(原来的名称为mytftp.exe)也拷贝到C:\下;
3. 行 wftpd32.exe 文件,并进行相应配置(见附录)
4.         打开超级终端(使用com1口;“每秒位数”为115200,“数据位“为“8”,“奇偶校验” 为无,“停止位”为“1”,“数据流控制”为“无”)

在 ARM 开发板上将网线和串口线与PC机相连接,并打开开发板电源。
修改 root 为 yaffs 文件格式

在 PC 机,超级终端下进入 vivi :
5.         在 vivi 下使用命令 boot 启动 linux
6.         进入 linux 后,使用命令 ifconfig  eth0  192.168.0.15  netmask 255.255.255.0  up 配置开发板的 IP 地址并且启用网卡。
7.         进入到 /etc/tmp 目录下,使用命令 wget ftp://192.168.0.1/root_china.yaffs 和wget        ftp://192.168.0.1/mkyaffs 从 Windows PC主机下载这两个文件到开发板上。
8.         使用命令 chmod +x mkyaffs ,增加 mkyaffs 的可执行属性
9.         使用命令 ./mkyaffs /dev/mtd/3 root_china.yaffs 烧写文件(mtd 分区表序号从0 开始,root 分区的序号为3)


修改 kernel 为 yaffs 文件格式


重新启动开发板

在 PC 机,超级终端下进入 vivi :
10.     使用命令 : load  flash  kernel  t  出现如下提示:
在 PC 机,命令提示符C:\盘符下:
11.     使用命令: tftp  -i  192.168.0.15  PUT  zImage-yaffs-20060117



    修改 qt/qtopia 为 yaffs 文件格式


传输完成后,重启开发板

在 PC 机,超级终端下进入 vivi
12.     使用命令 part erase usr 擦除 usr 分区
13.     在 vivi 下使用命令 boot 进入 Linux
14.     进入 linux 后,使用命令 ifconfig  eth0  192.168.0.15  255.255.255.0  up 配置开发板的 IP 地址并且启用网卡。
15.     进入到 /etc/tmp 目录下,使用命令 wget ftp://192.168.0.1/usr.yaffs.usbmouse 和wgetftp://192.168.0.1/mkyaffs 从 Windows PC主机下载这两个文件到开发板上。
16.     使用命令 chmod +x mkyaffs ,增加 mkyaffs 的可执行属性
17.使用命令 ./mkyaffs /dev/mtd/4 usr.yaffs.usbmouse 烧写文件(mtd 分区表序号从0 开始,usr 分区的序号为4)


编译内核:

tar zxf linux-br.tar.gz
cd linux
make  zImage


注意的是:

不支持yaffs为根文件系统的kernel  和以支持 yaffs为根文件系统 kernel 编译的的不同之处在于

yaffs  要将 linux内核源代码的fs/yaffs/yaffs_mtdif.c 的18行由

//#define   CONFIG_YAFFS_MTD_ENABLED
前的//  去掉

将yaffs_fs.c  的33行
//#define   CONFIG_YAFFS_MTD_ENABLED
前的//  去掉


修改后再make zImage



阅读(6370) | 评论(8) | 转发(0) |
给主人留下些什么吧!~~

tan_zhichao2009-03-09 07:27:44

你好,看了很多你的文章感觉收获不小啊 呵呵 对了,我的开发板的vivi让我改了后来不好用了,请问能发给我一份吗 我的邮箱 tanzhichaoanuo@163.com 谢谢你了 方便的话我的QQ 254536690

tan_zhichao2009-03-09 07:27:44

你好,看了很多你的文章感觉收获不小啊 呵呵 对了,我的开发板的vivi让我改了后来不好用了,请问能发给我一份吗 我的邮箱 tanzhichaoanuo@163.com 谢谢你了 方便的话我的QQ 254536690

chinaunix网友2008-09-18 10:46:36

大侠!我也买了块mc2410板子,但现在碰到个问题,希望大侠能够帮忙解答! 我用的dell 笔记本上没有9针串口,所以我就买了个usb串口转接线连接开发板的串口和笔记本的usb接口,而且从xp里面拷贝了超级终端(hyperterminal.dll 和hyperterminal.exe) 到windows vista。问题出现了,按说明书上《搭建测试环境》一章的说法,超级终端打开后应新建连接,此时应选择com1作为连接端口,但在我的超级终端上没有com1!而是显示的com20和com3!而不管我是选com20还是com3都没用!请问:这个问题如何解决? 另外还有个关于跳线的问题,板上一共有3组跳线,分别用于用于USB的主/从选择,SPI0和PS2的选 择以及SPI1和PS2的选择。 我的问题是,如果我不连接这几个跳线,对系统的启动会有什么影响吗?

chinaunix网友2008-09-18 10:46:36

大侠!我也买了块mc2410板子,但现在碰到个问题,希望大侠能够帮忙解答! 我用的dell 笔记本上没有9针串口,所以我就买了个usb串口转接线连接开发板的串口和笔记本的usb接口,而且从xp里面拷贝了超级终端(hyperterminal.dll 和hyperterminal.exe) 到windows vista。问题出现了,按说明书上《搭建测试环境》一章的说法,超级终端打开后应新建连接,此时应选择com1作为连接端口,但在我的超级终端上没有com1!而是显示的com20和com3!而不管我是选com20还是com3都没用!请问:这个问题如何解决? 另外还有个关于跳线的问题,板上一共有3组跳线,分别用于用于USB的主/从选择,SPI0和PS2的选 择以及SPI1和PS2的选择。 我的问题是,如果我不连接这几个跳线,对系统的启动会有什么影响吗?