LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   How to link a driver directly to kernel ? (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/how-to-link-a-driver-directly-to-kernel-846106/)

zvivered 11-23-2010 04:15 PM

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.

zvivered 11-24-2010 09:30 PM

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.


All times are GMT -5. The time now is 11:37 PM.