0

I am trying to build a kernel module for android-x86 3.10 kernel with a pre-compiled object file like below,

tmp-objs := sample1.o prebuilt.o obj-m += tmp.o

sample1.o has a sample1.c but prebuilt.o is precompiled object file.

While building the android-x86 3.10 kernel image , kernel build is throwing undefined! error for symbols which are present in prebuilt.o.

Please help to resolve this build error.

pawan
  • 141
  • 2
  • 8

1 Answers1

1

Every Kernel Module should be compiled against the same kernel. This means if you have any pre-compiled object files, the kernel throws the error(due to version mismatch)

and also few symbols defined in the prebuilt object file might not be there in the present kernel version (3.10). This is because after the kernel is compiled it will create the system map against which all the function address are referred. And every kernel has its own System.map file.
Santosh A
  • 5,173
  • 27
  • 37
  • Thanks Santosh. My vendor has supplied a prebuilt.bin only for which there is no source file , I created prebuilt.o using objcopy and trying to build the kernel module. So I have to use prebuilt.bin. I tired to compile the same on Ubuntu 12.04 and it compiles well. For Android-x86 its giving undefined! error for symbols. – pawan Aug 26 '13 at 04:42