




已阅读5页,还剩2页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
nios II架构uclinux的过程前言:最近在论坛上有一些朋友提出我上传的”nios2架构uclinux(nios2-linux-20080619开发包)的过程”是英文版的不好读.碰巧我最近整理资料就把架构过程重新整理了一篇.便于朋友参考. 对于英语阅读能力比较好的朋友建议参考我整理的英文版.内容比较详细.由于作者水平有限,在整理过程中难免会出现一些错误,望朋友们批评并指正.转贴的朋友请注明出处/chong_lang/ (本博客正在完善中欢迎交流学习)开发环境:在vmware 中安装centos5.2操作系统(在网上下载安装CentOS-5 2-i386-bin-DVD )本人所使用的开发板为: altera公司的ep2c35f672c6n宿主机windows开发平台为: windows xp sp3在宿主机上安装的linux开发平台为centos5.2 内核为: vmlinuz-2.6.18 开发工具为:quartus7.2安装过程Ok! 现在开始niosii架构uclinux过程首先要在centos下挂载window 下的一个共享目录便于centos与宿主机传送文件,不会挂载的朋友google 一下linux 下mount命令的使用在centos操作系统上我的开发目录设在了/home/zhaozhileirootlocalhost#cd /home/zhaozhilei安装架构uclinux时所需要的库rootlocalhostzhaozhilei#sudo yum install git-all make gcc ncurses-devel bison byacc flex gawk gettext ccache zlib-devel gtk2-devel lzo-devel一下载uclinux开发包rootlocalhostzhaozhilei#wget /outgoing/nios2-linux-20080619.tar二解压nios2-linux-20080619.tarrootlocalhostzhaozhilei# tar xf nios2-linux-20080619.tar三进入nios2-linux目录rootlocalhostzhaozhilei# cd nios2-linuxls # see whats inbinutils gcc3README uClibcuse_http_for_updatecheckout insight toolchain-build uClinux-distelf2flt linux-2.6 u-bootupdate四检查文件是否齐全rootlocalhostnios2-linux#./checkout五下载交叉编译工具rootlocalhostnios2-linux# cd .rootlocalhostzhaozhilei# wget /outgoing/nios2g.080203.tar.bz2六解压文件rootlocalhostzhaozhilei#sudo tar jxfnios2gcc-20080203.tar.bz2-C /七添加PATH路径rootlocalhostzhaozhilei#cd rootlocalhost# vim ./bash_profile添加:PATH=$PATH:/opt/nios2/bin (红颜色部分是要添加的部分)八检查是否加入PATHrootlocalhost#echo $PATH结果应为:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/nios2/bin十检查交叉编译环境是否安装成功rootlocalhost#nios2-linux-uclibc-gcc v结果应为:Reading specs from /opt/nios2/lib/gcc/nios2-linux-uclibc/3.4.6/specsConfigured with: /root/buildroot/toolchain_build_nios2/gcc-3.4.6/configure -prefix=/opt/nios2 -build=i386-pc-linux-gnu -host=i386-pc-linux-gnu -target=nios2-linux-uclibc -enable-languages=c -enable-shared -disable-_cxa_atexit -enable-target-optspace -with-gnu-ld -disable-nls -enable-threads -disable-multilib -enable-cxx-flags=-staticThread model: posixgcc version 3.4.6十一. 编译内核和应用,进入到uclinux-dist目录rootlocalhosti#cd /home/zhaozhilei/nios2-linuxrootlocalhostnios2-linux#cd uClinux-distrootlocalhostuClinux-dist#make menuconfig确保选择以下内容Vendor/Product Selection - - Select the Vendor you wish to target Vendor (Altera) - - Select the Product you wish to target Altera Products (nios2) - Kernel/Library/Defaults Selection - - Kernel is linux-2.6.x Libc Version (None) - * Default all settings (lose changes) Customize Kernel Settings Customize Vendor/User Settings Update Default Vendor Settings注意:在成功引导uclinux之前不要改变上面任何设置然后 十二 .编译硬件配置选择相应的cpu 和sdrmarootlocalhostuClinux-dist#makevendor_hwselect SYSPTF=/配件配置目录/your_system.ptf选择cpu出现如下图(如果是多cpu的话,根据实际情况选择) 选择sdram如下图(在这里我选择的是1即ddr_sdram_0,其它根据实际情况) 十三. 编译内核和应用rootlocalhostuClinux-dis# make (需要编译一段时间)十四. 将 zImage文件copy到宿主机上rootlocalhostyanfa# cp ./ images/zImage 你挂载的目录十五. 在宿主机上(windows)打开nios ii eds 7.2 command shell开始程序altera- nios ii eds 7.2-nios ii eds 7.2 command shell十六.下载你的sof文件到目标板十七. 下载zImage 到目标板十八. 打开nios终端十九. uclinux正确启动时应出现如下信息Using cable USB-Blaster USB 2-1.2, device 1, instance 0x00Pausing target processor: OKInitializing CPU cache (if present)OKDownloaded 1272KB in 7.7s (165.1KB/s)Verified OKStarting processor at address 0x00500000# nios2-terminalnios2-terminal: connected to hardware target using JTAG UART on cablenios2-terminal: USB-Blaster USB 2-1.2, device 1, instance 0nios2-terminal: (Use the IDE stop button or Ctrl-C to terminate)Uncompressing Linux. Ok, booting the kernel.Linux version 2.6.26-rc6 (hippodarkstar) (gcc version 3.4.6) #2 PREEMPT Mon Jun 16 14:30:09 CST 2008uClinux/Nios IIBuilt 1 zonelists in Zone order, mobility grouping off. Total pages: 8128Kernel command line:PID hash table entries: 128 (order: 7, 512 bytes)Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)Memory available: 30136k/2333k RAM, 0k/0k ROM (1552k kernel code, 781k data)Mount-cache hash table entries: 512net_namespace: 180 bytesNET: Registered protocol family 16NET: Registered protocol family 2IP route cache hash table entries: 1024 (order: 0, 4096 bytes)TCP established hash table entries: 1024 (order: 1, 8192 bytes)TCP bind hash table entries: 1024 (order: 0, 4096 bytes)TCP: Hash tables configured (established 1024 bind 1024)TCP reno registeredNET: Registered protocol family 1io scheduler noop registeredio scheduler deadline registered (default)ttyJ0 at MMIO 0x8009340 (irq = 8) is a Altera JTAG UARTconsole ttyJ0 enabledttyS0 at MMIO 0x8008e00 (irq = 7) is a Altera UARTdm9000 Ethernet Driver, V1.30TCP cubic registeredNET: Registered protocol family 17RPC: Registered udp transport module.RPC: Registered tcp transport module.Freeing unused kernel memory: 572k freed (0x1b8000 - 0x246000)Shell invoked to run file: /etc/rcCommand: hostname uClinuxCommand: mount -t proc proc /procCommand: mount -t sysfs sysfs /sysCommand: mount -t usbfs none /proc/bus/usbmount: mounting none on /proc/bus/usb failed: No such file or directoryCommand: mkdir /var/tmpCommand: mkdir /var/logCommand: mkdir /var/runCommand: mkdir /var/lockCommand: mkdir /var/emptyCommand: ifconfig lo Command: route add -net netmask loCommand: cat /etc/motdWelcome to _ _ _ / _| |_| _ _| | | | _ _ _ _ _ _ | | | | | | | | _ | | | | / / | |_| | |_| | | | | | |_| |/ | _|_|_|_| |_|_|_/_/ | | |_|呵呵, 恭喜你成功运行了uclinux操作系统现在你可以根据自己的喜好从新配置内核啦!如下操作:从新回到虚拟机下的uclinux-dist目录下rootlocalhostuclinux-dist#make menuconfigKernel/Library/Defaults Selection -(linux-2.6.x) Kernel Version(None) Libc Version Default all settings (lose changes)* Customize Kernel Settings* Customize Vendor/User Settings Update Default
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 合作开发产品市场调研与设计协议
- 2025年智慧农业温室建设项目投资环境与政策风险分析报告
- 2025年河北沧州市第十八中学提供大学生见习岗位考试参考题库及答案解析
- 2025四川乐山峨眉山市面向市外选调事业单位工作人员43人备考考试试题及答案解析
- 2025河南南阳张仲景医院招聘16人备考考试题库附答案解析
- 简阳市简城第一小学2025年临聘教师招聘备考考试题库附答案解析
- 2025年智慧养老社区跨境协作网络技术创新与应用报告
- 2025榆林高新第六小学招聘备考考试试题及答案解析
- 2025年智慧养老社区老年助餐服务体系构建报告
- 快递业务合作协议合同书
- GB/T 40924-2021单板滑雪靴滑雪板固定器接口
- GB/T 17193-1997电气安装用超重荷型刚性钢导管
- GB/T 1455-2022夹层结构或芯子剪切性能试验方法
- 《C++程序设计教程》PPT Chapter-5
- 关于介绍足球的英语课件
- 风电发电机组电控系统知识-安全链部分课件
- PMBOK指南第6版中文版
- 第五章-针织服装设计与样板制作经典版课件
- 肿瘤的介入治疗课件最新版
- 基坑土石方开挖安全专项施工方案
- 社会统计学-全套课件
评论
0/150
提交评论