Difference between revisions of "A10-OLinuXino-LIME"

(GPIO description)
(Linux)
 
(68 intermediate revisions by 2 users not shown)
Line 48: Line 48:
 
=== Linux ===
 
=== Linux ===
  
'''[https://drive.google.com/file/d/0B-bAEPML8fwlZWMtZHZCNVNoYTQ/edit?usp=sharing A10 OLinuXino LIME Debian 4GB SD-card image release-2 with:]'''
+
The official Debian images are suitable only for microSD card. Information on booting Debian from the NAND might be found at the forum.
  
*Linux Kernel 3.4.67+
+
Download methods and locations might be found below!
*XFCE4 desktop environment
+
 
*Mplayer CLI
+
FTP link to Debian release 4 (u-boot from sunxi to mainline): [https://ftp.olimex.com/Allwinner_Images/A10-OLinuXino-LIME/Debian/sd/a10_Lime_mainline_uboot_debian_3.4.90_release_4.zip Debian with kernel 3.4.90+ release 4]
*GCC 4.6
+
 
*4.3"(480x272), 7"(800x480), 10" (1024x600) and 15.6" (1366x768) LCD and touchscreen support
+
Instructions and required files for preparing the A10 LIME Debian image, release 4: [https://ftp.olimex.com/Lub-clients/A10_build/5-debian_3.4.90_release_4/ Debian with Kernel 3.4.90+ build instructions]
*GPIO
+
 
*I2C
+
Torrent of Debian release 3: [https://ftp.olimex.com/Allwinner_Images/A10-OLinuXino-LIME/Debian/sd/a10_Lime_debian_3.4.90_release_3.img.7z Debian with kernel 3.4.90+ release 3]
*USB WIFI RTL8188CU, Ethernet AX88772B
+
 
*Audio (MIC and Headphones)
+
Instructions and required files for preparing the A10 LIME Debian image, release 3: [https://ftp.olimex.com/Lub-clients/A10_build/4-debian_3.4.90_release_3/ Debian with Kernel 3.4.90+ build instructions]
 +
 
 +
*Default Login: '''root/olimex'''
 +
*Linux Kernel 3.4.90+
 +
*LXDE desktop environment
 +
*mplayer
 +
*smplayer
 +
*gcc-4.6
 
*dpkg
 
*dpkg
 
*git
 
*git
Line 64: Line 71:
 
*perl
 
*perl
 
*xorg
 
*xorg
*Python 2.7
+
*python 2.7
*OpenCV
+
*midori
*Scratch
+
*minicom
*vlc
+
*usb-modeswitch
*USB-ETHERNET-AX88772B 
+
*sshfs
*MOD-WIFI-RTL8188
+
*wvdial
 +
*GPIO
 +
*Kernel support for USB WIFI RTL8188CU, Ethernet AX88772B
 
*A13-LCD 4.3″TS 4.3″ LCD with backlight and touchscreen 480×272 pixels
 
*A13-LCD 4.3″TS 4.3″ LCD with backlight and touchscreen 480×272 pixels
 
*A13-LCD7″TS 7″ LCD with backlight and touchscreen 800×480 pixels
 
*A13-LCD7″TS 7″ LCD with backlight and touchscreen 800×480 pixels
Line 75: Line 84:
 
*HDMI
 
*HDMI
 
*Micro SD card
 
*Micro SD card
*OTG USB
+
*USB OTG
*HIGH SPEED HOST1 USB
+
*High speed HOST1 USB
*HIGH SPEED HOST2 USB
+
*High speed HOST2 USB
 
*ETHERNET 100MBIT
 
*ETHERNET 100MBIT
 
*SATA
 
*SATA
 
*I2C2(100KHz)  
 
*I2C2(100KHz)  
 
*I2C1(100KHz)
 
*I2C1(100KHz)
*Default Login: '''root/olimex'''
+
*NAND Flash<br><br>
 
+
The list of all installed packages is located in a10_lime_debian_3.4.90+_installed_packages.txt file
  
Tested board peripherials with this image:
+
Tested board peripherals with this image:
*GPIO - located at /sys/class/gpio
+
*GPIO - they are located in /sys/class/gpio directory. Note that first you have to export GPIOs. For example:<br><br>
*LCD - supported are [https://www.olimex.com/Products/OLinuXino/A13/A13-LCD43TS A13-LCD4.3TS], [https://www.olimex.com/Products/OLinuXino/A13/A13-LCD7-TS A13-LCD7TS], [https://www.olimex.com/Products/OLinuXino/A13/A13-LCD10TS A13-LCD10TS]
+
  # for i in `seq 1 1 230`; do echo $i > /sys/class/gpio/export; done
Touch_screen - you need calibrate LCD touch screen usi it. Note that by default the X environment does not start like root user. In our case the X starts with user named olimex
+
  will export all available GPIOs
Therefore if you want to use the touch screen in X environment then you have to run calibrate procedure like olimex user. For example type:  
+
  # echo out > /sys/class/gpio/gpioXX_pxx/direction
    #su olimex
+
  will make the port output
enter the olimex password:olimex
+
  # echo 1 > /sys/class/gpio/gpioXX_pXX/value
    #sudo ts_calibrate
+
  will make the port output in logical 1
calibrate the touch screen and reboot the board
+
*LCD - 4.3"(480x272), 7"(800x480), 10"(1024x600), 15"(1366x768)
    #sudo reboot
+
*SATA - with power on/off control
*SATA - works including power on/off control
+
*HDMI - the default HDMI resolution is 720p60(720x1280 - 60 Hz)
*HDMI - the default HDMI resolution is 720p60(1280x720-60 Hz)
+
*Touch_screen - you need calibrate LCD before using touch screen. Note that if you want to use touch screen in X environment then you have to calibrate it like olimex user, not like root user because X environment is started like olimex uder. For example type:
*ASIX 8877 USB-LAN - [https://www.olimex.com/Products/OLinuXino/A13/USB-ETHERNET-AX88772B/ USB-ETHERNET-AX88772B]
+
  # su olimex
 +
  # sudo ts_calibrate  
 +
  calibrate the touch screen and reboot the board
 +
*ASIX8877 USB-LAN - [https://www.olimex.com/Products/OLinuXino/A13/USB-ETHERNET-AX88772B/ USB-ETHERNET-AX88772B]
 
*WEB camera A4TECH
 
*WEB camera A4TECH
*TL-WN721(TP-LINK USB wireless)
+
*WIFI_RTL8188 - [https://www.olimex.com/Products/Modules/Ethernet/MOD-WIFI-RTL8188/ MOD-WIFI-RTL8188] - how to configure the module might be found here: [[How_to_configure_MOD-RTL8188_on_official_OLinuXino_Debian_releases]]
*RTL8188CU - [https://www.olimex.com/Products/Modules/Ethernet/MOD-WIFI-RTL8188/ MOD-WIFI-RTL8188]
+
*MOD-WIFI-R5370 - [https://www.olimex.com/Products/USB-Modules/MOD-WIFI-R5370 MOD-WIFI-R5370/]
*USB_OTG - works as OTG device and Low/Full/High USB host
+
*USB_OTG - low/full/high USB host
*USB_HOST_up - works as Low/Full/High USB host
+
*USB_HOST_up - low/full/high USB host
*USB_HOST_down - works as Low/Full/High USB host
+
*USB_HOST_down - low/full/high USB host
*mico_SD_card - allow Linux boot
+
*MOD-USB3G - [https://www.olimex.com/Products/USB-Modules/MOD-USB3G/ MOD-USB3G] <br><br>in order to test  MOD-USB3G module you have to place SIM card (without pin code) in <br>module and connect it to USB host connector change settings in /etc/wvdial.conf file according to your mobile operator and type:
*secondary SD-MMC card - with card present detector
+
  # wvdial 3gconnect
ETHERNET - 100Mb. Note that by default the board is set with DHCP. You can change it in /etc/network/interfaces file*I2C2(100KHz) - /dev/i2c-2
+
*mico_SD_card - linux starts from micro_SD card
 +
*ETHERNET - 100Mb/1000Mb
 +
*MIC IN<br><br>
 +
Microphone input can be tested with the followig code:
 +
  # arecord -f dat -r 60000 -D hw:0,0 -d 5 test.wav
 +
  this command will record 5 sec audio stream from microphone in test.wav file
 +
*Headphone OUT<br><br>
 +
  Headphones can be tested with the followig code:
 +
  # aplay -D hw:0,0 test.wav
 +
  this command will play the audio stream from test.wav file
 +
*NAND support - /dev/nandX (on A10-OLinuXino-LIME-4GB only!)
 +
*I2C2(100KHz) - /dev/i2c-2
 
*I2C1(100KHz) - /dev/i2c-1
 
*I2C1(100KHz) - /dev/i2c-1
*UART4 - /dev/ttyS1
+
*UART6 - /dev/ttyS1
 
+
*UART7 - /dev/ttyS2
 +
*SPI1 - /dev/spidev1.0
 +
*SPI2 - /dev/spidev2.0<br><br>
 +
  there is a simple test for SPI2 in /opt/spidev directory.
 +
  # ls /opt/spidev
 +
  max6675/
 +
  MOD-SMB380/
 +
  in folder max6675/ there is example related with MOD-TC ([https://www.olimex.com/Products/Modules/Sensors/MOD-TC/open-source-hardware link to product])- temperature <br>sensor that you have to connect to UEXT1 connector
 +
  # cd max6675
 +
  # ./MAX6675
 +
the last command will read temperature from MOD-TC thermocouple in folder MOD-SMB380 there is example related to [https://www.olimex.com/Products/Modules/Sensors/MOD-SMB380/ MOD-SMB380]3-AXIS ACCELEROMETER BOARD that you have to connect to UEXT1 connector
 +
  # cd MOD-SMB380
 +
  # ./a.out
 +
  the last command will read temperature and 3-asix accelerometer values
  
 
Note: the A10-Debian card which we have in our web store contains the same image on 4GB Class10 fast micro SDcard, if you want to use this image please use card of Class10 speed or the performance of Linux will be very slow.
 
Note: the A10-Debian card which we have in our web store contains the same image on 4GB Class10 fast micro SDcard, if you want to use this image please use card of Class10 speed or the performance of Linux will be very slow.
Line 125: Line 161:
 
=== Android ===
 
=== Android ===
  
 +
Torrents of official Android releases are below. Please read description of the image carefully.
 +
 +
Torrent of Android release 3 for NAND memory with HDMI and 7 inch (800x480px) display support: [[Media:A10_lime_android_nand_preliminary_rtl_ralink_wifi_480MHz_release3.torrent‎|A10-OLinuXino-LIME Android for NAND]]
 +
 +
Torrent of Android release 3 for NAND memory with HDMI and 10 inch (1024x600px) display support: [[Media:A10_lime_android_4.04_nand_LCD_10''_release3.torrent‎‎|A10-OLinuXino-LIME Android for NAND]]
 +
 +
Torrent of Android release 1 for microSD card: [[Media:A10_lime_android_SD_Olimex_release_1.torrent‎‎|A10-OLinuXino-LIME Android for microSD card]]
 +
 +
Direct download locations of official Android releases are below. In case the daily limit of the download locations had been reached, please use the torrents above. Please read description of the image carefully.
 +
 +
Direct download of Android release 3 for NAND memory with HDMI and 7 (800x480) inch display support: [https://drive.google.com/file/d/0B-bAEPML8fwlSmFEOXJtNmU0RFk/edit?usp=sharing NAND flash image]
 +
 +
Direct download of Android release 1 for microSD card: [https://drive.google.com/file/d/0B-bAEPML8fwlVy02LXYxMmlqUTg/edit?usp=sharing microSD card image]
 +
<br>
 +
 +
== Notable unofficial images ==
 +
 +
Below you would find locations to images released by the community. These are not officially supported by Olimex, however, some of these releases are pretty good and worth a try:
 +
 +
*Minimal A10-OLinuXino-LIME image by Remy van Elst: [https://raymii.org/s/articles/Olimex_A10-OLinuXino-LIME_minimal_debian_7_image.html link to his web-site]
  
Android 4.1.1 NAND image will be available soon
+
*A10-OLinuXino-LIME is supported by openSUSE Factory, installation instructions might be found here: [https://en.opensuse.org/HCL:A10-OLinuXino-LIME openSUSE wiki link]
 +
<br>
  
 
== Documents ==
 
== Documents ==
  
 
+
===A10-OLinuXino-LIME user's manual===
===A10-OLinuXino Board User Manual===
+
[https://www.olimex.com/Products/OLinuXino/A10/A10-OLinuXino-LIME/resources/A10-OLinuXino-LIME_manual.pdf User's manual for A10-OLinuXino-LIME and A10-OLinuXino-LIME-4GB]
  
 
=== A10 Brief ===
 
=== A10 Brief ===
Line 148: Line 205:
  
 
[http://dl.linux-sunxi.org/A10/A10%20User%20Manual%20-%20v1.20%20%282012-04-09%2c%20DECRYPTED%29.pdf A10 User Manual 1.20]
 
[http://dl.linux-sunxi.org/A10/A10%20User%20Manual%20-%20v1.20%20%282012-04-09%2c%20DECRYPTED%29.pdf A10 User Manual 1.20]
 +
 +
=== Digikey's Wiki ===
 +
 +
Robert Nelson made [http://eewiki.net/display/linuxonarm/A10-OLinuXino-LIME Digikey's Wiki] on LIME with instructions how to build Linux-Next Kernel and Uboot
  
 
== Hardware ==
 
== Hardware ==
<br>
+
 
 +
===LIME shields===
 +
[https://github.com/OLIMEX/OLINUXINO/tree/master/HARDWARE/A10-OLinuXino-LIME Eagle and KiCAD shield templates for LIME]
 +
 
 
===GPIO description===
 
===GPIO description===
  
 
[https://github.com/OLIMEX/OLINUXINO/blob/master/HARDWARE/A10-OLinuXino-LIME/A10_Lime_GPIOs.pdf  A10-OLinuXino-LIME GPIO description]
 
[https://github.com/OLIMEX/OLINUXINO/blob/master/HARDWARE/A10-OLinuXino-LIME/A10_Lime_GPIOs.pdf  A10-OLinuXino-LIME GPIO description]
 
  
 
A template that might be used to create custom shields or own adapters might be downloaded for Eagle or KiCad at the GitHub here: [https://github.com/OLIMEX/OLINUXINO/tree/master/HARDWARE/A10-OLinuXino-LIME shield template]
 
A template that might be used to create custom shields or own adapters might be downloaded for Eagle or KiCad at the GitHub here: [https://github.com/OLIMEX/OLINUXINO/tree/master/HARDWARE/A10-OLinuXino-LIME shield template]
Line 160: Line 223:
 
===Power supply and consumption===
 
===Power supply and consumption===
  
 +
A10-OLinuXino-LIME requires 5V regulated power supply external source. regulated means that the power supply adapter should provide exactly 5V no matter loaded or unloaded (some cheap wallwart adapters are not regulated and under no load their power supply may be higher than 5V although marked as 5V power supply, please measure with voltmeter if your power supply provide 5V as if you connect more than 5V to LIME it will be damaged!!!)
 +
 +
The power jack is standard [https://www.olimex.com/wiki/PWRJACK OLIMEX Power jack].
  
 
A10-OLinuXino-LIME can be powered from three sources:
 
A10-OLinuXino-LIME can be powered from three sources:
Line 207: Line 273:
  
 
== Software ==
 
== Software ==
<br>
 
===Python===
 
  
 +
===Linux Commands===
 +
[[Linux-Commands]] Brief Linux Command reference
  
[pyA10 is Python library for access to A10-OLinuXino-LIME GPIOs, I2C, SPI]
+
===Python===
 
 
Use:
 
  
    #!/usr/bin/env python
+
The Debian Linux Python package for A10-OLinuXino-LIME is called pyA10Lime. It is installed in the default Debian image. More information and examples on how it can be used might be found here:
   
 
    import A10_GPIO as GPIO
 
   
 
    #init module
 
    GPIO.init()
 
   
 
    #configure module
 
    GPIO.setcfg(GPIO.PIN#, GPIO.OUTPUT)
 
    GPIO.setcfg(GPIO.PIN#, GPIO.INPUT)
 
   
 
    #read the current GPIO configuration
 
    config = GPIO.getcfg(GPIO.PIN#)
 
   
 
    #set GPIO high
 
    GPIO.output(GPIO.PIN#, GPIO.HIGH)
 
   
 
    #set GPIO low
 
    GPIO.output(GPIO.PIN#, GPIO.LOW)
 
   
 
    #read input
 
    state = GPIO.input(GPIO.PIN#)
 
   
 
    #cleanup
 
    GPIO.cleanup()
 
  
 +
[https://pypi.python.org/pypi/pyA10Lime Link to pyA10Lime package at python.org]
  
 
===GPIO under Linux===
 
===GPIO under Linux===
Line 283: Line 324:
  
 
== How To? ==
 
== How To? ==
<br>
+
 
 +
===How do I write the Linux image to a micro SD card to use with my A10 board?===
 +
 
 +
 
 +
To write a Linux image to an SD card under Windows we use Win32 Disk Imager):
 +
 
 +
*Download Win32 Disk Imager [http://sourceforge.net/projects/win32diskimager/ Win32 Disk Imager]
 +
*Insert card
 +
*Start program
 +
*Select file
 +
*Click "write"
 +
 
 +
 
 +
To write a Linux image to an SD card under Linux:
 +
 
 +
For instance you have an image with the file name of "debian_2g.img". It would be downloaded to the SD card connected to a Linux machine using one of the following commands:
 +
 
 +
* # dd bs=4M oflag=sync if=debian_2g.img of=/dev/sdX
 +
or
 +
* # cp debian_2g.img /dev/sdX
 +
 
 +
 
 +
where X is the uSD card.
 +
 
 
===How to generate boot-able SD-card Debian Linux image for A10-OLinuXino-LIME? ===
 
===How to generate boot-able SD-card Debian Linux image for A10-OLinuXino-LIME? ===
  
[http://olimex.wordpress.com/2014/01/15/building-debian-linux-bootable-sd-card-with-hardware-accelerated-video-decoding-and-kernel-3-4-for-a10-olinuxino-lime/ Follow our blog post with step by step instructions]  
+
[http://olimex.wordpress.com/2014/06/23/a10-olinuxino-lime-debian-build-with-kernel-3-4-90/ Blog post with step by step instructions for generating Debian image with kernel 3.4.90+]  
  
 
Note that Linux-Sunxi Kernel is a work-in-progress, this means you can try the current stage/sunxi-3.4 branch but if something is broken and doesn't work just revert to the git tags we give in the blog and they should work for sure
 
Note that Linux-Sunxi Kernel is a work-in-progress, this means you can try the current stage/sunxi-3.4 branch but if something is broken and doesn't work just revert to the git tags we give in the blog and they should work for sure
Line 292: Line 356:
 
[https://github.com/linux-sunxi/u-boot-sunxi/wiki Sunxi u-boot loader] The linux-sunxi git page contains a lot of sources for all Olimex Allwinner boards.
 
[https://github.com/linux-sunxi/u-boot-sunxi/wiki Sunxi u-boot loader] The linux-sunxi git page contains a lot of sources for all Olimex Allwinner boards.
  
===How to change HDMI, VGA and LCD resolutions?===
+
===How to connect a display and adjust the video output resolution?===
 +
There is a separate article on the subject: [[How_to_connect_display_to_a_Lime_board]]
 +
<br>
  
 +
===How to download new Android image to the NAND memory of my A10 board?===
  
The default SD card setup is made with settings for HDMI 720p/60Hz. If you want to change to some other LCD, VGA or HDMI resolution then you have to start change_display.sh script file in /root directory.
+
Note that we no longer load Android to the NAND memory of the 4GB version of the LIME boards. You can upload Android following the advice below.
  
Type:
+
The image in the NAND flash can be updated or repaired using a software tool called 'LiveSuit'. Tested version of LiveSuit might be found at the following links:
  
    ./change_display*
+
[https://docs.google.com/file/d/0B7WHuNCASY8cWlZ2djh4X0QtV0U/edit?usp=sharing LiveSuit for Windows]
or
+
 
    ./change_display_a10_lime.sh
+
[http://linux-sunxi.org/LiveSuit LiveSuit for Linux]
 +
 
 +
There might be newer versions available.
 +
 
 +
LiveSuit is used to send the official Android images to the NAND flash memory of the board. To activate the A10 bootloader do as follows: run LiveSuit; disconnect the power supply and USB cable from the LIME board; then press and hold down the RECOVERY button; apply power supply; attach USB cable; release the RECOVERY button; install the drivers for the new device discovered by your PC - manually point to the folder where LiveSuit got installed. After the driver installation Livesuit will detect the bootloader and will ask which file to program to the NAND flash.
 +
 
 +
If there seems to be a problem at some point of the installation, start over.
 +
 
 +
Note that it is not recommended to have your mini USB connected to an external USB hub. This might cause delays and might distort the signal levels. Always test with the USB connected straight to the USB ports of your computer.
 +
 
 +
===How do I write the official Android image to a micro SD card for my A10 board?===
 +
There might be different Android images available for an SD card. They can be downloaded above [[A10-OLinuXino-LIME#Android]]. Note that Android display configuration settings are edited in the script.bin file (it has to be converter to fex and edited according to the fex guide at linux sunxi's article; then converted back to script.bin and written in the image). To write the images on the SD card you will need PhoenixSuit and to follow these steps:
  
and press "Enter".
+
• Install and run PhoenixSuit (can be found here: [https://drive.google.com/file/d/0BwplT87k9SCgaTFTZnVST05ONzA/view?usp=sharing download from google drive])
  
Then choose the resolution and the interface(LCD, HDMI). Note that the selection of a specific resolution is done by navigating with the arrow keys and pressing "space" button. Make sure the asterisk marks your selection properly.  
+
• Go to the firmware tab of the program and point to a valid Android image (note that the  
 +
images are compressed and you have to extract them to .img files to be able write
 +
them with PhoenixSuit)
  
The supported resolutions are:
+
• Disconnect the power supply and USB cable from the A10 board. Put an SD card in micro SD
 +
holder. We recommend 4GB class 10 card.
  
'''For LCD:'''
+
• Press and hold RECOVERY button, apply power supply (6-16)V, release RECOVERY button.
  
*1. 4.3" (480x272)
+
• Connect USB cable to the mini USB connector.
*2. 7" (800x480)
 
*3. 10" (1024x600)
 
*4. 15.6" (1366x768)
 
  
Important: initially the boards are calibrated for a specific display. If you re-write the image (no matter whether the SD card or the NAND memory) you would need to use a mouse to calibrate the display initially. It might be impossible to calibrate it via touching the display.
+
• You will be asked for drivers for the boot-loader. Navigate to the folder where you extracted the PhoenixSuit and install the drivers from the respective executable (or manually point the installer to the drivers folder in the PhoenixSuit installation path).
  
'''For HDMI:'''
+
• PhoenixSuit will detect the board and would ask for the method of writing the image. Choose
 +
method of writing the image and confirm your wish to write the image.
  
*0. 480i
+
• Wait till upgrade succeeds
*1. 576i
 
*2. 480p
 
*3. 576p
 
*4. 720p50
 
*5. 720p60
 
*6. 1080i50
 
*7. 1080i60
 
*8. 1080p24
 
*9. 1080p50
 
*10. 1080p60
 
  
'''For VGA:''' (note that the VGA signals are routed to custom 6 pin connector and you need from adapter to standard VGA connector)
+
Note that it is not recommended to have your mini USB connected to an external USB hub. This
 +
might cause delays and might distort the signal levels. Always test with the USB connected straight to the USB ports of your computer.
  
*0. 1680x1050
+
Important: When Android runs for very first time it takes several minutes to initialize all files and buffers please do not cut the power supply during this process! Also when fresh image is installed fast boot may be disabled, which means that when you apply power supply after few seconds Android will go in sleep mode and you have to press POWER button to start it, you can change to fast boot when you power off there is dialog box asking you if you want next boot to be fast boot, you have to check this box before you power off. Also note that you must do touch screen calibration when you run Android for very first time which might require a mouse.
*1. 1440x900
 
*2. 1360x768
 
*3. 1280x1024
 
*4. 1024x768
 
*5. 800x600
 
*6. 640x480
 
*7. 1920x1080
 
*8. 1280x720
 
<br>
 
  
 
===How to detect and enable the Ethernet controller (if it is disabled by default)? ===
 
===How to detect and enable the Ethernet controller (if it is disabled by default)? ===
Line 357: Line 418:
 
This should enable the Ethernet and then SSH would also be available.
 
This should enable the Ethernet and then SSH would also be available.
  
[[Category:LIME]]
+
===How to generate Arch Linux image?===
 +
 
 +
Recent forum post by user progmetalbg here: [https://www.olimex.com/forum/index.php?topic=4259.0| at Olimex forums]
 +
 
 +
[http://alarma20.wordpress.com/2013/09/13/howto-build-arch-linux-arm-for-a20-olinuxino-micro/ Older step by step instructions on how to build Arch Linux image for an Allwinner A20 board]
 +
 
 +
===How to edit board configurations and definitions in the official Debian Linux? ===
 +
 
 +
Do you want a custom video resolution output? Do you need a different port definition? Do you need to change the hardware defitions of the board?
 +
 
 +
You would need to edit the board's script.bin/script.fex file. How to do it is described in another separate article: [[How_to_edit_board_configurations_and_definitions_in_the_official_Debian_Linux]].
 +
 
 +
===How to add STK1160 video capture driver support in Kernel 3.4===
 +
 
 +
[https://www.olimex.com/wiki/STK1160-howto-linux-sunxi-3_4 STK1160] driver backport by Dimitar Tomov
 +
[[Main_Page]]

Latest revision as of 01:08, 18 August 2021

A10-OLinuXino-LIME.jpeg

A10-OLinuXino-LIME features:

  • A10 1GHz Cortex-A8 ARMv7 CPU, VFPv3, NEON, Mali 400 GPU, CedarX VPU
  • 512MB DDR3 RAM memory
  • optional 4GB NAND FLASH memory
  • SATA connector with 5V SATA power jack
  • HDMI FullHD 1080p
  • 2x USB Low-Full-High-Speed hosts with power control and current limiter
  • USB-OTG with power control and current limiter
  • 100MBit native Ethernet
  • LiPo Battery connector with battery-charging capabilities
  • LCD connector compatible with with 4.3", 7.0", 10.1" LCD modules from Olimex
  • 160 GPIOs on three GPIO connectors
  • MicroSD card connector
  • DEBUG-UART connector for console debug with USB-SERIAL-CABLE-F
  • status LED
  • Battery charge status LED
  • Power LED
  • 2KB EEPROM for MAC address storage and more
  • 2 BUTTONS with ANDROID functionality + RESET button
  • 2 mount holes
  • 5V input power supply, noise immune design
  • PCB dimensions: 84 x 60 mm


Official Images from OLIMEX

The file for download xxxx.7z is an archive of xxx.img file. So in order to write the image on SD card you have to unzip xxx.7z file and:

  • For Windows:

Use 7zip and then use Win32DiskImager.exe (http://sourceforge.net/projects/win32diskimager/) for image writing

  • For Linux

Use p7zip package. If you have no installed 7zip then type

   #apt-get install p7zip

Copy a10_Lime_debian_second_release.7z file in your directory and unzip it with

   #7za e a10_Lime_debian_second_release.7z

The output should be a new 4GB file named a10_Lime_debian_second_release.img Put 4GB SD card in your card reader and type

   # ls /dev/sd

Then press two times <TAB> you will see a list of your sd devices like sda sdb sdc note that some of these devices may be your hard disk so make sure you know which one is your sd card before you proceed as you can damage your HDD if you choose the wrong sd-device. You can do this by unplugging your sd card reader and identify which "sd" devices remove from the list. Once you know which device is your sdcard like sda use this text instead of the sdX name in the references below:

   #dd if=a10_Lime_debian_second_release.img of=/dev/sdX


Linux

The official Debian images are suitable only for microSD card. Information on booting Debian from the NAND might be found at the forum.

Download methods and locations might be found below!

FTP link to Debian release 4 (u-boot from sunxi to mainline): Debian with kernel 3.4.90+ release 4

Instructions and required files for preparing the A10 LIME Debian image, release 4: Debian with Kernel 3.4.90+ build instructions

Torrent of Debian release 3: Debian with kernel 3.4.90+ release 3

Instructions and required files for preparing the A10 LIME Debian image, release 3: Debian with Kernel 3.4.90+ build instructions

  • Default Login: root/olimex
  • Linux Kernel 3.4.90+
  • LXDE desktop environment
  • mplayer
  • smplayer
  • gcc-4.6
  • dpkg
  • git
  • i2c-tools
  • perl
  • xorg
  • python 2.7
  • midori
  • minicom
  • usb-modeswitch
  • sshfs
  • wvdial
  • GPIO
  • Kernel support for USB WIFI RTL8188CU, Ethernet AX88772B
  • A13-LCD 4.3″TS 4.3″ LCD with backlight and touchscreen 480×272 pixels
  • A13-LCD7″TS 7″ LCD with backlight and touchscreen 800×480 pixels
  • A10-LCD10″TS 10.1″ LCD with backlight and touchscreen 1024×600 pixels
  • HDMI
  • Micro SD card
  • USB OTG
  • High speed HOST1 USB
  • High speed HOST2 USB
  • ETHERNET 100MBIT
  • SATA
  • I2C2(100KHz)
  • I2C1(100KHz)
  • NAND Flash

The list of all installed packages is located in a10_lime_debian_3.4.90+_installed_packages.txt file

Tested board peripherals with this image:

  • GPIO - they are located in /sys/class/gpio directory. Note that first you have to export GPIOs. For example:

 # for i in `seq 1 1 230`; do echo $i > /sys/class/gpio/export; done
 will export all available GPIOs
 # echo out > /sys/class/gpio/gpioXX_pxx/direction
 will make the port output
 # echo 1 > /sys/class/gpio/gpioXX_pXX/value
 will make the port output in logical 1
  • LCD - 4.3"(480x272), 7"(800x480), 10"(1024x600), 15"(1366x768)
  • SATA - with power on/off control
  • HDMI - the default HDMI resolution is 720p60(720x1280 - 60 Hz)
  • Touch_screen - you need calibrate LCD before using touch screen. Note that if you want to use touch screen in X environment then you have to calibrate it like olimex user, not like root user because X environment is started like olimex uder. For example type:
 # su olimex
 # sudo ts_calibrate 
 calibrate the touch screen and reboot the board
 # wvdial 3gconnect
  • mico_SD_card - linux starts from micro_SD card
  • ETHERNET - 100Mb/1000Mb
  • MIC IN

Microphone input can be tested with the followig code:
 # arecord -f dat -r 60000 -D hw:0,0 -d 5 test.wav
 this command will record 5 sec audio stream from microphone in test.wav file 
  • Headphone OUT

 Headphones can be tested with the followig code:
 # aplay -D hw:0,0 test.wav
 this command will play the audio stream from test.wav file
  • NAND support - /dev/nandX (on A10-OLinuXino-LIME-4GB only!)
  • I2C2(100KHz) - /dev/i2c-2
  • I2C1(100KHz) - /dev/i2c-1
  • UART6 - /dev/ttyS1
  • UART7 - /dev/ttyS2
  • SPI1 - /dev/spidev1.0
  • SPI2 - /dev/spidev2.0

 there is a simple test for SPI2 in /opt/spidev directory. 
 # ls /opt/spidev
 max6675/
 MOD-SMB380/
 in folder max6675/ there is example related with MOD-TC (link to product)- temperature 
sensor that you have to connect to UEXT1 connector # cd max6675 # ./MAX6675

the last command will read temperature from MOD-TC thermocouple in folder MOD-SMB380 there is example related to MOD-SMB3803-AXIS ACCELEROMETER BOARD that you have to connect to UEXT1 connector

 # cd MOD-SMB380
 # ./a.out 
 the last command will read temperature and 3-asix accelerometer values

Note: the A10-Debian card which we have in our web store contains the same image on 4GB Class10 fast micro SDcard, if you want to use this image please use card of Class10 speed or the performance of Linux will be very slow.

Note: in the previous Debian releases the Ethernet was auto-detected and initialized during boot BUT this was causing big delays in the start-up of the board if you didn't want to use Ethernet or if there wasn't Ethernet cable connected.

You can enable it by following these two steps:

1. To check under what name the LAN is associated write "ifconfig –a"

2. If, for example, it is under eth0 name, then write: "dhclient eth0"

This should enable the Ethernet and then SSH would also be available.

Android

Torrents of official Android releases are below. Please read description of the image carefully.

Torrent of Android release 3 for NAND memory with HDMI and 7 inch (800x480px) display support: A10-OLinuXino-LIME Android for NAND

Torrent of Android release 3 for NAND memory with HDMI and 10 inch (1024x600px) display support: A10-OLinuXino-LIME Android for NAND

Torrent of Android release 1 for microSD card: A10-OLinuXino-LIME Android for microSD card

Direct download locations of official Android releases are below. In case the daily limit of the download locations had been reached, please use the torrents above. Please read description of the image carefully.

Direct download of Android release 3 for NAND memory with HDMI and 7 (800x480) inch display support: NAND flash image

Direct download of Android release 1 for microSD card: microSD card image

Notable unofficial images

Below you would find locations to images released by the community. These are not officially supported by Olimex, however, some of these releases are pretty good and worth a try:

  • A10-OLinuXino-LIME is supported by openSUSE Factory, installation instructions might be found here: openSUSE wiki link


Documents

A10-OLinuXino-LIME user's manual

User's manual for A10-OLinuXino-LIME and A10-OLinuXino-LIME-4GB

A10 Brief

A10 brief

A10 Datasheet

A10 Datasheet v1.21

A10 Transport Stream Controller

A10 Registers Guide

A10 User Manual

A10 User Manual 1.20

Digikey's Wiki

Robert Nelson made Digikey's Wiki on LIME with instructions how to build Linux-Next Kernel and Uboot

Hardware

LIME shields

Eagle and KiCAD shield templates for LIME

GPIO description

A10-OLinuXino-LIME GPIO description

A template that might be used to create custom shields or own adapters might be downloaded for Eagle or KiCad at the GitHub here: shield template

Power supply and consumption

A10-OLinuXino-LIME requires 5V regulated power supply external source. regulated means that the power supply adapter should provide exactly 5V no matter loaded or unloaded (some cheap wallwart adapters are not regulated and under no load their power supply may be higher than 5V although marked as 5V power supply, please measure with voltmeter if your power supply provide 5V as if you connect more than 5V to LIME it will be damaged!!!)

The power jack is standard OLIMEX Power jack.

A10-OLinuXino-LIME can be powered from three sources:

  • +5VDC voltage applied PWR jack
  • +3.7V from LiPo re-chargable battery connected to LiPo board connector
  • +5V applied to USB-OTG connector


Power consumption is as follows:

  • LiPo 3.7V power battery: 1.2W
  • +5VDC input power: 1.3W


Comparison table of power consumption might be found at the following link.

LiPo battery allow backup power supply when main power is interrupted. A10-OLinuXino-LIME have power managment IC which charge the battery when main power is present, when power is interrupted the LiPo battery automatically provide backup power supply. Step-up converter prvide 5V for the USB peripherials too. For LiPo batteries we recommend these:


Board dimensions

A10-OLinuXino-LIME basic dimensions in mils: 3305.5 x 2347.0

Some additional measures might be seen in the image here: link

CAD files

A10-OLinuXino-LIME is Open Source Hardware, CAD files are available at GitHub


The CAD product used to design OLinuXino is Eagle and you can download evaluation free version from their web.


Board Layout

A10-OLinuXino-LIME-FRONT.jpg


A10-OLinuXino-LIME-BACK.jpg

Software

Linux Commands

Linux-Commands Brief Linux Command reference

Python

The Debian Linux Python package for A10-OLinuXino-LIME is called pyA10Lime. It is installed in the default Debian image. More information and examples on how it can be used might be found here:

Link to pyA10Lime package at python.org

GPIO under Linux

GPIOs are located in /sys/class/gpio directory. Note that first you have to export GPIOs. For example:

add gpioPH2

   root@A10:~# echo 20 > /sys/class/gpio/export

make PH2 output

   root@A10:~# echo out > //sys/class/gpio/gpio20_ph2/direction

turn on onboard LED(connected to PH2)

   root@A10:~# echo 1 > /sys/class/gpio/gpio20_ph2/value

turn off onboard LED(connected to PH2)

   root@A10:~# echo 0 > /sys/class/gpio/gpio20_ph2/value

Full list with supported GPIOs is:

   gpio21_ph7   gpio33_ph20  gpio45_pb12  gpio57_pi2   gpio69_pi14
   gpio10_pg11  gpio22_ph9   gpio34_ph21  gpio46_pb13  gpio58_pi3   gpio6_pg5
   gpio11_pc3   gpio23_ph10  gpio35_ph22  gpio47_pb14  gpio59_pi4   gpio70_pi15
   gpio12_pc18  gpio24_ph11  gpio36_ph23  gpio48_pb15  gpio5_pg4    gpio71_pi16
   gpio13_pc19  gpio25_ph12  gpio37_pb3   gpio49_pb16  gpio60_pi5   gpio72_pi17
   gpio14_pc20  gpio26_ph13  gpio38_pb4   gpio4_pg3    gpio61_pi6   gpio73_pi18
   gpio15_pc21  gpio27_ph14  gpio39_pb5   gpio50_pb17  gpio62_pi7   gpio74_pi19
   gpio16_pc22  gpio28_ph15  gpio3_pg2    gpio51_ph24  gpio63_pi8   gpio75_pi20
   gpio17_pc23  gpio29_ph16  gpio40_pb6   gpio52_ph25  gpio64_pi9   gpio7_pg6
   gpio18_pc24  gpio2_pg1    gpio41_pb7   gpio53_ph26  gpio65_pi10  gpio8_pg7
   gpio19_ph0   gpio30_ph17  gpio42_pb8   gpio54_ph27  gpio66_pi11  gpio9_pg8
   gpio1_pg0    gpio31_ph18  gpio43_pb10  gpio55_pi0   gpio67_pi12  gpiochip1
   gpio20_ph2   gpio32_ph19  gpio44_pb11  gpio56_pi1   gpio68_pi13 

Add Voice to your OLinuXino project

Installation of Festival on OLinuXino

How To?

How do I write the Linux image to a micro SD card to use with my A10 board?

To write a Linux image to an SD card under Windows we use Win32 Disk Imager):

  • Download Win32 Disk Imager Win32 Disk Imager
  • Insert card
  • Start program
  • Select file
  • Click "write"


To write a Linux image to an SD card under Linux:

For instance you have an image with the file name of "debian_2g.img". It would be downloaded to the SD card connected to a Linux machine using one of the following commands:

  • # dd bs=4M oflag=sync if=debian_2g.img of=/dev/sdX

or

  • # cp debian_2g.img /dev/sdX


where X is the uSD card.

How to generate boot-able SD-card Debian Linux image for A10-OLinuXino-LIME?

Blog post with step by step instructions for generating Debian image with kernel 3.4.90+

Note that Linux-Sunxi Kernel is a work-in-progress, this means you can try the current stage/sunxi-3.4 branch but if something is broken and doesn't work just revert to the git tags we give in the blog and they should work for sure

Sunxi u-boot loader The linux-sunxi git page contains a lot of sources for all Olimex Allwinner boards.

How to connect a display and adjust the video output resolution?

There is a separate article on the subject: How_to_connect_display_to_a_Lime_board

How to download new Android image to the NAND memory of my A10 board?

Note that we no longer load Android to the NAND memory of the 4GB version of the LIME boards. You can upload Android following the advice below.

The image in the NAND flash can be updated or repaired using a software tool called 'LiveSuit'. Tested version of LiveSuit might be found at the following links:

LiveSuit for Windows

LiveSuit for Linux

There might be newer versions available.

LiveSuit is used to send the official Android images to the NAND flash memory of the board. To activate the A10 bootloader do as follows: run LiveSuit; disconnect the power supply and USB cable from the LIME board; then press and hold down the RECOVERY button; apply power supply; attach USB cable; release the RECOVERY button; install the drivers for the new device discovered by your PC - manually point to the folder where LiveSuit got installed. After the driver installation Livesuit will detect the bootloader and will ask which file to program to the NAND flash.

If there seems to be a problem at some point of the installation, start over.

Note that it is not recommended to have your mini USB connected to an external USB hub. This might cause delays and might distort the signal levels. Always test with the USB connected straight to the USB ports of your computer.

How do I write the official Android image to a micro SD card for my A10 board?

There might be different Android images available for an SD card. They can be downloaded above A10-OLinuXino-LIME#Android. Note that Android display configuration settings are edited in the script.bin file (it has to be converter to fex and edited according to the fex guide at linux sunxi's article; then converted back to script.bin and written in the image). To write the images on the SD card you will need PhoenixSuit and to follow these steps:

• Install and run PhoenixSuit (can be found here: download from google drive)

• Go to the firmware tab of the program and point to a valid Android image (note that the images are compressed and you have to extract them to .img files to be able write them with PhoenixSuit)

• Disconnect the power supply and USB cable from the A10 board. Put an SD card in micro SD holder. We recommend 4GB class 10 card.

• Press and hold RECOVERY button, apply power supply (6-16)V, release RECOVERY button.

• Connect USB cable to the mini USB connector.

• You will be asked for drivers for the boot-loader. Navigate to the folder where you extracted the PhoenixSuit and install the drivers from the respective executable (or manually point the installer to the drivers folder in the PhoenixSuit installation path).

• PhoenixSuit will detect the board and would ask for the method of writing the image. Choose method of writing the image and confirm your wish to write the image.

• Wait till upgrade succeeds

Note that it is not recommended to have your mini USB connected to an external USB hub. This might cause delays and might distort the signal levels. Always test with the USB connected straight to the USB ports of your computer.

Important: When Android runs for very first time it takes several minutes to initialize all files and buffers please do not cut the power supply during this process! Also when fresh image is installed fast boot may be disabled, which means that when you apply power supply after few seconds Android will go in sleep mode and you have to press POWER button to start it, you can change to fast boot when you power off there is dialog box asking you if you want next boot to be fast boot, you have to check this box before you power off. Also note that you must do touch screen calibration when you run Android for very first time which might require a mouse.

How to detect and enable the Ethernet controller (if it is disabled by default)?

Note: in the previous Debian releases the Ethernet was auto-detected and initialized during boot BUT this was causing big delays in the start-up of the board if you didn't want to use Ethernet or if there wasn't Ethernet cable connected.

You can enable it by following these two steps:

1. To check under what name the LAN is associated write "ifconfig –a"

2. If, for example, it is under eth0 name, then write: "dhclient eth0"

This should enable the Ethernet and then SSH would also be available.

How to generate Arch Linux image?

Recent forum post by user progmetalbg here: at Olimex forums

Older step by step instructions on how to build Arch Linux image for an Allwinner A20 board

How to edit board configurations and definitions in the official Debian Linux?

Do you want a custom video resolution output? Do you need a different port definition? Do you need to change the hardware defitions of the board?

You would need to edit the board's script.bin/script.fex file. How to do it is described in another separate article: How_to_edit_board_configurations_and_definitions_in_the_official_Debian_Linux.

How to add STK1160 video capture driver support in Kernel 3.4

STK1160 driver backport by Dimitar Tomov Main_Page