Open main menu

Wiki-Orange Pi β

Changes

Orange Pi Zero

16 bytes removed, 19:41, 27 June 2022
Orange Pi Driver development
<br>
Hardware: Orange Pi development board*1, Card reader*1, TF card*1, power supply*1
<div style="padding-left:200px;">[[File:Orange-pi-zero-plus-img4.png|600px]]</div>
<br>
=== '''Device driver and application programming''' ===
=== '''Compile device driver''' ===
<br>
Copy the OrangePi_misc.c to the */lichee/linux-3.104/driver/misc directory:<br>
<div>[[File:Orange-pi-pc2-img83.png|800px]]</div>
<br>
Enter to */lichee/linux-3.104/drivers/misc/, and modify makefile<br>
<div>[[File:Orange-pi-pc2-img84.png|800px]]</div>
<br>
<br>
$ ./build.sh<br>
After compiled the kernel, there will be an orangepi_misc.ko file generated on the directory of lichee/linux-3.104/output/lib/modules/3.104.6539<br>
<div>[[File:Orange-pi-prime-img16.png|400px]]</div>
<br>
There is a .ko module which generated after compiled of OrangePi_misc.c on */lichee/linux-3.104/output/lib/modules/3.104.6539/<br>
<div>[[File:Orange-pi-pc2-img88.png|800px]]</div>
<br>
<div>[[File:Orange-pi-i96-img55.png|800px]]</div>
<br>
Copy the OrangePi_misc.ko file to /media/*/lib/modules/3.104.6539.<br>$ cp OrangePi_misc.ko /media/*/lib/modules/3.104.6539<br>
<br>
=== '''Corss-complile or compiled Cross compiler Application codeProgram''' ===
<br>
Here will take arm-linux-gnueabihf-gcc as an example. Check whether there is the cross compiler, if not, then download and install it.<br>