Skip to content

aviboddu/linux-kernel-module-hello-world

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

linux-kernel-module-hello-world

A simple kernel module which prints Hello World. This was created as part of an application process for a research position.

This document describes how to get the given code compiled and executed on the given VM.

Prerequisites:

sudo apt-get install build-essential linux-headers-$(uname -r)

Compilation (In the repository):

make all

Insertion (In the repository):

sudo insmod hello.ko

Removal:

sudo rmmod hello

Checking output:

sudo dmesg

Most of this code was learnt from The Linux Kernel Module Programming Guide.

The main change from this guide was due to the kernel requiring license documentation before insertion. Additionally, it took some time to understand where exactly text would be printed and how to check this. Another confusion was how the printk function worked, since it required both arguments without a separating comma, which was unintuitive.

About

A simple kernel module which prints Hello World

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published