Com­pi­la­tion of the GPIO de­vice driver

OpenSource For You - - DEVELOPERS LET'S TRY -

There are two ways in which you can com­pile your driver.

Cross com­pi­la­tion on the host PC Lo­cal com­pi­la­tion on the tar­get board In the first method, one needs to have cer­tain pack­ages down­loaded. Th­ese are: ARM cross-com­piler Rasp­bian ker­nel source (the ker­nel ver­sion must match with the one run­ning on your Pi; oth­er­wise, the driver will not load onto the OS due to the ver­sion mis­match) In the sec­ond method, one needs to in­stall cer­tain pack­ages on Pi. Go to the fol­low­ing link and follow the steps in­di­cated: http://stack­over­flow.com/ques­tions/20167411/how­to­com­pile­a­ker­nel­mod­ule­for­rasp­berry­pi Or, follow the third an­swer at this link, the start­ing line of which says, "Here are the steps I used to build the ‘Hello World’ ker­nel mod­ule on Rasp­bian." I went ahead with the sec­ond method as it was more straight­for­ward.

Fig­ure 2: Con­sole

Fig­ure 1: Sys­tem lay­out

Newspapers in English

Newspapers from India

© PressReader. All rights reserved.