[okl4-developer] OKLinux: include <asm/arch> magic

Lukas HANEL lukas.hanel at st.com
Fri Jun 20 00:46:10 EST 2008


Hi

I am trying to integrate a driver from our internal Linux Kernel to 
OKLinux. My first problem is, that the build system cannot find the 
include files for the driver. These includes are used to being in 
include/asm-arm/arch-xxx/... and are referenced using #include 
<asm/arch/...>.

Following my intuition, I copied the arch-xxx folder to 
include/asm-l4/arm/. Changing also a bunch of KConfig and Makefiles, I 
get the Linux build system create the correct link:
   SYMLINK include/asm-l4/sys-arm/arch -> include/asm-l4/arm/arch-nomadik
mkdir -p include/asm-l4/asm
ln -fsn 
/home/lukas/okl4_2.1/oklinux_2.6.23.21/kernel-2.6.23-v2_ok/include/asm-l4/arm/arch-nomadik 
include/asm-l4/asm/arch

However, this is not exactly what I need. Because now I get 
include/asm/asm/arch. Hence this will not be included by #include 
asm/arch. Is this a bug or a feature?

If it is a feature, how should I use it? I.e. is there a way to avoid 
changing all the include instructions in the driver (and possible a lot 
of other files)? Another way is to manualy create a symlink, or to add 
-Iinclude/asm to the CFLAGS.

What is the right way to do?
Of all the other drivers in oklinux, are there already some using actual 
hardware? So are there some examples, which I can take as reference?

thanks,
Lukas Hänel



More information about the Developer mailing list