Skip to content

KlotzAndrew/kernel-modules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kernel modules

Blog post covering some of the setup for a hello.c example

Working environment

In this repo you should be able to get running with:

  1. git clone https://github.com/KlotzAndrew/kernel-modules.git
  2. cd kernel-modules
  3. vagrant up
  4. vagrant ssh
  5. cd src

This will drop you into a vagrant shell with file sync to your current directory

Installing Vagrant

Skip if you already have Vagrant installed

apt install virtualbox

curl -SL --progress-bar https://releases.hashicorp.com/vagrant/2.2.14/vagrant_2.2.14_linux_amd64.zip --output /tmp/vagrant.zip
unzip -o /tmp/vagrant.zip -d /usr/local/bin
rm  /tmp/vagrant.zip

# libarchive-tools not default in ubuntu 20.04
apt-get install libarchive-tools

vagrant --version

vagrant plugin install vagrant-vbguest

Compiling and Running

There is first time setup for installing your kernel headers

make setup

Compiling

make all

Running

sudo /sbin/insmod hello.ko
sudo /sbin/rmmod hello.ko

tail /var/log/kern.log

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published