Hello,
I have successfully ported LSDK 21.08 to my custom board, LS1012AFRWY. When I tried to compile and insmod the module driver that was used with the previous LSDK 18.12, it appears that the kernel version is not compatible.
I have written the Makefile as follows, and it compiled successfully, resulting in the generation of the .ko file.
DEVNAME := dev_pci_xdma_ls1012a
obj-m += $(DEVNAME).o
$(DEVNAME)-objs := main.o
PWD := $(shell pwd)
KDIR := /home/yhoh/wk-cleverlogic-LayerscapeSDK/flexbuild/build/linux/linux/arm64/LS/output/LSDK-21.08
all:
make -C $(KDIR) M=$(PWD) clean
make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 -C $(KDIR) M=$(PWD) modules
clean:
make -C $(KDIR) M=$(PWD) clean
After copying the file to the board and issuing the insmod command, it doesn't seem to be functioning correctly.
[root@LSDK ~]# insmod dev_pci_xdma_ls1012a.ko
[ 1838.387700] dev_pci_xdma_ls1012a: loading out-of-tree module taints kernel.
[ 1838.399196] kboject example_init() done. ret=0
[root@LSDK ~]# uname -a
Linux LSDK 5.10.35-dirty #1 SMP PREEMPT Wed Oct 4 18:44:39 KST 2023 aarch64 GNU/Linux
Please provide instructions on how to compile and run a module separately, without integrating it into the kernel.
Thank you.
Best Regards,
Gyosun.
Hello,
Sorry, the kernel is not compatible with your module, you have to build the whole module with the kernel version that you are using otherwise it simple won't work.
regards