LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-30-2014, 11:45 AM   #1
srinivas.rao1993
LQ Newbie
 
Registered: Jun 2014
Posts: 7

Rep: Reputation: Disabled
Smile what is a kernel tree?


hello everyone!I am learning to create device drivers in linux .I was told that the first thing i needed to learn was module programming .it was mentioned in the book that building modules requires that you have a configured and built kernel tree on your system.so could anyone please tell me what is a kernel tree?

And also in the book which i am referring, it is mentioned that the examples given will work on a 2.6x kernel,but i have a 3.14 version.So will those examples work?
 
Old 06-30-2014, 12:24 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
A kernel tree is the complete kernel source code. It is called tree because the kernel source code is organized in a tree like structure. You can get kernel sources from https://www.kernel.org/

Regarding version numbers, the change from 2.6 to the 3.x versioning system was an arbitrary decision that was not based on technical reasons, so the knowledge in that book still applies.
 
1 members found this post helpful.
Old 07-01-2014, 11:39 AM   #3
srinivas.rao1993
LQ Newbie
 
Registered: Jun 2014
Posts: 7

Original Poster
Rep: Reputation: Disabled
module.h file/directory not found

thank you.


i had a problem while compliling a module.the code is

Code:
#define MODULE
#include <linux/module.h>
int init_module(void) { printk("<1>Hello, world\n"); return 0; }
void cleanup_module(void) { printk("<1>Goodbye cruel world\n"); }
after saving it as hello.c ,
Code:
root# gcc -c hello.c
was run in the terminal,which must produce an object file.but its showing an error that
module.h file/directory not found.
could anyone please help me out with this.thank you
 
Old 07-01-2014, 12:18 PM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
I would recommend to open a new thread about this problem in the Programming subforum.
 
Old 07-01-2014, 12:31 PM   #5
srinivas.rao1993
LQ Newbie
 
Registered: Jun 2014
Posts: 7

Original Poster
Rep: Reputation: Disabled
ok. no problem
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to configure & build kernel tree on kernel version 2.6.X(RHEL-5)? pops13 Linux - Software 1 08-15-2009 12:48 AM
Where is dd in the linux kernel tree? droneprime Linux - Kernel 7 07-25-2009 02:37 PM
Unable to build kernel modules outside the kernel tree Rovalk Programming 2 01-19-2008 02:18 AM
LXer: Howto: build Linux kernel module against installed kernel w/o full kernel source tree LXer Syndicated Linux News 0 09-03-2006 09:21 PM
kernel-tree-2.6.5 The Seeker 11 Debian 2 04-26-2004 03:33 AM


All times are GMT -5. The time now is 08:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration