LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-30-2012, 10:49 PM   #1
arinsat
LQ Newbie
 
Registered: Aug 2012
Posts: 7

Rep: Reputation: Disabled
First kernal module


Hi,
I try to build my own kernal module with simple init & cleanup functions.I create a make file.(both are taken from sample examples in internet).When i try to compile using 'make' command. The 'bash:command not found'error is displayed.
I dont know whether i missed any kernal package.
Help me to solve this issue.
 
Old 08-30-2012, 10:52 PM   #2
SIG_SEGV
Member
 
Registered: Jul 2012
Location: Banglore, INDIA
Distribution: Fedora-Core
Posts: 70

Rep: Reputation: 11
Try whether your system has 'make' using command 'whereis make'. If its not showing any path then you have to get it explicitly
 
Old 08-31-2012, 07:04 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,657

Rep: Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281
Welcome to LQ.

Which "Linux OS" are you using ? ?
http://www.linuxquestions.org/linux/...Ask_a_Question
http://linuxsilo.net/docs/smart-questions_en.html
... Like Fedora 17, Ubuntu 12.04, etc.

A "standard" kernel module Makefile ( for hello.c ) :
Code:
obj-m    := hello.o

KDIR    := /lib/modules/$(shell uname -r)/build
PWD    := $(shell pwd)

default:
	$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
 
Old 09-01-2012, 11:34 AM   #4
arinsat
LQ Newbie
 
Registered: Aug 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
First kernal module

Hi,
The version is 2.6.15 as read by giving the command 'uname -a'.
when i try with 'whereis make' cmd, it shows 'make:'.Explicittly mean any package or...
 
Old 09-01-2012, 12:52 PM   #5
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,336

Rep: Reputation: 231Reputation: 231Reputation: 231
Quote:
Originally Posted by arinsat View Post
Hi,
The version is 2.6.15 as read by giving the command 'uname -a'.
when i try with 'whereis make' cmd, it shows 'make:'.Explicittly mean any package or...
That is the kernel version (and quite old at that).
What we need is what distribution you are using.
 
1 members found this post helpful.
Old 09-01-2012, 02:00 PM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,657

Rep: Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281
?

Could it be Fedora 5 ?

The command : 'cat /etc/redhat-release' will show.
 
Old 09-01-2012, 11:40 PM   #7
SIG_SEGV
Member
 
Registered: Jul 2012
Location: Banglore, INDIA
Distribution: Fedora-Core
Posts: 70

Rep: Reputation: 11
When its a "bash issue:", then its clear that the 'make' hasn't been installed yet
 
Old 09-02-2012, 06:14 AM   #8
arinsat
LQ Newbie
 
Registered: Aug 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
First Kernal module

Hi,
It is ubuntu...whether it is a seperate package or something...
 
Old 09-02-2012, 06:24 AM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,657

Rep: Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281
# 8

The command : cat /etc/issue
.. will usually reply with 'Ubuntu <version>'
 
Old 09-02-2012, 08:08 AM   #10
arinsat
LQ Newbie
 
Registered: Aug 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
First Kernal Module

Hi,
It shows ubuntu 6.06.1 LTS...for the command cat /etc/issue....
 
Old 09-02-2012, 01:52 PM   #11
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,336

Rep: Reputation: 231Reputation: 231Reputation: 231
Quote:
Originally Posted by arinsat View Post
Hi,
It shows ubuntu 6.06.1 LTS...for the command cat /etc/issue....
Why such an old version?
I would recommend atleast 8.04 LTS.

Last edited by smeezekitty; 09-02-2012 at 02:44 PM.
 
Old 09-02-2012, 02:23 PM   #12
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,484

Rep: Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089
Sounds like you need to install make
 
Old 09-02-2012, 02:44 PM   #13
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,336

Rep: Reputation: 231Reputation: 231Reputation: 231
In any case, try
Code:
apt-get install build-essential
 
Old 09-03-2012, 08:53 PM   #14
arinsat
LQ Newbie
 
Registered: Aug 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
First Kernal Module

Hi,
I will upgrade to latest soon...
But for the current issue, it shows that the package is missing or obsoleted...shall i get that package alone..
 
Old 09-03-2012, 09:14 PM   #15
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,336

Rep: Reputation: 231Reputation: 231Reputation: 231
Quote:
Originally Posted by arinsat View Post
Hi,
I will upgrade to latest soon...
But for the current issue, it shows that the package is missing or obsoleted...shall i get that package alone..
Do you have your sources.list set up to use the archive?
 
  


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
9.3 + kernal nat module berrance SUSE / openSUSE 0 10-13-2005 07:41 AM
rhel 4 ntfs kernal module toolapc22 Linux - Software 1 08-18-2005 02:00 AM
Module from old kernal sethgeekx86 Slackware 3 06-04-2004 02:27 PM
Mismatch between NVIDIA Kernal and X module ccin1492 Linux - Distributions 10 03-01-2004 12:14 PM
Kernal Module Programming herambshembekar Programming 2 02-22-2002 11:34 AM


All times are GMT -5. The time now is 10:28 PM.

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