LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 04-06-2007, 08:36 AM   #1
kingraja84
LQ Newbie
 
Registered: Aug 2006
Location: India
Distribution: suse,mandriva
Posts: 24

Rep: Reputation: 15
module compile_ firsttime


I am writing a helloworld module & for my make this is the errors comming

rajasekhar@localhost hello]$ make -f Makefile.txt
make -C /lib/modules/2.6.20/build M=/home/rajasekhar/hello modules
make[1]: Entering directory `/usr/src/kernels/linux-2.6.20.4'
scripts/Makefile.build:17: /home/rajasekhar/hello/Makefile: No such file or directory
make[2]: *** No rule to make target `/home/rajasekhar/hello/Makefile'. Stop.
make[1]: *** [_module_/home/rajasekhar/hello] Error 2
make[1]: Leaving directory `/usr/src/kernels/linux-2.6.20.4'
make: *** [default] Error 2


my makefile is like this PLEASE FIND THE BUG
ifneq ($(KERNELRELEASE),)
@echo $(KERNELRELEASE)
# call from kernel build system

obj-m := hello.o

else

KERNELDIR ?= /lib/modules/2.6.20/build
PWD := $(shell pwd)

default:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
echo $(KERNELDIR)

endif

clean:
rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions

depend .depend dep:
$(CC) $(CFLAGS) -M *.c > .depend


ifeq (.depend,$(wildcard .depend))
include .depend
endif
 
Old 04-06-2007, 11:15 AM   #2
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 78
Why don’t you call your makefile “Makefile” instead of “Makefile.txt”?
 
  


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
insmod: error inserting 'module.o': -1 Invalid module format ksrinivas Linux - Newbie 5 10-11-2006 07:29 AM
nvidia driver 8762 kernel module mismatch x module openfun Ubuntu 5 06-27-2006 10:02 PM
kcmshell module, Background&Screensaver Module can't be launch (but works @LookNFeeL) bobbyjoe Linux - Software 0 01-08-2005 04:48 AM
fglrx module not found but X runs using module biger problem though HELP! fireicer Linux - Newbie 4 07-30-2004 04:44 PM
'Invalid module format' loading simple module on Suse Linux Professional 9.1 rocketdude Linux - Distributions 3 07-27-2004 11:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 02:27 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
Open Source Consulting | Domain Registration