Showing results for 
Show  only  | Search instead for 
Did you mean: 
Registered: ‎03-08-2011

Compiling Issues with Embedded Linux




We are using the xilinx_lltemac driver code and it's get compiled with the main make at the top level.

And I got the ***.o files  as in    ...../linux-2.6-xlnx/drivers/net/xilinx_lltemac

ppclinux% ls -l *.o
-rw-r--r-- 1 root staff 392215 2011-03-08 19:55 built-in.o
-rw-r--r-- 1 root staff 392215 2011-03-08 19:55 xilinx_temac.o
-rw-r--r-- 1 root staff  45288 2011-03-08 19:55 xlltemac_control.o
-rw-r--r-- 1 root staff 296972 2011-03-08 19:55 xlltemac_main.o
-rw-r--r-- 1 root staff  53580 2011-03-08 19:55 xlltemac.o

Now I am trying to compile the same code as above in a separate directory to create a Loadable Module as *****.ko. And I am experiencing compiling problems mainly with the include files.....

This is the commandline text I am using  - 

          make  -I../../xilinx_common -C /usr/local/projects/Network/linux-2.6-xlnx SUBDIRS=$PWD modules

I am getting lots of errors as

/usr/local/projects/Network/linux-2.6-xlnx/drivers/net/xilinx_10Gmac/xlltemac_main.c:37:26: error: xbasic_types.h: No such file or directory
In file included from /usr/local/projects/Network/linux-2.6-xlnx/drivers/net/xilinx_10Gmac/xlltemac_main.c:38:
/usr/local/projects/Network/linux-2.6-xlnx/drivers/net/xilinx_10Gmac/xlltemac.h:273:18: error: xenv.h: No such file or directory
/usr/local/projects/Network/linux-2.6-xlnx/drivers/net/xilinx_10Gmac/xlltemac.h:275:21: error: xstatus.h: No such file or directory

BTW all those h files such as xbasic_types.h, xenv.h, xstatus.h are all there inthe right directory:

 /usr/local/projects/Network/linux-2.6-xlnx/drivers/xilinx_common and I have included that in the commandline as

make  -I../../xilinx_common -C /usr/local/projects/Network/linux-2.6-xlnx SUBDIRS=$PWD modules


And my Makefile is:


# Makefile for the Xilinx Tri-mode ethernet driver
# obj-m   = hello.o
obj-m   +=  xlltemac_main.o
xilinx10ge-objs         := xlltemac_main.o xlltemac.o xlltemac_control.o
# KVERSION = $(shell uname -r)
# KVERSION = $(uname -r)
# all:
#       make -C /usr/local/projects/Network/linux-2.6-xlnx  modules
#       make -C /lib/modules/2.6.31/build M=$(PWD) clean

# The Linux adapter for the Xilinx driver code.
# xilinx_temac-objs     := xlltemac_main.o xlltemac.o xlltemac_control.o

# obj-$(CONFIG_XILINX_LLTEMAC) := xilinx_temac.o


Can anyone help me to compile those files in   ...../linux-2.6-xlnx/drivers/net/xilinx_10Gmac, so that I can have a Loadable Module, which I like to insmod later  having some modifications.




0 Kudos
0 Replies