Difference between revisions of "A20-OLinuXino-MICRO"

(Android)
(Download locations Linux images)
 
(221 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== Official Images from OLIMEX ==
+
[[File:A20-OLinuXino.jpeg]]
  
=== Linux ===
+
A20-OLinuXino-MICRO features:
 +
*A20 Cortex-A7 dual-core ARM Cortex-A7 CPU and dual-core Mali 400 GPU
 +
*1GB 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
 +
*VGA output on 6-pin 1.25mm (0.05") step connector
 +
*100MBit native Ethernet
 +
*LiPo Battery connector with battery-charging capabilities
 +
*Audio headphones output
 +
*Microphone input on connector
 +
*2x UEXT connectors
 +
*LCD connector compatible with with 4.3", 7.0", 10.1" LCD modules from Olimex
 +
*160 GPIOs on three GPIO connectors
 +
*MicroSD card connector
 +
*SD/MMC 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
 +
*10 BUTTONS with ANDROID functionality + RESET button
 +
*4 mount holes
 +
*6-16V input power supply, noise immune design
 +
*PCB dimensions: 142 x 82 mm
  
'''[https://docs.google.com/file/d/0B-bAEPML8fwlc0xGVUdqa1lFQ28/edit?usp=sharing A20 Debian 4GB SD-card image release-2 with:]'''
 
  
*Linux Kernel 3.0.0+
+
== Official Images Released and Recommended by Olimex ==
*XFCE4 desktop environment
+
 
*Mplayer CLI
+
Below you would find links to the official Debian and Android images. The images in this chapter were compiled by Olimex. They are recommended for beginners and first time users since they include full hardware support.
*GCC 4.6
+
 
*4.3"(480x272), 7"(800x480) and 10" (1024x600) LCD and touchscreen support
+
If you are an experienced embedded Linux professional you might also find build instructions to our images.
*GPIO
+
 
*I2C
+
=== Linux Images ===
*USB WIFI RTL8188CU, Ethernet AX88772B
+
 
*Audio (MIC and Headphones)
+
There are three different types of Olimex-made official Linux images:
*dpkg
+
 
*git
+
* Recent kernel and u-boot Armbian-based Ubuntu Bionic and Debian Buster Linux images for general purpose Linux experience
*i2c-tools
+
* KODI images, LibreElec-based, if you wish to use your A20 board as TV box
*perl
+
* Debian 8 Jessie images with v3.4.x sunxi kernel
*xorg
+
 
*Python 2.7
+
 
*OpenCV
+
The official Linux images should be downloaded to a microSD card. Images can be downloaded either from our FTP or via torrent client. You can install the Debian to the NAND or the eMMC of your board (if it comes with one). Information on booting Debian from the NAND or eMMC might be found in these wiki article: [[how to install Debian to NAND]]; [[how to install Debian to eMMC]]. Download locations for the official images might be found below:
*Scratch
+
 
*vlc
+
== Download locations Linux images ==
*USB-ETHERNET-AX88772B
+
 
*MOD-WIFI-RTL8188  
+
'''ALWAYS FIRST TEST WITH LATEST OFFICIAL IMAGE, NEWER HARDWARE REVISIONS OF THE BOARD MIGHT NOT WORK WITH OLDER IMAGES!!!'''
*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
+
Main FTP hub folder for all Olimex-made A20 official images:
*Micro SD card
+
 
*SD/MMC card
+
ftp://staging.olimex.com/Allwinner_Images/A20-OLinuXino/
*OTG USB
+
 
*HIGH SPEED HOST1 USB
+
'''Latest mainline kernel official images:'''
*HIGH SPEED HOST2 USB
+
 
*ETHERNET 100MBIT
+
1. Latest Ubuntu Desktop Linux images can be found here: [ftp://staging.olimex.com/Allwinner_Images/A20-OLinuXino/1.latest_mainline_images/bionic/images/ FTP directory with latest Ubuntu Bionic images]
 +
 
 +
2. Latest Debian Server Linux images can be found here:
 +
[ftp://staging.olimex.com/Allwinner_Images/A20-OLinuXino/1.latest_mainline_images/buster/images/ FTP directory with latest Debian Buster images]
 +
 
 +
'''Latest KODI player official images:'''
 +
 
 +
3. Latest KODI player LibreElec Linux images here:
 +
[ftp://staging.olimex.com/Allwinner_Images/A20-OLinuXino/4.LibreELEC_KODI_images/ FTP directory with latest KODI/LibreElec images]
 +
 
 +
'''Latest sunxi kernel official images (not recommended):'''
 +
 
 +
Latest sunxi-kernel (v3.4.x) Debian 8 Jessie Linux images here: [ftp://staging.olimex.com/Allwinner_Images/A20-OLinuXino/2.legacy_images_kernel_3.4.x/ FTP location with all sunxi-kernel Debian 8 images here]
 +
 
 +
FTP link of official Debian Jessie release #18, suitable for boards with no extra flash memory or with extra eMMC flash memory (not suitable for boards with NAND memory): [https://ftp.olimex.com/Allwinner_Images/A20-OLinuXino-MICRO/Debian/sd/A20_OLinuxino_Micro_debian_Jessie_34_103_2G_eMMC_release_18.zip A20 OLinuxino Micro debian Jessie 34 103 2G eMMC release 18]
 +
 
 +
FTP link of official Debian Jessie release #15, suitable for boards with no extra flash memory or with extra NAND memory (not suitable for boards with eMMC memory): [https://ftp.olimex.com/Allwinner_Images/A20-OLinuXino-MICRO/Debian/sd/A20_OLinuxino_Micro_debian_Jessie_34_103_2G_NAND_release_15.7z A20-OLinuXino-MICRO Debian Jessie with kernel 3.4.103+ release 15]
 +
 
 +
Image description and typical interfacing: [https://raw.githubusercontent.com/OLIMEX/OLINUXINO/master/SOFTWARE/A20/A20-build-3.4.103-release-7/USAGE-AND-COMMON-PRACTICEs-A20-Olimex_kernel_3.4.103%2B_Jessie_rel_3.txt description and basic usage of different peripherals at at the GitHub page]
 +
 
 +
Image build instructions and required files for latest Debian Jessie release might be found here: [https://github.com/OLIMEX/OLINUXINO/raw/master/SOFTWARE/A20/A20-build-3.4.103-release-7/BUILD_DESCRIPTION_A20_Olimex_kernel_3.4.103%2B_Jessie_rel_6.txt build instructions and required files at the GitHub page]
 +
 
 +
You can find some older releases and older build instructions (older image revisions might be used as a reference, for testing purposes, or if you own old hardware revision of the board) at the following article: [[A20-OLinuXino-MICRO-older-releases|older releases and older build instructions]]
 +
 
 +
----
 +
 
 +
Note: in the previous Debian releases the Ethernet was auto-detected and initialized during boot BUT this caused 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 images ===
 +
 
 +
FTP links of official Android releases are below. Please read description of the image carefully.
 +
 
 +
FTP link of Android release 3 for NAND memory with HDMI and 7 inch LCD (800x480) support: [https://ftp.olimex.com/Allwinner_Images/A20-OLinuXino-MICRO/Android/nand/A20_android_422_TS_USB_UART_I2C_WIFI_LAN_HDMI_LCD_800x480_release_3.img A20-OLinuXino Android for NAND with HDMI and 800x480 video support]
 +
 
 +
If you want to use it with our RTL8188ETV module then consider release #4:
 +
 
 +
[https://ftp.olimex.com/Allwinner_Images/A20-OLinuXino-MICRO/Android/nand/A20_android_422_TS_USB_UART_I2C_WIFI_LAN_HDMI_LCD_800x480_release_4.img A20-OLinuXino-MICRO Android for NAND memory with video settings for 800x480 display output + MOD-WIFI-RTL8188ETV module]]
 +
 
 +
FTP of Android release 3 for NAND memory with HDMI and 10 inch LCD (1024x600) support: [https://ftp.olimex.com/Allwinner_Images/A20-OLinuXino-MICRO/Android/nand/A20_android_422_TS_USB_UART_I2C_WIFI_LAN_HDMI_LCD_1024x600_release_3.img A20-OLinuXino Android for NAND with HDMI and 1024x600 video support]
 +
 
 +
Torrent of Android release 1 for microSD card with HDMI and 7 inch LCD (800x480) support: [[Media:A20_SD_4G_android_422_TS_USB_UART_I2C_WIFI_LAN_HDMI_LCD_800x480_release_1.torrent‎‎‎|A20-OLinuXino Android for microSD card with HDMI and 800x480 video support]]
 +
 
 +
Torrent of Android release 1 for microSD card with HDMI and 10 inch LCD (1024x600) support: [[Media:A20_SD_4G_android_422_TS_USB_UART_I2C_WIFI_LAN_HDMI_LCD_1024x600_release_1_fix.torrent‎‎|A20-OLinuXino Android for microSD card with HDMI and 1024x600 video support]]
 +
 
 +
Build instructions and source files for the official Android images for A20 boards in this repository: https://github.com/hehopmajieh/olinuxino_configs
 +
 
 +
The Android image has the following features:
 +
*Android 4.2.2
 +
*NAND image i.e. will work only on [https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-MICRO-4GB/ A20-OLinuXino-MICRO-4GB]
 +
*Supports [https://www.olimex.com/Products/OLinuXino/A13/A13-LCD7-TS 7" LCD 800x480 pixels] and [https://www.olimex.com/Products/OLinuXino/A13/A13-LCD10TS 10" LCD 1024x600 pixels]
 +
*HDMI support (720p default)
 +
*both LCD and HDMI work together
 +
*Touchscreen supported
 +
*GPIO support
 +
*Native Ethernet 100Mbit
 +
*USB-Ethernet [https://www.olimex.com/Products/OLinuXino/A13/USB-ETHERNET-AX88772B/ ASIX 88772]
 +
*USB-WIFI [https://www.olimex.com/Products/Modules/Ethernet/MOD-WIFI-RTL8188/ RTL8188]
 +
*USB-OTG support USB device and USB host with Low/Full/High speed
 +
*USB-HOST-top Low/Full/High speed
 +
*USB-HOST-bottom Low/Full/High speed
 +
*micro SD card
 +
*Audio OUT
 +
*Audio In
 +
*I2C1
 +
*I2C2
 +
*UART6
 +
*UART7
 +
*Buttons
 +
 
 +
 
 +
What is left unsupported in Android:
 
*SATA
 
*SATA
*Audio IN
+
*SD-MMC card on bottom
*Audio OUT
 
*I2C2(400KHz)
 
*I2C1(200KHz)
 
*Default Login: '''root/olimex'''
 
  
Note: the A20-Debian-SD card which we have on our webshop contain same image on 4GB Class10 fast micro sd-card, if you want to use this image please use Class10 fast card or the performance of Linux will slow down
+
== Notable unofficial images ==
  
=== Android ===
+
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:
  
'''[https://docs.google.com/file/d/0BznD3qIZ1RfGckdjVVJfZDMtZUU/edit?pli=1 Latest A20-OLinuXino-MICRO Android NAND image revision 2]''' (The LAN and the bottom SD card should be working properly now. Note that there are at least 2 things NOT working as intended in this Android release: 1. The touch screen support; 2. The bottom USB_HOST connector. It is being worked on fixing these problems!)
+
*A number of very good and optimized A20-OLinuXino-MICRO Armbian images: [https://www.armbian.com/olimex-micro/ link to LIME2 article at Armbian's web-site]
  
'''[https://docs.google.com/file/d/0B-bAEPML8fwlNUJwV0plZWc2Nk0/edit?usp=sharing Older A20-OLinuXino-MICRO preliminary Android NAND image]''' (Note that there are at least 4 things NOT working as intended in this Android release: 1. The Ethernet; 2. The bottom SD card; 3. The touch screen support; 4. The bottom USB_HOST connector. It is being worked on fixing these problems!)
+
*A20-OLinuXino-MICRO is supported by openSUSE Factory, installation instructions might be found here: [https://en.opensuse.org/HCL:A20-OLinuXino-MICRO openSUSE wiki link]
  
'''[https://docs.google.com/file/d/0B-bAEPML8fwlNTJCSFhFUHJEUTg/edit?usp=sharing A20-SDK torrent for building Android images] the bootloader and kernel sources are not available at the moment due to privacy concerns; these would be made available as soon as possible'''
+
*A20-OLinuXino-MICRO is recognized by the Devuan community and there are official releases here might be found here: [https://files.devuan.org/devuan_jessie_rc/embedded/ Devuan list of files link]
 +
<br>
  
 
== Documents ==
 
== Documents ==
  
A20-OLinuXino-MICRO and A20-OLinuXino-MICRO-4GB basic dimensions in mils: [https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-MICRO/resources/a20-dimensions.png image in PNG format]
+
 
 +
===A20-OLinuXino Board User Manual===
 +
[https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-MICRO-4GB/resources/A20-OLinuXino-Micro.pdf A20-OLinuXino user manual]
 +
 
 +
=== A20 Brief ===
 +
 
 +
[https://github.com/OLIMEX/OLINUXINO/blob/master/DOCUMENTS/A20-PDFs/A20%20brief%2020130407.pdf A20 brief description]
 +
 
 +
=== A20 Datasheet ===
 +
 
 +
[https://github.com/OLIMEX/OLINUXINO/blob/master/DOCUMENTS/A20-PDFs/A20%20Datasheet%20v1.0%2020130227.pdf A20 datasheet]
 +
 
 +
=== A20 User Manual ===
 +
[https://github.com/OLIMEX/OLINUXINO/blob/master/DOCUMENTS/A20-PDFs/A20%20User%20Manual%202013-03-22.pdf A20 users manual]
  
 
== Hardware ==
 
== Hardware ==
  
Under construction
+
[[File:Example.jpg|650px]]
 +
 
 +
<br>
 +
===Power supply and consumption===
 +
 
 +
 
 +
A20-OLinuXino can be powered from three sources:
 +
*+6-16VDC 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: 0.17-0.25A depend on processor load
 +
*+6VDC input power: 0.18-0.33A depend on processor load
 +
*+16VDC input power: 0.11-0.17A depend on processor load
 +
 
 +
 
 +
Comparison table of power consumption might be found at the following [https://www.olimex.com/Products/OLinuXino/_resources/OLinuXino-Consumption.pdf link].
 +
 
 +
LiPo battery allow backup power supply when main power is interrupted. A20-OLinuXino 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:
 +
*[https://www.olimex.com/Products/Power/BATTERY-LIPO1400mAh/ 1400mAh]
 +
*[https://www.olimex.com/Products/Power/BATTERY-LIPO3000mAh/ 3000mAh]
 +
*[https://www.olimex.com/Products/Power/BATTERY-LIPO4400mAh/ 4400mAh]
 +
*[https://www.olimex.com/Products/Power/BATTERY-LIPO6600mAh/ 6600mAh]
 +
 
 +
 
 +
===Board dimensions===
 +
 
 +
A20-OLinuXino-MICRO hardware revision M dimensions in mils:[https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-MICRO/resources/A20-OLinuXino-MICRO-revsion-M-dimensions.png image in PNG format]
 +
 
 +
A20-OLinuXino-MICRO hardware revision D dimensions in mils: [https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-MICRO/resources/a20-dimensions.png image in PNG format]
 +
 
 +
===CAD files===
 +
 
 +
 
 +
A20-OLinuXino-MICRO is Open Source Hardware, CAD files are available at [https://github.com/OLIMEX/OLINUXINO/tree/master/HARDWARE/A20-OLinuXino-MICRO GitHub]
 +
 
 +
The CAD product used to design OLinuXino is Eagle and you can download evaluation free version from their [http://www.cadsoftusa.com/ web].
 +
 
 +
===Board Layout===
 +
 
 +
 
 +
[[File:A20-OLinuXino-FRONT.jpg]]
 +
 
 +
 
 +
[[File:A20-OLinuXino-BACK.jpg]]
 +
 
 +
===Be careful with TV monitors without grounding===
 +
[http://olimex.wordpress.com/2014/01/22/bevare-non-grounded-tv-monitors-can-damage-your-olinuxino/ Here] you can read how easy you can damage your OLinuXino if you connect it to TV without grounding.
  
 
== Software ==
 
== Software ==
  
To update the Android image (located on the NAND) you need the PhoenixSuit program (and not LiveSuit as in A13 and A10s boards).
+
===Linux Commands===
[https://docs.google.com/file/d/0B7WHuNCASY8caWRNUy00VUszbDg/edit?usp=sharing PhoenixSuit download]
+
 
 +
[[Linux-Commands]] Brief Linux Command reference
 +
 
 +
===Python===
 +
 
 +
 
 +
[https://pypi.python.org/pypi/pyA20 pyA20 is Python library for access to A20-OLinuXino-MICRO GPIOs, I2C, SPI]
 +
 
 +
Use:
 +
 
 +
    #!/usr/bin/env python
 +
   
 +
    import A20_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()
  
To write a Linux image to an SD card under Windows you might use Win32 Disk Imager: [http://sourceforge.net/projects/win32diskimager/ Win32 Disk Imager Win32 Disk Imager]
+
===GPIO under Linux===
  
NOTE! The default '''username/password''' combination is '''root/olimex'''
+
A very good GPIO guide by Dr. Guido Pelz might be found here: [https://github.com/OLIMEX/OLINUXINO/raw/master/HARDWARE/A20-PDFs/A20-GPIO.pdf https://github.com/OLIMEX/OLINUXINO/raw/master/HARDWARE/A20-PDFs/A20-GPIO.pdf]
  
== Projects ==
+
You can read data from a given GPIO port. The logical ranges are usually as follows: 0V-1V for LOW (or 0) and 2.4V-3.3V for HIGH (or 1). All voltages are measured against ground (GND).
Under construction
 
  
== FAQ ==
+
If the input signal is to high, you will at least destroy the port!
  
'''Q: How to download new Android image to the NAND memory of my A20 board?'''
+
In order to use A20 GPIO's first you have to export them. You can export a single GPIO:
  
A: To repair the image on the NAND re-upload it following these steps:
+
    root@A20:~# echo gpioXX > /sys/class/gpio/export
  
*1. Install and run PhoenixSuit (can be found here: [https://docs.google.com/file/d/0B7WHuNCASY8caWRNUy00VUszbDg/edit?usp=sharing download from google drive]).
+
To export a range of GPIOs (from 1-230 in the example below) use:
 +
 
 +
    root@A20:~#  for i in `seq 1 1 230`; do echo $i > /sys/class/gpio/export; done
 +
 
 +
list of all available GPIO
 +
 
 +
    root@A20:~# ls /sys/class/gpio/
 +
    export      gpio21_pc3/  gpio33_pb8/  gpio45_ph27/ gpio57_ph17/ gpio69_pg5/
 +
    gpio10_pe9/  gpio22_pc7/  gpio34_pb10/ gpio46_ph0/  gpio58_ph18/ gpio6_pe5/
 +
    gpio11_pe10/ gpio23_pc16/ gpio35_pb11/ gpio47_ph2/  gpio59_ph19/ gpio70_pg6/
 +
    gpio12_pe11/ gpio24_pc17/ gpio36_pb12/ gpio48_ph7/  gpio5_pe4/  gpio71_pg7/
 +
    gpio13_pi14/ gpio25_pc18/ gpio37_pb13/ gpio49_ph9/  gpio60_ph20/ gpio72_pg8/
 +
    gpio14_pi15/ gpio26_pc23/ gpio38_pb14/ gpio4_pe3/  gpio61_ph21/ gpio73_pg9/
 +
    gpio15_pi0/  gpio27_pc24/ gpio39_pb15/ gpio50_ph10/ gpio62_ph22/ gpio74_pg10/
 +
    gpio16_pi1/  gpio28_pb3/  gpio3_pe2/  gpio51_ph11/ gpio63_ph23/ gpio75_pg11/
 +
    gpio17_pi2/  gpio29_pb4/  gpio40_pb16/ gpio52_ph12/ gpio64_pg0/  gpio7_pe6/
 +
    gpio18_pi3/  gpio2_pe1/  gpio41_pb17/ gpio53_ph13/ gpio65_pg1/  gpio8_pe7/
 +
    gpio19_pi10/ gpio30_pb5/  gpio42_ph24/ gpio54_ph14/ gpio66_pg2/  gpio9_pe8/
 +
    gpio1_pe0/  gpio31_pb6/  gpio43_ph25/ gpio55_ph15/ gpio67_pg3/  gpiochip1/
 +
    gpio20_pi11/ gpio32_pb7/  gpio44_ph26/ gpio56_ph16/ gpio68_pg4/  unexport
 +
 
 +
Example on how to write to a GPIO. For instance - toggle onboard LED. The LED is connected to PH2.
 +
 
 +
1. Export gpio47_ph2
 +
   
 +
    root@A20:~# echo gpio47 > /sys/class/gpio/export
 +
 
 +
2. Set PH2 as output
 +
 
 +
    root@A20:/sys/class/gpio/gpio47_ph2# echo out > direction
 +
 
 +
3. Set high position (1) of PH2 - LED is ON
 +
 
 +
    root@A20:/sys/class/gpio/gpio47_ph2# echo 1 > value
 +
 
 +
4. Set low position (0) of PH2 - LED is OFF
 +
 
 +
    root@A20:/sys/class/gpio/gpio47_ph2# echo 0 > value
 +
 
 +
Example on how to read GPIO (with GPIO #49):
 +
 
 +
1. Export GPIO 49
 +
 
 +
    echo 49 > /sys/class/gpio/export
 +
 
 +
2. Set input
 +
 
 +
    echo "in" > /sys/class/gpio/gpio49_ph9/direction
 +
 
 +
3. Read value GPIO 49
 +
 
 +
    cat /sys/class/gpio/gpio49_ph9/value
 +
 
 +
4. Unexport GPIO 49 when finished
 +
 
 +
    echo 49 > /sys/class/gpio/unexport
 +
 
 +
===Add Voice to your OLinuXino project===
 +
 
 +
[http://olimex.wordpress.com/2013/10/03/make-things-talk-with-olinuxino/ Installation of Festival on OLinuXino]
 +
 
 +
== How To? ==
 +
<br>
 +
===How to correctly power off OLinuXino running from NAND Flash===
 +
[http://olimex.wordpress.com/2014/01/24/how-to-correctly-power-off-olinuxino-running-android/ In this Blog post] we explain what are the problems. This is common problem for all computers running OS. [http://www.linux-mtd.infradead.org/doc/ubifs.html#L_ubifs_mlc Here] you can read more about MLC NAND Flash and Linux file system.
 +
 
 +
=== Is it possible to boot Debian from NAND? Do you provide such image?===
 +
Yes, it is possible. Use the latest Debian Jessie image and write "nandinstall". More information can be found in this wiki article: [[How_to_install_Debian_to_NAND| installing Debian Jessie to the 4GB NAND memory]]
 +
 
 +
There are other people who are also successful in booting Debian from the NAND. Make sure to check on the forum. Make sure to check the number of very good and optimized A20-OLinuXino Debian images by Igor Pečovnik. There are also his instructions for NAND installation of Debian: [http://www.armbian.com/download/ link to his web-site]
 +
 
 +
===How to generate boot-able SD-card Debian Linux image for A20-OLinuXino? ===
 +
 
 +
Build instructions and required files for the latest Debian images: [https://github.com/OLIMEX/OLINUXINO/tree/master/SOFTWARE/A20/A20-build-3.4.103-release-7 instructions and files at the GitHub page]
 +
 
 +
[http://olimex.wordpress.com/2014/03/07/building-a20-olinuxino-micro-debian-image-with-hardware-accelerated-video/ Official Olimex wordpress article on how to extend the previous build of Debian Linux 3.4 with hardware acceleration support, keep a look at the wordpress for more interesting articles]
 +
 
 +
[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 download new Android image to the NAND memory of my A20 board?===
 +
 
 +
 
 +
To repair the image on the NAND re-upload it following these steps:
 +
 
 +
*1. Install and run PhoenixSuit (can be found here: [https://drive.google.com/file/d/0BwplT87k9SCgaTFTZnVST05ONzA/view?usp=sharing download from google drive]).
  
 
*2. Go to firmware tab of the program and point to a valid Android image (the latest official one may also be downloaded above).
 
*2. Go to firmware tab of the program and point to a valid Android image (the latest official one may also be downloaded above).
Line 84: Line 363:
 
*3. Disconnect the power supply and USB cable from the A20 board.
 
*3. Disconnect the power supply and USB cable from the A20 board.
  
*4. Make sure NAND_E jumper is closed.
+
*4. Press and hold RECOVERY button, apply power supply (6-16)V, release RECOVERY button.
 +
 
 +
*5. Connect USB cable to the mini USB connector.
 +
 
 +
*6. You will be asked for drivers for the bootloader. Navigate to the folder where you extracted the PhoenixSuit and install the drivers from the respective executables (or manually point the installer to the drivers folder in the PhoenixSuit installation path).
 +
 
 +
*7. 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.
 +
 
 +
*8. 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.
 +
 
 +
===How do I write the official Android image to a micro SD card for my A20 board?===
 +
A: First download one of the official Android images, which might be found in the Android section above.
 +
 
 +
Make sure that the download link you visit clearly indicates that the image is suitable for the microSD card since there are images suitable for NAND memory also. The images suitable for the microSD memory and those suitable for NAND card are different. However, the upload method is almost identical – using PhoenixSuit.
 +
 
 +
There are two types of Android images for microSD card that we usually provide and each of them has to be downloaded to a microSD card using a different method. The image provided for microSD card is either the native Android image that can be downloaded to the card via a software tool like PhoenixSuit (through the board) or an image taken from an already prepared microSD card that requires to simply write the image (through a microSD card reader).
 +
 
 +
'''It is more likely that you have an Android image that requires a simple copy to a card. If that is the case you can follow the exact steps as for Linux (e.g. using "Win32 Disk Imager" or "dd" command).'''
 +
 
 +
In order to prepare a microSD card with a native Android you will need a software tool called PhoenixSuit and then:
 +
 
 +
• Install and run PhoenixSuit (can be found here: [https://drive.google.com/file/d/0BwplT87k9SCgaTFTZnVST05ONzA/view?usp=sharing download from google drive])
 +
 
 +
• Go to the firmware tab of the program and point to a valid Android image (note that the
 +
images on Gdrive are compressed and you have to extract them to .img files to be able write
 +
them with PhoenixSuit)
  
*5. Press and hold RECOVERY button, apply power supply (6-16)V, release RECOVERY button.
+
• Disconnect the power supply and USB cable from the A20 board. Put an SD card in micro SD
 +
holder. We recommend 4GB class 10 card.
  
*6. Connect USB cable to the mini USB connector.
+
• Press and hold RECOVERY button, apply power supply (6-16)V, release RECOVERY button.
  
*7. You will be asked for drivers for the bootloader. Navigate to the folder where you extracted the PhoenixSuit and install the drivers from the respective executables (or manually point the installer to the drivers folder in the PhoenixSuit installation path).
+
• Connect USB cable to the mini USB connector.
  
*8. 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.
+
• 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 executables (or manually point the installer to the drivers folder in the PhoenixSuit installation path).
  
*9. Wait till upgrade succeeds
+
• 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 do I write the Linux image to a micro SD card to use with my A20 board?===
  
'''Q: How do I upload a Linux image to an SD card which I want to use with my A20 board?'''
 
  
A: To write a Linux image to an SD card under Windows we use Win32 Disk Imager:
+
To write a Linux image to an SD card under Windows we use Win32 Disk Imager):
  
*Download Win32 Disk Imager Win32 Disk Imager
+
*Download Win32 Disk Imager [http://sourceforge.net/projects/win32diskimager/ Win32 Disk Imager]
 
*Insert card
 
*Insert card
 
*Start program
 
*Start program
Line 120: Line 434:
  
 
where X is the uSD card.
 
where X is the uSD card.
[[Category:A20]]
+
 
 +
===How to change HDMI, VGA and LCD resolutions in the official Debian image?===
 +
 
 +
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. When you are logged as super user in the board type:
 +
 
 +
  For Debian Wheezy releases: ./change_display* (* = press 'tab')
 +
  For Debian Jessie releases: change_display* (* = press 'tab')
 +
 
 +
and press "Enter".
 +
 
 +
'''Note that the script should be executed as super user. Under the command line interface you are automatically logged as super user (user "root", password "olimex"). However, under the graphical environment you are not auto-logged as super user and you must type "sudo" before the command (in the GUI the super-user is "olimex" and the password is "olimex")'''
 +
 
 +
Then choose the resolution and the interface(LCD, HDMI or VGA). 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.
 +
 
 +
The supported resolutions are:
 +
 
 +
'''For LCD:'''
 +
 
 +
*1. 4.3" (480x272)
 +
*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.
 +
 
 +
'''For HDMI:'''
 +
 
 +
*0. 480i
 +
*1. 576i
 +
*2. 480p
 +
*3. 576p
 +
*4. 720p50
 +
*5. 720p60
 +
*6. 1080i50
 +
*7. 1080i60
 +
*8. 1080p24
 +
*9. 1080p50
 +
*10. 1080p60
 +
<br>
 +
'''For VGA:''' (note that the VGA signals are routed to custom 6 pin connector and you need from adapter to standard VGA connector)
 +
 
 +
*0. 1680x1050
 +
*1. 1440x900
 +
*2. 1360x768
 +
*3. 1280x1024
 +
*4. 1024x768
 +
*5. 800x600
 +
*6. 640x480
 +
*7. 1920x1080
 +
*8. 1280x720
 +
<br>
 +
 
 +
===How to generate Arch Linux image?===
 +
 
 +
Recent forum post by user progmetalbg here: [https://www.olimex.com/forum/index.php?topic=4261.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]
 +
 
 +
===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 install Android on SD-card? ===
 +
 
 +
[http://olimex.wordpress.com/2013/10/02/android-4-2-2-images-for-a20-olinuxino-running-from-sd-card-is-updated-on-wiki/ Blog post about it]
 +
 
 +
===How to access UART, I2C, GPIOs under Android? ===
 +
 
 +
 
 +
[http://olimex.wordpress.com/2013/10/02/a20-olinuxino-tools-for-android-released/ Use our Open Source OLinuXino A20-TOOLS]
 +
 
 +
===How to control PWM under Linux? ===
 +
 
 +
There is an article here: [[how to add pwm]]
 +
 
 +
===How to build the Android 4.2.2 image for A20-OLinuXino-MICRO? ===
 +
 
 +
First you need to Download the [http://dl.linux-sunxi.org/users/tsvetan/ANDROID-4.2.2-SDK2.0-KERNEL-3.4/ A20 SDK2.0 Linux Kernel 3.4]
 +
 
 +
Second you need to configure your environment read the instructions [http://source.android.com/source/initializing.html here]
 +
 
 +
Then Build the kernel, kernel modules and u-boot
 +
 
 +
    cd lichee
 +
    ./build.sh -psun7i_android
 +
 
 +
When done, continue with Bulding the android image:
 +
 
 +
    cd ../android4.2
 +
    cd device/softwinner/
 +
    tar zxfv olinuxino-a20.tgz
 +
    cd ../../
 +
    source build/envsetup.sh
 +
    lunch #select olinuxino-a20_eng
 +
    extract-bsp
 +
    make -j4
 +
 
 +
Dave from Axon instruments wrote more detailed [http://axonjakarta.wordpress.com/2014/02/14/olimex-a20-android-building-4/ blog post] about how he generates the Android image
 +
 
 +
===I don't have neither serial cable, nor HDMI monitor. I also can't access the local Ethernet network. Can I somehow access the board anyway?===
 +
 
 +
The latest official Debian Linux image allows the use the USB_OTG connector for SSH connection without the need of a LAN cable or a serial cable. You can use a mini USB cable connected between your host PC and the on-board mini USB connector. For connection convenience there is a DHCP server running specifically for USB0 interface. The DHCP server should give IP address to the new USB0 interface of your host PC so you can make SSH connection from your PC to the default board IP address of the USB0 interface – 192.168.2.1.
 +
 
 +
You can connect to the board using a mini USB cable and an SSH client (if you use Windows you might use "puTTY", for example) at address 192.168.2.1.
 +
 
 +
For Windows operating system - upon connection, the board should show up in "Windows Device Manager" as "RNDIS Ethernet Gadget". You might be asked to install a driver. The drivers can be found online as "RNDIS driver" (Remote Network Driver Interface Specification).  The drivers are provided by Microsoft and they should be available for every Windows distribution - refer to the respective files and articles provided by Microsoft on how to install the required drivers.
 +
 
 +
===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 properly calibrate a display under Debian===
 +
 
 +
Latest Debian Jessie images should be calibrated as detailed here: https://www.olimex.com/wiki/Touch_calibration_official_images
 +
 
 +
If using older Debian Wheezy image follow the algorithm below:
 +
 
 +
Make sure you are properly logged in the LXDE visual interface! Else applying calibration would not happen for the current user - if you are calibrating from the X graphical interface make sure that you are logged as user “olimex” (if calibrating without the X, the user is “root”).
 +
 
 +
    #su olimex
 +
enter the olimex password:olimex
 +
 
 +
    #sudo ts_calibrate
 +
calibrate the touch screen and reboot the board
 +
 
 +
    #sudo reboot
 +
 
 +
It would be a good idea to test with Android or another Debian image also, it has a built-in calibration application by default.
 +
 
 +
===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:45, 6 December 2023

A20-OLinuXino.jpeg

A20-OLinuXino-MICRO features:

  • A20 Cortex-A7 dual-core ARM Cortex-A7 CPU and dual-core Mali 400 GPU
  • 1GB 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
  • VGA output on 6-pin 1.25mm (0.05") step connector
  • 100MBit native Ethernet
  • LiPo Battery connector with battery-charging capabilities
  • Audio headphones output
  • Microphone input on connector
  • 2x UEXT connectors
  • LCD connector compatible with with 4.3", 7.0", 10.1" LCD modules from Olimex
  • 160 GPIOs on three GPIO connectors
  • MicroSD card connector
  • SD/MMC 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
  • 10 BUTTONS with ANDROID functionality + RESET button
  • 4 mount holes
  • 6-16V input power supply, noise immune design
  • PCB dimensions: 142 x 82 mm


Contents

Official Images Released and Recommended by Olimex

Below you would find links to the official Debian and Android images. The images in this chapter were compiled by Olimex. They are recommended for beginners and first time users since they include full hardware support.

If you are an experienced embedded Linux professional you might also find build instructions to our images.

Linux Images

There are three different types of Olimex-made official Linux images:

  • Recent kernel and u-boot Armbian-based Ubuntu Bionic and Debian Buster Linux images for general purpose Linux experience
  • KODI images, LibreElec-based, if you wish to use your A20 board as TV box
  • Debian 8 Jessie images with v3.4.x sunxi kernel


The official Linux images should be downloaded to a microSD card. Images can be downloaded either from our FTP or via torrent client. You can install the Debian to the NAND or the eMMC of your board (if it comes with one). Information on booting Debian from the NAND or eMMC might be found in these wiki article: how to install Debian to NAND; how to install Debian to eMMC. Download locations for the official images might be found below:

Download locations Linux images

ALWAYS FIRST TEST WITH LATEST OFFICIAL IMAGE, NEWER HARDWARE REVISIONS OF THE BOARD MIGHT NOT WORK WITH OLDER IMAGES!!!


Main FTP hub folder for all Olimex-made A20 official images:

ftp://staging.olimex.com/Allwinner_Images/A20-OLinuXino/

Latest mainline kernel official images:

1. Latest Ubuntu Desktop Linux images can be found here: FTP directory with latest Ubuntu Bionic images

2. Latest Debian Server Linux images can be found here: FTP directory with latest Debian Buster images

Latest KODI player official images:

3. Latest KODI player LibreElec Linux images here: FTP directory with latest KODI/LibreElec images

Latest sunxi kernel official images (not recommended):

Latest sunxi-kernel (v3.4.x) Debian 8 Jessie Linux images here: FTP location with all sunxi-kernel Debian 8 images here

FTP link of official Debian Jessie release #18, suitable for boards with no extra flash memory or with extra eMMC flash memory (not suitable for boards with NAND memory): A20 OLinuxino Micro debian Jessie 34 103 2G eMMC release 18

FTP link of official Debian Jessie release #15, suitable for boards with no extra flash memory or with extra NAND memory (not suitable for boards with eMMC memory): A20-OLinuXino-MICRO Debian Jessie with kernel 3.4.103+ release 15

Image description and typical interfacing: description and basic usage of different peripherals at at the GitHub page

Image build instructions and required files for latest Debian Jessie release might be found here: build instructions and required files at the GitHub page

You can find some older releases and older build instructions (older image revisions might be used as a reference, for testing purposes, or if you own old hardware revision of the board) at the following article: older releases and older build instructions


Note: in the previous Debian releases the Ethernet was auto-detected and initialized during boot BUT this caused 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 images

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

FTP link of Android release 3 for NAND memory with HDMI and 7 inch LCD (800x480) support: A20-OLinuXino Android for NAND with HDMI and 800x480 video support

If you want to use it with our RTL8188ETV module then consider release #4:

A20-OLinuXino-MICRO Android for NAND memory with video settings for 800x480 display output + MOD-WIFI-RTL8188ETV module]

FTP of Android release 3 for NAND memory with HDMI and 10 inch LCD (1024x600) support: A20-OLinuXino Android for NAND with HDMI and 1024x600 video support

Torrent of Android release 1 for microSD card with HDMI and 7 inch LCD (800x480) support: A20-OLinuXino Android for microSD card with HDMI and 800x480 video support

Torrent of Android release 1 for microSD card with HDMI and 10 inch LCD (1024x600) support: A20-OLinuXino Android for microSD card with HDMI and 1024x600 video support

Build instructions and source files for the official Android images for A20 boards in this repository: https://github.com/hehopmajieh/olinuxino_configs

The Android image has the following features:

  • Android 4.2.2
  • NAND image i.e. will work only on A20-OLinuXino-MICRO-4GB
  • Supports 7" LCD 800x480 pixels and 10" LCD 1024x600 pixels
  • HDMI support (720p default)
  • both LCD and HDMI work together
  • Touchscreen supported
  • GPIO support
  • Native Ethernet 100Mbit
  • USB-Ethernet ASIX 88772
  • USB-WIFI RTL8188
  • USB-OTG support USB device and USB host with Low/Full/High speed
  • USB-HOST-top Low/Full/High speed
  • USB-HOST-bottom Low/Full/High speed
  • micro SD card
  • Audio OUT
  • Audio In
  • I2C1
  • I2C2
  • UART6
  • UART7
  • Buttons


What is left unsupported in Android:

  • SATA
  • SD-MMC card on bottom

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:

  • A20-OLinuXino-MICRO is supported by openSUSE Factory, installation instructions might be found here: openSUSE wiki link
  • A20-OLinuXino-MICRO is recognized by the Devuan community and there are official releases here might be found here: Devuan list of files link


Documents

A20-OLinuXino Board User Manual

A20-OLinuXino user manual

A20 Brief

A20 brief description

A20 Datasheet

A20 datasheet

A20 User Manual

A20 users manual

Hardware

Example.jpg


Power supply and consumption

A20-OLinuXino can be powered from three sources:

  • +6-16VDC 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: 0.17-0.25A depend on processor load
  • +6VDC input power: 0.18-0.33A depend on processor load
  • +16VDC input power: 0.11-0.17A depend on processor load


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

LiPo battery allow backup power supply when main power is interrupted. A20-OLinuXino 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

A20-OLinuXino-MICRO hardware revision M dimensions in mils:image in PNG format

A20-OLinuXino-MICRO hardware revision D dimensions in mils: image in PNG format

CAD files

A20-OLinuXino-MICRO 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

A20-OLinuXino-FRONT.jpg


A20-OLinuXino-BACK.jpg

Be careful with TV monitors without grounding

Here you can read how easy you can damage your OLinuXino if you connect it to TV without grounding.

Software

Linux Commands

Linux-Commands Brief Linux Command reference

Python

pyA20 is Python library for access to A20-OLinuXino-MICRO GPIOs, I2C, SPI

Use:

   #!/usr/bin/env python
   
   import A20_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()

GPIO under Linux

A very good GPIO guide by Dr. Guido Pelz might be found here: https://github.com/OLIMEX/OLINUXINO/raw/master/HARDWARE/A20-PDFs/A20-GPIO.pdf

You can read data from a given GPIO port. The logical ranges are usually as follows: 0V-1V for LOW (or 0) and 2.4V-3.3V for HIGH (or 1). All voltages are measured against ground (GND).

If the input signal is to high, you will at least destroy the port!

In order to use A20 GPIO's first you have to export them. You can export a single GPIO:

   root@A20:~# echo gpioXX > /sys/class/gpio/export

To export a range of GPIOs (from 1-230 in the example below) use:

   root@A20:~#  for i in `seq 1 1 230`; do echo $i > /sys/class/gpio/export; done

list of all available GPIO

   root@A20:~# ls /sys/class/gpio/
   export       gpio21_pc3/  gpio33_pb8/  gpio45_ph27/ gpio57_ph17/ gpio69_pg5/
   gpio10_pe9/  gpio22_pc7/  gpio34_pb10/ gpio46_ph0/  gpio58_ph18/ gpio6_pe5/
   gpio11_pe10/ gpio23_pc16/ gpio35_pb11/ gpio47_ph2/  gpio59_ph19/ gpio70_pg6/
   gpio12_pe11/ gpio24_pc17/ gpio36_pb12/ gpio48_ph7/  gpio5_pe4/   gpio71_pg7/
   gpio13_pi14/ gpio25_pc18/ gpio37_pb13/ gpio49_ph9/  gpio60_ph20/ gpio72_pg8/
   gpio14_pi15/ gpio26_pc23/ gpio38_pb14/ gpio4_pe3/   gpio61_ph21/ gpio73_pg9/
   gpio15_pi0/  gpio27_pc24/ gpio39_pb15/ gpio50_ph10/ gpio62_ph22/ gpio74_pg10/
   gpio16_pi1/  gpio28_pb3/  gpio3_pe2/   gpio51_ph11/ gpio63_ph23/ gpio75_pg11/
   gpio17_pi2/  gpio29_pb4/  gpio40_pb16/ gpio52_ph12/ gpio64_pg0/  gpio7_pe6/
   gpio18_pi3/  gpio2_pe1/   gpio41_pb17/ gpio53_ph13/ gpio65_pg1/  gpio8_pe7/
   gpio19_pi10/ gpio30_pb5/  gpio42_ph24/ gpio54_ph14/ gpio66_pg2/  gpio9_pe8/
   gpio1_pe0/   gpio31_pb6/  gpio43_ph25/ gpio55_ph15/ gpio67_pg3/  gpiochip1/
   gpio20_pi11/ gpio32_pb7/  gpio44_ph26/ gpio56_ph16/ gpio68_pg4/  unexport

Example on how to write to a GPIO. For instance - toggle onboard LED. The LED is connected to PH2.

1. Export gpio47_ph2

   root@A20:~# echo gpio47 > /sys/class/gpio/export

2. Set PH2 as output

   root@A20:/sys/class/gpio/gpio47_ph2# echo out > direction

3. Set high position (1) of PH2 - LED is ON

   root@A20:/sys/class/gpio/gpio47_ph2# echo 1 > value

4. Set low position (0) of PH2 - LED is OFF

   root@A20:/sys/class/gpio/gpio47_ph2# echo 0 > value

Example on how to read GPIO (with GPIO #49):

1. Export GPIO 49

   echo 49 > /sys/class/gpio/export

2. Set input

   echo "in" > /sys/class/gpio/gpio49_ph9/direction

3. Read value GPIO 49

   cat /sys/class/gpio/gpio49_ph9/value 

4. Unexport GPIO 49 when finished

   echo 49 > /sys/class/gpio/unexport

Add Voice to your OLinuXino project

Installation of Festival on OLinuXino

How To?


How to correctly power off OLinuXino running from NAND Flash

In this Blog post we explain what are the problems. This is common problem for all computers running OS. Here you can read more about MLC NAND Flash and Linux file system.

Is it possible to boot Debian from NAND? Do you provide such image?

Yes, it is possible. Use the latest Debian Jessie image and write "nandinstall". More information can be found in this wiki article: installing Debian Jessie to the 4GB NAND memory

There are other people who are also successful in booting Debian from the NAND. Make sure to check on the forum. Make sure to check the number of very good and optimized A20-OLinuXino Debian images by Igor Pečovnik. There are also his instructions for NAND installation of Debian: link to his web-site

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

Build instructions and required files for the latest Debian images: instructions and files at the GitHub page

Official Olimex wordpress article on how to extend the previous build of Debian Linux 3.4 with hardware acceleration support, keep a look at the wordpress for more interesting articles

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

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

To repair the image on the NAND re-upload it following these steps:

  • 2. Go to firmware tab of the program and point to a valid Android image (the latest official one may also be downloaded above).
  • 3. Disconnect the power supply and USB cable from the A20 board.
  • 4. Press and hold RECOVERY button, apply power supply (6-16)V, release RECOVERY button.
  • 5. Connect USB cable to the mini USB connector.
  • 6. You will be asked for drivers for the bootloader. Navigate to the folder where you extracted the PhoenixSuit and install the drivers from the respective executables (or manually point the installer to the drivers folder in the PhoenixSuit installation path).
  • 7. 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.
  • 8. 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.

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

A: First download one of the official Android images, which might be found in the Android section above.

Make sure that the download link you visit clearly indicates that the image is suitable for the microSD card since there are images suitable for NAND memory also. The images suitable for the microSD memory and those suitable for NAND card are different. However, the upload method is almost identical – using PhoenixSuit.

There are two types of Android images for microSD card that we usually provide and each of them has to be downloaded to a microSD card using a different method. The image provided for microSD card is either the native Android image that can be downloaded to the card via a software tool like PhoenixSuit (through the board) or an image taken from an already prepared microSD card that requires to simply write the image (through a microSD card reader).

It is more likely that you have an Android image that requires a simple copy to a card. If that is the case you can follow the exact steps as for Linux (e.g. using "Win32 Disk Imager" or "dd" command).

In order to prepare a microSD card with a native Android you will need a software tool called PhoenixSuit and then:

• 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 on Gdrive 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 A20 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 executables (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 do I write the Linux image to a micro SD card to use with my A20 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 change HDMI, VGA and LCD resolutions in the official Debian image?

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. When you are logged as super user in the board type:

  For Debian Wheezy releases: ./change_display* (* = press 'tab')
  For Debian Jessie releases: change_display* (* = press 'tab')

and press "Enter".

Note that the script should be executed as super user. Under the command line interface you are automatically logged as super user (user "root", password "olimex"). However, under the graphical environment you are not auto-logged as super user and you must type "sudo" before the command (in the GUI the super-user is "olimex" and the password is "olimex")

Then choose the resolution and the interface(LCD, HDMI or VGA). 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.

The supported resolutions are:

For LCD:

  • 1. 4.3" (480x272)
  • 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.

For HDMI:

  • 0. 480i
  • 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)

  • 0. 1680x1050
  • 1. 1440x900
  • 2. 1360x768
  • 3. 1280x1024
  • 4. 1024x768
  • 5. 800x600
  • 6. 640x480
  • 7. 1920x1080
  • 8. 1280x720


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

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 install Android on SD-card?

Blog post about it

How to access UART, I2C, GPIOs under Android?

Use our Open Source OLinuXino A20-TOOLS

How to control PWM under Linux?

There is an article here: how to add pwm

How to build the Android 4.2.2 image for A20-OLinuXino-MICRO?

First you need to Download the A20 SDK2.0 Linux Kernel 3.4

Second you need to configure your environment read the instructions here

Then Build the kernel, kernel modules and u-boot

   cd lichee
   ./build.sh -psun7i_android

When done, continue with Bulding the android image:

   cd ../android4.2
   cd device/softwinner/
   tar zxfv olinuxino-a20.tgz
   cd ../../
   source build/envsetup.sh
   lunch #select olinuxino-a20_eng
   extract-bsp
   make -j4

Dave from Axon instruments wrote more detailed blog post about how he generates the Android image

I don't have neither serial cable, nor HDMI monitor. I also can't access the local Ethernet network. Can I somehow access the board anyway?

The latest official Debian Linux image allows the use the USB_OTG connector for SSH connection without the need of a LAN cable or a serial cable. You can use a mini USB cable connected between your host PC and the on-board mini USB connector. For connection convenience there is a DHCP server running specifically for USB0 interface. The DHCP server should give IP address to the new USB0 interface of your host PC so you can make SSH connection from your PC to the default board IP address of the USB0 interface – 192.168.2.1.

You can connect to the board using a mini USB cable and an SSH client (if you use Windows you might use "puTTY", for example) at address 192.168.2.1.

For Windows operating system - upon connection, the board should show up in "Windows Device Manager" as "RNDIS Ethernet Gadget". You might be asked to install a driver. The drivers can be found online as "RNDIS driver" (Remote Network Driver Interface Specification). The drivers are provided by Microsoft and they should be available for every Windows distribution - refer to the respective files and articles provided by Microsoft on how to install the required drivers.

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 properly calibrate a display under Debian

Latest Debian Jessie images should be calibrated as detailed here: https://www.olimex.com/wiki/Touch_calibration_official_images

If using older Debian Wheezy image follow the algorithm below:

Make sure you are properly logged in the LXDE visual interface! Else applying calibration would not happen for the current user - if you are calibrating from the X graphical interface make sure that you are logged as user “olimex” (if calibrating without the X, the user is “root”).

   #su olimex

enter the olimex password:olimex

   #sudo ts_calibrate

calibrate the touch screen and reboot the board

   #sudo reboot

It would be a good idea to test with Android or another Debian image also, it has a built-in calibration application by default.

How to add STK1160 video capture driver support in Kernel 3.4

STK1160 driver backport by Dimitar Tomov


Main_Page