Skip to content

Build a piano driver in the Linux kernel the x86 Android emulator

License

Notifications You must be signed in to change notification settings

37Rb/android-kernel-piano-kata

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Android Linux Kernel Piano Kata

In this kata you will build a piano driver in the Linux kernel for the x86 Android emulator.

Thorough error handling and graceful degradation when things go wrong is important. While this is generally true it's especially true in kernel programming. If your code crashes, leaves the system in a bad state or leaks resources you will bring down the whole system, not just your app.

Set up the development environment

Use the environment set up guide to set up your development environment and tools.

Create a skeleton piano device driver

Create a skeleton piano device driver that we will build our piano on.

Interface with the Goldfish audio device

Interface with the Goldfish emulated audio device to play audio on the Android emulator.

Implement the piano device driver

Now that all the building blocks are in place, go ahead implement the piano device driver turning your keyboard into a piano.

Under normal circumstances you would do this kind of work in user space not in the kernel. The kernel's purpose is to provide user space applications with efficient, secure and convenient access to computing hardware. In this kata we're putting some application logic in the kernel just to practice programing in kernel space.

Verified versions

  • Android Studio 3.0
  • VirtualBox 5.2.0
  • Vagrant 2.0.1

About

Build a piano driver in the Linux kernel the x86 Android emulator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%