User Tools

Site Tools


tutorials:expansion_boards_dvk:dvk521:documentations:a10:driver_porting_and_configuration

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

tutorials:expansion_boards_dvk:dvk521:documentations:a10:driver_porting_and_configuration [2014/06/28 16:58]
waveshare
tutorials:expansion_boards_dvk:dvk521:documentations:a10:driver_porting_and_configuration [2014/07/23 10:27] (current)
waveshare
Line 10: Line 10:
   [lcd0_para]   [lcd0_para]
   lcd_gpio_0 = port:​PH15<​0><​0><​default><​default>​   lcd_gpio_0 = port:​PH15<​0><​0><​default><​default>​
-Then convert it into script.bin format by using fex2bin, and replace the earlier script.bin on the board. (for more info, refer to the document [[tutorials:​DVK521:​Documentations:​A10:​Prepare for Kernel and Drivers Porting|Prepare for Kernel and Drivers Porting]]+Then convert it into script.bin format by using fex2bin, and replace the earlier script.bin on the board. (for more info, refer to the document [[tutorials/​expansion_boards_dvk/​dvk521/​documentations/​a10/​prepare_for_kernel_and_drivers_porting|Prepare for Kernel and Drivers Porting]]
 Reboot the system to apply new configuration. Reboot the system to apply new configuration.
  
Line 31: Line 31:
 Save and exit, re-compile the kernel: Save and exit, re-compile the kernel:
   #make uImage   #make uImage
-Replace the earlier uImage on the board with the new generated uImage under arch/​arm/​boot/​ directory via NFS. (for more info, refer to the document [[tutorials:​DVK521:​Documentations:​A10:​Prepare for Kernel and Drivers Porting|Prepare for Kernel and Drivers Porting]]+Replace the earlier uImage on the board with the new generated uImage under arch/​arm/​boot/​ directory via NFS. (for more info, refer to the document [[tutorials/​expansion_boards_dvk/​dvk521/​documentations/​a10/​prepare_for_kernel_and_drivers_porting|Prepare for Kernel and Drivers Porting]]
 === Config the script.fex ===  === Config the script.fex === 
 Config the script.fex as follows, add the [w1_para] setting: ​ Config the script.fex as follows, add the [w1_para] setting: ​
Line 37: Line 37:
   w1_used = 1   w1_used = 1
   w1_pin = port:​PB10<​1><​default><​default><​default>​   w1_pin = port:​PB10<​1><​default><​default><​default>​
-Then convert it into script.bin format by using fex2bin, and replace the earlier script.bin on the board. (for more info, refer to the document [[tutorials:​DVK521:​Documentations:​A10:​Prepare for Kernel and Drivers Porting|Prepare for Kernel and Drivers Porting]]+Then convert it into script.bin format by using fex2bin, and replace the earlier script.bin on the board. (for more info, refer to the document [[tutorials/​expansion_boards_dvk/​dvk521/​documentations/​a10/​prepare_for_kernel_and_drivers_porting|Prepare for Kernel and Drivers Porting]]
  
 Reboot the system, insert the DS18B20 device. Reboot the system, insert the DS18B20 device.
Line 75: Line 75:
   twi1_scl = port:​PB18<​2><​default><​default><​default>​   twi1_scl = port:​PB18<​2><​default><​default><​default>​
   twi1_sda = port:​PB19<​2><​default><​default><​default>​   twi1_sda = port:​PB19<​2><​default><​default><​default>​
-Then convert it into script.bin format by using fex2bin, and replace the earlier script.bin on the board. (for more info, refer to the document [[tutorials:​DVK521:​Documentations:​A10:​Prepare for Kernel and Drivers Porting|Prepare for Kernel and Drivers Porting]]+Then convert it into script.bin format by using fex2bin, and replace the earlier script.bin on the board. (for more info, refer to the document [[tutorials/​expansion_boards_dvk/​dvk521/​documentations/​a10/​prepare_for_kernel_and_drivers_porting|Prepare for Kernel and Drivers Porting]]
  
 Reboot the system. Reboot the system.
Line 94: Line 94:
 Save and exit, re-compile the kernel: Save and exit, re-compile the kernel:
   #make uImage   #make uImage
-Replace the earlier uImage on the board with the new generated uImage under arch/​arm/​boot/​ directory via NFS. (for more info, refer to the document [[tutorials:​DVK521:​Documentations:​A10:​Prepare for Kernel and Drivers Porting|Prepare for Kernel and Drivers Porting]]+Replace the earlier uImage on the board with the new generated uImage under arch/​arm/​boot/​ directory via NFS. (for more info, refer to the document [[tutorials/​expansion_boards_dvk/​dvk521/​documentations/​a10/​prepare_for_kernel_and_drivers_porting|Prepare for Kernel and Drivers Porting]]
  
 === Config the script.fex ===  === Config the script.fex === 
Line 117: Line 117:
   full_duplex = 0   full_duplex = 0
   manual_cs = 0   manual_cs = 0
-Then convert it into script.bin format by using fex2bin, and replace the earlier script.bin on the board. (for more info, refer to the document [[tutorials:​DVK521:​Documentations:​A10:​Prepare for Kernel and Drivers Porting|Prepare for Kernel and Drivers Porting]]+Then convert it into script.bin format by using fex2bin, and replace the earlier script.bin on the board. (for more info, refer to the document [[tutorials/​expansion_boards_dvk/​dvk521/​documentations/​a10/​prepare_for_kernel_and_drivers_porting|Prepare for Kernel and Drivers Porting]]
  
 Now the kernel and script.fex configuration for SPI device have completed, the last step is to load the io_control.ko driver module (refer to the previous section " Porting I/O Control Driver"​). Now the kernel and script.fex configuration for SPI device have completed, the last step is to load the io_control.ko driver module (refer to the previous section " Porting I/O Control Driver"​).
Line 141: Line 141:
 Save and exit, re-compile the kernel: Save and exit, re-compile the kernel:
   #make uImage   #make uImage
-Replace the earlier uImage on the board with the new generated uImage under arch/​arm/​boot/​ directory via NFS. (for more info, refer to the document [[tutorials:​DVK521:​Documentations:​A10:​Prepare for Kernel and Drivers Porting|Prepare for Kernel and Drivers Porting]]+Replace the earlier uImage on the board with the new generated uImage under arch/​arm/​boot/​ directory via NFS. (for more info, refer to the document [[tutorials/​expansion_boards_dvk/​dvk521/​documentations/​a10/​prepare_for_kernel_and_drivers_porting|Prepare for Kernel and Drivers Porting]]
  
 === Config the script.fex ===  === Config the script.fex === 
Line 260: Line 260:
 Re-compile the kernel: Re-compile the kernel:
   #make uImage   #make uImage
-Replace the earlier uImage on the board with the new generated uImage under arch/​arm/​boot/​ directory via NFS. (for more info, refer to the document [[tutorials:​DVK521:​Documentations:​A10:​Prepare for Kernel and Drivers Porting|Prepare for Kernel and Drivers Porting]]+Replace the earlier uImage on the board with the new generated uImage under arch/​arm/​boot/​ directory via NFS. (for more info, refer to the document [[tutorials/​expansion_boards_dvk/​dvk521/​documentations/​a10/​prepare_for_kernel_and_drivers_porting|Prepare for Kernel and Drivers Porting]]
  
 === Config the script.fex ===  === Config the script.fex === 
Line 291: Line 291:
   ctp_wakeup = port:​PB13<​1><​default><​default><​1>​   ctp_wakeup = port:​PB13<​1><​default><​default><​1>​
   ctp_io_port = port:​PH7<​0><​default>​   ctp_io_port = port:​PH7<​0><​default>​
-Then convert it into script.bin format by using fex2bin, and replace the earlier script.bin on the board. (for more info, refer to the document [[tutorials:​DVK521:​Documentations:​A10:​Prepare for Kernel and Drivers Porting|Prepare for Kernel and Drivers Porting]]+Then convert it into script.bin format by using fex2bin, and replace the earlier script.bin on the board. (for more info, refer to the document [[tutorials/​expansion_boards_dvk/​dvk521/​documentations/​a10/​prepare_for_kernel_and_drivers_porting|Prepare for Kernel and Drivers Porting]]
  
 Connect the 7inch capacitive LCD, reboot the system, try to touch the icons on the screen. ​ Connect the 7inch capacitive LCD, reboot the system, try to touch the icons on the screen. ​
Line 378: Line 378:
   sun4i_csi1.ko:​   sun4i_csi1.ko:​
   /​lib/​modules/​3.4.61+/​kernel/​drivers/​media/​video/​sun4i_csi/​csi1   /​lib/​modules/​3.4.61+/​kernel/​drivers/​media/​video/​sun4i_csi/​csi1
-Replace the earlier uImage on the board with the new generated uImage under arch/​arm/​boot/​ directory via NFS. (for more info, refer to the document [[tutorials:​DVK521:​Documentations:​A10:​Prepare for Kernel and Drivers Porting|Prepare for Kernel and Drivers Porting]]+Replace the earlier uImage on the board with the new generated uImage under arch/​arm/​boot/​ directory via NFS. (for more info, refer to the document [[tutorials/​expansion_boards_dvk/​dvk521/​documentations/​a10/​prepare_for_kernel_and_drivers_porting|Prepare for Kernel and Drivers Porting]]
  
 Copy the above 4 driver files to the board, and install them in order: ​ Copy the above 4 driver files to the board, and install them in order: ​
Line 513: Line 513:
 Modify the files permission: Modify the files permission:
   #cd /​home/​waveshare/​cubieboard/​waveshare_demo/​driver/​io_control_dev   #cd /​home/​waveshare/​cubieboard/​waveshare_demo/​driver/​io_control_dev
-{{..:Documentations-6_2.jpg}}+   
 +{{:tutorials:​expansion_boards_dvk:​dvk521:​documentations:​a10:​documentations-6_2.jpg}} ​ 
   #chmod 777 ./*   #chmod 777 ./*
   ​   ​
 1.2 Modify the Makefile 1.2 Modify the Makefile
   #vi Makefile   #vi Makefile
-{{..:Documentations-6_3.jpg}}+   
 +{{:tutorials:​expansion_boards_dvk:​dvk521:​documentations:​a10:​documentations-6_3.jpg}}
  
 Assign the KERNELDIR according to your actual kernel path.  Assign the KERNELDIR according to your actual kernel path. 
Line 524: Line 527:
 1.3 Clear the old files 1.3 Clear the old files
   #make clean   #make clean
-{{..:Documentations-6_4.jpg}}+   
 +{{:tutorials:​expansion_boards_dvk:​dvk521:​documentations:​a10:​documentations-6_4.jpg}}
  
 1.4 Compile 1.4 Compile
Line 535: Line 539:
 As shown in the picture below: As shown in the picture below:
  
-{{..:Documentations-6_5.jpg}}+{{:tutorials:​expansion_boards_dvk:​dvk521:​documentations:​a10:​documentations-6_5.jpg}} 
  
 It is caused by the different kernel version, can be just omitted. It is caused by the different kernel version, can be just omitted.
-{{..:Documentations-6_6.jpg}}+ 
 +{{:tutorials:​expansion_boards_dvk:​dvk521:​documentations:​a10:​documentations-6_6.jpg}} 
  
 Copy the new generated io_control.ko file to your own system and load it.  Copy the new generated io_control.ko file to your own system and load it. 
tutorials/expansion_boards_dvk/dvk521/documentations/a10/driver_porting_and_configuration.1403945889.txt.gz · Last modified: 2014/06/28 16:58 by waveshare