https://github.com/ahmedalyelghannam/linuxkerneldevelopment_playground
https://github.com/ahmedalyelghannam/linuxkerneldevelopment_playground
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ahmedalyelghannam/linuxkerneldevelopment_playground
- Owner: AhmedAlyElGhannam
- Created: 2024-08-05T08:31:48.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-08-05T10:58:32.000Z (10 months ago)
- Last Synced: 2024-08-05T11:44:05.765Z (10 months ago)
- Language: Batchfile
- Size: 309 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# LinuxKernelDevelopment_Playground
This repo contains 2 simple projects related to kernel development: a kernel module that prints stuff and a character device driver that also prints stuff but repeatedly!
This was done on a machine running Ubuntu 20.04 with kernel version `5.15.0`. Some functions/macros may differ depending in the kernel version you are running so feel free to check [Bootlin's Website](https://elixir.bootlin.com/linux/v5.15/source/kernel) to know more about the right syntax.
## Preparations
1. In order to check for kernel version, run:
```
uname -r
```1. Install essentials for kernel development:
```
sudo apt install build-essential linux-headers-$(uname -r)
```## Loading & Unloading Modules
```
# for loading
sudo insmod hello.ko# for unloading
sudo rmmod hello.ko
```## Bro Tip
If you forgot your root password for some reason, using a user account that has root privilages, run:
```
sudo passwd root
```