How to Build External Kernel Modules on Jetson Xavier

Hi,
I try to build a External Kernel Modules on Jetson Xavier.
I find a document at here:
https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/kernel_custom.html#


It seems easy to make a .ko file, but when I try to build it , I got

I have no idea about how to deal with it, I think the doucument is not easy to understand to a new bird.
Can anyone help me?

Yan

Hi,
Finally I can build something follow the guide, but it seems build all kernel rather than one module, should I build all kernel when I want to build only one kernel ?

Hi,
Finally I write a Makefile to build single module .

KERNELDIR := /lib/modules/4.9.201-tegra/build

CURRENT_PATH := $(shell pwd)

obj-m := chrdev.o


default:
	$(MAKE) -C $(KERNELDIR) M=$(CURRENT_PATH) modules
clean:
	$(MAKE) -C $(KERNELDIR) M=$(CURRENT_PATH) clean

I will test it.

Glad to know issue resolved!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.