Difference between revisions of "A13-OLinuXino"

(Software)
Line 1: Line 1:
 +
== DEBIAN SD CARD IMAGE ==
  
== Documents ==
+
[https://docs.google.com/open?id=0B-bAEPML8fwlU1NBQ015V2Naa2s A13 Debian Linux Image] Debian SD card image on A13-OLinuXino board without X, includes: Mplayer CLI, GCC
Under construction
+
 
 +
The default user/password are root/password
 +
 
 +
Extract it and write the image (A13_Micro_Debian_first_preliminary_release.img) on SD card
 +
 
 +
[https://docs.google.com/open?id=0B-bAEPML8fwlNElERXRUZURTTUU 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-Micro setings to VGA800x600 mode or to LCD800x480 mode: ==
 +
 
 +
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).
 +
 
 +
 
 +
== 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
 +
 
 +
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 ==
 +
 
 +
[https://www.olimex.com/Products/OLinuXino/A13/USB-ETHERNET-AX88772B/ 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><data>
 +
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
  
== Hardware ==
 
Under construction
 
  
 
== Software ==
 
== Software ==
  
[https://docs.google.com/open?id=0B-bAEPML8fwlU1NBQ015V2Naa2s A13 Debian Linux Image] Debian SD card image on A13-OLinuXino board without X, includes: Mplayer CLI, GCC
 
 
[https://docs.google.com/open?id=0B-bAEPML8fwlNElERXRUZURTTUU A13 script bin and fex tool]
 
  
 
[http://linux-sunxi.org/Linux Linux Sunxi] to build latest Kernel yourself
 
[http://linux-sunxi.org/Linux Linux Sunxi] to build latest Kernel yourself
Line 29: Line 237:
  
 
== Projects ==
 
== Projects ==
 
  
 
ANDROID PROJECTS:
 
ANDROID PROJECTS:

Revision as of 05:13, 6 December 2012

DEBIAN SD CARD IMAGE

A13 Debian Linux Image Debian SD card image on A13-OLinuXino board 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

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-Micro setings to VGA800x600 mode or to LCD800x480 mode:

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


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

Linux Sunxi to build latest Kernel yourself

U-boot to build community U-boot

Tools to hack A13-OLinuXino

Building bootable Debian SD card for A13-OLinuXino Step by Step instructions how to make SD card image with above Kernel and U-boot

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

FAQ

Under construction