Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kernel Module Example #28

Open
BlackFrog1 opened this issue Jul 18, 2019 · 2 comments
Open

Kernel Module Example #28

BlackFrog1 opened this issue Jul 18, 2019 · 2 comments

Comments

@BlackFrog1
Copy link

Is it possible to create a loadable kernel module example?

I know what the result of the Makefile should be

`obj-m += main.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`

@ttroy50
Copy link
Owner

ttroy50 commented Jul 20, 2019

Thanks for the suggestion.

Unfortunately I don't know much about building kernel modules. The only experience I have is building toy examples to test things and using a makefile similar to what you posted.

I'm happy to accept a PR with an example for a kernel module but wouldn't feel comfortable to write one at the moment.

@enkeyz
Copy link

enkeyz commented Feb 6, 2021

You can find a straightforward tutorial here: https://musteresel.github.io/posts/2020/02/cmake-template-linux-kernel-module.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants