LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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: 294

Rep: Reputation: 23
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: 294

Original Poster
Rep: Reputation: 23
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 07:56 PM.

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