mini2440新版移植.doc_第1页
mini2440新版移植.doc_第2页
mini2440新版移植.doc_第3页
mini2440新版移植.doc_第4页
mini2440新版移植.doc_第5页
已阅读5页,还剩5页未读 继续免费阅读

下载本文档

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

文档简介

Mini2440(128M)环境下面的操作环境见下表:目 录说 明OSRedhat 企业版 5交叉编译工具arm-linux-gcc 4.3.2Uboot获取u-boot.tgz,将其拷贝至虚拟机的工作目录下。编译步骤如下:rootlocalhost jj# tar xzvf u-boot.tgzrootlocalhost jj# cd u-boot-2010.03/rootlocalhost u-boot-2010.03# make distcleanrootlocalhost u-boot-2010.03# make smdk2440a_configConfiguring for smdk2440a board.rootlocalhost u-boot-2010.03# make烧写首先,安装开发板的USB驱动,并将USB接口线与主机相连。同时,使用串口线连接开发板与主机。将开发板的启动模式选择为nor,开发板上电后输出信息如下:# FriendlyARM BIOS 2.0 for 2440 #x format NAND FLASH for Linuxv Download vivi k Download linux kernel y Download root_yaffs image a Absolute User Applicationn Download Nboot for WinCE l Download WinCE boot-logow Download WinCE NK.bin d Download & Run z Download zImage into RAM g Boot linux from RAM f Format the nand flash b Boot the system s Set the boot parameters u Backup NAND Flash to HOST through USB(upload) r Restore NAND Flash from HOST through USB q Goto shell of vivi i Version: 0945-2KEnter your selection:键入“f”,完成nand flash的格式化。随后,键入“n”:Enter your selection: nUSB host is connected. Waiting a download.此时,开发板完成烧写uboot-bin文件的准备工作。在主机中打开“dnw”:顶部显示USB:OK,即表示usb驱动正常,可以实现文件下载。点击“USB Port”-“Transmit/Restore”,在弹出的对话框中,选择uboot的镜像文件“u-boot.bin”,点击“打开”后完成文件的烧写。此时,串口的输出信息如下:Enter your selection: nUSB host is connected. Waiting a download.Now, Downloading ADDRESS:30000000h,TOTAL:256942RECEIVED FILE SIZE: 256942 (250KB/S, 1S)Downloaded file at 0x30000000, size = 256932 bytesErase flash ok: start address = 0x0, size = 0x40000Write to flash ok: start address = 0x0, size = 0x3eba4测试首先,将开发板的启动模式,切换为nand flash启动。然后,开发板上电,敲回车阻止自启动,输出信息如下:U-Boot 2010.03 (Sep 16 2010 - 19:01:40)I2C: readyDRAM: 64 MBFlash: 2 MBNAND: 128 MiB* Warning - bad CRC or NAND, using default environmentVideo: no VESA Mode found, switching to mode 0x211 640x480x8 31kHz 59HzIn: serialOut: serialErr: serialNet: dm9000Hit any key to stop autoboot: 0 u-bootSMDK2440A#到此,uboot成功烧写!内核获取linux--mini2440-20100609.tar.gz,将其拷贝至虚拟机的工作目录下。编译步骤如下:rootlocalhost jj# tar xzvf linux--mini2440-20100609.tar.gzrootlocalhost jj# cd linux-rootlocalhost linux-# cp config_mini2440_n35 .configrootlocalhost linux-# make bzImage制作uImage镜像文件:rootlocalhost linux-# cd arch/arm/boot/rootlocalhost boot# mkimage -A arm -O linux -T kernel -C none -a 0x30008000 -e 0x30008040 -n Linux kernel Image -d zImage uImage烧写首先,在主机下开启tftp服务器,并将uImage镜像文件拷贝到tftp工作目录下。然后,用网线将开发板与主机连接起来,将连接的主机网卡,ip地址配置为:72启动开发板,配置其网路环境参数如下:u-bootSMDK2440A# set serverip 72u-bootSMDK2440A# set ipaddr 26u-bootSMDK2440A# saveenv重新复位开发板,下载uImage镜像文件至内存:u-bootSMDK2440A# tftp 0x30008000 uImagedm9000 i/o: 0x20000300, id: 0x90000a46 DM9000: running in 16 bit modeMAC: 08:08:11:18:12:27operating at 100M full duplex modeUsing dm9000 deviceTFTP from server 72; our IP address is 26Filename uImage.Load address: 0x30008000Loading: T # # #doneBytes transferred = 2517112 (266878 hex)最终烧写到nand flash:u-bootSMDK2440A# nand erase 60000 500000NAND erase: device 0 offset 0x60000, size 0x500000Erasing at 0x54000002800000 - 0% complete.OKu-bootSMDK2440A# nand write 0x30008000 60000 500000NAND write: device 0 offset 0x60000, size 0x500000Writing at 0x54000000020000 - 100% is complete. 5242880 bytes written: OK测试见根文件系统的测试一节。到此,内核成功烧写!根文件系统制作Busybox准备解压busybox。rootlocalhost busybox-1.2.0# tar xjvf busybox-1.2.0.tar.tar配置rootlocalhost busybox-1.2.0# make menuconfig(1) 编译busybox为静态链接库Busybox Settings - Build Options - *Build BusyBox as a static binary (no shared fibs)这一项将BusyBox编译为静态链接,可以减少启动时查找动态链接库的时间。* Do you want fo build BusyBox with:Cross Compiler?(arm-linux-) Cross Compiler prefix 指定交叉编译器(2)安装Busybox Settings - Installation Options -* Dont use /usr Applets links (as soft-links) - (/home/alex/project/boot/mini2440/minifs)BusyBox installation prefix指定安装路径(3)选择 initInit Utilities - * init (5)选择shellShells - Choose your default shell (ash) - (4)添加tabShells - * msh * Command line editing * Tab completion (5)选择ttyCoreutils - * tty(6)Login/Password Management Utilities -* getty 其他命令选项可选。编译rootlocalhost busybox-1.2.0# makerootlocalhost busybox-1.2.0# make install执行make install后,将编译生成安装在/home/alex/jj/minifs路径下。系统目录rootlocalhost minifs# mkdir dev etc home lib mnt proc sys tmp varinittab文件rootlocalhost minifs# mkdir etc/init.d1)创建inittab文件rootlocalhost minifs# touch etc/inittab2)编辑inittabvi etc/inittab编辑如下:# System initialization.:sysinit:/etc/init.d/rcS:sysinit:/bin/sh :ctrlaltdel:/sbin/reboot:shutdown:/bin/umount -a -r3)添加执行权限 rootlocalhost etc# chmod +x inittabrcS文件1) 创建rcS文件rootlocalhost minifs# touch etc/init.d/rcS2)编辑rcSvi etc/init.d/rcS编辑如下:#!/bin/shmount a3)添加执行权限 rootlocalhost etc# chmod +x rcSfstab文件1) 创建fstab文件rootlocalhost minifs# touch etc/fstab2) 编辑fstab文件vi etc/fstab编辑如下:none /procproc defaults0 0tmpfs/tmp tmpfsdefaults0 0设备文件创建设备文件节点。rootlocalhost minifs# cd dev/rootlocalhost dev# mknod ttySAC0 c 204 64rootlocalhost dev# ln s ttySAC0 consolerootlocalhost dev# mknod null c 1 3rootlocalhost dev# mknod mtdblock0 b 31 0rootlocalhost dev# mknod mtdblock1 b 31 1rootlocalhost dev# mknod mtdblock2 b 31 2库文件拷贝库文件,包括加载器、动态库文件和静态库文件。rootlocalhost lib# cp /usr/local/arm/4.3.2/arm-none-linux-gnueabi/libc/armv4t/lib/* ./ -arpYaffs镜像最终,利用mkyaffs2image-128M工具完成yaffs镜像的制作:mkyaffs2image-128M minifs minifs.img烧写首先,在主机下开启tftp服务器,并将yaffs镜像文件拷贝到tftp工作目录下。然后,用网线将开发板与主机连接起来,将连接的主机网卡,ip地址配置为:72启动开发板,配置其网路环境参数如下:u-bootSMDK2440A# set serverip 72u-bootSMDK2440A# set ipaddr 26u-bootSMDK2440A# saveenv重新复位开发板,下载uImage镜像文件至内存:u-bootSMDK2440A# tftp 0x30008000 minifs.imgdm9000 i/o: 0x20000300, id: 0x90000a46 DM9000: running in 16 bit modeMAC: 08:08:11:18:12:27operating at 100M full duplex modeUsing dm9000 deviceTFTP from server 72; our IP address is 26Filename minifs.img.Load address: 0x30008000Loading: T #T # # # # # #doneBytes transferred = 5187072 (4f2600 hex)最终烧写到nand flash:u-bootSMDK2440A# nand erase 0x560000 $filesizeNAND erase: device 0 offset 0x60000, size 0x500000Erasing at

温馨提示

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

评论

0/150

提交评论