LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 03-10-2009, 11:09 PM   #1
ananth86coolguy
LQ Newbie
 
Registered: Mar 2009
Posts: 28

Rep: Reputation: 15
Unhappy Compiling Driver Application program along with Kernel


hi

i've written a character driver on uClinux platform for blinking the LEDs on a blackfin 527 board.i included the driver code in the uclinux-dist/linux/driver/char directory and compiled the entire kernel.
i got the kernel image and i loaded the image onto board.i got the listing of my driver in /proc/devices .now i have written an application which uses
my LED driver for blinking the LEDs.My doubt is how should i compile the application program with kernel.In which directory should i place my application program so that it gets compiled along with kernel??
 
Old 03-11-2009, 01:14 AM   #2
Suresh Maniyath
Member
 
Registered: Feb 2009
Location: India
Distribution: Fedora, Ubuntu
Posts: 37

Rep: Reputation: 19
Filesystem

Ananth,
Applications are not part of kernel. One should place his/her application inside the file system directories. For example I can say your home directory "/home/ananth/" (if it exist) will be the right choice.

Best regards,
Suresh Maniyath

Last edited by Suresh Maniyath; 03-11-2009 at 01:16 AM.
 
Old 03-11-2009, 01:34 AM   #3
ananth86coolguy
LQ Newbie
 
Registered: Mar 2009
Posts: 28

Original Poster
Rep: Reputation: 15
thanks suresh for your kind info. . .
 
Old 03-11-2009, 01:41 AM   #4
ananth86coolguy
LQ Newbie
 
Registered: Mar 2009
Posts: 28

Original Poster
Rep: Reputation: 15
Question

hey can yo explain me bit clearly. .we have compiled the LED driver along with kernel.thats getting compiled fine. .i have an application which uses my LED driver via ioctl() to make the LEDs blink. . em asking how should i compile this application.
 
Old 03-11-2009, 01:59 AM   #5
Suresh Maniyath
Member
 
Registered: Feb 2009
Location: India
Distribution: Fedora, Ubuntu
Posts: 37

Rep: Reputation: 19
Cross-Compile

Ananth,
You need to cross-compile your application with your toolchain(cross-compiler). I am not sure about the name of your gcc. But just for an example
xxx-linux-gcc -o Application.out Application.c

The above command will generate a cross compiled binary application. Copy the same into your file system.
If you are using custom defined IOCTL'S then, place the ioctl definitions into a header file and you can include that header file to your driver and to the apps.

Best regards,
Suresh

Last edited by Suresh Maniyath; 03-11-2009 at 02:49 AM.
 
  


Reply



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 link our network driver and application program? sandeep_raju123 Programming 1 12-24-2008 02:25 PM
Problem in compiling a device driver program p.arun Linux - Kernel 4 01-23-2008 01:14 AM
Compiling a program written for 2.4 kernel, with 2.6 kernel rvenkatesh25 Programming 0 08-28-2007 09:31 AM
Help with Compiling and what's a good application to program with? johnnyICON Programming 11 01-12-2005 02:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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