xilinxlinux驱动开发

1,交叉编译环境的建立

现在网址上已经下载不到单独的编译链,可以在xilinx ISE14,4的第一个文件夹中找到  codesourcery  文件夹,打开找到 xlinx-2012.03-79-arm-xilinx-linux-gnueabi.bin

右击属性-权限 勾上 以程序执行文件  ,把 。bin文件 拖入终端 -回车  开始安装

或使用 chmod+x 更改权限

2,更改环境变量

export PATH=/《安装路径》/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/:$PATH
export ARCH=arm
export CROSS_COMPILE=arm-xilinx-linux-gnueabi-

这个是每次重启都要重新设置一次

除非写到brshrc里,这个自己去弄吧

3,编译内核,

内核下载地址

1,http://wiki.xilinx.com/zynq-linux

2,这个是开发板sd卡上的那个内核

The Linux kernel (zImage) used for this design is built off of the Digilent
Linux repository, at the commit tagged v3.3.0-digilent-12.07-zed-beta. To
download and build the source, do the following:

1) Clone the latest version of the Digilent Linux repository into the current
working directory:

bash> git clone https://github.com/Digilent/linux-digilent.git

2) Create a new branch starting at the commit tagged
v3.3.0-digilent-12.07-zed-beta:

bash> cd linux-digilent
bash> git checkout -b zedboard_oob v3.3.0-digilent-12.07-zed-beta

3) Copy the kernel configuration from this package to the kernel source:

bash> cp <pkg>/linux/.config ./.config

4) Build the kernel:

bash> make ARCH=arm

4,编译驱动

cd 到驱动所在文件夹

make

~~~~~~~~~

就是这样

原文地址:https://www.cnblogs.com/puck/p/3002996.html