下面的英文部分是從之前給老師報告中的一部分截取出來了,是在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 "debhttp://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)