太原理工大學嵌入式系統(tǒng)實驗報告_第1頁
太原理工大學嵌入式系統(tǒng)實驗報告_第2頁
太原理工大學嵌入式系統(tǒng)實驗報告_第3頁
太原理工大學嵌入式系統(tǒng)實驗報告_第4頁
太原理工大學嵌入式系統(tǒng)實驗報告_第5頁
已閱讀5頁,還剩25頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

WordWord資料WordWord資料G◎d應打下火浮G◎TAIYUANUNIVEaSIIYOFTECHNOLOGY308201112016111ARM Skyeye2.熟悉交叉編譯開發(fā)環(huán)境的搭建ARM-LinuxSkyeye ARM-LinuxLinuxSkyeye二、實驗內容和原理PC SkyeyeARM-LinuxSMDK2410I-Cache?:?CPUS3C2410ARM920T 62.400MHzI-Cache16K,D-Cache16K?32MB 62.400MHz實驗軟件介紹SkyEye OpenSourceSoftwareSkyEye LinuxWindows境,模擬常見的嵌入式計算機系統(tǒng)(這里假定“仿真”和“模擬”的SkyEyeuCLinuxuC/OS-IITCP/IPSkyEye CPUSkyEyeSkyEye SkyEyeSkyEye實的硬件環(huán)境相比還是有一定差別的。ARM-Linux ARM-LinuxARMSkyEyeARM主要儀器設備:a.PC:VMwareworkstation9.0Ubuntu10.04LTSskyeye-1.2.5_REL.tar.gzskyeye-testsuite-1.2.5.tar.bz2arm-linux-gcc-3.4.1.tar.bz2linux-2.6.14.tar.gzcpp-4.1_4.1.2-27ubuntu1_i386.debg++-4.1_4.1.2-27ubuntu1_i386.debgcc-4.1_4.1.2-27ubuntu1_i386.debgcc-4.1-base_4.1.2-27ubuntu1_i386.deblibstdc++6-4.1-dev_4.1.2-27ubuntu1_i386.deb四、操作方法與實驗步驟VMwareworkstation8.0ubuntulOTypicalInstall ubuntuVMToolhostcomputergccgcc4.1 Skyeyegccubuntu10.04gcccpp-4.1_4.1.2-27ubuntu1_i386.debg++-4.1_4.1.2-27ubuntu1_i386.debgcc-4.1_4.1.2-27ubuntu1_i386.debgcc-4.1-base_4.1.2-27ubuntu1_i386.deblibstdc++6-4.1-dev_4.1.2-27ubuntu1_i386.debsudodpkg-i*.deb gcc4.1.gccupdateSKyeyeSkyeye安裝交叉編譯環(huán)境arm-gcc /usr/local/arm/3.4.1/bin7.cdlinux-2.6.14viMakefile Makefilecparch/arm/configs/smdk2410_defconfig.sodumakesmdk2410_defconfig/Linux裁剪/定制內核sodumakemenuconfig設置內核啟動參數(shù)initrdROM filesystemext2makevmlinux arm-linux了驗證skeeye-testsuite-1.2.5/linux/s3c2410/s3c2410-2.6.14 skyeye.confinitrd.imglinux-2.6.14skyeye-evmlinuxARMLinuxFileEditViewTerminalHelpStartingpid19,console/dev/console:'/etc/init.d/rcSeth0:usinghalf-duplexIBBase-T(RJ-451Welcometo,.Groot@ubuntu:/mnt/hgfs/^A^/fils/skyeye-testsuite-1.2.5/Linux/s3c2410/BusyBoxvl.4.1(2007-02-1001:19:06CST)Built-inshell(ash)Enter'help1foralistofbuilt-incommands./bin/ash:can'taccesstty;jobcontrolturnedoffARMLinuxforSkyeyeForfurtherinformationpleasecheck:/BusyBoxvl.4.1(2007-02-1SSl:19:0&CST)Built-inshell(ash)Enter'help'foralistofbuilt-incommands./bin/ash:can'taccesstty;jobcontrolturnedoffIIII//\/\\ARMLinuxforSkyeyeForfurtherinformationpleasecheckhttp:///「I二\門門\一“7,?命root@ubuntu:/home/yewanjaly/src/linux-2.6.14i 門二*「ii_iii_iii_ii/\ h_i_ii」\_\\j\jFileEditViewTerminalHelpTCPrenoregistered|TCPbicregisteredNET:Registeredprotocolfamily1RAMDISK:ext2filesystemfoundatblockQRAMDISK:Loading2S48KiB[1disk]intoramdisk...done.VFS:Mountedroot(ext2filesystem).initstarted:BusyBoxvl.4.1(20S7-02-1B01:19:06CST}multi-callbinaryStartingpid17rconsole/dev/console:'/etc/init.d/rcS'ifconfig:SIOCSIFADDR:NosuchdeviceWelcometoLINUX2.熟悉修initrd3.熟悉利C4.將自己C5.回答后面遇到的4個問題1busyboxARM-LinuxinitrdinitrdLinux的目錄和關鍵LinuxinitLinux掛載分Linux/etc/fstab包括了許多的binLinuxBusyBox BusyBoxlinuxBusyBoxIscatecho等等,還包含了grepfindmounttelnet。GNUfileutils,shellutilsBusyBoxa.PC實驗一搭建好的嵌入式虛擬平臺busybox-1.19.4.tar.bz2helloword.c四、操作方法與實驗步驟busyboxMakefilearchARCH ?=armCROSS_COMPILE?=/usr/local/3.4.1/bin/arm-linux-makemenuconfigc.makemakeinstallbusybox chmod4755./_install/bin/busyboxbusybox$susu:mustbesuidtoworkproperlybusyboxinitrd.img創(chuàng)建映像文件并掛到initrd目錄將添加busybox到此映像文件busybox arm-linux/lib建立必要的文件helloworld.c home/usr/local/arm/3.4.1/bin/arm-linuc-gcchelloworld.c-ohelloworldcphelloworldinitrd/home/,initrd.imgcd..umountinitrdinitrd.imginitrd.img linux-2.6.14 skyeye-evmlinuxSkyeye home ./helloworldHelloARMWorldbusyboxmake1.5 lll-L^LULJ._LUIIJ.Lt:.Umiscutils/ionice.c:Infunction-ioprio_set':miscutils/ionice.c:23:error:LSYS_ioprio_set'undeclared(firstuseinthisfunction)miscutils/ionice.c:23:error:(Eachundeclaredidentifierisreportedonlyoncemiscutils/ionice.c:23:error:foreachfunctionitappearsin.)miscutils/ionice.c:Infunction-loprioget':miscutils/ionice.c:28:error:LSYS_ioprioget'undeclared(firstuseinthisfunction)make[l]:***[miscutils/ionice.o]Error1make:***[miscutils]Error2root@uibuntu:/home/yewanjaly/busybox/busybox-1.19.4#

makemenuconfigBusyboxSetting >MiscellaneousUtilities--->[]ionicemake2.miscutils/ubitools.c:186:error:UBIDYNAMICVOLUME'undeclared(firstuseinthisfunction)miscutils/ub^tools.c:195:)miscutils/ub^tools.c:17Q:miscuti-Ls/Libi_toa_Ls.cmiscutils/ub^tools.c:195:)miscutils/ub^tools.c:17Q:miscuti-Ls/Libi_toa_Ls.c:291:error:UBIIOCMKVOL'undeclared(firstuseinthisfunctionwarning:unusedvariable'req'error:UBIIOCRMVOL'undeclared(firstuseinthisfunctionmiscutils/ub^tools.c:294:(niscutils/ub^tools.c:214:)miscutils/ubitoals.c:294:miscutils/ubitoals.c:222:error:storagesizeof'req'isn'tknownerror:UBIIOCRSVOL'undeclaredffirstuseinwarning:unusedvariable'req'error:"UBIIOCVOLUP'undeclared(firstuseinthisfunctionthisfunctionniake[l]:***[miscutils/ub^tools.o]Error1make:***[miscutils]Error2mtdincludemtdubi-user.hmtdcp/home/yewanjaly/busybox/ubi-user.hinclude/mtd(ubi-user.h)make3.出現(xiàn)如下錯誤networking/interface.c:806:error:ARPHRDINFINIBAND'undeclaredhere(notinafunction)networking/interface.c:806:error:initializerelementisnotconstantnetworking/interface.c:806:error:[nearinitializationfor'ib_hwtype.type')make[l]:***[networkifig/interface.o]Error1makE:***[n目“"king]Error21makemenuconfigBusyboxSettings--->BusyboxLibraryTuning-->[]SupportinfinibandHWmakeinclude/linux/ifarp.”hARPHRD」NFINIBAND 32 networking/interface.c#defineARPHRD_INIFINIBAND32、' '■T? #defineARPHR口二工EEE1394 24 /* IEEE1394IPv4 - RFC 2734#defineARPHR^EU164 27 /* EUI-64#defineARPHR口二工NF工N工BAN口32 /* InfiniBandubi_toois,cXif_arp.h翼interfacesX1S/1998-AndiKleen.Useinterfacelistprimitives.20001808-BerndEckenfels,PatchfromRHforsettingmtu(defaultAFwaswrong)/include"'Libbb.h"#include"inetcotnmon.h"#include<net/if.h>#include<net/if_arp.h>#defineARPHRDINFINIBAMM32#ifdefHAVENETETHERNET_H#include<net/ethernet.h>#working/udhcp/dhcpc.c:839:warning:(nearinitializationtortiLter_instrL8J'Jnetworking/udhcp/dhcpc.c:839:warning:excesselementsinstructinitializernetworking/udhcp/dhcpc.c:839:warning:(nearinitializationfor^filter^nstrfB]')networking/udhcp/dhcpc.c:821:error:storagesizeof'filter_instr'isn'tknownnetworking/udhcp/dhcpc.c:844:error:initializerelementisnotconstantnetworking/udhcp/dhcpc.c:844:error:(nearinitializationfor'filter_prog.filter')networking/udhcp/dhcpc.c:821:warning:unusedvariableLfilterinstr1make[l]|:***[networking/udhcp/dhcpc.o]Error1make:***[networking/udhcp]Error2vi/usr/local/arm/3.4.1/arm-linux/sys-include/linux/filter.h#include<linux/types.h>ubitools.cMif_arp.h篝interfaces篝filter.hX/**LinuxSocketFilterDataStructures*/#include<linux/types.h>#ifndef_LINUX_FILTER_H_#define3LINLOILTER2H2make5./usr/local/ann/3.4.1/^ib/gcc/arm-liniix/3.4.1/-../arm-linux/sys-include/linux/ext2_fs_sb.h:49:error:parseerrorbefore"u32M/usr/local/artn/3.4.l/lib/gcc/arm-linux/3.4.1/../■./■■/../arm-linux/sys-include/linux/ext2_fs_5b.h:51:error:parseerrorbeforetoken/usr/Tocal/ar(n/3.4.1/lib/gcc/ann-liniix/3.4.1/.■/../arm-linux/sys-include/linux/ext2fssb.h:56:error:parseerrorbeforetokenmake[l]:***[util-linux/mkfsextZ.o]Error1make:***[util-liniix]Error2makemenuconfigLinuxSystemUtilities--->[]mkfs_ext2

IL 」 3產產j?』[] upportIL 」 3產產j?』[] upport[] upport[] upport產] upport產]indfs產]lock產]reeramdisk[*]sckminixSUNdisklabelsBSDdisklabelsGPTdisklabelsexpertmode]mkfsext2[*]mfs_minix<Exit> <Help>make6./usr/local/arm/3.4.l/lib/gcc/ann-linux/3.4.1//arm-linux/sys-include/linux/fd.h:36B:error:parseerrorbeforetokennake[l]:***[util-ILinux/mkfsvfat.o]Error1nake:***[util-linux]Error2makemenuconfigLinuxSystemUtilities--->[]mkfs_vfatmake./_instafL//sbin/watchdog->../bin/busybox./_instaH//sbin/zcip->../bin/busyboxYouwillprobablyneedtomakeyourbusyboxbinarysetuidroottoensureallconfiguredappletswillworkproperly.root@ubuntu:/home/yewanjaly/busybox/busybox-1.19.4#/usr/local/arm/3.4.1/bin/ann-linux-readelf-d./_install/bin/busyboxDynamicsegmentatoffset9xfl764contains21entries:TagType Name/Value0X00000991 (NEEDED1 Shared library: [iibm.so.6]0x00000001 (NEE口ED) Shared library: [Iibc.so.6]0X0000000C (INIT) 0xd4ccTCP:Hashtablesconfigured(established2948bindTCPreno「cgi弓TCPbicregisteredNET:Registeredprotocolfamily1RAMDISK:ext2filesystemfoundatblock0RAHDISK:Loading8192K1B[1disk]intoramdisk...VFS:Mountedroot(ext2filesystem).ifconfig:SIOCSIFADDR:Nosuchdevice/bin/ash:can'taccesstty;jobcontrolturnedoff/#Isbin hellcworld lib procdev helloworld.c linuxrc rootetc home Lost+found sbin/#2048)done.tmp

varbinhelloweridlibproctmpdevhelloworld.clinuxrcrootvaretchomelost+foundsbinifconfig:SIOCSIFADDR:Nosuchdevice/bin/ash:can'taccesstty;jobcontrolturnedoff/#Is/#cdhome/home#Ishelloworld/home#./helloworldHelloARMWorid!/home#busyboxmakeARM-LinuxNFSSkyEye NFSARM-LinuxCS8900aNFSServerARM-LinuxNFSServer、寫以及執(zhí)行操作正常說明網卡驅動程序添加成功。NFS SUNMicrosystems1984 NFSNFS問遠端系統(tǒng)上的文件。NFS主要儀器設備:a.PC:VMwareworkstation9.0Ubuntu10.04LTSskyeye-1.2.5_REL.tar.gzskyeye-testsuite-1.2.5.tar.bz2arm-linux-gcc-3.4.1.tar.bz2linux-2.6.14.tar.gzcpp-4.1_4.1.2-27ubuntu1_i386.debg++-4.1_4.1.2-27ubuntu1_i386.debgcc-4.1_4.1.2-27ubuntu1_i386.debgcc-4.1-base_4.1.2-27ubuntu1_i386.deblibstdc++6-4.1-dev_4.1.2-27ubuntu1_i386.debbusybox-1.19.4.tar.bz2四、操作方法與實驗步驟1、內核的編譯過程已在前面的實驗中進行過,這里就不在cs8900( ) ,NFS復制cs8900驅動到drivers/net/arm目錄#cpcs8900.cdrivers/net/arm#cpcs8900.hdrivers/net/arm修改drivers/net/arm目錄下的Kconfig文件drivers/net/arm Makefile修改arch/arm/mach-s3c2410/mach-smdk2410.csmdk2410.h在include/asm-arm/arch-s3c2410目錄下創(chuàng)建文件smdk2410.hhttp://skyeye.wiki.sourceforge.het/Linux/makemenuconfig設置內核啟動參數(shù)設置CS8900的支持DeviceDrivers--->Networkdevicesupport--->Ethernet(10or100Mbit)--->[*]CS8900supportinitrd設置NFS的支持Filesystems--->NetworkFileSystems--->[*]NFSfilesystemsupport[*]ProvideNFSv3clientsupportROMfilesystemext2make編譯完成后會有個vmlinux在當前目錄下,這就是我們要的arm-linuxinitrd.img3 ubuntuNFSServer在arm-linux的宿主機里配置NFSServer編輯文件/etc/exports,內容如下(具體需ip重啟nfsserver注:可用showmount-e來驗證你的配置ipskyeyearm-linux,ipNFS掛接

五、實驗結果與分析Packagenfs-commonisnotconfiguredyet.nfs-kernel-serverdependsonlibgssgluel;however:Packagelibgssgluelisnotinstalled.nfs-kernel-serverdependsonlibnfsidmap2;howHve「:Packagelibnfsid(nap2isnotinstalled.nfs-kernel-serverdependsonlibrpcsecgss3;however:Packagelibrpcsecgss3isnotinstalled.dpkg:errorprocessingnfs-kernel-server(--install):dependencyproblems-leavingunconfiguredProcessingtriggersforureadahead...lurpaHlahpadwiIIIIhprpnrnfi1pHnnnpvtrphnnt Iroot^uDuntu:-#/usr/sbin/exportfs-rexportfs:/etc/exports[1]:Neither'subtreecheck'or'nosubtreecheck'specifiedforexport"^i/test?.Assumingdefaultbehaviour('nosubtreecheck'1.NOTE:thisdefaulthaschangedsincenfs-utilsversionl.a.xrootfaubuntu:-#/etc/init.d/nfs-kernel-serverrestartStoppingNFSkerneldaemon [OK]UnexportingdirectoriesforNFSkerneldaemon... [OK]ExportingdirectoriesforNFSkerneldaemon...exportfs:/etc/exports[1]:Neither'subtreecheck'or'nosubtreecheck'specifiedforexport"*:/test''.Assumingdefaultbehaviour('nosubtreecheck'1.NOTE:thisdefaulthaschangedsincenfs-utilsversionl.a.x I-13QQskyeye.conf(/home/yewanjaly/src/linux-2.6.14)-gedit ?FileEditViewSearchToolsDocumentsHelp?,OpentSave?-Undo,\skyeyeTonfXskyeyeconfigfileforS3C241BXcpu:arm929tmach:s3c2410xphysicalmemorysize=0x00800000size=0x0080S000,file=./initrd.imgsize=9x01000000membank:map=M,type=RW,addr=0xc0000000,membank:map=M,type=RW,addr=0xcS800000,membank:map=M,type=RW,addr=0xcl000000size=0x00800000size=0x0080S000,file=./initrd.imgsize=9x01000000allperipheralsI/Omappingareamembank:map=Ltype=RW,addr=0x48000000,size=0x20000000membank:map=Irtype=RWraddr=Qxl9000300rsize=0xQ0000020^et:type=cs8900a,base=0xl9900300rsize=0x20,int=9,mac=0:4:3:2:l:f,ethmod=tuntapRhostip=ie.0.0.1led:type=s3c2410x,mod=gtkdbct:state=on$OOroat(a)ubuntu:?FileEditViewTerminalHelp|root(aubuntu:-#pingIB.0.0.2-c2RING(]56(84)bytesofdata.64bytesfrom:icmp_seq=lttl=64time=2.61ms64bytesfrom:icmp_seq=2ttl=64time=1.16ms---IB.0.0.2pingstatistics--2packetstransmitted,2received,日常packetloss,timeIBS1msrttBin/avg/max/mdev=1..160/1.885/2.610/0.725msrootfaubuntu:-#PING(1B.0.0.1):56databytes64bytesfromW.B.e.l:seq=flttl=64time=0.039ms64bytesfromW.0.0.I:seq=lttl=64timers.S18ms——pingstatistics——2packetstransmittedp2packetsreceived,packetlossround-tripmin/avg/max=O.01B/0.028/0.039ms/#ping/#cdtmp/tmp#Ishelloworld/tmp#./helloworldHelloARMWorld!/tmp#I1.ubootkernelsystemrootfs、操作方法與實驗步驟1. SDwindowswindows SD SD 10Muboot SDuboot linux ubuntuSD(1)打開軟件2SD3)右鍵,選擇【刪除4)右鍵,選擇【創(chuàng)建5 10MFAT32

+ParagonPartitionManager服務器版口回岡常規(guī)⑥查看魚)硬盤魚)分區(qū)W)操作⑥)幫助也)口回岡司.掾4 0?圾?目燒1-1導磁盤口(TOCWD1600AAJS-08FE等主C:電獷展*■口通邏輯D:修邏輯E:曲主,自由磁盤11.9GE他主,自由盤展由磁擴自FAT16FAT32HTFSLiniiKExt£ LinwtSwap未格式化LinuitExt3 HFFS 無效SDC:HTFSD:HTFSE:NTFS祚i”rF5格式化主分區(qū)1.廣(磁盤1)E0卷名蛤 ||系統(tǒng)類型1-1導磁盤口(TOCWD1600AAJS-08FE等主C:電獷展*■口通邏輯D:修邏輯E:曲主,自由磁盤11.9GE他主,自由盤展由磁擴自FAT16FAT32HTFSLiniiKExt£ LinwtSwap未格式化LinuitExt3 HFFS 無效SDC:HTFSD:HTFSE:NTFS祚i”rF5格式化主分區(qū)1.廣(磁盤1)E0卷名蛤 ||系統(tǒng)類型(T) ||FAT32表面測試區(qū))<HI><哥航結0IJfiCID1EOOA<TS-08P<多主c:m多拉晨*:aiSttn:.生邏輯E-,主,自由班弗It9GB,主,目由才主?S展由磁r自FKT16 -LinuxExt2LinwSir?p 耒格式化槨T鴕 | LinuxExt3HPFS 無力ms |—免*imdg 其它卷 類S3[黑標 大小I巴則I自由卷標丁酒拓IJ&院(Q).. Alt+?裝數(shù)?[自由] 70MB集最選定的分區(qū)分配盤符并記好,按 【確定】磁盤口fflDC*主C:B擴展*:學邏疆D:磁盤口fflDC*主C:B擴展*:學邏疆D:9邏輯E:力主,目由磁盤11.9GB多主,自由*主*:£展由磁擴自FAT32HT^=LinuxEx12 Linux Swap 未格式化一LinuxExt3 KFFS 無效ReistrFS |? 其它磁盤0meTO1600AAJS-03PSAD)144GB常規(guī)⑥)笆香⑥硬盤⑥分區(qū)口操作①幫助如磁=i-0CttDCWD1600WS-06FSB-DEGI常規(guī)⑥)笆香⑥硬盤⑥分區(qū)口操作①幫助如磁=i-0CttDCWD1600WS-06FSB-DEGI+:輯輯髓9之3主r:l寺主&主.自由FAT16 | Limu^Ext2 Lin,^Swap未格式化FAT32 J LinuxExt3 KFFS 無效NTFS RtissrFS 其它*FAT32盤展由磁擴自要獲得幫助,話按Fl&1.9要獲得幫助,話按Fl選擇【應用】,讓之前所有操作真正執(zhí)行5Para&onPartitionlanager服務看版卷類型1系統(tǒng)|大小|已使用| I自由卷標 |活百學收 主 [自由1 7.8MB圣*: 主 FAT32 1.9GB 0b1.9GB 否±i要獲得然助,請按FlWordWord資料3.使用sdfuse SD3.使用sdfuse SDSD sdfuse (kernel,system,u-boot)Word資料2.ubootSDubootwindows1SD FAT32 SD2)打開燒寫軟件(以管理員身份moviNAND_Fusing_Tool_v2.0|jIImoviNAHDFueing^TODO:<Filed**TODO:KComp&TiynSDu-boot4START

sdfuseSDSDDNW0.6CCONNECTetcv210_i

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
  • 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論