LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   How to build a static Linux kernel library? (https://www.linuxquestions.org/questions/linux-kernel-70/how-to-build-a-static-linux-kernel-library-4175589431/)

jasonhan 09-14-2016 02:23 PM

How to build a static Linux kernel library?
 
I am assigned a job to build a Linux kernel (version 4.1) static library to support our hardware for our customer. The library is built separate to the kernel compile. How should I create makefile?
I tried with makefile like this:

lib-y += hello.o
lib-y += goodby.o

all:
make -C $(SYS_PATH) M=$(PWD) ARCH=powerpc CROSS_COMPILE=powerpc64-fsl-linux modules

The compiler didn't give any error. But it doesn't do anything. Anyone can give me some hint?

Rinndalir 09-16-2016 09:14 PM

Are you writing a driver for your hardware?

Are you writing a user space driver or a driver that runs in the kernel?


All times are GMT -5. The time now is 04:42 AM.