资源描述:
《个人笔记嵌入式linux.doc》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、个人笔记(嵌入式linux)1、编译交叉工具链:方法一:1.getallthesourcefileslinux-2.4.9.tar.gz,patch-2.4.9-ac9.gz,patch-2.4.9-ac9-rmk1.bz2,diff-2.4.9-ac9-rmk1-np1.gz,binutils-2.11.2.tar.gz,gcc-2.95.3.tar.gz,glibc-2.2.4.tar.gz,glibc-linuxthreads-2.2.4.tar.gz2.installthebinutils#cd/tmp#tarz
2、xvfbinutils-2.11.2.tar.gz#cdbinutils-2.11.2#./configure--target=armv4l-unknown-linux--prefix=/opt/host/armv4l#make#makeinstall3.makethebinutilsreachablel#exportPATH=/opt/host/armv4l/bin:$PATH4.Installinggcc(ccompiler)#cd/tmp#tarzxvflinux-2.4.9.tar.gz#mvlinuxlinux
3、-2.4.9-ac9-rmk1-np1#mvpatch-2.4.9-ac9.gzpatch-2.4.9-ac9-rmk1.bz2diff-2.4.9-ac9-rmk1-np1.gz./linux-2.4.9-ac9-rmk1-np1#cdlinux-2.4.9-ac9-rmk1-np1:kernel2.4.9#gzip-cdpatch-2.4.9-ac9.gz
4、patch-p1:AlanCoxpatch#bzip2-cdpatch-2.4.9-ac9-rmk1.bz2
5、patch-p1:RussellKingpatch#
6、gzip-cddiff-2.4.9-ac9-rmk1-np1.gz
7、patch-p1:NicholasPitrepatch#makemenuconfig:DotocreateARMheaderfiles.Whenyouexit,selectsaveitem.#makedep:Alsodotocreateheaderfiles.5.Nowheaderfilesofthedevelopmentversionkernelarecreatedat/usr/includedirectory.Copythemtodevelopdir
8、ectoryLink/usr/includedirectoryto/opt/host/armv41/armv41-unknown-linux/includebysymboliclink.#cd/opt/host/armv4l/armv4l-unknown-linux#cdinclude:Ifnotexisting,makeincludedirectory.#cp-a/usr/include/*.:Copyallheaderfilesunder/usr/includedirtothecurrentdir.#ln-s/tmp
9、/linux-2.4.9-ac9-rmk1-np1/include/asm-armasm#ln-s/tmp/linux-2.4.9-ac9-rmk1-np1/include/linuxlinux6.Then,installGCCCcompilerasfollowing.#cdgcc-2.95.3#./configure--target=armv4l-unknown-linux--prefix=/opt/host/armv4l#makeLANGUAGES=c#makeLANGUAGES=cinstall7.Installi
10、ngglibc#cd/tmp#tarzxvfglibc-2.2.4.tar.gz#mvglibc-linuxthreads-2.2.4.tar.gz./glibc-2.2.4#cdglibc-2.2.4#tarzxvfglibc-linuxthreads-2.2.4.tar.gz#CC=armv4l-unknown-linux-gcc./configurearm-linux--enable-add-ons--build=i686-pc-linux-gnu--disable-iconv--with-headers=/tmp
11、/linux-2.4.9-ac9-rmk1-np1/include--prefix=/opt/host/armv4l#make#makeinstall8.Installinggcc(c++compiler)#cd/tmp/gcc-2.95.3#./configure--target=armv4l-unknown-li