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

Geoffrey Lee glee at ok-labs.com
Fri Jun 20 01:34:11 EST 2008


On Thu, Jun 19, 2008 at 04:46:10PM +0200, Lukas HANEL wrote:
> Hi

Hi Lukas

> 
> 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?
> 

For that symlink to work, you need to place your files under
include/asm-l4.  That's not ideal, since the driver include
files that you want to put into OK Linux seems to be ARM-specific.
The reason why it doesn't work though, is because the build system
creates a symlink called asm which points to include/asm-l4,
located here:

build/iguana/wombat/include2

it may be possible to get the Linux build system to create an 
include3/asm with a symlink called arch which points to
include/asm-l4/arm/arch-<xyz>, then you can use the standard
include conventions.


> 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?
> 

We've enabled the Intel PIIX ATA driver and the USB driver for
i386.  To our knowledge the Linux drivers for ARM do not work
out of the box currently.

> thanks,
> Lukas Hänel

	-gl

> 
> _______________________________________________
> Developer mailing list
> Developer at okl4.org
> https://lists.okl4.org/mailman/listinfo/developer
> 

-- 




More information about the Developer mailing list