Difference between revisions of "A13-OLinuXino"

(Software Links)
Line 279: Line 279:
 
=== Software Links ===
 
=== Software Links ===
  
 
[http://linux-sunxi.org/Linux Linux Sunxi] to build latest Kernel yourself
 
 
[http://linux-sunxi.org/U-boot U-boot] to build community U-boot
 
  
 
[http://linux-sunxi.org/Sunxi-tools Tools to hack A13-OLinuXino]
 
[http://linux-sunxi.org/Sunxi-tools Tools to hack A13-OLinuXino]
 
[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
 
 
[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
 
  
 
[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://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
 
 
  
 
== Projects ==
 
== Projects ==

Revision as of 18:20, 27 December 2012

Hardware

Schematics and board designs can be found here

Olimex Hardware

Designs were created with Eagle

A limited functionality freeware version of Eagle can be downloaded here

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

A10 datasheet

Software

Bare Metal programming - no OS

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

If anyone is successful or gathers more information on this please post on the forum and the wiki will be updated.

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 following link

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.

Andoroid 4.0.3 NAND flash prebuild image for VGA 800x600 resolution (default shipped with A13-OLinuXino-WIFI)

Andoroid 4.0.3 NAND flash prebuild image for LCD 800x480 resolution

Using an operating system - SD card

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

Script files

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

fex

The fex tool will convert a script.bin file to a text file and back again.

This allows the easy modification of the settings that are in the script.bin file

Tools and script files

A13 script bin and fex tool

The directory A13_script_files contains:

  • script.bin - the default script with VGA800x600settings
  • 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

The default SD card setup is made with settings for VGA 800x600. 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

plug in MOD-WIFI-RTL8188 if the board is not A13-OLinuXino-WIFI

type ifconfig -a

lo Link encap:Local Loopback

         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

         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

         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

open the file /etc/network/interfaces- for example using vi tool

vi /etc/network/interfaces

and change

auto wlan2

iface wlan2 inet dhcp

wpa-ssid YourSSIDname

wpa-psk YourWPAkey

reboot A13-OLinuXino board

Chek your connection

ifconfig -a

if everything is ok you should see something as:

wlan1 Link encap:Ethernet HWaddr 48:02:2a:eb:21:1c

         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)


Establish ethernet connection using USB-ETHERNET adapter

recommended supported adapter USB-ETHERNET-AX88772B

plug in USB-ETHERNET-AX88772B adapter

type

ifconfig -a

you should see something like this

eth1 Link encap:Ethernet HWaddr 00:80:80:9a:4a:63

         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

         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

         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

open the file /etc/network/interfaces- for example using vi tool

vi /etc/network/interfaces

and change the following rows

auto eth1

iface eth1 inet dhcp

where eth1 is the interface number

reboot A13-OLinuXino board

or type ifup eth1

Check your connection

ifconfig -a

if everything is ok you should see something as:

eth1 Link encap:Ethernet HWaddr 00:80:80:9a:4a:63

         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: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)


GPIO

GPIO changing

type lsmod

if sun4i-gpio is present - OK

unless type modprobe sun4i-gpio

go to /sys/devices/virtual/misc/sun4i-gpio/pins and type ls

list of supported pins will be shown

example for port reading: 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

extract fex2bin_bin2fex_tools on linux machine

sudo su

enter password

cd fex2bin_bin2fex_tools directory


mount /dev/sdx1 /mnt/sd - mount first partitition on SD card

./bin2fex /mnt/sd/script.bin > /mnt/sd/script_test.fex - convert bin file to fex

gedit /mnt/sd/script_test.fex

GPIOs are defined in the end.

where

Pxx<mode><pull><drive> 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: 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

./fex2bin /mnt/sd/script_test.fex > /mnt/sd/script.bin - convert fex to bin

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

Projects

ANDROID PROJECTS:

Interface MOD-IO board with I2C under Android

LINUX PROJECTS:

GPIOs

Instructions how to run MOD-BT with A13-OLinuXino

FAQ

Under construction