-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor, insert install and remove in makefile and update readme
- Loading branch information
1 parent
3a29daa
commit d58405e
Showing
4 changed files
with
23 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,32 @@ | ||
# my_device | ||
This is an example of a kernel device which works as a parrallel port. When writing or reading from the device, it will write in a buffer and print in the KERN_DEBUG. | ||
This is an example of a kernel device which works as a parallel port. When writing or reading from the device, it will write in a buffer and print in the KERN_DEBUG. | ||
|
||
## Install | ||
|
||
``` | ||
git clone [email protected]:brunoproduit/my_device.git | ||
cd my_device | ||
./install.sh | ||
make | ||
``` | ||
|
||
Note: needs sudo for insmod, mknod & chmod. | ||
|
||
if you just want to compile a simple `make` is enough. | ||
|
||
The device driver is created in the nodefile `/dev/my_device` as a character device with major number *42*. | ||
|
||
## Remove | ||
## Test | ||
|
||
The device will write in KERN_DEBUG, which can be read with `dmesg`. | ||
In order to test you can use: | ||
|
||
``` | ||
./remove.sh | ||
make test | ||
``` | ||
|
||
Note: needs sudo for rmmod & rm. | ||
This will insert the modue in the kernel, clean dmesg, run device_usage_example.c and print dmesg. | ||
## Remove | ||
|
||
The device will write in KERN_DEBUG, which can be read with `dmesg`. | ||
``` | ||
make clean | ||
``` | ||
|
||
Note: needs sudo for rmmod & rm. |
This file was deleted.
Oops, something went wrong.