Difference between revisions of "A13-OLinuXino"

(DEBIAN SD CARD IMAGES)
Line 1: Line 1:
== DEBIAN SD CARD IMAGES ==
+
==Hardware==
 +
 
 +
Schematics and board designs can be found here
 +
 
 +
[https://github.com/OLIMEX/OLINUXINO/tree/master/HARDWARE Olimex Hardware]
 +
 
 +
Designs were created with Eagle
 +
 
 +
A limited functionality freeware version of Eagle can be downloaded here
 +
 
 +
[http://www.cadsoftusa.com/download-eagle/freeware/?language=en Eagle Freeware]
 +
 
 +
==Software==
 +
=== DEBIAN SD CARD IMAGES ===
  
 
The A13 board can boot from the SD card. There are some ready made SD card images that are suitable. Some of these images can be found in this wiki section.
 
The A13 board can boot from the SD card. There are some ready made SD card images that are suitable. Some of these images can be found in this wiki section.
Line 5: Line 18:
 
Once a suitable SD card is imaged with these files, place it into the board then power the board on, it should boot.
 
Once a suitable SD card is imaged with these files, place it into the board then power the board on, it should boot.
  
=== Download Method===
+
==== Download Method====
 
These images can be downloaded using the following methods
 
These images can be downloaded using the following methods
  
Line 24: Line 37:
 
where X is the uSD card.
 
where X is the uSD card.
  
=== Images ===
+
==== Images ====
  
 
The following sections have images with various different configurations
 
The following sections have images with various different configurations
  
====Debian image====
+
=====Debian image=====
 
[https://docs.google.com/open?id=0B-bAEPML8fwlU1NBQ015V2Naa2s A13 Debian Linux Image]
 
[https://docs.google.com/open?id=0B-bAEPML8fwlU1NBQ015V2Naa2s A13 Debian Linux Image]
  
Line 39: Line 52:
 
Extract it and write the image (A13_Micro_Debian_first_preliminary_release.img) on SD card
 
Extract it and write the image (A13_Micro_Debian_first_preliminary_release.img) on SD card
  
====Debian with GUI (X)====
+
=====Debian with GUI (X)=====
 
[https://dl.dropbox.com/u/26179254/olinuxino_xfce.zip A13 Debian Image with X]
 
[https://dl.dropbox.com/u/26179254/olinuxino_xfce.zip A13 Debian Image with X]
  
Line 52: Line 65:
 
* custom (non-debug) kernel
 
* custom (non-debug) kernel
  
===Script files===
+
====Script files====
 
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 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
  
Line 67: Line 80:
 
'''script_GPIO_LCD_800x480''' - script with VGA800x480settings
 
'''script_GPIO_LCD_800x480''' - script with VGA800x480settings
  
== Changing A13-OLinuxino setings to VGA800x600 or LCD800x480 ==
+
=== Changing A13-OLinuxino settings to VGA800x600 or LCD800x480 ===
  
 
The default SD card setup is made with settings for VGA 800x600.
 
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 partitition 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 VGA800x600 mode).
+
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 VGA800x600 mode).
  
== Establish WIFI connection ==
+
=== Establish WIFI connection ===
 
   
 
   
 
plug in  [https://www.olimex.com/Products/Modules/RF/MOD-WIFI-RTL8188/ MOD-WIFI-RTL8188] if the board is not A13-OLinuXino-WIFI
 
plug in  [https://www.olimex.com/Products/Modules/RF/MOD-WIFI-RTL8188/ MOD-WIFI-RTL8188] if the board is not A13-OLinuXino-WIFI
Line 135: Line 148:
  
  
== Establish ethernet connection using USB-ETHERNET adapter ==
+
=== Establish ethernet connection using USB-ETHERNET adapter ===
  
 
[https://www.olimex.com/Products/OLinuXino/A13/USB-ETHERNET-AX88772B/ recommended supported adapter USB-ETHERNET-AX88772B]
 
[https://www.olimex.com/Products/OLinuXino/A13/USB-ETHERNET-AX88772B/ recommended supported adapter USB-ETHERNET-AX88772B]
Line 204: Line 217:
  
  
== GPIO ==
+
=== GPIO ===
  
  
Line 263: Line 276:
  
  
== Software ==
+
=== Software Links ===
  
  

Revision as of 06:51, 22 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

Software

DEBIAN SD CARD IMAGES

The A13 board can boot from the SD card. There are some ready made SD card images that are suitable. Some of these images can be found in this wiki section.

Once a suitable SD card is imaged with these files, place it into the board then power the board on, it should boot.

Download Method

These images can be downloaded using the following methods

Windows:


Linux:

  • dd to card

For example an image with the file name of "debian_2g.img" would be downloaded to the SD card connected to a linux machine using the following command

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

where X is the uSD card.

Images

The following sections have images with various different configurations

Debian image

A13 Debian Linux Image

Configuration

  • 2g SD card image
  • without X
  • includes Mplayer CLI, GCC
  • The default user/password are root/password

Extract it and write the image (A13_Micro_Debian_first_preliminary_release.img) on SD card

Debian with GUI (X)

A13 Debian Image with X

Configuration

  • 4g SD card image
  • wpa-supplicant (change /etc/network/interfaces to enter your ssid/key)
  • xfce4
  • tightvncserver (starts on boot)
  • various dev tools (python, gcc, etc)
  • sudo
  • 500mb swap file
  • custom (non-debug) kernel

Script files

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

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 VGA800x480settings

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


Software Links

Linux Sunxi to build latest Kernel yourself

U-boot to build community U-boot

Tools to hack A13-OLinuXino

Build Bootable SD Card with Debian

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

Forum post with yet another more up to date explanation how to build SD card

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

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

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.

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