ichergui / hello-world

Hello world kernel module

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hello world

This is a simple code source of kernel module "Hello world".

Get and build the software

Download the source code

$ cd $HOME
$ mkdir devel
$ cd devel
$ git clone https://github.com/ichergui/hello-world.git

Build

It will be possible to use the Makefile.

$ cd $HOME/devel/hello-world
$ make all

Test

Insert it into the Linux kernel

$ sudo insmod hello_world.ko
  • verification
$ lsmod | grep -i "hello"
hello_world            16384  0

Try with the command line dmesg to see what's happened.

$ dmesg | tail

Remove it from Linux kernel

$ sudo rmmod hello_world

About

Hello world kernel module


Languages

Language:C 63.9%Language:Makefile 36.1%