Albert Arquer

building modules

Discussion created by Albert Arquer on Oct 17, 2011
Latest reply on Oct 17, 2011 by Albert Arquer

Hello, I'm affraid I have another issue....

 

I currently have installed the LTIB that belongs to the i.MX25 PDK and I need to compile modules on for the BSP. Last time I had to do this i did this:

 

1. I went to /opt/freescale/pkgs/

2. Extracted linux-2.6.31.tar.bz2

3. Modified the code I wanted in /drivers/....

4. Compress the fonder linux-2.6.31 into linux-2.6.31.tar.bz2 again

5. Recalculated md5 checksum: md5sum linux-2.6.31.tar.bz2 > linux-2.6.31.tar.bz2.md5

6. Went to LTIB's source directory and rebuildt the kernel.

 

This solution did work, however, you can see how tedious it is. I am sure that there is a better way to do this but I can't seem to get it to work properly.. I am running on a standard i386 with ubuntu and I know how to build modules for my own platform with the command "make -C /lib/modules/$(uname -r)/build/ M=`pwd` modules"

However, if I go to /ltib/rpm/BUILD/linux-2.6.31/drivers/net/wireless/libertas (for example) and I change the makefile strictly to make it independent from the kernel global build (changing the obj-($CONFIG_PARAMETER) to obj-m) and then type:

make -C LTIBSOURCEDIR/rpm/BUILD/linux-2.6.31/kernel/ M=`pwd` modules

I get an error telling me that there is no target "modules" and if I try with the path "LTIBSOURCEDIR/rpm/BUILD/linux-2.6.31" without going into the "kernel" folder I get a huge output full of errors.....

What am I doing wrong?¿? I am really desperate as this is a very important issue that is not allowing me to move forward.

 

I will appreciate anybodys help but I ask you please to explain things clearly as I am a newbie and get lost easily.

 

PS: I am attaching both Makefiles, the original and the modified one that I am using to try to compile the libertas driver so that you can see if I am doing it correctly.

 

Thanks again!!!

Attachments

Outcomes