在基于ZedBoard的Linux系统下添加自定义硬件IP(3)——建立交叉编译环境

下面的英文部分是从之前给老师报告中的一部分截取出来了,是在ubuntu Linux下建立交叉编译环境的过程。在交叉编译环境建立好之后,需要下载Linux系统进行编译生成zImage。下载地址为:https://github.com/Digilent/linux-digilent。 选择Tags下的v3.6-digilent-13.01。 

(1)编译Linux内核

进入下载的Linux系统根目录,使用命令:make digilent_zed_defconfig对系统进行编译配置。接着使用命名make进行编译,编译完后在arch/arm/boot/ 路径下会生成zImage文件。

(2)编译digilent-zed.dts 

使用命令dtc  -I dts -O dtb -o devicetree.dtb digilent-zed.dts。将修改过的digilent-zed.dts重新编译生成devicetree.dtb。

(3)编译u-boot

下载u-boot的链接为:https://github.com/Digilent/u-boot-digilent 选择Tags目录下的digilent-v2014.04。进入下载的-boot系统根目录,使用命令:make digilent_zed_defconfig对系统进行编译配置。接着使用命名make进行编译,编译生成u-boot, 重命名为u-boot.elf。

1、Youcan download xilinx-2011.09-50-arm-xilinx-linux-gnueabi.bin through the followLink by Google.https://code.google.com/p/zedboard-book-source/downloads/detail?name=xilinx-2011.09-50-arm-xilinx-linux-gnueabi.bin&can=2&q=

 

2、Becausemy system is Ubuntu 14.04 64-bit,we should install the ia32-libs before we could install xilinx-2011.09-50-arm-xilinx-linux-gnueabi.bin.

      a. Gaining system privileges ("root privileges")

           sudo -i

      b. Getting in the list of apt source

           cd /etc/apt/sources.list.d

      c. Adding the source of Ubuntu system

echo "deb http://old-releases.ubuntu.com/ubuntu raring main restricted universe multiverse" > ia32-libs-raring.list

d.Updatingsource

      apt-getupdate

e.Installingia32-libs

      apt-getinstall ia32-libs

f.Regainingsource

rm ia32-libs-raring.list

apt-get update

 

3、Nowwe can install the xilinx-2011.09-50-arm-xilinx-linux-gnueabi.bin

a. Replacing the dash with bash. Youshould select “no” in the pop-up dialog box after you executed the following command.

dpkg-reconfigure dash

b. Getting the path of the file(xilinx-2=11.09-50-arm-xilinx-linux-gnueabi.bin) and executing the following command. Chmod is used todefinethe way a file can be accessed.

chmod +x xilinx-2011.09-50-arm-xilinx-linux-gnueabi.bin

./xilinx-2011.09-50-arm-xilinx-linux-gnueabi.bin


There were something been ignored tomorrow. we should add the path of compile environment to the “PATH” through“export” command. You can open the bash.bashrc file by vim and add the nextthree commands to the end of it.

vim /etc/bash.bashrc

export ARCH=arm

exportCROSS_COMPILE=arm-xilinx-linux-gnueabi-

export PATH=/home/youngfly/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/:$PATH(this path is according to the actual path of compile environment on yourcomputer)



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值