<span class="ul-threaded" style="margin: 0.5em 0pt 0pt -20px;"><span class="text-cell"><span>H</span><br>Hello,<br><span>I am new to the <b class="highlight">OpenMoko</b> community and appreciate your patience.
</span><br><span>I am trying to compile a simple &quot;Hello World&quot; <b class="highlight">kernel</b> module.
</span><br><br><span>//***********************************************************************
</span><br><span>#include &lt;linux/module.h&gt;       /* Needed by all <b class="highlight">modules</b> */
</span><br><span>#include &lt;linux/<b class="highlight">kernel</b>.h&gt;       /* Needed for KERN_INFO */
</span><br><span>#include &lt;linux/init.h&gt;         /* Needed for the macros */
</span><br><br><span>static int __init hello_start(void)
</span><br><span>{
</span><br><span>printk(KERN_INFO &quot;Loading hello module...\n&quot;);
</span><br><span>return 0;
</span><br><span>}
</span><br><br><span>static void __exit hello_end(void)
</span><br><span>{
</span><br><span>printk(KERN_INFO &quot;Leaving module\n&quot;);
</span><br><span>}
</span><br><span>//***********************************************************************
</span><br><br><span>I have downloaded the tool chain and am trying to compile the module as follows:
</span><br><span>/usr/local/<b class="highlight">openmoko</b>/arm/bin/arm-angstrom-linux-gnueabi-gcc -D__KERNEL__ -DMODULE -c hello.c
</span><br><span>hello.c:1:60: error: linux/module.h: No such file or directory
</span><br><span>hello.c:3:60: error: linux/init.h: No such file or directory
</span><br><span>hello.c:5: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘hello_start’
</span><br><span>hello.c:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘hello_end’
</span><br><span>hello.c:17: warning: data definition has no type or storage class
</span><br><span>hello.c:17: warning: parameter names (without types) in function declaration
</span><br><span>hello.c:18: warning: data definition has no type or storage class
</span><br><span>hello.c:18: warning: parameter names (without types) in function declaration
</span><br><br><span>It&#39;s complaining that it cannot find linux/ libraries.
</span><br><span>Do I need to use the -l option to specify the <b class="highlight">OpenMoko</b> libraries somewhere?
</span><br><br><span>I really appreciate any help.
</span><br><span>Thanks.
</span><br><br><span>Wesley 
</span><br></span></span>