![]() |
Kernel module - C & assembly files - makefile problems
I am working on building a kernel module, architecture is Arm (armv7-m), tool chain is arm-uclinuxeabi-gcc and family.
I have a C file, sample.c that builds as a kernel module, loads, executes, all is fine. I have an assembly file, mmcau.S, that builds independently. However, when I try to include the assembly file in the kernel module build process, I can not get the make file to cooperate. I have read that there are implicit rules for .S -> .o, but I am left wondering if that is true. To build sample.c by itself: Code:
CFLAGS := -Os -mcpu=cortex-m4 -mthumb Code:
AS := $(CROSS_COMPILE_APPS)gccCode:
obj-m += sample.oCode:
make[2]: *** No rule to make target `..../app/mmcau.c', needed by `.../app/mmcau.o'. Stop.Thanks, paulcsf |
I believe that the output kernel module name cannot match any of the source files.
There were two other error cases/clues that I found. Modinfo reports little information, only the filename and vermagic, no author, license, description, or parms. Another case would have the module load into the kernel, but would fail to do anything, no output, the device would exist but couldn't be opened, etc. Here is the solution I came up with... Code:
obj-m += KModule.oCode:
obj-m += KMod1.oCan anybody confirm this? It does work. Thanks, paulcsf |
| All times are GMT -5. The time now is 01:33 AM. |