版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
实验五NFS文件系统实验一、实验目的掌握Linux系统之间资源共享和互访方法;掌握NFS服务器和客户端的安装与配置。二、实验设备硬件:EduKit-IV嵌入式教学实验平台、Mini2410核心子板、PC机;软件:Windows2000/NT/XP、Ubuntu8.04、其他嵌入式软件包。实验内容利用rpm命令安装软件包的方法;安装、配置NFS服务器并启动Linux系统之间资源共享。实验步骤:1)单击菜单应用程序->附件->终端打开终端,设置环境变量;$source/usr/local/src/EduKit-IV/Mini2410/set_env_linux.sh2)安装配置nfs服务:$cd$SIMPLEDIR/6.5-nfs-server$sudoshlocal-nfs-install.sh安装脚本如下:#!/bin/bash##E-pack-install.sh-InstallNFSserver.##Copyright(C)2002-2007<>33#Created.lusi<luce_008@163.com>sudoapt-getinstallnfs-kernel-servernfs-commonportmapcd/etc/default/sudosed's/OPTIONS="-i"/#OPTIONS="-i"/'portmap>portmap-tempsudorm-fportmapsudomvportmap-tempportmapcd/etc/sudosed's/#\/srv\/nfs4\/homesgss\/krb5i(rw,sync)/\/home\/example\/nfs*(rw,sync)/'exports>exports-tempsudorm-fexportssudomvexports-tempexportssudoexportfs-rsudo/etc/init.d/nfs-kernel-serverrestart3)拷贝6.3节中已经创建好的文件结构$NFSDIR目录下:$cp-av../6.3-busybox/root-mini/*$NFSDIR4)连接好交叉串口线(连接实验平台COM2到PC端串口),连接好交叉网线(连接实验平台主板网卡接口到PC端网卡)。点击ubuntu菜单栏右边的网络图标,弹出以下界面:图6-5-1网络设置界面6)在界面中点击解锁按钮,弹出对话框要求输入当前用户密码,正确输入后,将激活该菜单,如下图所示:图6-5-2激活网络设置界面7)选中“有线连接”,点击属性按钮,在弹出的界面中按照下图所示设置网络IP(其中IP地址可以任意设置,必须为跟实验平台主板网卡IP在同一网段):图6-5-3设置网络IP8)设置完成后点击确定按钮退出,则网络设置界面将显示如下:图6-5-4设置正确后的网络9)此时运行ubuntu的终端,在终端中输入命令查看当前网络设置,如果正确则显示如下:$ifconfigeth0Linkencap:以太网硬件地址00:16:36:3b:c5:1einet地址:90广播:55掩码:inet6地址:fe80::216:36ff:fe3b:c51e/64Scope:LinkUPBROADCASTRUNNINGMULTICASTMTU:1500接收数据包:773错误:0丢弃:0过载:0帧数:0发送数据包:1722错误:0丢弃:0过载:0载波:0碰撞:0发送队列长度:1000接收字节:113752(111.0KB)发送字节:1978362(1.8MB)中断:20跃点数:1loLinkencap:本地环回inet地址:掩码:inet6地址:::1/128Scope:HostUPLOOPBACKRUNNINGMTU:16436跃点数:1接收数据包:1488错误:0丢弃:0过载:0帧数:0发送数据包:1488错误:0丢弃:0过载:0载波:0碰撞:0发送队列长度:0接收字节:81664(79.7KB)发送字节:81664(79.7KB)10)运行minicom,给实验平台加电,启动vivi并按空格键进入到vivi的命令行界面,修改vivi引导参数:vivi>paramsetlinux_cmd_line"root=/dev/nfsnfsroot=90:/home/example/nfsip=00:90:::EDUK4:eth1:offconsole=ttySAC1,115200mem=64Minit=/linuxrcnoinitrd"vivi>paramsave//注释:输入次命令将会保存修改后的vivi参数信息到Flash,可以不保存6)输入命令启动内核,可以看到正确引导nfs文件系统。vivi>boot7)minicom终端将正确启动linux:VIVIversion0.1.4(embest@embest-laptop)(gccversion2.95.320010315(release))#TMMUtablebaseaddress=0x33DFC000Succeedmemorymapping.NANDdevice:ManufactureID:0xec,ChipID:0x76(SamsungK9D1208V0M)Couldnotfoundstoredviviparameters.Usedefaultviviparameters.PressReturntostarttheLINUXnow,anyotherkeyforvivitype"help"forhelp.vivi>paramsetlinux_cmd_line"root=/dev/nfsnfsroot=90:/home/example/nfsip=00:90:::EDUK4:eth0:offconsole=ttySAC1,115200mem=64Minit=/linuxrcnoinitrd"Changelinuxcommandlineto"root=/dev/nfsnfsroot=90:/home/example/nfsip=00:90:::EDUK4:eth1:offconsole=ttySAC1,115200mem=64Minit=/linuxrcnoinitrd"vivi>bootCopylinuxkernelfrom0x00030000to0x30008000,size=0x001d0000...size=14donezImagemagic=0x016f2818Copyramdiskfrom0x00200000to0x30800000,size=0x00200000...size=2097152doneSetuplinuxparametersat0x30000100linuxcommandlineis:"root=/dev/nfsnfsroot=90:/home/example/nfs"MACH_TYPE=193NOW,BootingLinuxUncompressingLinuxLinuxversion2.6.14(embest@embest-laptop)(gccversion3.4.5)#2WedNov2609:308CPU:ARM920Tid(wb)[41129200]revision0(ARMv4T)Machine:SMDK2410ATAG_INITRDisdeprecated;pleaseupdateyourbootloader.Memorypolicy:ECCdisabled,Datacachewriteback37CPUS3C2410A(id0x32410002)S3C2410:core200.000MHz,memory100.000MHz,peripheral50.000MHzS3C2410Clocks,(c)2004SimtecElectronicsCLOCK:Slowmode(1.500MHz),fast,MPLLon,UPLLonUSBControl,(c)2006pc104CPU0:DVIVTwrite-backcacheCPU0:Icache:16384bytes,associativity64,32bytelines,8setsCPU0:Dcache:16384bytes,associativity64,32bytelines,8setsBuilt1zonelistsKernelcommandline:root=/dev/nfsnfsroot=90:/home/example/nfsipdirq:clearingsubpendingstatus00000038irq:clearingsubpendingstatus00000010PIDhashtableentries:512(order:9,8192bytes)timertcon=00000000,tcnta2c1,tcfg00000200,00000000,usec00001eb8Console:colourdummydevice80x30Dentrycachehashtableentries:16384(order:4,65536bytes)Inode-cachehashtableentries:8192(order:3,32768bytes)Memory:64MB=64MBtotalMemory:60928KBavailable(2803Kcode,688Kdata,420Kinit)Mount-cachehashtableentries:512CPU:Testingwritebuffercoherency:oksoftlockupthread0startedup.NET:Registeredprotocolfamily16S3C2410:InitialisingarchitectureSCSIsubsysteminitializedusbcore:registerednewdriverusbfsusbcore:registerednewdriverhubBluetooth:Corever2.7NET:Registeredprotocolfamily31Bluetooth:HCIdeviceandconnectionmanagerinitializedBluetooth:HCIsocketlayerinitializedS3C2410DMADriver,(c)2003-2004SimtecElectronicsDMAchannel0atc4800000,irq33DMAchannel1atc4800040,irq34DMAchannel2atc4800080,irq35DMAchannel3atc48000c0,irq36NetWinderFloatingPointEmulatorV0.97(doubleprecision)devfs:2004-01-31RichardGooch(rgooch@atnf.csiro.au)devfs:boot_options:0x138JFFS2version2.2.(NAND)(C)2001-2003RedHat,Inc.yaffsNov25200816:42:48Installing.InitializingCryptographicAPIConsole:switchingtocolourframebufferdevice80x30fb0:s3c2410fbframebufferdeviceS3C2410RTC,(c)2004SimtecElectronicss3c2410-rtcs3c2410-rtc:rtcdisabled,re-enablings3c2410_serial0atMMIO0x50000000(irq=70)isaS3C2410s3c2410_serial1atMMIO0x50004000(irq=73)isaS3C2410s3c2410_serial2atMMIO0x50008000(irq=76)isaS3C2410ioschedulernoopregisteredioscheduleranticipatoryregisteredioschedulerdeadlineregisteredioschedulercfqregisteredRAMDISKdriverinitialized:16RAMdisksof4096Ksize1024blocksizeloop:loaded(max8devices)nbd:registereddeviceatmajor43usbcore:registerednewdriverubDM9000Aeth0foundDM9000Aeth1foundLinuxvideocaptureinterface:v1.00ovcamchip:v2.27forLinux2.6:OVcamerachipI2CdriverS3C24XXNANDDriver,(c)2004SimtecElectronicss3c2410-nand:mappedregistersatc4880000s3c2410-nand:timing:Tacls10ns,Twrph040ns,Twrph110nsNANDdevice:ManufacturerID:0xec,ChipID:0x76(SamsungNAND64MiB3,3V8-bi)ScanningdeviceforbadblocksCreating6MTDpartitionson"NAND64MiB3,3V8-bit":0x00000000-0x00030000:"bootloader"0x00030000-0x00200000:"kernel"0x00200000-0x00400000:"ramdisk"0x00400000-0x03c00000:"yaffs"0x03c00000-0x03d00000:"jffs2"0x03d00000-0x03ff0000:"data"usbmon:debugfsisnotavailables3c2410-ohcis3c2410-ohci:S3C24XXOHCIs3c2410-ohcis3c2410-ohci:newUSBbusregistered,assignedbusnumber1s3c2410-ohcis3c2410-ohci:irq42,iomem0x49000000hub1-0:1.0:USBhubfound39hub1-0:1.0:2portsdetectedInitializingUSBMassStoragedriver...usbcore:registerednewdriverusb-storageUSBMassStoragesupportregistered.usbcore:registerednewdriverhiddevusbcore:registerednewdriverusbhiddrivers/usb/input/hid-core.c:v2.6:USBHIDcoredriverusbcore:registerednewdriverdabusbdrivers/usb/media/dabusb.c:v1.54:DAB-USBInterfaceDriverforLinux(c)1999s3c2410_udc:version28Aug2005s3c2410_udc_probegotandenabledclocks3c2410_udc:gotirq41mice:PS/2mousedevicecommonforallmicets:Compaqtouchscreenprotocoloutputs3c2410TouchScreensuccessfullyloadedi2c/deventriesdrivers3c2410-i2cs3c2410-i2c:slaveaddress0x10s3c2410-i2cs3c2410-i2c:busfrequencysetto390KHzs3c2410-i2cs3c2410-i2c:i2c-0:S3CI2CadapterBluetooth:HCIUSBdriverver2.9usbcore:registerednewdriverhci_usbs3c2410-sdidriverinitialisationdone.UDA1341audiodriverinitializedNET:Registeredprotocolfamily26NET:Registeredprotocolfamily2IProutecachehashtableentries:1024(order:0,4096bytes)TCPestablishedhashtableentries:4096(order:2,16384bytes)TCPbindhashtableentries:4096(order:2,16384bytes)TCP:Hashtablesconfigured(established4096bind4096)TCPrenoregisteredTCPbicregisteredNET:Registeredprotocolfamily1Bluetooth:L2CAPver2.7Bluetooth:L2CAPsocketlayerinitializedBluetooth:RFCOMMver1.5Bluetooth:RFCOMMsocketlayerinitializedBluetooth:RFCOMMTTYlayerinitializedBluetooth:BNEP(EthernetEmulation)ver1.2Bluetooth:BNEPfilters:protocolmulticast802.1QVLANSupportv1.8BenGreear<greearb@>AllbugsaddedbyDavidS.Miller<davem@>IP-Config:Complete:device=eth1,addr=00,mask=,gw=,host=EDUK4,domain=,nis-domain=(none),bootserver=90,rootserver=90,rootpath=LookingupportofRPC100003/2on90LookingupportofRPC100005/1on90VFS:Mountedroot(nfsfilesystem).Mounteddevfson/devFreeinginitmemory:420Kinitstarted:BusyBoxv1.1.2(2008.11.25-08:48+0000)multi-callbinaryStartingpid763,console/dev/console:'/etc/init.d/rcS'running/etc/init.d/rcSmounttmpfsfilesystemto/tmpmountramfsfilesystemto/var//此处正确加载nfs根文件系统PleasepressEntertoactivatethisconsole.Startingpid782,console/dev/console:'/bin/sh'/$四、实验中遇到的问题及解决方法在本次实验中,一直都出现超时错误,经过老师的帮助也没能解决,我们自己又插好网线、换网线做了好几次,仍然不可以。第二部分嵌入式Linux驱动开发实验环境构建说明:在做实验之前,先统一一下实验环境,本部分linux下的实验均脱离GUI图形界面,均为linux命令行下操作,因此提供了专用于实验用的精简文件系统。在实验中提供的rootfs-eduk4-base.tgz根文件系统映像即为实验用文件系统,可参照《基于S3C2410嵌入式Linux开发实验与实践》4.6.2章节中(P227)更新yaffs文件系统映像为rootfs-eduk4-base.tgz。可以在ubuntu下操作,串口终端使用minicom。并修改vivi的启动参数为yaffs根文件系统引导:vivi>paramresetvivi>paramsave文件系统更新完毕,并修改好vivi启动参数后,启动实验系统,minicom的终端串口信息如下:VIVIversion0.1.4(embest@embest-laptop)(gccversion2.95.320010315(release))#0.1.42008xxxxxxxxxxxxxxxxxxxxxx16:38:19CSTMMUtablebaseaddress=0x33DFC000Succeedmemorymapping.NANDdevice:ManufactureID:0xec,ChipID:0x76(SamsungK9D1208V0M)Foundsavedviviparameters.PressReturntostarttheLINUXnow,anyotherkeyforviviCopylinuxkernelfrom0x00030000to0x30008000,size=0x001d0000...size=1900544donezImagemagic=0x016f2818Copyramdiskfrom0x00200000to0x30800000,size=0x00200000...size=2097152doneSetuplinuxparametersat0x30000100linuxcommandlineis:"noinitrdroot=/dev/mtdblock/3rootfstype=yaffsconsole=ttySAC1"MACH_TYPE=193NOW,BootingLinuxUncompressingLinuxdone,bootingthekernel.Linuxversion2.6.14(embest@embest-laptop)(gccversion3.4.5)#2WedNov2609:30:51CST2008CPU:ARM920Tid(wb)[41129200]revision0(ARMv4T)Machine:SMDK2410ATAG_INITRDisdeprecated;pleaseupdateyourbootloader.Memorypolicy:ECCdisabled,DatacachewritebackCPUS3C2410A(id0x32410002)S3C2410:core200.000MHz,memory100.000MHz,peripheral50.000MHzS3C2410Clocks,(c)2004SimtecElectronicsCLOCK:Slowmode(1.500MHz),fast,MPLLon,UPLLonUSBControl,(c)2006pc104CPU0:DVIVTwrite-backcacheCPU0:Icache:16384bytes,associativity64,32bytelines,8setsCPU0:Dcache:16384bytes,associativity64,32bytelines,8setsBuilt1zonelistsKernelcommandline:noinitrdroot=/dev/mtdblock/3rootfstype=yaffsconsole=ttySAC1irq:clearingsubpendingstatus00000010PIDhashtableentries:512(order:9,8192bytes)timertcon=00000000,tcnta2c1,tcfg00000200,00000000,usec00001eb8Console:colourdummydevice80x30Dentrycachehashtableentries:16384(order:4,65536bytes)Inode-cachehashtableentries:8192(order:3,32768bytes)Memory:64MB=64MBtotalMemory:60928KBavailable(2803Kcode,688Kdata,420Kinit)Mount-cachehashtableentries:512CPU:Testingwritebuffercoherency:oksoftlockupthread0startedup.NET:Registeredprotocolfamily16S3C2410:InitialisingarchitectureSCSIsubsysteminitializedusbcore:registerednewdriverusbfsusbcore:registerednewdriverhubBluetooth:Corever2.7NET:Registeredprotocolfamily31Bluetooth:HCIdeviceandconnectionmanagerinitializedBluetooth:HCIsocketlayerinitializedS3C2410DMADriver,(c)2003-2004SimtecElectronicsDMAchannel0atc4800000,irq33DMAchannel1atc4800040,irq34DMAchannel2atc4800080,irq35DMAchannel3atc48000c0,irq36NetWinderFloatingPointEmulatorV0.97(doubleprecision)devfs:2004-01-31RichardGooch(rgooch@atnf.csiro.au)devfs:boot_options:0x1JFFS2version2.2.(NAND)(C)2001-2003RedHat,Inc.3yaffsNov25200816:42:48Installing.InitializingCryptographicAPIConsole:switchingtocolourframebufferdevice80x30fb0:s3c2410fbframebufferdeviceS3C2410RTC,(c)2004SimtecElectronicss3c2410-rtcs3c2410-rtc:rtcdisabled,re-enablings3c2410_serial0atMMIO0x50000000(irq=70)isaS3C2410s3c2410_serial1atMMIO0x50004000(irq=73)isaS3C2410s3c2410_serial2atMMIO0x50008000(irq=76)isaS3C2410ioschedulernoopregisteredioscheduleranticipatoryregisteredioschedulerdeadlineregisteredioschedulercfqregisteredRAMDISKdriverinitialized:16RAMdisksof4096Ksize1024blocksizeloop:loaded(max8devices)nbd:registereddeviceatmajor43usbcore:registerednewdriverubDM9000Aeth0foundDM9000Aeth1foundLinuxvideocaptureinterface:v1.00ovcamchip:v2.27forLinux2.6:OVcamerachipI2CdriverS3C24XXNANDDriver,(c)2004SimtecElectronicss3c2410-nand:mappedregistersatc4880000s3c2410-nand:timing:Tacls10ns,Twrph040ns,Twrph110nsNANDdevice:ManufacturerID:0xec,ChipID:0x76(SamsungNAND64MiB3,3V8-bit)ScanningdeviceforbadblocksCreating6MTDpartitionson"NAND64MiB3,3V8-bit":0x00000000-0x00030000:"bootloader"0x00030000-0x00200000:"kernel"0x00200000-0x00400000:"ramdisk"0x00400000-0x03c00000:"yaffs"0x03c00000-0x03d00000:"jffs2"0x03d00000-0x03ff0000:"data"usbmon:debugfsisnotavailables3c2410-ohcis3c2410-ohci:S3C24XXOHCIs3c2410-ohcis3c2410-ohci:newUSBbusregistered,assignedbusnumber1s3c2410-ohcis3c2410-ohci:irq42,iomem0x49000000hub1-0:1.0:USBhubfoundhub1-0:1.0:2portsdetectedInitializingUSBMassStoragedriver...usbcore:registerednewdriverusb-storageUSBMassStoragesupportregistered.usbcore:registerednewdriverhiddev4usbcore:registerednewdriverusbhiddrivers/usb/input/hid-core.c:v2.6:USBHIDcoredriverusbcore:registerednewdriverdabusbdrivers/usb/media/dabusb.c:v1.54:DAB-USBInterfaceDriverforLinux(c)1999s3c2410_udc:version28Aug2005s3c2410_udc_probegotandenabledclocks3c2410_udc:gotirq41mice:PS/2mousedevicecommonforallmicets:Compaqtouchscreenprotocoloutputs3c2410TouchScreensuccessfullyloadedi2c/deventriesdrivers3c2410-i2cs3c2410-i2c:slaveaddress0x10s3c2410-i2cs3c2410-i2c:busfrequencysetto390KHzs3c2410-i2cs3c2410-i2c:i2c-0:S3CI2CadapterBluetooth:HCIUSBdriverver2.9usbcore:registerednewdriverhci_usbs3c2410-sdidriverinitialisationdone.UDA1341audiodriverinitializedNET:Registeredprotocolfamily26NET:Registeredprotocolfamily2IProutecachehashtableentries:1024(order:0,4096bytes)TCPestablishedhashtableentries:4096(order:2,16384bytes)TCPbindhashtableentries:4096(order:2,16384bytes)TCP:Hashtablesconfigured(established4096bind4096)TCPrenoregisteredTCPbicregisteredNET:Registeredprotocolfamily1Bluetooth:L2CAPver2.7Bluetooth:L2CAPsocketlayerinitializedBluetooth:RFCOMMver1.5Bluetooth:RFCOMMsocketlayerinitializedBluetooth:RFCOMMTTYlayerinitializedBluetooth:BNEP(EthernetEmulation)ver1.2Bluetooth:BNEPfilters:protocolmulticast802.1QVLANSupportv1.8BenGreear<greearb@>AllbugsaddedbyDav
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 机械行业促销计划总结
- 健康行业采购工作总结
- 重要工程安保工作的系统总结计划
- 科技产品设计师的智能体验与科技感
- 水务文化建设的探索计划
- 中小学了解学习历史英雄人物故事主题班会:红色人物1
- 2023年云南省临沧市公开招聘警务辅助人员辅警笔试自考题1卷含答案
- 2022年浙江省舟山市公开招聘警务辅助人员辅警笔试自考题1卷含答案
- 2024年山西省忻州市公开招聘警务辅助人员辅警笔试自考题1卷含答案
- 2022年浙江省丽水市公开招聘警务辅助人员辅警笔试自考题1卷含答案
- 装配式钢筋混凝土简支T梁设计
- COMMERCIAL INVOICE 商业发票
- 大气课程设计-—袋式除尘器
- 普天超五类检测报告
- 会计师事务所业务培训制度
- CMM2-18锚杆机(新)说明书
- 12吨汽车起重机基本技术规格资料
- WEB开发基础-2021秋本-计算机科学与技术本复习资料-国家开放大学2022年1月期末考试复习资料
- 安徽省政协机关文件材料归档范围
- 本质安全理论综述研究
- 代建项目管理工作大纲
评论
0/150
提交评论