Hi Andy,<br><br>Thanks for the reply.<br>I&#39;ve downloaded and built the kernel:<br><pre>git clone git://<a href="http://git.openmoko.org/git/kernel.git">git.openmoko.org/git/kernel.git</a> linux-2.6<br>cd linux-2.6<br>git checkout -b mystable origin/andy-tracking<br>
mkdir GTA02<br>cp arch/arm/configs/gta02-moredrivers-defconfig GTA02/.config<br>cp arch/arm/configs/gta02-moredrivers-defconfig .config<br>./build GTA02 dummy<br><br></pre><div class="gmail_quote">When I try to run the make command line that you&#39;ve provided, I get the following error:<br>
root@notebook:~/OpenMoko2/linux-2.6# make ARCH=arm -C /home/wesjin/OpenMoko2/linux-2.6/ KBUILD_SRC=/home/wesjin/OpenMoko2/linux-2.6/ M=`pwd`<br>make: Entering directory `/home/wesjin/OpenMoko2/linux-2.6&#39;<br><br>  ERROR: Kernel configuration is invalid.<br>
         include/linux/autoconf.h or include/config/auto.conf are missing.<br>         Run &#39;make oldconfig &amp;&amp; make prepare&#39; on kernel src to fix it.<br><br><br>  WARNING: Symbol version dump /home/wesjin/OpenMoko2/linux-2.6/Module.symvers<br>
           is missing; modules will have no dependencies and modversions.<br><br>  CC      kernel/bounds.s<br>cc1: error: include/linux/autoconf.h: No such file or directory<br>make[1]: *** [kernel/bounds.s] Error 1<br>make: *** [_module_/home/wesjin/OpenMoko2/linux-2.6] Error 2<br>
<br>It&#39;s complaining that the kernel has not been configured. However, I&#39;ve copied the gta02_moredrivers_defconfig<br>file to GTA02 and to linux-2.6 directory. Do I need to do anything else? Is there someway that I can generate<br>
or copy autoconf.h from somewhere?<br><br>Thanks for your help.<br>Wesley<br>On Tue, Mar 3, 2009 at 2:04 AM, Andy Green <span dir="ltr">&lt;<a href="mailto:andy@openmoko.com">andy@openmoko.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<div class="im"><br>
<br>
Somebody in the thread at some point said:<br>
<br>
| I am new to the *OpenMoko* community and appreciate your patience.<br>
| I am trying to compile a simple &quot;Hello World&quot; *kernel* module.<br>
<br></div><div class="im">
| I have downloaded the tool chain and am trying to compile the module as<br>
| follows:<br>
| /usr/local/*openmoko*/arm/bin/arm-angstrom-linux-gnueabi-gcc<br>
| -D__KERNEL__ -DMODULE -c hello.c<br>
<br></div>
You need to abandon that way of coming at it.<br>
<br>
The way that will give results is to leverage the kernel makefile to<br>
build the module.<br>
<br>
Here is how I did this for a hardware RNG driver I wrote as a module:<br>
<br>
Makefile:<br>
<br>
#<br>
# Makefile for whirlygig-rng<br>
#<br>
<br>
obj-m := whirlygig-rng.o<br>
<br>
clean:<br>
~        rm -f *~ *.mod.c *.mod.o *.ko *.o *.symvers<br>
<br>
<br>
Then build something like this:<br>
<br>
export<br>
CROSS_COMPILE=/usr/local/openmoko/arm/bin/arm-angstrom-linux-gnueabi- ;<br>
make ARCH=arm -C &lt;path to kernel source dir&gt; KBUILD_SRC=&lt;path to kernel<br>
source dir&gt; M=`pwd`<br>
<br>
This will build the module in the current directory against the kernel<br>
source tree in the given directory.<br>
<br>
- -Andy<br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.9 (GNU/Linux)<br>
Comment: Using GnuPG with Fedora - <a href="http://enigmail.mozdev.org" target="_blank">http://enigmail.mozdev.org</a><br>
<br>
iEYEARECAAYFAkms1osACgkQOjLpvpq7dMrGNgCfVn+nglPJ5bDpgd1ZvraR2sPf<br>
F8gAn3gwXGE4zg/ZJWxdRFsOqGxLspCl<br>
=t39W<br>
-----END PGP SIGNATURE-----<br>
</blockquote></div><br>