2
votes

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?

1
Does this answer your question? Cross compiling a kernel module - S.S. Anne

1 Answers

2
votes

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