I have to build a CAN driver for Linux on my board and I experience many problems in compiling.
First I built the linux kernel 3.6.0-xilinx and I followed these steps:
# make ARCH=arm xilinx_zynq_defconfig
# make ARCH=arm menuconfig
# make ARCH=arm CROSS_COMPILE=/root/CodeSourcery/Sourcery_G++_Lite/bin/arm-xilinxa9-linux-gnueabi-
# make modules_install
# make install
Then I changed the paths in the 'cross-zedboard' file to the following:
ARCH=arm
CROSS_COMPILE=arm-xilinxa9-linux-gnueabi-
CROSS_TOOL_PATH=/root/CodeSourcery/Sourcery_G++_Lite/bin
PATH=$PATH:$CROSS_TOOL_PATH
CC=${CROSS_TOOL_PATH}/arm-xilinxa9-linux-gnueabi-gcc
AR=${CROSS_TOOL_PATH}/arm-xilinxa9-linux-gnueabi-ar
LD=${CROSS_TOOL_PATH}/arm-xilinxa9-linux-gnueabi-ld
RANLIB=${CROSS_TOOL_PATH}/arm-xilinxa9-linux-gnueabi-ranlib
DEPMOD=/sbin/depmod
[ ${KDIR} ] || KDIR=/home/naiad/Desktop/linux-xlnx-xilinx-v14.4
DEPLOYDIR=
DESTDIR=$(dirname $(pwd))/install/arm
LD_LIBRARY_PATH=${DEPLOYDIR}/lib/
then executed:
# ./target zedboard
# unset KDIR
# . cross-zedboard
# make all
But I get a lots of errors. Can anyone point out what am I doing wrong in this? I am doubtful about the correctness of cross-compiler and dependency (DEPMOD).
Thanks in advance.