<div dir="ltr">hi all:<div>      the codes is:</div><div>#########################################</div><div><div>#include &lt;linux/module.h&gt;               // for printk()</div><div>#include &lt;linux/mm.h&gt;             // for struct page</div>
<div>#include &lt;asm/page.h&gt;             // for struct page</div><div>#include &lt;asm/pgtable.h&gt;                // for ZERO_PAGE</div><div><br></div><div>static int __init init_hello( void )</div><div>{</div><div>
        int i;</div><div>        struct page * zero_page;</div><div>        printk( &quot;\n   Kello, the first! \n\n&quot; );</div><div>        i = 0x100;</div><div>        zero_page = ZERO_PAGE(&amp;i);</div><div>        printk(&quot; the ZERO address is %p&quot;, zero_page);</div>
<div>        return  0;</div><div>}</div><div><br></div><div>static void __exit exit_hello( void )</div><div>{</div><div>        printk( &quot;\n   Goodbye now... \n\n&quot; );</div><div>}</div><div><br></div><div>MODULE_LICENSE(&quot;GPL&quot;);</div>
<div>module_init(init_hello);</div><div>module_exit(exit_hello);</div></div><div>#########################################</div><div><br></div><div>I complier it. by:</div><div>#########################################</div>
<div>make -C /lib/modules/`uname -r`/build M=`pwd`<br></div><div>#########################################</div><div><br></div><div>the results is:</div><div>#########################################</div><div><div>[root@localhost kernel_test]# make -C /lib/modules/`uname -r`/build M=`pwd`</div>
<div>make: Entering directory `/usr/src/kernels/2.6.18-308.el5-x86_64&#39;</div><div>  CC [M]  /opt/lx/kernel/kernel_test/zero.o</div><div>  Building modules, stage 2.</div><div>  MODPOST</div><div><span style="background-color:rgb(255,255,255)"><b><font color="#ff0000">WARNING: &quot;phys_base&quot; [/opt/lx/kernel/kernel_test/zero.ko] undefined!</font></b></span></div>
<div>  LD [M]  /opt/lx/kernel/kernel_test/zero.ko</div><div>make: Leaving directory `/usr/src/kernels/2.6.18-308.el5-x86_64&#39;</div></div><div>#########################################</div><div><br></div><div>I try to find the file which defined the &quot;phys_base&quot;, for examples;</div>
<div><h1 style="font-family:&#39;Trebuchet MS&#39;,&#39;Lucida Grande&#39;,Verdana,Arial,sans-serif;color:black;font-size:1.3em">phys_base</h1><span style="color:rgb(120,120,120);font-family:&#39;Lucida Grande&#39;,Verdana,Arial,sans-serif;font-size:14px;background-color:rgb(51,51,51)">Defined as a variable in:</span><ul style="margin-top:0.5em;color:rgb(120,120,120);font-family:&#39;Lucida Grande&#39;,Verdana,Arial,sans-serif;font-size:14px">
<li style="margin-top:0.35em"><a href="http://lxr.oss.org.cn/source/arch/sparc/mm/init.c?v=2.6.8#L40" style="text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(153,153,153);color:white;background-image:none;background-color:rgb(51,51,51)">arch/sparc/mm/init.c, line 40</a></li>
<li style="margin-top:0.35em"><a href="http://lxr.oss.org.cn/source/arch/sparc64/kernel/sparc64_ksyms.c?v=2.6.8#L110" style="text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(153,153,153);color:white;background-color:rgb(51,51,51)">arch/sparc64/kernel/sparc64_ksyms.c, line 110</a></li>
<li style="margin-top:0.35em"><a href="http://lxr.oss.org.cn/source/arch/sparc64/mm/init.c?v=2.6.8#L47" style="text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(153,153,153);color:white;background-color:rgb(51,51,51)">arch/sparc64/mm/init.c, line 47</a></li>
<li style="margin-top:0.35em"><a href="http://lxr.oss.org.cn/source/include/asm-sparc/page.h?v=2.6.8#L160" style="text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(153,153,153);color:white;background-color:rgb(51,51,51)">include/asm-sparc/page.h, line 160</a></li>
<li style="margin-top:0.35em"><a href="http://lxr.oss.org.cn/source/include/asm-sparc/pgtable.h?v=2.6.8#L122" style="text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(153,153,153);color:white;background-color:rgb(51,51,51)">include/asm-sparc/pgtable.h, line 122</a></li>
<li style="margin-top:0.35em"><a href="http://lxr.oss.org.cn/source/include/asm-sparc64/pgtable.h?v=2.6.8#L227" style="text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(153,153,153);color:white;background-color:rgb(51,51,51)">include/asm-sparc64/pgtable.h, line 227</a></li>
</ul></div><div><br></div><div>But I can&#39;t find the file of init.c in my computer. Please tell me some ways to solve it, thank you.</div><div><br></div></div>