<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Building linux kernel module/Driver in C code? in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/building-linux-kernel-module-driver-in-c-code/m-p/5107498#M61752</link>
    <description>I want to compile and run below code I tried lot as&lt;BR /&gt;&lt;BR /&gt;# gcc -C -W -Wall -D__KERNEL__ -DMODULE -isystem /lib/modules/2.6.23.14-115.fc8/build -v /usr/include/linux/version.h -c hello.c&lt;BR /&gt;&lt;BR /&gt;# gcc -C -E -W -Wall -D__KERNEL__ -DMODULE -isystem /lib/modules/2.6.23.14-115.fc8/build -v /usr/include/linux/version.h -c hello.c&lt;BR /&gt;&lt;BR /&gt;# gcc -C -E -W -Wall -D__KERNEL__ -DMODULE -isystem /lib/modules/2.6.23.14-115.fc8/build -v /usr/include/linux/version.h -c hello.c&lt;BR /&gt;&lt;BR /&gt;# gcc -W -Wall -D__KERNEL__ -DMODULE -isystem /lib/modules/2.6.23.14-115.fc8/build -v /usr/include/linux/version.h -c hello.c&lt;BR /&gt;&lt;BR /&gt;# gcc -W -Wall -D__KERNEL__ -DMODULE -isystem /lib/modules/2.6.23.14-115.fc8/build -v /usr/include/linux/version.h -c hello.c&lt;BR /&gt;&lt;BR /&gt;Its not able to find linux/module.h whereas I have installed linux-source code and able to see same file in include/linux/module.h ?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#include &lt;LINUX&gt;&lt;BR /&gt;int init_module(void)&lt;BR /&gt;{&lt;BR /&gt;printk("&amp;lt;1&amp;gt;Hello, world\n");&lt;BR /&gt;return 0;&lt;BR /&gt;}&lt;BR /&gt;void cleanup_module(void)&lt;BR /&gt;{&lt;BR /&gt;printk("&amp;lt;1&amp;gt;Goodbye cruel world\n");&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I tried by Creating Makefile with contents:&lt;BR /&gt;&lt;BR /&gt;obj-m &lt;TAB spaces=""&gt; := hello.o&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;===============================then fired below============&lt;BR /&gt;&lt;BR /&gt;# make -C /lib/modules/`uname -r` M=/Project modules&lt;BR /&gt;# make -C /lib/modules/`uname -r` M=/Project modules -c hello.c&lt;BR /&gt;# make -C /lib/modules/`uname -r` M=/Project modules hello.c&lt;BR /&gt;# make -C /lib/modules/`uname -r` M=/Project modules hello.c&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;But all failed ...................! Need Help&lt;BR /&gt;Is Anybody konwing how to compile Kernel C code I have docs to will send to u guys as per ur request for reference????????&lt;BR /&gt;&lt;BR /&gt;My Linux Version :&lt;BR /&gt;uname -r&lt;BR /&gt;Linux linuxguru.symantec.com 2.6.23.14-115.fc8 #1 SMP Mon Jan 21 14:20:50 EST 2008 i686 i686 i386 GNU/Linux&lt;/TAB&gt;&lt;/LINUX&gt;</description>
    <pubDate>Wed, 07 May 2008 08:36:03 GMT</pubDate>
    <dc:creator>Vinayak_HPUX</dc:creator>
    <dc:date>2008-05-07T08:36:03Z</dc:date>
    <item>
      <title>Building linux kernel module/Driver in C code?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/building-linux-kernel-module-driver-in-c-code/m-p/5107498#M61752</link>
      <description>I want to compile and run below code I tried lot as&lt;BR /&gt;&lt;BR /&gt;# gcc -C -W -Wall -D__KERNEL__ -DMODULE -isystem /lib/modules/2.6.23.14-115.fc8/build -v /usr/include/linux/version.h -c hello.c&lt;BR /&gt;&lt;BR /&gt;# gcc -C -E -W -Wall -D__KERNEL__ -DMODULE -isystem /lib/modules/2.6.23.14-115.fc8/build -v /usr/include/linux/version.h -c hello.c&lt;BR /&gt;&lt;BR /&gt;# gcc -C -E -W -Wall -D__KERNEL__ -DMODULE -isystem /lib/modules/2.6.23.14-115.fc8/build -v /usr/include/linux/version.h -c hello.c&lt;BR /&gt;&lt;BR /&gt;# gcc -W -Wall -D__KERNEL__ -DMODULE -isystem /lib/modules/2.6.23.14-115.fc8/build -v /usr/include/linux/version.h -c hello.c&lt;BR /&gt;&lt;BR /&gt;# gcc -W -Wall -D__KERNEL__ -DMODULE -isystem /lib/modules/2.6.23.14-115.fc8/build -v /usr/include/linux/version.h -c hello.c&lt;BR /&gt;&lt;BR /&gt;Its not able to find linux/module.h whereas I have installed linux-source code and able to see same file in include/linux/module.h ?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#include &lt;LINUX&gt;&lt;BR /&gt;int init_module(void)&lt;BR /&gt;{&lt;BR /&gt;printk("&amp;lt;1&amp;gt;Hello, world\n");&lt;BR /&gt;return 0;&lt;BR /&gt;}&lt;BR /&gt;void cleanup_module(void)&lt;BR /&gt;{&lt;BR /&gt;printk("&amp;lt;1&amp;gt;Goodbye cruel world\n");&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I tried by Creating Makefile with contents:&lt;BR /&gt;&lt;BR /&gt;obj-m &lt;TAB spaces=""&gt; := hello.o&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;===============================then fired below============&lt;BR /&gt;&lt;BR /&gt;# make -C /lib/modules/`uname -r` M=/Project modules&lt;BR /&gt;# make -C /lib/modules/`uname -r` M=/Project modules -c hello.c&lt;BR /&gt;# make -C /lib/modules/`uname -r` M=/Project modules hello.c&lt;BR /&gt;# make -C /lib/modules/`uname -r` M=/Project modules hello.c&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;But all failed ...................! Need Help&lt;BR /&gt;Is Anybody konwing how to compile Kernel C code I have docs to will send to u guys as per ur request for reference????????&lt;BR /&gt;&lt;BR /&gt;My Linux Version :&lt;BR /&gt;uname -r&lt;BR /&gt;Linux linuxguru.symantec.com 2.6.23.14-115.fc8 #1 SMP Mon Jan 21 14:20:50 EST 2008 i686 i686 i386 GNU/Linux&lt;/TAB&gt;&lt;/LINUX&gt;</description>
      <pubDate>Wed, 07 May 2008 08:36:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/building-linux-kernel-module-driver-in-c-code/m-p/5107498#M61752</guid>
      <dc:creator>Vinayak_HPUX</dc:creator>
      <dc:date>2008-05-07T08:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: Building linux kernel module/Driver in C code?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/building-linux-kernel-module-driver-in-c-code/m-p/5107499#M61753</link>
      <description>You might take a look at kerneltrap.org. E.g.: &lt;A href="http://kerneltrap.org/node/6955" target="_blank"&gt;http://kerneltrap.org/node/6955&lt;/A&gt;</description>
      <pubDate>Tue, 27 May 2008 22:12:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/building-linux-kernel-module-driver-in-c-code/m-p/5107499#M61753</guid>
      <dc:creator>Siert Zijl</dc:creator>
      <dc:date>2008-05-27T22:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: Building linux kernel module/Driver in C code?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/building-linux-kernel-module-driver-in-c-code/m-p/5107500#M61754</link>
      <description>I got the solutions</description>
      <pubDate>Mon, 31 Aug 2009 05:36:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/building-linux-kernel-module-driver-in-c-code/m-p/5107500#M61754</guid>
      <dc:creator>Vinayak_HPUX</dc:creator>
      <dc:date>2009-08-31T05:36:20Z</dc:date>
    </item>
  </channel>
</rss>

