如何在构建 linux 驱动程序时添加预构建对象 (android)

How to add prebuilt object when building linux driver (android)

要求我的驱动的源文件暂时不能打开,请问有什么好方法吗?

目前,我的想法是可以放置预构建的目标文件 (.o) 并让 makefile 将它们编译为最终构建的 in.o,但我不知道如何编写 Makefile 来处理这件事。

非常感谢任何帮助!

Linking to a kernel module a precompiled object file

解决

Simply rename the shipped .o file to .o_shipped. In your case :

  • leave your Makefile as is
  • mv obj2.o obj2.o_shipped
  • make and let the kernel build system magic do the work for you :)