LinuxQuestions.org
Review your favorite Linux distribution.
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 10-13-2010, 01:11 PM   #1
saurin
Member
 
Registered: Aug 2008
Posts: 50

Rep: Reputation: 0
error while building the kernel module


Hi,

I am using powerpc 2.6.27 kernel. When i tried to build the kernel module, it gives following error.

AS arch/powerpc/lib/crtsavres.o
<built-in>:0: fatal error: opening dependency file arch/powerpc/lib/.crtsavres.o.d: Permission denied
compilation terminated.

i don't have write permission in linux source. how to remove the dependency to write in kernel source?

Regards,
Saurin
 
Old 10-13-2010, 02:33 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,737

Rep: Reputation: 154Reputation: 154
What user do you use when you compile kernel module, your personal account or root account. You should use root account or sudo account.
 
Old 10-13-2010, 06:36 PM   #3
saurin
Member
 
Registered: Aug 2008
Posts: 50

Original Poster
Rep: Reputation: 0
kernel is compiled with root access and i am using my user login to compile the kernel module.

Why kernel module needs to write in kernel source?
 
Old 10-13-2010, 06:40 PM   #4
Meson
Member
 
Registered: Oct 2007
Distribution: Arch x86_64
Posts: 606

Rep: Reputation: 67
You should *not* use root to build the kernel. I don't see why you would need anything more than read access. Can't you just copy the source over to your own personal build directory?
 
Old 10-14-2010, 02:19 PM   #5
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,737

Rep: Reputation: 154Reputation: 154
AS arch/powerpc/lib/crtsavres.o
<built-in>:0: fatal error: opening dependency file arch/powerpc/lib/.crtsavres.o.d: Permission denied
compilation terminated.

The above error information indicate that builder can't access the library file in kernel source directory, read permission.
 
Old 10-14-2010, 05:37 PM   #6
saurin
Member
 
Registered: Aug 2008
Posts: 50

Original Poster
Rep: Reputation: 0
AS arch/powerpc/lib/crtsavres.o
<built-in>:0: fatal error: opening dependency file arch/powerpc/lib/.crtsavres.o.d: Permission denied
compilation terminated
.

when i tried to build the kernel module, it goes to kernel source and compile the crtsavres.S file and generate the .crtsavres.o.d in arch/powerpc/lib/
i don't understand why it create the file in kernel source tree?
 
Old 10-15-2010, 02:28 PM   #7
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,737

Rep: Reputation: 154Reputation: 154
This would seem to be a linux-headers bug - it seems that it should include the arch/powerpc/lib/crtsavres.o file or no modules will be able to be built against the kernel. Moving to linux-ports, the source of your linux-headers package.
You could probably work around this by installing the linux-source package, ensuring that you have write access to the unpacked kernel tree, and ensuring the /lib/modules/linux-$(uname -r)/source symlink points at the kernel tree.
 
  


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
Building a new module into a Kernel dsylvester Slackware 4 10-03-2006 04:16 PM
error building nvidia kernel module beeblequix Debian 1 10-07-2005 05:21 PM
Building kernel module from multiple source file in 2.6 kernel yogeshwar_s Programming 1 12-20-2004 09:31 AM
Building a module within a kernel brianvdc Linux - General 1 12-11-2003 08:13 PM
VMware module building kernel error ^^ ZoNicONE Linux - Newbie 3 09-09-2003 01:52 PM

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

All times are GMT -5. The time now is 10:37 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