LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices

Reply
 
Search this Thread
Old 10-19-2010, 09:07 PM   #1
blink182
LQ Newbie
 
Registered: Oct 2010
Posts: 29

Rep: Reputation: 0
Question in adding device drivers for kernel compilation of uClinux


Hi . I have encountered problems in compiling the driver source codes while the linux-2.6.x kernel is being built . Since some of my C files are dependent on header files in other directories , by following the ordinary procedures in adding device drivers to kernel , it will result in compilation error as the compiler doesn't know where the header files are . How can I solve the problem ( e.g. Modify Makefile and Kconfig ) so that I can add the driver at kernel build successfully ? Thanks !
 
Old 10-23-2010, 05:11 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,537

Rep: Reputation: 149Reputation: 149
Just give the correct paths to the header files in your #include lines. Or the files are outside the kernel tree?
 
Old 10-24-2010, 10:49 PM   #3
blink182
LQ Newbie
 
Registered: Oct 2010
Posts: 29

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Mara View Post
Just give the correct paths to the header files in your #include lines. Or the files are outside the kernel tree?
The files are inside the kernel tree . I try to modify the Makefile in hopes of guiding the compilation but it doesn't work . Is there a way to write some Makefiles to guide the compilation instead of changing the #include lines ? Any reference on the web ? Otherwise , it will be very painful ...... Thank you .
 
Old 10-25-2010, 02:52 PM   #4
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,537

Rep: Reputation: 149Reputation: 149
I think you should rather follow the way other people do it: they change the paths in their #include files. It's less bug-prone. Otherwise, the include directories are set in the main makefile and in the architectures.
 
Old 11-07-2010, 09:42 PM   #5
blink182
LQ Newbie
 
Registered: Oct 2010
Posts: 29

Original Poster
Rep: Reputation: 0
Thanks , Mara . The problem is solved .
 
  


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
question on kernel compilation shellarchive Red Hat 1 09-29-2007 03:34 AM
A Question of Kernel RE-Compilation hirts123 Slackware 7 05-31-2006 08:40 AM
Kernel Compilation Question yougene Slackware 9 11-24-2005 12:29 AM
how to install dynamic device driver in uClinux chandansingh Programming 1 04-26-2005 03:02 PM
Some question about the Kernel 2.6.10 compilation Shagrath239 Slackware 5 02-20-2005 12:01 PM


All times are GMT -5. The time now is 02:29 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration