Compilation of the GPIO device driver
There are two ways in which you can compile your driver.
Cross compilation on the host PC Local compilation on the target board In the first method, one needs to have certain packages downloaded. These are: ARM cross-compiler Raspbian kernel source (the kernel version must match with the one running on your Pi; otherwise, the driver will not load onto the OS due to the version mismatch) In the second method, one needs to install certain packages on Pi. Go to the following link and follow the steps indicated: http://stackoverflow.com/questions/20167411/howtocompileakernelmoduleforraspberrypi Or, follow the third answer at this link, the starting line of which says, "Here are the steps I used to build the ‘Hello World’ kernel module on Raspbian." I went ahead with the second method as it was more straightforward.