系统移植试验手册-2010-08-19(new)

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

嵌入式学院实验手册系统移植部分嵌入式学院教材开发部编著(内部资料,请勿外传)嵌入式学院(2010)版权所有V3.0目录目录..........................................................................................................................................................2实验一交叉工具链的移植.....................................................................................................................3实验二u-boot的烧写及使用.................................................................................................................8实验三u-boot-2010.03的移植.............................................................................................................12实验四linux-2.6.22.6内核的编译和配置............................................................................................31实验五linux-2.6.35内核移植—网卡驱动的添加................................................................................34实验六linux-2.6.35内核移植—Nandflash驱动的添加......................................................................36实验七linux-2.6.35内核移植—LCD驱动的添加.................................................................................38实验八linux-2.6.35内核移植—USB驱动的添加................................................................................40实验九linux-2.6.35内核移植—SD卡驱动的添加...............................................................................42实验十linux-2.6.35内核移植—yaffs2文件系统的支持.....................................................................45实验十一内核调试...............................................................................................................................47实验十二内存调试...............................................................................................................................50实验十三文件系统的移植...................................................................................................................53实验十四UDEV的移植.........................................................................................................................58实验一交叉工具链的移植【实验目的】了解交叉工具链的编译过程及其使用。说明:在本系统移植课程实验中命令行提示符“$”表示是在主机上执行,“#”表示在目标板执行【实验环境】1、Ubuntu10.10发行版2、FS2410平台【实验步骤】1、源码下载Crosstools-ng下载地址同时对每一个版本都有相应的补丁我们尽量把这些补丁打上,这些补丁的下载地址是我这里选用的是crosstool-ng-1.8.1.tar.bz2并下载补丁000-scripts_log_do_not_interpret_log_string_as_printf_format.patch001-binutils_binutils_remove_faulty_patch.patch002-kconfig_resync_curses_check_with_Linux_kernel.patch2、工具的安装在使用之前必须安装一些软件$sudoapt-getinstallgawkautotools-devautomaketexinfolibtoolcvspatchbisonflexlibncurses5-dev3、必要目录的创建/home/linux目录下,$mkdirs3c2410-2.6.35$mkdirtoolchain$cds3c2410-2.6.35$mkdirtoolchain$cdtoolchain$mkdirtoolchain-build$mkdirtoolchain-install把下列源码包复制到目录/home/linux/s3c2410-2.6.35/toolchaincrosstool-ng-1.8.1.tar.bz2000-scripts_log_do_not_interpret_log_string_as_printf_format.patch001-binutils_binutils_remove_faulty_patch.patch002-kconfig_resync_curses_check_with_Linux_kernel.patch4、解压源码并打补丁$tarxvfcrosstool-ng-1.8.1.tar.bz2$cdcrosstool-ng-1.8.1$patch–p1../000-scripts_log_do_not_interpret_log_string_as_printf_format.patch$patch–p1../001-binutils_binutils_remove_faulty_patch.patch$patch–p1../002-kconfig_resync_curses_check_with_Linux_kernel.patch5、配置并编译crosstool-ng-1.8.1$./configure--prefix=/home/linux/s3c2410-2.6.35/toolchain/toolchain-install$make$makeinstall6、配置工具链选项$cd../toolchain-build$cp../crosstool-ng-1.8.1/samples/arm-unknown-linux-gnueabi/*./$mvcrosstool.config.config$../toolchain-install/bin/ct-ngmenuconfigPathsandmiscoptions---(${HOME}/src)Localtarballsdirectory(${HOME}/x-tools/${CT_TARGET})Prefixdirectory修改为Pathsandmiscoptions---(/home/linux/Downloads)Localtarballsdirectory//源码包存放路径(/home/linux/toolchain)Prefixdirectory//工具生成后的安装路径Targetoptions---(armv4t)Architecturelevel(arm9tdmi)EmitassemblyforCPU(arm920t)TuneforCPUCcompiler---[]JavaOperatingSystem---[]CheckinstalledheadersPathsandmiscoptions---(1)NumberofparalleljobsToolchainoptions---(none)Tuple'svendorstringCcompiler---(crosstool-NG-${CT_VERSION}-farsight)gccIDstring修改.config文件,将文件中的2.6.33.2全部改为2.6.357、目标代码准备拷贝下面文件到/home/linux/Downloads目录下:binutils-2.19.1.tar.bz2gcc-4.3.2.tar.bz2glibc-ports-2.9.tar.bz2linux-2.6.35.tar.bz2ncurses-5.7.tar.gzdmalloc-5.5.2.tgzgdb-6.8.tar.bz2gmp-4.3.2.tar.bz2ltrace_0.5.3.orig.tar.gzstrace-4.5.19.tar.bz2duma_2_5_15.tar.gzglibc-2.9.tar.bz2libelf-0.8.13.tar.gzmpfr-2.4.2.tar.bz2Sstrip.c8、工具链编译$../toolchain-install/bin/ct-ngbuild这个过程比较时间比较长,1.5小时左右9、环境变量的添加修改文件/etc/bash.bashrc添加如下内容exportPATH=$PATH:/home/linux/toolchain/bin重启配置文件$sourcebash.bashrc10、工具链的测试$arm-none-linux-gnueabi-gcc–vUsingbuilt-inspecs.Target:arm-none-linux-gnueabiConfiguredwith:/home/linux/s3c2410-2.6.35/toolchain/toolchain-build/targets/src/gcc-4.3.2/configure--build=i686-build_pc-linux-gnu--host=i686-build_pc-linux-gnu--target=arm-none-linux-gnueabi--prefix=/home/linux/toolchain--with-sysroot=/home/linux/toolchain/arm-none-linux-gnueabi//sys-root--enable-languages=c,c++,fortran--disable-multilib--with-arch=armv4t--with-cpu=arm9tdmi--with-tune=arm920t--with-float=soft--with-

1 / 57
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功