Giter VIP home page Giter VIP logo

parrot's Introduction

Parrot Linux device driver sample

This is a GPLv2+ sample implementation of a character device driver for Linux 2.6 and later, based on udev.

For more background information as well as a detailed source walkthrough, see the following blog post.

Requirements

  • gcc
  • A recent Linux kernel (with its source)

Compilation

  • Just invoke make as root

Testing

  • insmod parrot_driver.ko debug=1
  • lsmod | grep parrot
  • echo "Yabba Dabba Doo" > /sys/devices/virtual/parrot/parrot_device/fifo
  • cat /dev/parrot_device

Notes

On a Debian system, and if you haven't recompiled a kernel before, you may have to issue the following before you can compile and run the driver:

cd /usr/src
apt-get install linux-headers
uname -r	# Get the version of your kernel, e.g. '3.16.0-4-amd64'
apt-get install linux-source-3.16	# Use the same major.minor as above
tar -xJvf linux-source-3.16.tar.xz
ln -s linux-source-3.16 linux
cd /usr/src/linux
cp /usr/src/linux-headers-$(uname -r)/Module.symvers .
make oldconfig && make prepare && make scripts

parrot's People

Contributors

pbatard avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.