Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
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.


  Search this Thread
Old 11-23-2010, 04:15 PM   #1
Registered: Sep 2007
Posts: 169

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


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 ?

Old 11-24-2010, 09:30 PM   #2
Registered: Sep 2007
Posts: 169

Original Poster
Rep: Reputation: 23


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".



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 > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 07:16 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration