Let's code a Linux Driver: 1: A minimal Hello World Linux Kernel Module

preview_player
Показать описание
#GNU #Linux #Tutorial #Driver #DriverDevelopment

Let's leave userspace and head towards Kernelspace!

In this series of videos I will show you how to write your own Linux Driver. Today we will start with a minimal hello world Linux Kernel Module.

Here is the link to my git-repo:

You want to learn more? Check out my playlist:
Рекомендации по теме
Комментарии
Автор

Oh hells yeah!!!

I've decided to not only do these projects on a linux box, but to recreate each of the drivers you make on a FreeBSD machine.

That way not only will I learn in a more hands on way, but I can compare and contrast the different *nix systems

jholloway
Автор

The first of the updated videos? Congrats!

ΝίκοςΙστοσελίδα
Автор

First comment? Thanks for the video Johanes! ❤

sergiogcollado
Автор

I am really excited about the new series. I followed the old one but I am very hyped for this and I will definitely follow this one as well! Thank you very much for this!

ExplosiveAnyThing
Автор

This video series came at a great time!
I'm looking at writing a custom tty line-discipline module that extends n_tty, so I can do ^K (ctrl+k) to send SIGKILL just like ^C (ctrl+c) sends SIGINT
Partially an exercise, but at the same time useful

cat_dev_random
Автор

Nice, thank you! I remember fixing a sound driver for Linux 2.4 in 2003 or so.. was fun. I since moved on to macOS but it's nice to see the modern Linux way -- it's EXACTLY like it used to be 20 years ago haha -- schöne Grüße.. und aufpassen.. deine Website hat kein Impressum..

fluctura
Автор

its great you are using Raspberry pi for your kernel module. It's a common board in my opinion

anthony
Автор

How did you navigate to /build? There isn't even a file or directory named build when we see the ls command

jeffinphilip
Автор

Hey Johannes

What would be the difference between using Static variable for the module init and exit functions vs not using one? We do not need them to retain their value after the driver is unloaded so we can just use int only?

Optmzdlyz
Автор

kernel headers installed proper version still not able to do make, its throws an make oldconfig && make prepare still that command is issue

rohithkapse
Автор

Hi! Loved the tutorial. However, I'm getting the error: ""insmod: ERROR: could not insert module hello.ko: Invalid module format"
Any help?
I'm using PopOS

nyeeesss
Автор

Hello, I have reached till compiling the ko file. But, when I enter the tmux command, I don't see another window like in this video where I can enter insmod command. Is there any other package I need to install?

rishidivakar
Автор

Great video!
I noticed that I can do 'sudo rmmod hello' without specifying the .ko file, I guess that is using the running module name directly

xF
Автор

as i am a complete idiot i want to point out that when you do `mkdir 01_hello` and then follow up with `cd !:1` you can do the same with 1 less character to type if you `cd $_` , srry i had to :)

hoefkensj