Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Linux - Kernel This forum is for all discussion relating to the Linux kernel.


  Search this Thread
Old 09-14-2016, 02:23 PM   #1
LQ Newbie
Registered: Jul 2015
Posts: 3

Rep: Reputation: Disabled
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

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?
Old 09-16-2016, 09:14 PM   #2
Registered: Sep 2015
Posts: 733

Rep: Reputation: Disabled
Are you writing a driver for your hardware?

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


compile, kernel, library, linux

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
build a static (.a) library for kernel modules. dfatlq Linux - Kernel 8 01-18-2016 06:32 PM
How to compile an arm linux kernel with third party static library(e.g. ssdk_ks_km.a) mhtsoi Programming 1 08-14-2014 06:28 AM
how to build static library .a using .so and .o for gnash saritha Fedora 0 09-11-2007 12:33 AM
How can I use gcc to build a static library? vtluu Red Hat 1 04-12-2004 10:45 AM > Forums > Linux Forums > Linux - Software > Linux - Kernel

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

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