title: Cross compiling linux kernel module for ARM on x86 ubuntu
body: <p>I want to cross compile an ARM kernel module on my x86 ubuntu linux.
  I have downloded kernel source(linux 2.6.26 since target ARM machine is running this linux version).
  and I apt-get'ed arm cross compiler. as you can see.</p>
  
  <pre><code>root@declspec-desktop:/var/www/module_test# arm-linux-gnueabi-
  arm-linux-gnueabi-addr2line  arm-linux-gnueabi-cpp-4.5
  arm-linux-gnueabi-gcov-4.5   arm-linux-gnueabi-ld.gold
  arm-linux-gnueabi-ranlib     arm-linux-gnueabi-strip
  arm-linux-gnueabi-ar         arm-linux-gnueabi-elfedit
  arm-linux-gnueabi-gprof      arm-linux-gnueabi-nm
  arm-linux-gnueabi-readelf    arm-linux-gnueabi-as
  arm-linux-gnueabi-gcc        arm-linux-gnueabi-ld
  arm-linux-gnueabi-objcopy    arm-linux-gnueabi-size       
  arm-linux-gnueabi-c++filt    arm-linux-gnueabi-gcc-4.5
  arm-linux-gnueabi-ld.bfd     arm-linux-gnueabi-objdump
  arm-linux-gnueabi-strings  
  </code></pre>
  
  <p>following is the Makefile for my kernel module(hello_module.ko)
   compilation(for my x86 machine) and this works fine.</p>
  
  <pre><code>obj-m += hello_module.o
  KDIR := /lib/modules/$(shell uname -r)/build
  #PWD:=$(shell pwd)
  
  all:
          $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
  
  clean:
          rm -rf *.o *.ko *.mod.* .c* .t*
  </code></pre>
  
  <p>now, what do I have to change in my original working Makefile
  in order to cross compile a kernel module for linux 2.6.26 for ARM?</p>
  
  <p>and whats the difference between linux source and linux header source?
  I have seen these every time I compile some kernel stuff but I still dont get it.</p>
  
  <p>I have googled some articles but it wont help...</p>