Study the Linux Device Driver.