Hi, I have wrote a charDevDriver for linux, I am able to compile and work with it on ubuntu with the following make file:
obj-m += chardrv.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
I have followed the second step of this answer to compile kernel sources in SDK. what changes should I do in my make file to be able to compile my driver for colibri iMX6DL? I want to load it in my device for testing it and debugging.
what changes should I do in my make file to be able to compile my driver for colibri iMX6DL
Is this Makefile working on Ubuntu? Please have a look here to create a Makefile.
The only difference between making a driver for your host or the module, is just you need to cross-compile the driver with the SDK for Colibri iMX6DL.
thank you jaski, yes this make file works on Ubuntu and almost any other Linux to make a kernel module.
The problem is not exactly the make file, I followed the instructions in this link to make SDK with kernel sources. Compilation succeeded and I installed the SDK, but there is no Linux source files in the SDK directory! what else should I do when I want to make SDK?
If the Linux sources were available, when I set the ARCH and compilers the make File I use compiles the kernel module for that linux and target device.