LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 11-23-2010, 04:15 PM   #1
zvivered
Member
 
Registered: Sep 2007
Posts: 119

Rep: Reputation: 15
How to link a driver directly to kernel ?


Hello,

I built a simple module (ko) for a PCI card. In rcS (startup script) of busybox I'm running: insmod mymodule.ko

It works great.

Now I have to use "alloc_bootmem" in my driver. According to chap. 8 in DD3, I have to "link the driver directly to kernel".

How can I do it ?

Thanks.
 
Old 11-24-2010, 09:30 PM   #2
zvivered
Member
 
Registered: Sep 2007
Posts: 119

Original Poster
Rep: Reputation: 15
Solution

Hi,

I put the c code (mymodule.c) in drivers/char and changed the Makefile located in this folder (+mymodule.o)

The driver was compiled and a .o was created.

This is the only way I could use "alloc_bootmem".

Thanks.
 
  


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
Which kernel settings directly relate to power/usage etc? Josh000 Linux - Laptop and Netbook 3 01-11-2010 10:59 AM
Does 2.6 kernel support control register directly? LeoneVictor Linux - Kernel 0 04-18-2007 03:34 AM
How to use NIC driver directly? wangjinyi Programming 6 05-09-2005 08:10 PM
statically link a network card driver into kernel stonux Linux - Hardware 0 04-07-2005 02:57 PM
Won't work unless complied directly in the kernel Clark Bent Linux - Hardware 5 03-27-2005 06:43 PM


All times are GMT -5. The time now is 11:40 AM.

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