OpenSource For You

Compilatio­n of the GPIO device driver

-

There are two ways in which you can compile your driver.

Cross compilatio­n on the host PC Local compilatio­n 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://stackoverf­low.com/questions/20167411/howtocompi­leakernelm­oduleforra­spberrypi 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 straightfo­rward.

 ??  ?? Figure 2: Console
Figure 2: Console
 ??  ?? Figure 1: System layout
Figure 1: System layout

Newspapers in English

Newspapers from India