2

Suppose I have machine with some version of Linux kernel. And I have directory with kernel sources of another version. The kernel was built for arch and loaded to the appropriate device.
Now I need to rebuild just one kernel module in this big directory.
I read this post and tried something like

make path/to/the/module/itself.ko

, but it build module for amd64.

When I try

make M=path/to/the/module/

it gives a bunch of arch-related C-errors.

Could someone explain how can easy use this ARM-ready environment to rebuild some kernel module?

red0ct
  • 4,840
  • 3
  • 17
  • 44
narotello
  • 419
  • 2
  • 14
  • Does this answer your question? [Cross compiling a kernel module](https://stackoverflow.com/questions/3467850/cross-compiling-a-kernel-module) – S.S. Anne Nov 29 '19 at 21:00

1 Answers1

2

You could try:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- M=path/to/the/module/

Also read:

Cross compiling a kernel module

gcc-arm-linux-gnueabi command not found

red0ct
  • 4,840
  • 3
  • 17
  • 44