0

I have a static library ssdk_ks_km.a which is needed to the linux kernel. I tried the following method:

1, edit linux/Makefile as below

libs-y1 := $(patsubst %/, %/lib.a, $(libs-y))
libs-y2 := $(patsubst %/, %/built-in.o, $(libs-y))
##libs-y := $(libs-y1) $(libs-y2)
libs-y3 := $(patsubst %/, %/ssdk_ks_km.a, $(libs-y))
libs-y := $(libs-y1) $(libs-y2) $(libs-y3)
##

2, copy ssdk_ks_km.a into directories linux/lib and linux/arch/arm/lib

3, make uImage

4, load the uImage into an ARM based development board.

It is successfully complied but the static library ssdk_ks_km.a seems not to be linked to the kernel.

Is the method correct or not? And how can I know the static library is successfully linked to the linux kernel.

Thank You!!!

  • possible duplicate of [Linking kernel module with a static lib](http://stackoverflow.com/questions/22150812/linking-kernel-module-with-a-static-lib) – artless noise Aug 14 '14 at 17:05
  • So, just use `ar` to extract the objects and use `ld -r` to make a `libssdk_ks_km.o_shipped`. The kernel sees the *shipped* and doesn't try to remake anything. Obvious GPL issues apply. – artless noise Aug 14 '14 at 17:08

0 Answers0