下面的英文部分是从之前给老师报告中的一部分截取出来了,是在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)