Difference between revisions of "A13-OLinuXino"

(Android for NAND)
 
(168 intermediate revisions by 5 users not shown)
Line 1: Line 1:
==Hardware==
+
[[File:A13-OLinuXino-MAXI-WIFI-1.jpg|thumb| A13-OlinuXino-WIFI]]
 +
 
 +
[[File:A13-OLinuXino-MICRO.jpg|thumb| A13-OlinuXino-MICRO]]
 +
 
 +
 
 +
The A13 processor from Allwinner runs at 1GHz with a Mali400 GPU. It was designed for integration into tablets. Olimex has made several development board designs based around this chip. This wiki page contains information about hardware and software to help make use of these development boards.
 +
 
 +
 
 +
The A13 based boards currently available are<br />
 +
*[https://www.olimex.com/Products/OLinuXino/A13/A13-OLinuXino-WIFI/ A13-OLinuXino-WIFI] - Recommended if your developing software for the A13 for the first time as its the only one with network connectivity.
 +
*[https://www.olimex.com/Products/OLinuXino/A13/A13-OLinuXino/ A13-OLinuXino] - This is the same as the WIFI version but without WIFI module and NAND flash. Note: Android requires NAND flash to run, so this board can't run Android.
 +
*[https://www.olimex.com/Products/OLinuXino/A13/A13-OLinuXino-MICRO/ A13-OLinuXino-MICRO] - Similar to the A13-OlinuXino but with less extras
 +
*[https://www.olimex.com/Products/SOM/A13/A13-SOM-512/ A13-SOM-512] - System-on-Module A13 board recommended for users with experience in Allwinner development. Allows developing custom extensions with only the peripherals needed.
 +
<br>
 +
== Official Images from OLIMEX ==
 +
 
 +
=== 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!
 +
 
 +
'''Please note that you might need different Debian Linux images for different boards with different hardware - you would need to inspect the DDR3 RAM memory and use the image suitable for your board. We use either HYNIX H5TQ2G83CFR, or SAMSUNG K4B2G0846Q.'''
 +
 
 +
'''Newest official Debian release (recommended):'''
 +
 
 +
Direct download for Debian release 11.3 suitable for boards with SAMSUNG K4B2G0846Q DDR3 RAM memory: [https://ftp.olimex.com/Allwinner_Images/A13-OLinuXino/2.legacy_images_kernel_3.4.x/A13_debian_34_90_mainline_u-boot_release_11_3.7z A13 Debian Linux with kernel 3.4.90+, suitable for boards with SAMSUNG DDR3 RAM]
 +
 
 +
Direct download Debian release 10 suitable for boards with HYNIX H5TQ2G83CFR DDR3 RAM memory: [https://ftp.olimex.com/Allwinner_Images/A13-OLinuXino/2.legacy_images_kernel_3.4.x/A13_debian_34_90_WIFI_RALINK_GCC_GPIO_X_I2C_100KHz_UVC_TS_FTDI_3G_video_accell_release_10.7z Debian A13 Linux with kernel 3.4.90+, suitable for HYNIX DDR3 RAM]
 +
 
 +
'''Instructions and required files for preparing the Debian images: [https://github.com/OLIMEX/OLINUXINO/tree/master/SOFTWARE/A13/A13-build building Linux for A13-OLinuXino and A13-OLinuXino-WIFI]'''
 +
 
 +
The images include the following:
 +
*Linux Kernel 3.4.90+
 +
*LXDE desktop environment
 +
*GCC 4.6
 +
*dpkg
 +
*git
 +
*i2c-tools
 +
*perl
 +
*xorg
 +
*Python 2.7
 +
*vlc
 +
*mplayer
 +
*smplayer
 +
*midori browser
 +
*usb-modeswitch
 +
*sshfs
 +
*wvdial
 +
*LCD and touchscreen support
 +
*GPIO
 +
*I2C
 +
*SPI
 +
*USB WIFI RTL8188CU, Ethernet AX88772B
 +
*Audio
 +
*PyA13 python module with GPIO,I2C,SPI support
 +
*Default Login: '''root/olimex'''
 +
 
 +
 
 +
'''Note:''' the A13-OLinuXino-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
 +
 
 +
The file A13_debian_34_75_WIFI_RALINK_GCC_GPIO_X_I2C_100KHz_UVC_TS_FTDI_video_release_9.7z is an archive of A13_debian_34_75_WIFI_RALINK_GCC_GPIO_X_I2C_100KHz_UVC_TS_FTDI_video_release_9.7z file.
 +
 
 +
So in order to write the image on SD card you have to unzip A13_debian_34_75_WIFI_RALINK_GCC_GPIO_X_I2C_100KHz_UVC_TS_FTDI_video_release_9.7z file:
 +
 
 +
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 A13_debian_34_75_WIFI_RALINK_GCC_GPIO_X_I2C_100KHz_UVC_TS_FTDI_video_release_9.7z file in your directory and unzip it with
 +
 
 +
    #7za e A13_debian_34_75_WIFI_RALINK_GCC_GPIO_X_I2C_100KHz_UVC_TS_FTDI_video_release_9.7z
 +
 
 +
The output should be a new 4GB file named A13_debian_34_75_WIFI_RALINK_GCC_GPIO_X_I2C_100KHz_UVC_TS_FTDI_video_release_9.7z
 +
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=A13_debian_34_75_WIFI_RALINK_GCC_GPIO_X_I2C_100KHz_UVC_TS_FTDI_video_release_9.7z <br>of=/dev/sdX
 +
 
 +
 
 +
The main tested onboard hardware modules are:
 +
 
 +
'''GPIO''' - they are located in /sys/class/gpio directory. Note that first you have to export GPIOs.
 +
For example: to add PB03
 +
 
 +
    root@A10:~# echo 1 > /sys/class/gpio/export
 +
 
 +
to make PB03 output
 +
 
 +
    root@A10:~# echo out > /sys/class/gpio/gpio1_pb3/direction
 +
 
 +
to make PB03 high level(3.3V)
 +
 
 +
    root@A10:~# echo 1 > /sys/class/gpio/gpio1_pb3/value
 +
 
 +
to make PB03 low level(0V)
 +
 
 +
    root@A10:~# echo 0 > /sys/class/gpio/gpio1_pb3/value
 +
 
 +
Full list with supported GPIOs is:
 +
 
 +
    gpio12_pg9  gpio1_pb3  gpio4_pe4  gpio7_pe7
 +
    gpio10_pe10  gpio13_pg10  gpio2_pb4  gpio5_pe5  gpio8_pe8
 +
    gpio11_pe11  gpio14_pg11  gpio3_pb10  gpio6_pe6  gpio9_pe9
 +
 
 +
note that:
 +
 
 +
gpio12_pg9(GPIO2/pin10) is connected to on board LED and it is multiplexed with UART3_TX and gpio13_pg10(GPIO2/pin8) is multiplexed with UART3_RX
 +
Therfore if you want to use these ports like GPIO then UART3_TX and UART3_RX will not be available.
 +
 
 +
'''LCD''' - 4.3"(480x272), 7"(800x480), 10"(1024x600)
 +
 
 +
'''VGA''' - 800x600, 1024x768
 +
 
 +
'''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
 +
 
 +
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:
 +
 
 +
    #su olimex
 +
 
 +
enter the olimex password:olimex
 +
 
 +
    #sudo ts_calibrate
 +
 
 +
calibrate the touch screen and reboot the board
 +
 
 +
    #sudo reboot
 +
 
 +
ASIX8877 USB-LAN - https://www.olimex.com/Products/OLinuXino/A13/USB-ETHERNET-AX88772B/
 +
 
 +
WEB camera A4TECH
 +
 
 +
MOD-WIFI-RTL8188 - https://www.olimex.com/Products/Modules/Ethernet/MOD-WIFI-RTL8188/ instructions on how to enable it might be found here: [[How_to_configure_MOD-RTL8188_on_official_OLinuXino_Debian_releases]]
 +
 
 +
USB_OTG - low/full/high USB host
 +
 
 +
USB_HOST_up - low/full/high USB host
 +
 
 +
USB_HOST_down - low/full/high USB host
 +
 
 +
mico_SD_card
 +
 
 +
I2C2(100KHz) - /dev/i2c-2
 +
 
 +
I2C1(100KHz) - /dev/i2c-1
 +
 
 +
UART3 - /dev/ttyS1
 +
 
 +
'''[https://drive.google.com/file/d/0B-bAEPML8fwlYnUwdnpkUllVNFU/edit?usp=sharing A13 Debian 4GB SD-card image armel (softfloat) with: MONO complete]'''
 +
*Linux Kernel 3.4.67+
 +
*XFCE4 desktop environment
 +
*Mplayer CLI
 +
*GCC 4.6
 +
*iceweasel WEB browser
 +
*LCD and touchscreen support
 +
*GPIO
 +
*I2C
 +
*SPI
 +
*USB WIFI RTL8188CU, Ethernet AX88772B
 +
*Audio
 +
*apache2
 +
*dpkg
 +
*git
 +
*i2c-tools
 +
*perl
 +
*vlc
 +
*xorg
 +
*Scratch
 +
*GCC
 +
*Python 2.7.3
 +
*PyA13 python module with GPIO,I2C,SPI support
 +
*OpenCV
 +
*mono-complete
 +
*Default Login: '''root/olimex'''
 +
 
 +
<br>
 +
 
 +
=== Android ===
 +
 
 +
====Android for NAND====
 +
<br>
 +
 
 +
There are different images depending on the screen output settings. Also there are different images depending on the WIFI module placed. Latest hardware revisions use MOD-WIFI-RTL8188ETV and an updated image.
 +
 
 +
'''
 +
'''A13 Android NAND images with LCD 4.3" 480x272 and touchscreen (torrents):'''
 +
 +
[https://ftp.olimex.com/Allwinner_Images/A13-OLinuXino/4.%D0%B0ndroid_images/nand/A13_android_8G_NAND_LCD_480x272_EN_fifth_release.img A13-OLinuXino Android for NAND memory with video settings for 480x272 display output + MOD-WIFI-RTL8188ETV module]
 +
 
 +
*Android_version - 4.0.3
 +
*Baseband version - 1.2
 +
*Kernel version 3.0.8+
 +
*MOD-WIFI-RTL8188ETV wifi module
 +
*LCD 4.3" 480x272 pixels with backlight
 +
*Touchscreen support
 +
 
 +
 
 +
[[Media:A13_android_NAND_LCD_480x272_EN_first_release.torrent‎‎|A13-OLinuXino Android for NAND memory with video settings for 480x272 display output + MOD-WIFI-RTL8188 module]]
 +
 
 +
'''
 +
*Android_version - 4.0.3
 +
*Baseband version - 1.2
 +
*Kernel version 3.0.8+
 +
*MOD-WIFI-RTL8188 wifi module
 +
*LCD 4.3" 480x272 pixels with backlight
 +
*Touchscreen support
 +
 
 +
 
 +
'''
 +
'''A13 Android NAND images with LCD 7" 800x480 and touchscreen support (torrents):'''
 +
 
 +
[https://ftp.olimex.com/Allwinner_Images/A13-OLinuXino/4.%D0%B0ndroid_images/nand/A13_android_8G_NAND_LCD_800x480_EN_fifh_release.img A13-OLinuXino Android for NAND memory with video settings for LCD 7" 800x480 and touchscreen]
 +
'''
 +
 
 +
*Android_version - 4.0.3
 +
*Baseband version - 1.2
 +
*Kernel version 3.0.8+
 +
*MOD-WIFI-RTL8188-ETV wifi module
 +
*LCD 7" 800x480 pixels with backlight
 +
*touchscreen support
 +
 
 +
 
 +
[[Media:A13_android_8G_NAND_LCD_800x480_EN_third_release.torrent|A13-OLinuXino Android for NAND memory with video settings for LCD 7" 800x480 and touchscreen]]
 +
'''
 +
 
 +
*Android_version - 4.0.3
 +
*Baseband version - 1.2
 +
*Kernel version 3.0.8+
 +
*MOD-WIFI-RTL8188 wifi module
 +
*LCD 7" 800x480 pixels with backlight
 +
*Touchscreen support
 +
 
 +
 
 +
'''
 +
 
 +
'''A13 Android NAND images with LCD 10" 1024x600 and touchscreen support:'''
 +
 
 +
[https://ftp.olimex.com/Allwinner_Images/A13-OLinuXino/4.%D0%B0ndroid_images/nand/A13_android_8G_NAND_LCD_1024x600_EN_fifth_release.img A13-OLinuXino Android for NAND memory with video settings for LCD 10" 1024x600 and touchscreen]
 +
 
 +
'''
 +
 
 +
*Android_version - 4.0.3
 +
*Baseband version - 1.2
 +
*Kernel version 3.0.8+
 +
*MOD-WIFI-RTL8188-ETV wifi module
 +
*LCD 10" 1024x600 pixels with backlight
 +
*Touchscreen support
 +
 
 +
 
 +
'''A13 Android NAND image with VGA 800x600 support, torrents:'''
  
Schematics and board designs can be found here
+
[https://ftp.olimex.com/Allwinner_Images/A13-OLinuXino/4.%D0%B0ndroid_images/nand/A13_android_8G_NAND_VGA_800x600_EN_fifth_release.img A13-OLinuXino Android for NAND memory with VGA 800x600 support]
 +
'''
 +
*Android_version - 4.0.3
 +
*Baseband version - 1.2
 +
*Kernel version 3.0.8+
 +
*MOD-WIFI-RTL8188ETV wifi module
 +
*VGA 800x600 pixels
  
[https://github.com/OLIMEX/OLINUXINO/tree/master/HARDWARE Olimex Hardware]
 
  
Designs were created with Eagle
+
[[Media:A13_android_8G_NAND_VGA_800x600_EN_third_release.torrent‎‎|A13-OLinuXino Android for NAND memory with VGA 800x600 support]]
 +
'''
 +
*Android_version - 4.0.3
 +
*Baseband version - 1.2
 +
*Kernel version 3.0.8+
 +
*MOD-WIFI-RTL8188 wifi module
 +
*VGA 800x600 pixels
  
A limited functionality freeware version of Eagle can be downloaded here
 
  
[http://www.cadsoftusa.com/download-eagle/freeware/?language=en Eagle Freeware]
+
----
  
There is very limited information about the A13 processor. The only detailed data found is an A10 datasheet which has some errors in it apparently. As this is the best source of low level information it is linked here
+
====Android for microSD card====
 +
<br>
  
[http://dl.linux-sunxi.org/A10/ A10 datasheet]
+
'''Torrent of Android release 3 with LCD support for microSD card (recommended):  
  
==Software==
+
[[Media:A13_android_sd_800x480_USB_OTG_8G_third_release.torrent‎‎|A13-OLinuXino A13 Android for microSD card with video support for 800x480 LCD, release 3]]
  
=== Bare Metal programming - no OS ===
+
*Android_version - 4.0.3
 +
*Baseband version - 1.2
 +
*Kernel version 3.0.8+
 +
*Only LCD support - 800x480 pixels
  
Using the JTAG port on the A13 board and eclipse it is possible to program and debug code written directly on the chip without an OS.<br />
 
The advantage is no kernel overhead and tighter control of the CPU operation.
 
  
Due to the lack of documentation from Allwinner the chip manufacturer nobody has yet been able to program directly on the chip.
+
'''Older (not recommended) releases:'''
  
If anyone is successful or gathers more information on this please post on the forum and the wiki will be updated.
+
Torrent of Android release 2 with LCD support for microSD card (not recommended, the USB OTG does not work properly due to fex error): [[Media:A13_android_sd_800x480_second_release.torrent‎|A13-OLinuXino A13 Android for microSD card with video support for 800x480 LCD, release 2]]
  
=== Using an operating system - Nand flash ===
+
<br>
  
The Wifi version of the A13 board comes preprogrammed with android, which is held in the Nand flash.
+
==HOWTOs==
  
The image in the Nand flash can be updated using the following link
+
===General===
  
[http://linux-sunxi.org/LiveSuit LiveSuit for loading images] to the NAND flash; to activate A13 bootloader do as follows: run Livesuit, disconnect the power supply and USB cable, then press HOME button, apply power supply, attach USB cable and release the button, Livesuit will detect the bootloader and will ask which file to program to the NAND flash.
+
'''How to write the Debain image to a microSD card?'''
  
 +
To write a Linux image to an SD card under Windows we use Win32 Disk Imager):
  
Prebuilt images that can be programmed into the Nand flash can be found here.
+
*Download Win32 Disk Imager [http://sourceforge.net/projects/win32diskimager/ Win32 Disk Imager]
 +
*Insert card
 +
*Start program
 +
*Select file
 +
*Click "write"
  
[https://docs.google.com/open?id=0B-bAEPML8fwlR3hSS0R5aHpoVmM Andoroid 4.0.3 NAND flash prebuild image for VGA 800x600 resolution (default shipped with A13-OLinuXino-WIFI)]
 
  
[https://docs.google.com/open?id=0B-bAEPML8fwleXBMellGdWJ3RUk Andoroid 4.0.3 NAND flash prebuild image for LCD 800x480 resolution ]
+
To write a Linux image to an SD card under Linux:
  
=== Using an operating system - SD card ===
+
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:
  
==== Prebuilt images ====
+
* # dd bs=4M oflag=sync if=debian_2g.img of=/dev/sdX
 +
or
 +
* # cp debian_2g.img /dev/sdX
  
Some prebuilt images have been created, follow the link below for details.
 
  
[[Prebuilt SD card images running debian]]
+
where X is the uSD card.
  
 +
'''How to change VGA and LCD resolutions under Debian?'''
  
==== Build your own kernel and image onto SD card ====
+
The default SD card setup is made with settings for 800x600 VGA video output. If you want to change to some other LCD or VGA resolution then you have to start change_display.sh script file in /root directory.
  
Some developers want more control over the kernel and modules that are included. The link below shows directions to build your own kernel and image it onto an SD card.
+
Type:
 +
 
 +
    ./change_display* (press 'TAB' to auto-complete) 
 +
or
 +
    ./change_display_A13.sh
  
[[Build Bootable SD Card with Debian]] Step by step instructions how to make SD card image with above Kernel and U-boot
+
and press "Enter". 
  
====Script files====
+
Then choose the resolution and the interface(LCD 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.
'''Script file'''
 
  
The script.bin is a text file with very important configuration parameters like port GPIO assignments, DDR memory parameters, Video resolution etc, by changing these parameters in the script.bin you can configure your Linux without need to re-compile your kernel again and again this is smart way Allwinner provides for tweaking A13 Linux Kernel
+
The supported resolutions are:
  
'''fex'''
+
'''For LCD:'''
  
The fex tool will convert a script.bin file to a text file and back again.
+
*1. 4.3" (480x272)
 +
*2. 7" (800x480)
 +
*3. 10" (1024x600)
 +
<br>
 +
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 might need to use a mouse to calibrate the display initially. It might be impossible to calibrate it via touching the display.
  
This allows the easy modification of the settings that are in the script.bin file
+
'''For VGA:'''
 +
<br>
 +
*1. 800x600
 +
*2. 1024x768
 +
<br>
  
'''Tools and script files'''
+
===Linux related===
 +
'''How to build latest official Debian release'''
  
[https://docs.google.com/open?id=0B-bAEPML8fwlNElERXRUZURTTUU A13 script bin and fex tool]  
+
The latest official instructions might be found here:
 +
[https://github.com/OLIMEX/OLINUXINO/tree/master/SOFTWARE/A13/A13-build building the latest official Debian release, at Olimex GitHub]
  
The directory A13_script_files contains:
+
There are a number of unofficial guides to building the Debian, among them:
  
* script.bin - the default script with VGA800x600settings
+
[https://github.com/OLIMEX/OLINUXINO/blob/master/SOFTWARE/A13/olinuxino-debian.pdf How to build Debian for A13-OLinuXino-WIFI by Marcin Twardak]
* fex2bin_bin_fex_tools.tar.gz - tools fex2bin and bin2fex for converting the *.bin script file to *.fex(text file)
 
* script_GPIO_VGA - script with VGA800x600settings
 
* script_GPIO_LCD_800x480 - script with LCD800x480settings
 
  
=== Changing A13-OLinuxino settings to VGA800x600 or LCD800x480 ===
+
[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.
  
The default SD card setup is made with settings for VGA 800x600.
+
'''How to edit my MAC address?'''
If you want to switch between VGA 800x600 and LCD800x480 mode then you have to replace the existing script.bin file from the first SD card partitition (note that this partition is FAT - so you can replace the file under Windows or Linux) with the script.bin file from script_GPIO_VGA directory (if you want to change to VGA800x600 mode) or from script_GPIO_LCD_800x480 directory (if you want to change to LCD800x600 mode).
 
  
=== Establish WIFI connection ===
+
However, it is very easy to change MAC under Debian.
 +
 +
All you have to do is:
 +
 +
1. turn off the network interface (it is off by default, can be turned off by “ifdown eth0”)
 +
2. open /etc/network/interfaces with a text editor (for instance “nano /etc/network/interfaces”)
 +
3. add the following line under eth0 definitions: “hwaddress ether 00:11:22:33:44:55”, where 00:11:22:33:44:55 is the desired MAC address.
 +
4. save and turn on the network interface (“ifup eth0”)
 
   
 
   
plug in [https://www.olimex.com/Products/Modules/RF/MOD-WIFI-RTL8188/ MOD-WIFI-RTL8188] if the board is not A13-OLinuXino-WIFI
+
You can think of own way implementing own MAC address (for instance storing a consecutive number in the small EEPROM and then loading it).
  
type
+
'''How to enable WIFI?'''
ifconfig -a
 
  
lo        Link encap:Local Loopback
+
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.
          inet addr:127.0.0.1  Mask:255.0.0.0
 
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
 
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
 
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
 
          collisions:0 txqueuelen:0
 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
 
  
tunl0    Link encap:IPIP Tunnel  HWaddr
+
You can enable it by following these two steps:
          NOARP  MTU:1480  Metric:1
 
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
 
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
 
          collisions:0 txqueuelen:0
 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
 
  
wlan2    Link encap:Ethernet  HWaddr 48:02:2a:eb:21:1c
+
1. To check under what name the LAN is associated write "ifconfig –a"
          inet addr:192.168.0.229  Bcast:192.168.0.255  Mask:255.255.255.0
 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
 
          RX packets:166 errors:0 dropped:726 overruns:0 frame:0
 
          TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
 
          collisions:0 txqueuelen:1000
 
          RX bytes:31361 (30.6 KiB)  TX bytes:1248 (1.2 KiB)
 
  
and look at your wlan number. In this case we have wlan2
+
2. If, for example, it is under eth0 name, then write: "dhclient eth0"
  
open the file /etc/network/interfaces- for example using vi tool
+
This should enable the Ethernet and then SSH would also be available.
  
vi /etc/network/interfaces
+
'''How to enable Ethernet?'''
  
and change
+
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.
  
auto wlan2
+
You can enable it by following these two steps:
  
iface wlan2 inet dhcp
+
1. To check under what name the LAN is associated write "ifconfig –a"
  
wpa-ssid YourSSIDname
+
2. If, for example, it is under eth0 name, then write: "dhclient eth0"
  
wpa-psk YourWPAkey
+
This should enable the Ethernet and then SSH would also be available.
  
reboot A13-OLinuXino board
+
===Android related===
 +
'''How to compile new Android image?'''
  
Chek your connection
+
Good guide shared by Akshay Mathur might be found here: [https://github.com/OLIMEX/OLINUXINO/tree/master/SOFTWARE/A13/Android-JellyBean pdf instructions available at GitHub]
  
ifconfig -a
+
'''How to make code to run on power up?'''
  
if everything is ok you should see something as:
+
You would need an application that works in kiosk mode. There is a lot of information available online on how to write an application capable of autostart.
  
wlan1    Link encap:Ethernet  HWaddr 48:02:2a:eb:21:1c
+
'''How to access GPIOs?'''
          inet addr:192.168.0.229  Bcast:192.168.0.255  Mask:255.255.255.0
 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
 
          RX packets:166 errors:0 dropped:726 overruns:0 frame:0
 
          TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
 
          collisions:0 txqueuelen:1000
 
          RX bytes:31361 (30.6 KiB)  TX bytes:1248 (1.2 KiB)
 
  
 +
There is an application we wrote to demonstrate how this can be done under Android. Please check the following two links:
  
=== Establish ethernet connection using USB-ETHERNET adapter ===
+
[http://www.youtube.com/watch?v=fBydZn8FylE YouTube video of relay control via MOD-IO under Android]
  
[https://www.olimex.com/Products/OLinuXino/A13/USB-ETHERNET-AX88772B/ recommended supported adapter USB-ETHERNET-AX88772B]
+
[https://github.com/OLIMEX/OLINUXINO/tree/master/SOFTWARE/A13/ANDROID-MOD-IO Source code of the above example]
  
plug in USB-ETHERNET-AX88772B adapter
+
'''How to add PWM support?'''
  
type
+
There is a separate article on the subject here: [[how to add pwm]]
  
ifconfig -a
+
===Python===
  
you should see something like this
+
The Debian Linux Python package for A13-OLinuXino is called pyA13. It is installed in the default Debian image. More information and examples on how it can be used might be found here:
 +
 
 +
[https://pypi.python.org/pypi/pyA13 Link to pyA13 package at python.org]
 +
 
 +
===Scratch===
 +
 
 +
There are a number of SCRATCH resources we have published. The following might be of interested for you if you are interested in SCRATCH or OpenCV:
 +
 
 +
[http://www.youtube.com/watch?v=Pyidx-zOsm4 YouTube video of A13-OLinuXino running SCRATCH + OPENCV interractive project with web camera]
 +
 
 +
[http://www.youtube.com/watch?v=DzmvqlQodac YouTube video of A13-OLinuXino-WIFI + SCRATCH animation of GPIO-2 connector with buttons and LEDs]
 +
 
 +
[https://github.com/OLIMEX/OLINUXINO/tree/master/SOFTWARE/A13 source code and other scratch-related project available at Github]
 +
 
 +
===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 a 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
 +
 
 +
==Hardware==
  
eth1      Link encap:Ethernet  HWaddr 00:80:80:9a:4a:63
+
[https://github.com/OLIMEX/OLINUXINO/tree/master/HARDWARE/A13-OLinuXino A13-OLinuXino schematic in PDF format and Eagle CAD files]
          inet addr:192.168.0.113  Bcast:192.168.0.255  Mask:255.255.255.0
 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
 
          RX packets:58 errors:0 dropped:0 overruns:0 frame:0
 
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
 
          collisions:0 txqueuelen:1000
 
          RX bytes:7852 (7.6 KiB)  TX bytes:510 (510.0 B)
 
  
lo        Link encap:Local Loopback
+
[https://github.com/OLIMEX/OLINUXINO/tree/master/HARDWARE/A13-PDFs A13 datasheet and user manual PDFs]
          inet addr:127.0.0.1  Mask:255.0.0.0
 
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
 
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
 
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
 
          collisions:0 txqueuelen:0
 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
 
  
tunl0    Link encap:IPIP Tunnel  HWaddr
+
[http://linux-sunxi.org/A13_Register_guide A13 Registers Guide]
          NOARP  MTU:1480  Metric:1
 
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
 
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
 
          collisions:0 txqueuelen:0
 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
 
  
look at your eth number. In this case we have eth1
+
GPIOs
  
open the file /etc/network/interfaces- for example using vi tool
+
UEXT
  
vi /etc/network/interfaces
+
LCD
  
and change the following rows
+
RTC
  
auto eth1
+
[[Serial connection to A13]] description of how to connect a computer to the A13 board over serial cable.
  
iface eth1 inet dhcp
+
===Power supply===
  
where eth1 is the interface number
+
The A13-OLinuXino can be partially powered over Micro USB, but to power all peripherals, a 6+ watt DC power supply between 6 and 16 volts can be used.  The connector is a positive-center 2.5mm barrel plug.  There is also an on-board connector for a Li-PO battery.
 +
'''Important note: A13-OLinuXino-MICRO works with +5V only! If you apply more than 5V you will damage the board.'''
  
reboot A13-OLinuXino board
+
==Software==
  
or type ifup eth1
+
===Linux Commands===
  
Check your connection
+
[[Linux-Commands]] Brief Linux Command reference
  
ifconfig -a
+
[http://linux-sunxi.org/Main_Page A generic wiki for the Allwinner devices might be found here. It contains some great detailed info]
 +
<br>
  
if everything is ok you should see something as:
+
=== Bare Metal programming - no OS ===
  
eth1      Link encap:Ethernet  HWaddr 00:80:80:9a:4a:63
+
It is possible to program and debug code written directly on the chip without an OS such as linux or android.<br />
          inet addr:192.168.0.113  Bcast:192.168.0.255  Mask:255.255.255.0
+
The advantage is no kernel overhead and tighter control of the CPU operation.
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
 
          RX packets:725 errors:0 dropped:0 overruns:0 frame:0
 
          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
 
          collisions:0 txqueuelen:1000
 
          RX bytes:77056 (75.2 KiB)  TX bytes:1686 (1.6 KiB)
 
  
 +
[[Bare Metal programming A13]]
  
 +
=== Using an operating system - Nand flash ===
  
=== GPIO ===
+
The Wifi version of the A13 board comes preprogrammed with android, which is held in the Nand flash.
  
 +
The image in the Nand flash can be updated using the tools found at the following links:
  
'''GPIO changing'''
+
[https://docs.google.com/file/d/0B7WHuNCASY8cWlZ2djh4X0QtV0U/edit?usp=sharing LiveSuit for Windows]
  
type lsmod
+
[http://linux-sunxi.org/LiveSuit LiveSuit for loading images]
  
if sun4i-gpio is present - OK
+
to the NAND flash; to activate A13 bootloader do as follows: run Livesuit, disconnect the power supply and USB cable, then press HOME button, apply power supply, attach USB cable and release the button, Livesuit will detect the bootloader and will ask which file to program to the NAND flash.
  
unless type modprobe sun4i-gpio
+
Prebuilt images that can be programmed into the Nand flash can be found here.
  
go to /sys/devices/virtual/misc/sun4i-gpio/pins and type ls
+
=== Using an operating system - SD card ===
 +
The A13 board can boot from an SD card. Just plug it in an imaged uSD card and connect power.
  
list of supported pins will be shown
+
Note: The SD card can easily be corrupted if power is removed while the system is booting or writing to system files.
 +
To avoid this do not remove power while it is booting and shut the system down properly before disconnecting power.
  
example for port reading:
+
==== Prebuilt images ====
cat pe4 read PortE4
 
the result should be
 
0 or 1
 
example for port writing:
 
echo 1 > pg9 - turn on LED
 
  
'''Changing A13 GPIO direction'''
+
Some prebuilt images have been created, follow the link below for details.
  
extract  fex2bin_bin2fex_tools on linux machine
+
[[Prebuilt SD card images running debian]]
  
sudo su
+
==== Build your own kernel and image onto SD card ====
  
enter password
+
Some developers want more control over the kernel and modules that are included. The link below shows directions to build your own kernel and image it onto an SD card.
  
cd fex2bin_bin2fex_tools directory
+
[[Build Bootable SD Card with Debian]] Step by step instructions how to make SD card image with above Kernel and U-boot
  
 +
====Setup and configure the installed debian image====
  
mount /dev/sdx1 /mnt/sd - mount first partitition on SD card
+
There are several settings that can be made for a particular hardware configuration in the script file.
  
./bin2fex /mnt/sd/script.bin > /mnt/sd/script_test.fex - convert bin file to fex
+
The following link explains the script file as well as wifi or ethernet setup and GPIO settings
  
gedit /mnt/sd/script_test.fex
+
[[Configuration of hardware in the debian image]]
  
GPIOs are defined in the end.
+
====Installing UsbVideoClass(UVC) on A13-OLinuXino board====
  
where
+
To work with USB Video Cameras you have to enable the UVC support in the kernel. The link below explains how to do it.
  
Pxx<mode><pull><drive><data>
+
[[UVC support]]
mode 0-7, 0=input, 1=ouput, 2-7 I/O function
 
pull 0=none, 1=up, 2=down
 
drive 0-3, I/O drive level
 
data - data output - logical 0 or 1
 
  
for example:
+
====Setup VLC player for video streaming on A13-OLinuXino board====
if you want to change GPIO direction then change first parameter after port name:
 
gpio_pin_8 = port:PE08<0><default><default><default> make PE8 input
 
gpio_pin_8 = port:PE08<1><default><default><default> make PE8 output
 
  
save and exit
+
To setup video streaming you should first have installed UVC support so you can connect USB cameras to A13-OLinuXino.
  
./fex2bin /mnt/sd/script_test.fex > /mnt/sd/script.bin - convert fex to bin
+
[[VLC streaming]]
  
 
=== Creating a program to run on the A13-OlinuXino board ===
 
=== Creating a program to run on the A13-OlinuXino board ===
Line 277: Line 542:
 
[[Programming for A13 in debian]] Step by step instructions to make your first hello world program run on the A13 board running debian.
 
[[Programming for A13 in debian]] Step by step instructions to make your first hello world program run on the A13 board running debian.
  
=== Software Links ===
+
=== Software links ===
  
  
[http://linux-sunxi.org/Linux Linux Sunxi] to build latest Kernel yourself
+
[http://linux-sunxi.org/Sunxi-tools Tools to hack A13-OLinuXino]
  
[http://linux-sunxi.org/U-boot U-boot] to build community U-boot
+
[http://olimex.wordpress.com/2012/11/23/running-debian-with-xfce4-on-a13-olinuxino/ Installing Xfce4 graphical interface on Debian] How to install XFCE4 on A13-OLinuXino
  
[http://linux-sunxi.org/Sunxi-tools Tools to hack A13-OLinuXino]
+
=== A13-SDK Android 4.0.3 ICS ===
  
[http://olimex.wordpress.com/2012/10/12/building-bootable-sd-card-with-debian-linux-image-for-a13-olinuxino/ Building bootable Debian SD card for A13-OLinuXino] Original step by step instructions how to make SD card image with above Kernel and U-boot
+
The official Allwinner repository contains all official files, including the files required to build Android ACS 4.0.3 NAND image for A13-OLinuXino-WIFI.
  
[https://www.olimex.com/forum/index.php?topic=518.0 Forum post ] with yet another more up to date explanation how to build SD card
+
[https://github.com/allwinner-dev-team Allwinner's official GitHub]
  
[http://olimex.wordpress.com/2012/11/23/running-debian-with-xfce4-on-a13-olinuxino/ Installing Xfce4 graphical interface on Debian] How to install XFCE4 on A13-OLinuXino
+
=== A13-SDK Android 4.1 JB ===
  
 +
This is version 1.5 of A13-SDK which builds Android 4.1 Jelly Beans image. It works slower than 4.0.3 and we personally do not see any advantage to use 4.1 vs 4.0.3
  
 +
[http://emicrotec.at/public/ Andreas Auer kindly offered to host this 4GB image]
  
 
== Projects ==
 
== Projects ==
 +
Projects people from the olinuxino community are working on or have finished and how they did it.
 +
 +
'''LINUX:'''<br>
 +
[[Build Bootable SD Card with Debian]] Run Debian and u-boot, Step by step instructions how to make SD card image.<br>
 +
[[Prebuilt SD card images running debian]]
 +
 +
[http://olimex.wordpress.com/2014/03/06/bootling-linux-on-a13-for-less-than-1-second/ Booting Linux for less than 1 second] optimization made by Miroslav Bendik.
 +
 +
[http://olimex.wordpress.com/2012/10/23/a13-olinuxino-playing-with-gpios/ Change GPIOs using scripts in linux]
 +
 +
[https://www.olimex.com/forum/index.php?topic=436.msg4066#msg4066 A13 OLinuXino fast GPIO with /dev/mem now achieve up to 2 Mhz toggle]
 +
 +
[https://www.olimex.com/forum/index.php?topic=899.0 A13 kernel module for direct support of UEXT MOD-IO board, adding ADC, relays etc, cool project can be used as reference how to make your own kernel modules]
 +
 +
[https://docs.google.com/open?id=0B7WHuNCASY8cWnRrQ0tGVFMybFk Instructions how to run MOD-BT with A13-OLinuXino]
 +
 +
[https://github.com/asfluido/olinuxino/ Customer project of A13-OLinuXino communication via SPI with MOD-MRF89-868]
  
ANDROID PROJECTS:
+
[http://olimex.wordpress.com/2013/04/18/a13-olinuxino-wifi-and-opencv-face-detection-project/ A13-Olinuxino-WIFI and opencv face detection]
  
 +
[http://olimex.wordpress.com/2013/04/02/scratch-control-for-mod-io/ Controlling Relays, Switching ON/OFF of 220V appliances and home automation]
 +
 +
[http://olimex.wordpress.com/2013/03/28/make-door-security-logger-with-a13-olinuxino-wifi-opencv/ Door security logger, image capture]
 +
 +
[http://olimex.wordpress.com/2013/03/08/gps-logger-with-google-maps-viewer-made-with-a13-olinuxino-and-mod-gps/ GPS logger with google maps viewer, MOD-GPS module on UEXT]
 +
 +
[http://olimex.wordpress.com/2013/02/25/a13-olinuxino-web-server-with-mod-rgb-controlling-rgb-led-stripe-over-internet/ Web server with MOD-RGB controlling RGB LED strip]
 +
 +
'''ANDROID:'''<br>
 
[http://olimex.wordpress.com/2012/10/24/a13-olinuxino-project-control-relays-and-read-adcs-and-ios-with-android/ Interface MOD-IO board with I2C under Android ]
 
[http://olimex.wordpress.com/2012/10/24/a13-olinuxino-project-control-relays-and-read-adcs-and-ios-with-android/ Interface MOD-IO board with I2C under Android ]
  
LINUX PROJECTS:
+
[http://olimex.wordpress.com/2013/03/13/mame4droid-is-running-on-a13-olinuxino/ Run old games on android mame4droid]
  
[http://olimex.wordpress.com/2012/10/23/a13-olinuxino-playing-with-gpios/ GPIOs ]
+
'''No OS'''<br>
 +
[[Bare Metal programming A13]] Programming directly for the chip without an OS
  
[https://docs.google.com/open?id=0B7WHuNCASY8cWnRrQ0tGVFMybFk Instructions how to run MOD-BT with A13-OLinuXino]
+
'''FreedomBox:'''<br>
 +
[https://wiki.debian.org/FreedomBox/UniLeipzigPractical FreedomBox/UniLeipzigPractical is the documentation of a freedom box related practical course at the AKSW Research Group at the University of Leipzig]
 +
 
 +
== List of Contributors ==
 +
 
 +
'''Henrik Nordstrom''' - a.k.a. hno, uboot for A13 development, A1X guru, Linux-Sunxi maintainer
 +
 
 +
'''Dimitar Gamishev''' - a.k.a. HEHOPMAJIEH, Linux kernel configuration for OLinuXino, Android images, LCD touchscreen
 +
 
 +
'''Alexandro Mery''' - a.k.a. mnemoc, Linux-Sunxi maintainer
 +
 
 +
'''Davide Fabbri''' - Linaro kernel and lubuntu image
 +
 
 +
'''Scott Anderson''' - A13 wiki maintainer
 +
 
 +
'''Jeffrey Wischkaemper''' - a.k.a. jwischka,  A13-OLinuXino Debian image with X
 +
 
 +
'''Maxime Ripard''' - ARM Linux patches
  
== FAQ ==
+
'''Jason Plum''' - Arch Linux support
Under construction
 
  
[[Category:A13]]
+
[[Main_Page]]

Latest revision as of 00:28, 29 November 2024

A13-OlinuXino-WIFI
A13-OlinuXino-MICRO


The A13 processor from Allwinner runs at 1GHz with a Mali400 GPU. It was designed for integration into tablets. Olimex has made several development board designs based around this chip. This wiki page contains information about hardware and software to help make use of these development boards.


The A13 based boards currently available are

  • A13-OLinuXino-WIFI - Recommended if your developing software for the A13 for the first time as its the only one with network connectivity.
  • A13-OLinuXino - This is the same as the WIFI version but without WIFI module and NAND flash. Note: Android requires NAND flash to run, so this board can't run Android.
  • A13-OLinuXino-MICRO - Similar to the A13-OlinuXino but with less extras
  • A13-SOM-512 - System-on-Module A13 board recommended for users with experience in Allwinner development. Allows developing custom extensions with only the peripherals needed.


Official Images from OLIMEX

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!

Please note that you might need different Debian Linux images for different boards with different hardware - you would need to inspect the DDR3 RAM memory and use the image suitable for your board. We use either HYNIX H5TQ2G83CFR, or SAMSUNG K4B2G0846Q.

Newest official Debian release (recommended):

Direct download for Debian release 11.3 suitable for boards with SAMSUNG K4B2G0846Q DDR3 RAM memory: A13 Debian Linux with kernel 3.4.90+, suitable for boards with SAMSUNG DDR3 RAM

Direct download Debian release 10 suitable for boards with HYNIX H5TQ2G83CFR DDR3 RAM memory: Debian A13 Linux with kernel 3.4.90+, suitable for HYNIX DDR3 RAM

Instructions and required files for preparing the Debian images: building Linux for A13-OLinuXino and A13-OLinuXino-WIFI

The images include the following:

  • Linux Kernel 3.4.90+
  • LXDE desktop environment
  • GCC 4.6
  • dpkg
  • git
  • i2c-tools
  • perl
  • xorg
  • Python 2.7
  • vlc
  • mplayer
  • smplayer
  • midori browser
  • usb-modeswitch
  • sshfs
  • wvdial
  • LCD and touchscreen support
  • GPIO
  • I2C
  • SPI
  • USB WIFI RTL8188CU, Ethernet AX88772B
  • Audio
  • PyA13 python module with GPIO,I2C,SPI support
  • Default Login: root/olimex


Note: the A13-OLinuXino-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

The file A13_debian_34_75_WIFI_RALINK_GCC_GPIO_X_I2C_100KHz_UVC_TS_FTDI_video_release_9.7z is an archive of A13_debian_34_75_WIFI_RALINK_GCC_GPIO_X_I2C_100KHz_UVC_TS_FTDI_video_release_9.7z file.

So in order to write the image on SD card you have to unzip A13_debian_34_75_WIFI_RALINK_GCC_GPIO_X_I2C_100KHz_UVC_TS_FTDI_video_release_9.7z file:

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 A13_debian_34_75_WIFI_RALINK_GCC_GPIO_X_I2C_100KHz_UVC_TS_FTDI_video_release_9.7z file in your directory and unzip it with

   #7za e A13_debian_34_75_WIFI_RALINK_GCC_GPIO_X_I2C_100KHz_UVC_TS_FTDI_video_release_9.7z

The output should be a new 4GB file named A13_debian_34_75_WIFI_RALINK_GCC_GPIO_X_I2C_100KHz_UVC_TS_FTDI_video_release_9.7z 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=A13_debian_34_75_WIFI_RALINK_GCC_GPIO_X_I2C_100KHz_UVC_TS_FTDI_video_release_9.7z 
of=/dev/sdX


The main tested onboard hardware modules are:

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

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

to make PB03 output

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

to make PB03 high level(3.3V)

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

to make PB03 low level(0V)

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

Full list with supported GPIOs is:

   gpio12_pg9  gpio1_pb3   gpio4_pe4  gpio7_pe7 
   gpio10_pe10  gpio13_pg10  gpio2_pb4   gpio5_pe5  gpio8_pe8 
   gpio11_pe11  gpio14_pg11  gpio3_pb10  gpio6_pe6  gpio9_pe9

note that:

gpio12_pg9(GPIO2/pin10) is connected to on board LED and it is multiplexed with UART3_TX and gpio13_pg10(GPIO2/pin8) is multiplexed with UART3_RX Therfore if you want to use these ports like GPIO then UART3_TX and UART3_RX will not be available.

LCD - 4.3"(480x272), 7"(800x480), 10"(1024x600)

VGA - 800x600, 1024x768

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

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:

   #su olimex

enter the olimex password:olimex

   #sudo ts_calibrate

calibrate the touch screen and reboot the board

   #sudo reboot

ASIX8877 USB-LAN - https://www.olimex.com/Products/OLinuXino/A13/USB-ETHERNET-AX88772B/

WEB camera A4TECH

MOD-WIFI-RTL8188 - https://www.olimex.com/Products/Modules/Ethernet/MOD-WIFI-RTL8188/ instructions on how to enable it might be found here: How_to_configure_MOD-RTL8188_on_official_OLinuXino_Debian_releases

USB_OTG - low/full/high USB host

USB_HOST_up - low/full/high USB host

USB_HOST_down - low/full/high USB host

mico_SD_card

I2C2(100KHz) - /dev/i2c-2

I2C1(100KHz) - /dev/i2c-1

UART3 - /dev/ttyS1

A13 Debian 4GB SD-card image armel (softfloat) with: MONO complete

  • Linux Kernel 3.4.67+
  • XFCE4 desktop environment
  • Mplayer CLI
  • GCC 4.6
  • iceweasel WEB browser
  • LCD and touchscreen support
  • GPIO
  • I2C
  • SPI
  • USB WIFI RTL8188CU, Ethernet AX88772B
  • Audio
  • apache2
  • dpkg
  • git
  • i2c-tools
  • perl
  • vlc
  • xorg
  • Scratch
  • GCC
  • Python 2.7.3
  • PyA13 python module with GPIO,I2C,SPI support
  • OpenCV
  • mono-complete
  • Default Login: root/olimex


Android

Android for NAND


There are different images depending on the screen output settings. Also there are different images depending on the WIFI module placed. Latest hardware revisions use MOD-WIFI-RTL8188ETV and an updated image.

A13 Android NAND images with LCD 4.3" 480x272 and touchscreen (torrents):

A13-OLinuXino Android for NAND memory with video settings for 480x272 display output + MOD-WIFI-RTL8188ETV module

  • Android_version - 4.0.3
  • Baseband version - 1.2
  • Kernel version 3.0.8+
  • MOD-WIFI-RTL8188ETV wifi module
  • LCD 4.3" 480x272 pixels with backlight
  • Touchscreen support


A13-OLinuXino Android for NAND memory with video settings for 480x272 display output + MOD-WIFI-RTL8188 module

  • Android_version - 4.0.3
  • Baseband version - 1.2
  • Kernel version 3.0.8+
  • MOD-WIFI-RTL8188 wifi module
  • LCD 4.3" 480x272 pixels with backlight
  • Touchscreen support


A13 Android NAND images with LCD 7" 800x480 and touchscreen support (torrents):

A13-OLinuXino Android for NAND memory with video settings for LCD 7" 800x480 and touchscreen

  • Android_version - 4.0.3
  • Baseband version - 1.2
  • Kernel version 3.0.8+
  • MOD-WIFI-RTL8188-ETV wifi module
  • LCD 7" 800x480 pixels with backlight
  • touchscreen support


A13-OLinuXino Android for NAND memory with video settings for LCD 7" 800x480 and touchscreen

  • Android_version - 4.0.3
  • Baseband version - 1.2
  • Kernel version 3.0.8+
  • MOD-WIFI-RTL8188 wifi module
  • LCD 7" 800x480 pixels with backlight
  • Touchscreen support


A13 Android NAND images with LCD 10" 1024x600 and touchscreen support:

A13-OLinuXino Android for NAND memory with video settings for LCD 10" 1024x600 and touchscreen

  • Android_version - 4.0.3
  • Baseband version - 1.2
  • Kernel version 3.0.8+
  • MOD-WIFI-RTL8188-ETV wifi module
  • LCD 10" 1024x600 pixels with backlight
  • Touchscreen support


A13 Android NAND image with VGA 800x600 support, torrents:

A13-OLinuXino Android for NAND memory with VGA 800x600 support

  • Android_version - 4.0.3
  • Baseband version - 1.2
  • Kernel version 3.0.8+
  • MOD-WIFI-RTL8188ETV wifi module
  • VGA 800x600 pixels


A13-OLinuXino Android for NAND memory with VGA 800x600 support

  • Android_version - 4.0.3
  • Baseband version - 1.2
  • Kernel version 3.0.8+
  • MOD-WIFI-RTL8188 wifi module
  • VGA 800x600 pixels



Android for microSD card


Torrent of Android release 3 with LCD support for microSD card (recommended):

A13-OLinuXino A13 Android for microSD card with video support for 800x480 LCD, release 3

  • Android_version - 4.0.3
  • Baseband version - 1.2
  • Kernel version 3.0.8+
  • Only LCD support - 800x480 pixels


Older (not recommended) releases:

Torrent of Android release 2 with LCD support for microSD card (not recommended, the USB OTG does not work properly due to fex error): A13-OLinuXino A13 Android for microSD card with video support for 800x480 LCD, release 2


HOWTOs

General

How to write the Debain image to a microSD card?

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 VGA and LCD resolutions under Debian?

The default SD card setup is made with settings for 800x600 VGA video output. If you want to change to some other LCD or VGA resolution then you have to start change_display.sh script file in /root directory.

Type:

   ./change_display* (press 'TAB' to auto-complete)  

or

   ./change_display_A13.sh

and press "Enter".

Then choose the resolution and the interface(LCD 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)


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 might need to use a mouse to calibrate the display initially. It might be impossible to calibrate it via touching the display.

For VGA:

  • 1. 800x600
  • 2. 1024x768


Linux related

How to build latest official Debian release

The latest official instructions might be found here: building the latest official Debian release, at Olimex GitHub

There are a number of unofficial guides to building the Debian, among them:

How to build Debian for A13-OLinuXino-WIFI by Marcin Twardak

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

How to edit my MAC address?

However, it is very easy to change MAC under Debian.

All you have to do is:

1. turn off the network interface (it is off by default, can be turned off by “ifdown eth0”) 2. open /etc/network/interfaces with a text editor (for instance “nano /etc/network/interfaces”) 3. add the following line under eth0 definitions: “hwaddress ether 00:11:22:33:44:55”, where 00:11:22:33:44:55 is the desired MAC address. 4. save and turn on the network interface (“ifup eth0”)

You can think of own way implementing own MAC address (for instance storing a consecutive number in the small EEPROM and then loading it).

How to enable WIFI?

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 enable Ethernet?

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 related

How to compile new Android image?

Good guide shared by Akshay Mathur might be found here: pdf instructions available at GitHub

How to make code to run on power up?

You would need an application that works in kiosk mode. There is a lot of information available online on how to write an application capable of autostart.

How to access GPIOs?

There is an application we wrote to demonstrate how this can be done under Android. Please check the following two links:

YouTube video of relay control via MOD-IO under Android

Source code of the above example

How to add PWM support?

There is a separate article on the subject here: how to add pwm

Python

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

Link to pyA13 package at python.org

Scratch

There are a number of SCRATCH resources we have published. The following might be of interested for you if you are interested in SCRATCH or OpenCV:

YouTube video of A13-OLinuXino running SCRATCH + OPENCV interractive project with web camera

YouTube video of A13-OLinuXino-WIFI + SCRATCH animation of GPIO-2 connector with buttons and LEDs

source code and other scratch-related project available at Github

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 a 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

Hardware

A13-OLinuXino schematic in PDF format and Eagle CAD files

A13 datasheet and user manual PDFs

A13 Registers Guide

GPIOs

UEXT

LCD

RTC

Serial connection to A13 description of how to connect a computer to the A13 board over serial cable.

Power supply

The A13-OLinuXino can be partially powered over Micro USB, but to power all peripherals, a 6+ watt DC power supply between 6 and 16 volts can be used. The connector is a positive-center 2.5mm barrel plug. There is also an on-board connector for a Li-PO battery. Important note: A13-OLinuXino-MICRO works with +5V only! If you apply more than 5V you will damage the board.

Software

Linux Commands

Linux-Commands Brief Linux Command reference

A generic wiki for the Allwinner devices might be found here. It contains some great detailed info

Bare Metal programming - no OS

It is possible to program and debug code written directly on the chip without an OS such as linux or android.
The advantage is no kernel overhead and tighter control of the CPU operation.

Bare Metal programming A13

Using an operating system - Nand flash

The Wifi version of the A13 board comes preprogrammed with android, which is held in the Nand flash.

The image in the Nand flash can be updated using the tools found at the following links:

LiveSuit for Windows

LiveSuit for loading images

to the NAND flash; to activate A13 bootloader do as follows: run Livesuit, disconnect the power supply and USB cable, then press HOME button, apply power supply, attach USB cable and release the button, Livesuit will detect the bootloader and will ask which file to program to the NAND flash.

Prebuilt images that can be programmed into the Nand flash can be found here.

Using an operating system - SD card

The A13 board can boot from an SD card. Just plug it in an imaged uSD card and connect power.

Note: The SD card can easily be corrupted if power is removed while the system is booting or writing to system files. To avoid this do not remove power while it is booting and shut the system down properly before disconnecting power.

Prebuilt images

Some prebuilt images have been created, follow the link below for details.

Prebuilt SD card images running debian

Build your own kernel and image onto SD card

Some developers want more control over the kernel and modules that are included. The link below shows directions to build your own kernel and image it onto an SD card.

Build Bootable SD Card with Debian Step by step instructions how to make SD card image with above Kernel and U-boot

Setup and configure the installed debian image

There are several settings that can be made for a particular hardware configuration in the script file.

The following link explains the script file as well as wifi or ethernet setup and GPIO settings

Configuration of hardware in the debian image

Installing UsbVideoClass(UVC) on A13-OLinuXino board

To work with USB Video Cameras you have to enable the UVC support in the kernel. The link below explains how to do it.

UVC support

Setup VLC player for video streaming on A13-OLinuXino board

To setup video streaming you should first have installed UVC support so you can connect USB cameras to A13-OLinuXino.

VLC streaming

Creating a program to run on the A13-OlinuXino board

Programming for A13 in debian Step by step instructions to make your first hello world program run on the A13 board running debian.

Software links

Tools to hack A13-OLinuXino

Installing Xfce4 graphical interface on Debian How to install XFCE4 on A13-OLinuXino

A13-SDK Android 4.0.3 ICS

The official Allwinner repository contains all official files, including the files required to build Android ACS 4.0.3 NAND image for A13-OLinuXino-WIFI.

Allwinner's official GitHub

A13-SDK Android 4.1 JB

This is version 1.5 of A13-SDK which builds Android 4.1 Jelly Beans image. It works slower than 4.0.3 and we personally do not see any advantage to use 4.1 vs 4.0.3

Andreas Auer kindly offered to host this 4GB image

Projects

Projects people from the olinuxino community are working on or have finished and how they did it.

LINUX:
Build Bootable SD Card with Debian Run Debian and u-boot, Step by step instructions how to make SD card image.
Prebuilt SD card images running debian

Booting Linux for less than 1 second optimization made by Miroslav Bendik.

Change GPIOs using scripts in linux

A13 OLinuXino fast GPIO with /dev/mem now achieve up to 2 Mhz toggle

A13 kernel module for direct support of UEXT MOD-IO board, adding ADC, relays etc, cool project can be used as reference how to make your own kernel modules

Instructions how to run MOD-BT with A13-OLinuXino

Customer project of A13-OLinuXino communication via SPI with MOD-MRF89-868

A13-Olinuxino-WIFI and opencv face detection

Controlling Relays, Switching ON/OFF of 220V appliances and home automation

Door security logger, image capture

GPS logger with google maps viewer, MOD-GPS module on UEXT

Web server with MOD-RGB controlling RGB LED strip

ANDROID:
Interface MOD-IO board with I2C under Android

Run old games on android mame4droid

No OS
Bare Metal programming A13 Programming directly for the chip without an OS

FreedomBox:
FreedomBox/UniLeipzigPractical is the documentation of a freedom box related practical course at the AKSW Research Group at the University of Leipzig

List of Contributors

Henrik Nordstrom - a.k.a. hno, uboot for A13 development, A1X guru, Linux-Sunxi maintainer

Dimitar Gamishev - a.k.a. HEHOPMAJIEH, Linux kernel configuration for OLinuXino, Android images, LCD touchscreen

Alexandro Mery - a.k.a. mnemoc, Linux-Sunxi maintainer

Davide Fabbri - Linaro kernel and lubuntu image

Scott Anderson - A13 wiki maintainer

Jeffrey Wischkaemper - a.k.a. jwischka, A13-OLinuXino Debian image with X

Maxime Ripard - ARM Linux patches

Jason Plum - Arch Linux support

Main_Page