Chinaunix首页 | 论坛 | 博客
  • 博客访问: 57839
  • 博文数量: 19
  • 博客积分: 1560
  • 博客等级: 上尉
  • 技术积分: 180
  • 用 户 组: 普通用户
  • 注册时间: 2009-06-28 17:32
个人简介

大家好 请多多关照

文章分类

全部博文(19)

文章存档

2011年(5)

2009年(14)

我的朋友

分类: LINUX

2009-06-28 17:53:14

    工作之余,每次遇到问题,总是从网上获取,还没有分享过,可能是没有这个习惯;也可能是没这个意识;也可能是感觉没这个时间;昨天晚上到了1点钟后才将主机和虚拟机Linux以及开发板SmartARM2200的通信环境搭建成功,NFS也挂载上了,也Mount到开发板上了。最后终于整理了出来,原来分享也是一种进步、一种交流,更是一种理清思路的过程,同时也是心里头的一种开心...

好了,分享如下:
1 .在安装uClinux-dist-20040408.tar 后,Fedora:开机出现欢迎应用程序似乎即将崩溃,我将尝试使用不同的欢迎程序。
网上找了有很多版本说法,其中有什么是:(以root命令行登录,执行chmod 1777 /tmp 改变目录权限)最后解决办法是:因为占用了太多的磁盘空间的缘故,虚拟机留的空闲空间太少了,建议当ARMuCLinux交叉编译环境安装好后,将 .tz 压缩文件删除掉。当然最好在安装时,分多一些空间。

2.在运行arm-elf-tools-20040427.sh 后出现 (1). tail: cannot open `+43' for reading: No such file or directory ?   (2). gzip: stdin: unexpected end of file ? 解决办法。
(1). 将第39行的代码 tail +${SKIP} ${SCRIPT} | gunzip | tar xvf - 改成如下:tail -n +${SKIP} ${SCRIPT} | gunzip | tar xvf –
(2)要在.sh 文件尾最后一行加入一空行(建议用vi修改,WindowsUnixLinux在回车换行有所不同)

3.  Error:(Fatal)L6002U:Could not open file F:\lpc2200\ARM与嵌入式系统基础实验教程. Not enough information to list the image sizes and/or totals.

不能使用中文目录名,改成英文的吧。

4.为什么会停在while((PLLSTAT & (1 << 10)) == 0){};
AXD中选择的是软件仿真了!EasyJtag没选上

5.服务器IP172.0.0.1,主机名:p470-1, 通过NFS共享/disk1目录,在客户端使用 mount -t nfs p470-1:/disk1 /disk1,时出现"mount: mount to NFS server 'p470-1' failed: RPC Error: Program not registered."错误提示。
出错原因:p470-1由于网络原因nfs服务被中断,重新开启p470-1nfs服务然后在客户端重新mount disk1即可
service nfs restart /etc/rc.d/init.d/nfs restart

6.解压uClinux-dist-20040408.tar.gz 时报如下错误。
tar: uClinux-dist/bin/nettelmem.elf: Cannot open: No such file or directory
uClinux-dist/bin/qmake
tar: uClinux-dist/bin/qmake: Cannot open: No such file or directory
tar: Error exit delayed from previous errors
原因:
这个命令是用普通用户做的,而/home/目录下来有一个root用户生成的文件。
删除这个文件后就可以了。

7.下载ZLG_BOOT时,程序运行到;设置系统模式堆栈的LDR SP,=StackUsr 停下了?
没有正确运行串口下载工程。同时检查串口连接是否正常。

8.NFS 终于挂载到了开发板!!!
主机(Host)Windows XP ;虚拟机:Red Hat Linux 9.0  开发板:SmartARM 2200
1)、搭建主机(Host) 与虚拟机Linux,以及主机和开发板,同时支持虚拟机与开发板的互相通信环境。(这个也费了我不少心思,工作之余,最少花了我一周才搞定)
主机(Host):
   IP: 192.168.0.10
   SubMarsk: 255.255.0.0
   NetGateWay:192.168.0.254
虚拟机Red Hat Linux 9.0:
   IP: 192.168.0.100
   SubMarsk: 255.255.0.0
   NetGateWay:192.168.0.254
开发板SmartARM 2200
   IP: 192.168.0.101
   SubMarsk: 255.255.0.0
   NetGateWay:192.168.0.254
以上三个操作系统平台的IP设置正确后,其中虚拟机一定要设为桥连接方式;
原因,虚拟机和主机的地位是相同的,相当于网终上其它的用户接到这个虚拟机上(虑拟桥);写到这里,还是解释一下桥吧,“桥”就是一个主机,这个机器拥有两块网卡,分别处于两个局域网中,同时在“桥”上,运行着程序,让局域网X中的所有数据包原封不动的流入Y,反之亦然。这样,局域网XY就无缝的在链路层连接起来了。

(2). 在虚拟机上新建共享目录armwork,并增加权限为777 (chmod +777 armwork) 记得以超级用户login

(3). 编辑/etc/exports 添加/home/armwork 192.168.0.*(rw,sync,no_root_suqash)

解释一下/home/armwork 即共享给192.168.0.* 网段上所有用户的目录。括号里面是能访问你的权限。

(4).检查虚拟机Linux nfsportmap服务的状态
[root@localhost etc]# service nfs status
rpc.mountd (pid 726) is running...
nfsd (pid 718 717 716 715 714 713 712 711) is running...
rpc.rquotad (pid 707) is running...
[root@localhost etc]# service portmap status
portmap (pid 549) is running...
[root@localhost etc]#
如果没有运行,那就分别输入
service nfs restart
service portmap restart
来开启它

(5) 关闭虚拟机LinuxWindows XP 主机的防火墙,XP的就不说了,这里我说一下Linux下,打开服务,将iptables去掉,并关掉服务,同时打开主菜单System Settings 下的Security Level 将防火墙级别改为No Firewall (说明,我装的时候用的是英文语言环境,中文也就是一个意思,自己看着改吧)。

(6). 在开发板上,挂载
在/usr/新建一个目录armwork, 也可以改变权限为777(chmod +777 armwork)
ZLG/BOOT V1.0 for SmartARM2200
     Guangzou ZLG-MCU Development Co.,LTD.
               graduate school
             http://www.zlgmcu.com

Chiose Function:
1: run ZLG/FTP-S V1.0 ( user     ip)
2: run ZLG/FTP-S V1.0 ( default ip)
3: run LCM demo for SmartARM2200
4: run uClinux for SmartARM2200

F: Format Disk
                               default choise is 3
     Please choise....         default choise delay 7
4
Start User's Program...Linux version 2.4.24-uc0 (root@vcmj) (gcc version 2.95.3 20010315 (release)(ColdFire patches - 20010318 from )(uClinux XIP and shared lib patches from )) #2 ò? 6?? 6 10:41:37 CST 2005
Processor: philip lpc2200 revision 14
Architecture: zlg-arm-linux
Ignoring unrecognised tag 0x00000000
On node 0 totalpages: 2048
zone(0): 0 pages.
zone(1): 2048 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/ram
Calibrating delay loop... 1.93 BogoMIPS
Memory: 8MB = 8MB total
Memory: 5876KB available (962K code, 183K data, 40K init)
Dentry cache hash table entries: 1024 (order: 1, 8192 bytes)
Inode cache hash table entries: 512 (order: 0, 4096 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 2048 (order: 1, 8192 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
Starting kswapd
Serial driver version 5.05c (2001-07-08) with no serial options enabled
ttyS00 at 0xe000c000 (irq = 6) is a 16550A
ttyS01 at 0xe0010000 (irq = 7) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
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 512 bind 512)
RAMDISK: ext2 filesystem found at block 0
RAMDISK: Loading 1000 blocks [1 disk] into ram disk... done.
Freeing initrd memory: 1024K
VFS: Mounted root (ext2 filesystem) readonly.
Freeing init memory: 40K
Shell invoked to run file: /etc/rc
Command: hostname GDB-ARMulator
Command: /bin/expand /etc/ramfs.img /dev/ram1
Command: mount -n -o remount,rw /
Command: mount -t proc proc /proc
Command: mount -t ext2 /dev/ram1 /var
Command: insmod /bin/zlg_ffs
Using /bin/zlg_ffs
Warning: loading zlg_ffs will taint the kernel: non-GPL license - Proprietary
   See for information about tainted modules
zlg_ffs: zlg_ffs_init OK
Command: mount /dev/zlg_ffs /usr
VFS: Can't find ext2 filesystem on dev zlg_ffs(126,0).
kmod: failed to exec /sbin/modprobe -s -k nls_cp437, errno = 2
kmod: failed to exec /sbin/modprobe -s -k nls_iso8859-1, errno = 2
kmod: failed to exec /sbin/modprobe -s -k nls_iso8859-1, errno = 2
kmod: failed to exec /sbin/modprobe -s -k nls_iso8859-1, errno = 2
Command: mkdir /var/tmp
Command: mkdir /var/log
Command: mkdir /var/run
Command: mkdir /var/lock
Command: mkdir /var/empty
Command: /usr/etc/rc
BINFMT_FLAT: Loading file: /usr/etc/rc
BINFMT_FLAT: bad magic/rev (0x6f64202f, need 0x4)
Shell invoked to run file: /usr/etc/rc
Command: insmod /usr/bin/rtl8019
Using /usr/bin/rtl8019
Warning: loading rtl8019 will taint the kernel: non-GPL license - Proprietary
   See for information about tainted modules
eth0: init OK
Command: ifconfig eth0 192.168.0.101
Command: ifconfig eth0 netmask 255.255.0.0
Command: ifconfig eth0 down
Command: ifconfig eth0 hw ether 00:14:97:0f:00:0
Command: ifconfig eth0 up
Command: route add default gw 192.168.0.254
Execution Finished, Exiting
Command: cat /etc/motd
Welcome to
           ____ _   _
         /   __| ||_|                
     _   _| |   | | _ ____   _   _   _   _
   | | | | |   | || |   _ \| | | |\ \/ /
   | |_| | |__| || | | | | |_| |/     \
   |   ___\____|_||_|_| |_|\____|\_/\_/
   | |
   |_|

GDB/ARMulator support by
For further information check:


Execution Finished, Exiting

Sash command shell (version 1.1.1)
/> mount -o nolock 192.168.0.100:/home/armwork /usr/armwork
/> cd /usr/armwork
/usr/armwork> ll
ll: Bad command or file name
/usr/armwork> ls
dameon.c
fork.c
open
select.c
/usr/armwork>
开心,虚拟机Linux 上的文件已经到了开发板!!!
阅读(6685) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:GDB调试精粹及使用实例

给主人留下些什么吧!~~