嵌入式实验五解析_第1页
嵌入式实验五解析_第2页
嵌入式实验五解析_第3页
嵌入式实验五解析_第4页
嵌入式实验五解析_第5页
已阅读5页,还剩10页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、根文件系统移植实验、实习题目针对arm2410cl的根文件系统移植实习目的了解arm2410cl根文件系统结构,掌握其生成步骤,了解busybox、mkcramfs工具 三、实习内容1 .配置并启动redhat的samba服务(具体步骤见实验四),把从110系统 下载的实验所需压缩包复制到redhat中。2 .在 redhat 中用 tar xjvf busybox-1.00-pre10.tar.bz2 解压 busybox工具压缩 包。切换到解压后的 busybox-1.00-pre10目录,再执行 make menuconfig 命令,根据具体需要配置busybox编译配置。.A I I

2、RJL/a Tl、y-4m J*ITJrootC root# cp -bfr /arn410c 1/raotfs/busybox-l .00-preW n/rootfs(roc ig虬 root I sjnilconda-ks. cfg busybox-1 JHi-pre 1 U. ta r ins la I L lugins lj 11. lag . syslogmg- sunp k s-1 .6 JO. lar .gzk忸编辑 隹看出终端转到却助(H?.bz2 I ibmin igu i-1 t6,10 uar qvfb- 1,1 h iar inle-L .6 JO. tar .gzro

3、otC motif tried ir root f5roo IC4KJ r uot cd rootf 5rocKBC rootf si# cp . r/busybox-1 00-pre 10k lar .bi2 . /rcxitC root!si# Hbusybox-1.00-preID.r.hz2(rooroo11 s# iar -j xv f busybox- 1 .()()-pre 10, tar fapp k iscoreu tilsf indut i1sL1CESEpu ichc ssysdepsarch iva Jdeb in.nc hide1。甘 inu t l I proep

4、esy !ik LogdALTintSdebunut iiin i 1Mkefik1 fle s l su i leChange logdocs1SSTALLmi !;cu | i 1 5加i le5 . makut 1- 1 inuxconf ig-up tc ched j lor ilibbbniidu tilsscr ip i &conioIsexanp le 91 ibpwjgrpnf iork ingshe 11pusynox-1 ruu-pre j 11/ cnren t 1 i / cu 1 r c hutiybox- J .OU-prelD/coreuli 1/pvuJ.c t

5、oolTJC rnot f s1# cd buybox-*00-prel0 (rue biisyhoS-1 .OU-pre 11)1# 1 st(:BC bui&ybox 1 .00-pr? 10/r运行 make menuconfig ,酉己置 busybox图1 busybox配置界面文件() 编辑()S#(V) 终端(Q 转到(9 帮助(比roolBC: /roolfs/busyt)ox-1 0()-pre 】。Arrow keys nav iga te the rwnu. se lects subrwnus .High I igh ted Ie t ter s are hotkeys.

6、 Press ing se lec tes a feature, while will exc lude a fea ture. Press to exit. for Ik? Ip. Legend: fea lure is selected fea ture is exc ludedBui Id BusyBox as a static binary (no shared libs)u i Id with Large File Suppor t (for access ing f i les 2 GB) o you want to bu i Id BusyBox wi th a Cross Co

7、np i ler?(/op t/hos t/ar!nr4 l/b in/armr4 1-unknown- 1 inux-) ross Conp i ler prefix () ny extra CFLAGS opt ions for the conpi ler?rootBC: /roolfs/busyboxT OO-pre 1文件编辑() 查看(V) 终端(Q 转到(G) 帮助(比1i Ie wi 1 1 exc lude a fea ture .Press to exit, forArrow keys nav iga te the nrnuPress nig se Icctes a fea

8、ture .liigh I igh ted Ie t ters are hotkeys .Legend: fea ture is se lected J fealure is excluded(./_ins tall) usyBox ins ta I la t ion pref ixroo&BG; oolfs/busyboxT ,01)-pre文件 编辑查看(V) 终端3 转到(G) 帮助(WArrow keys nav iga te the nrnu. se lects subnrnus .High I igh ted Ie t ter s are hotkeys . Press ing s

9、e lec tes a feature, while wi) I exc lude a fea ture . Press to ex i t for Ik? Ip. Legend: fea ture is se lected fea ture is excludeduppor t read ing*uppor t runn inguppor I dunp ing*hou Id in i t be*alt*owroffebootan ini t tab f i le?ini t from wi thin an ini trd?core for child processes (debugg in

10、g on ly)?ex t ra_ qu ie t on hoot?3.修改编译工具链的libc.a文件,先备份原文件。创建一个链接脚本,将 libnss_files.a, libnss_dns.a, libresolv.都力口入至I脚本中。链接文件内容如下 图所示:GROUP(/opt/host/armv41/arfnv41 -unknown-linux/lib/libc_ns + a/opt/ha5t/arffv41/armv41-unkncwn-linux/lilb/libnss_files.a /opt/host/arinv41/drmv41-unknown-linux/lib/lib

11、nssdns, a /apt/host/arfflv41/srmv41-unknown-linux/lib/libre5clv.* )图2 libc.a链接文件Z1文件编辑起)查看终端05 转到帮助抄Il root .:4JG /4 cd /opl/husl/armr4 l-uuiknowi-I mux/I ib11be.$。u6Iibcus tnnvidgelb soI ibcus toniidlge K so. 1I ibcus tomiidEe l 卜手口 J +1 ()euuSBC lib# k 1 ibc-2.2.1.soI ibc1ibc_nonshared.a1ibcp.aIib

12、crypt-2.2 J.sd |1抑 I ih# cp (too J ib# m |仃加1型 lib#libr* 1 ibcryp t .aI ibrryptjp,a1 ibcryptI ibcrypt +5口I ibc.soI ibc ka I ibcaa ikI ibc Iibc_ns.a4.在busybox-1.00-pre10 目录下,执行 make clean命令,清理上次编译 的中间代码文件。再执行rm -f .depend 删除旧的依赖文件。最后执 行make命令编译。文件 编辑 查看f竺答端 转到康p ffiWKWroott阡 3 # cd /opt/hofl t/a rmr4

13、 l/a rinr4 l-iinknown-1 inux/1 ih rou lib# i I ibc*Iibc2.2.1 .soIibc+aI ibc noiiihtij red .aIibc_p h3I ibcrypt- TOOt(C roo 1,可视. roc l :jBC2 ,2.1.eUlib# opI ih# mrI ibcrypt .a 1 ihc. si)GI ihcrypt _p hB I ihvu %t ,I ibcrypt.m I ibcuslonvid1.so JI ibcrypt /opL/host/arin4l/arm4lrunkncun-inux71ib/1ihc

14、J1F Zflpt/hos i /a rmr4 I Zarw4 |-unknon- I inux 7 I ib/ I ibc_Ti!i. a /opt/hos 1 /a rmr4 I Za r in 4 1-uiikjiumi 1 inu/ I ib/ ibnss_f i Ie i .a ?upt7hc?4 l-unknoun- 1 inux/ I ib/ I ibreiinlv、篇)以产root?BC lib#I ibc-2,2,1,eqI ibc .aI ibc+a hakI ibc_nanstia red .aroolBC lib#libc*I ibc_ns 后I ibc_p .aIib

15、crypt2.2.1 %。Iiberyp I . j1ibcrypt_p-a1ibcrypi .moI ibtrypl. jso . 11 ibc.soI jbc4 jto htiI ihtU$ tutm idge l. mI ibcus tnm idge l . fo . 1I jbcus tutrti idgc i. %u . I L )5.编译完成后,执行 make PREFIX=./root install 成后执行 cp - rf /arm2410cl/rootfs/target ./ 文件夹 复制到 busybox-1.00-pre10目 录,,生成安装文件。完命令,将target

16、 cd target 切换到busybox-1.00-pre10下的target目录,删除无用的链接文件root/jam小小unTjo 11四七卬七二ggg工件编辑f宙音看终端QJ 转到帮助(H)Iroolib# cd /rflot/roQtfn/busybnx-1HO(Hpre10rootvC buybox-l .00-prelC# nke cleanivakc -C les ts c kanirake i *bb such i i le or direcicry . Slop.inikc: clean Error 2 ( ignored :rnn -f docs/busybox .dv i

17、 cioc5/busyhox ,ps docs/busybox.pod docs/busybox.nel/busybux.hUni docs/husybox podShtn *,gdh *+eIf * ccre *conf ig.Ig docs/liii yllox . l S t ducs/lkKiyUon . JUov .11 Lml docs/busybox .ne t/BusyBox.hlml butybox.1 inks Iibbb/loop.h .conf ig Id . hdepejid busyboxrm -r f _insta I I ind - -nanFp ,*hf la

18、gs -exec rm -f f ind - -nani? * .d -exec rm - f I ;find . -nanr *那 -pkcc rm -f I ;f rou husyhov- I .OU-pre 1C # rm -f .dependtoor:BC husyhox-l .00-prel01tf6.返回上一级到 busybox-1.00-pre10 目录,执行 mkcramfs target/ root.cramfs ,建立根文件系统。wtBG、/nx)m/Ixisybox 1。PF。文件 编辑(E)终端转到帮助pes -Shadow -Os -fs t r ict-a I ia

19、s ing -fomi t-frarw-pointer -D_CMJ_S(1 KCE -ObOLBLG 区- c -o Iibbb/pr int_f ile,o Iibbb/pr int_f iIe.c/opt/hos t/armr4 l/b in/armr4 l-unknon- i inux-gcc -I ./ inc lude 11 t r ict-prototypes -Shadow -O; -fs tr ict-a 1 ias ing -fomi t-frarw-pointer -D_(MJ_SOLRCE -DbCtBLG- c -o Iibbb/ge t_console.o 1ibb

20、b/ge t_console.c/op t/hos l/armr4 l/b in/armr4 l-unknowi- I inux-gcc -I . / include -Mi 11 t r ict-pro to types -Shadow -Q; -fs Ir ict-a I ias ing -fomi t-frare-pointer -D_(HJ_SOLRCE -DhCEBUJ- c -o Iibbb/process_escape_sequencc.o 1ibbb/process_escape_sequence.c/opt/hos t/armr4 l/bin/arm4 l-unknosn-

21、I inux-gcc -I ./ include -M6 11 tr ict-prototypes -Shadow -Os -fs tr ict-a I ias ing -fomi t-frarw-pointer -D_GMJ_SOLRQ -OhTEBUG- c -o Iibbb/proeps.o Iibbb/proeps.c/opt/hos I/ar mr4 l/b in/armr4 l-unknon- I inux-gcc -I ./include -Mfi 11 ; t r ict-prototypes -Shadow -Os -fs t r ict-a I ias ing -fomi

22、t-franr-po in ter -D_CNJ_S(1KCE- c -o 1 ibbb/pd2spd o 1 ibbb/pd2spd . c/opt/hos t/armr4 l/b in/armr4 l-unknon- i inux-gcc -I ./ inc lude i 1 t r ict-prototy pes -Shadow -Os -fs tr ict-a I ias ing -fomi t-frarw-pointer -D_(MJ_SOLRCE -CbOiBUi- c -o I ibbb/puencrypt .o I ibbb/pv_encrypt .c/op t/hos t/a

23、rmr4 l/b in/arm4 l-unknowi- 1 inux-gcc -I ./ inc lude -Will t r ict-prototypes -Shadow -Q; -fs tr ict-a 1 ias ing -fomi t-franr-pointer -D_GNU_SOLRCE -DbCEBLG- c -o I ibbb/qrwdu le .o I ibbb/qirodu le .c/opt/hos t/armr4 l/b in/arm4 l-unknoi)- I inux-gcc -I. / include -WUI -W; tr ict-prololy pes -Kha

24、dow -fs tr ict-a I ias ing -fomi l-frarw-pointer -D_(NJ_SOLRCE -DhTEBUtJ- c -o 1ibbb/read_package_f ieId.o I ibbb/read_package_f ieId.croo 侬 BC: /ooifs/busyboxT ,U0-pre 10文件 编辑 S#(V) 终端(Q 转到哂助(如pod2nBn -center=BusyBox -re lease= docs/BusyBox.1pod2html -no index docs/busybox .pod docs/busybox.ne t/Bu

25、syBox.htmlnkd ir -p docsrootSC busybox-1 .()0-prel()# Isapp le t sconf ig-upteched i torslibbbnudut i Isscr iptsarch iva 1console-too Isexarrp les1 ibpwdgrpne twork ingshe 11AITIBRScoreut iIsf indu tilsLICENSEpa tchessysdepsbusyboxdeb ianincludeloginut i Isproepssysk !ogdbusybox.1 inksdeb ianu tilsi

26、n i tMke i i leREADMEtes t su i teChange logdocsINSTALLmiscut iIsRules .mku t i1-1inuxroot4K2 busybox-1 .00-pre 1()# rrake PREFIXj./root ins ta 11/bin/sh appIc ts/ins ta 11.sh ./root./root/bin/ash - busybox./rool/bin/caI - busybox./root/bin/chgrp - busybox./rool/bin/chirod - busybox./root/bin/chown

27、- busybox./root/usr/sbin/chroot - ./. ./bin/busybox./root/usr/sb in/ine td - . ./b in/busybox./root/usr/sbin/te Inetd - ././bin/busybex rootBC busybox-1 .00-pre 1()# cd .rootJC rootfs# Is busybox-1.00-prel0 busybox-1.00-prei0.tar.bz2 root rootBC rootfs# Is root/ bin ) inuxrc sb in usrtC roolfs#7.JO:

28、J? BC: /1odLti-|O X|文件(E编辑好看山 终端转到(1二)帮助必root *BCb in 加vr(Mt f&f cp -rf /arnl?4 10c l/roo I s / ta roo L fss targp l /e tc hos t lib 1inuv r l rmt procrge i Jsb in显usrvarroot:C joulfg# cd largt 1/f rootBC la rgf 1 rm -r f bin/ I inuxrc sb in/ usr/rout.?BC lurgE# cp - r t . 7rou l/b in . root/ t inur c L L/r co /in L ./r uu i /usrraot34 7 L Uiv dntKfMton *nlow ol I8炉rt图3 tftpd32配置配置完成后,在超级终端执行t即flash root root.cramfs命令烧写根文件系统。地址)匕J D: bootloader文件和文件夹任务大二2创建一个新文件夹 必将这个文件夹发布到 WebR共享此文件夹其它位置3J本地磁盘(D:)口我的文档力共享文档s j 2410-1.

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论