Difference between revisions of "What can I do with IGEP COM PROTON"

From IGEP - ISEE Wiki

Jump to: navigation, search
m
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
__NOTOC__
+
{{Table/IGEP Technology Devices
 
+
|Tech_Family={{#lst:Template:Links|IGEP_COM_PROTON_Tech_Family}}
{| cellspacing="0" cellpadding="5" border="1" align="center" width="100%" style="text-align: left;"
+
|Tech_ID={{#lst:Template:Links|IGEP_COM_PROTON_Tech_ID}}
|-
 
| bgcolor="#cccccc" |'''What can I do with IGEP COM PROTON'''
 
|-
 
| If you have '''successfully completed the [[{{#lst:Template:Links|IGEP_COM_PROTON_Community_MainPage}}|first chapter of this guide]]''', you can continue with this tutorial guide about IGEP COM PROTON.
 
|}
 
 
 
 
 
{{Navigation/IGEP Technology Guides
 
 
|Name={{#lst:Template:Links|IGEP_COM_PROTON_Name}}
 
|Name={{#lst:Template:Links|IGEP_COM_PROTON_Name}}
 
|Image={{#lst:Template:Links|IGEP_COM_PROTON_Image}}
 
|Image={{#lst:Template:Links|IGEP_COM_PROTON_Image}}
 
|ISEE_MainPage={{#lst:Template:Links|IGEP_COM_PROTON_ISEE_MainPage}}
 
|ISEE_MainPage={{#lst:Template:Links|IGEP_COM_PROTON_ISEE_MainPage}}
 
|ISEE_Hardware={{#lst:Template:Links|IGEP_COM_PROTON_ISEE_Hardware}}
 
|ISEE_Hardware={{#lst:Template:Links|IGEP_COM_PROTON_ISEE_Hardware}}
|Community_MainPage={{#lst:Template:Links|IGEP_COM_PROTON_Community_MainPage}}
 
|Community_Guides_1={{#lst:Template:Links|IGEP_COM_PROTON_Community_Guides_1}}
 
|Community_Guides_2={{#lst:Template:Links|IGEP_COM_PROTON_Community_Guides_2}}
 
 
}}
 
}}
  
  
{| cellspacing="0" cellpadding="5" border="1" align="center" style="text-align: left;"
+
= Overview =
|-
 
| bgcolor="#cccccc" colspan="3" | '''Overview'''
 
|-
 
| [[Image:{{#lst:Template:Links|IGEP_COM_PROTON_Image}}|250px|center|link={{#lst:Template:Links|IGEP_COM_PROTON_Community_MainPage}}]]
 
|-
 
|'''1) [[#Booting and setting up|Booting up IGEP COM PROTON]]'''
 
|-
 
|'''2) [[#Basic instructions|Basic instructions]]'''
 
|-
 
|'''3) [[#Send a file between a PC and IGEP COM PROTON|Send a file between a PC and IGEP COM PROTON]]'''
 
|-
 
|'''4) [[#Mount a MicroSD card|Mount a MicroSD card]]'''
 
|-
 
|}
 
 
 
 
 
=== Booting and setting up ===
 
----
 
 
 
{| cellspacing="0" cellpadding="5" border="1" align="center" width="100%" style="text-align: left;"
 
|-
 
| bgcolor="#cccccc" |'''Pre-installed software'''
 
|-
 
|By default, '''all brand new IGEP Processor Boards have a firmware installed''' on its flash memory.
 
 
 
That means that if you power up your board it will run a Linux distribution provided and installed by ISEE.
 
|}
 
 
 
 
 
This distribution consists on a '''minimal Linux-based distribution''' with a lite X Window System and GNOME Mobile based applications created with '''Poky Platform Builder'''.
 
 
 
In the previous chapter of this tutorial, we have booted IGEP COM PROTON with its pre-installed software.
 
 
 
Once the board has booted up, you can log in into IGEP COM PROTON via many interfaces. In the previous chapter of this tutorial we have used the USB Ethernet Gadget and the Wifi interface, but you can use many other interfaces when connecting IGEP COM PROTON to an IGEP Expansion Board.
 
 
 
'''Boot priority'''
 
 
 
In fact, IGEP COM PROTON can boot from many other devices (listed by priority):
 
 
 
# from USB
 
# from UART3
 
# from a MMC/MicroSD card
 
# from OneNAND memory
 
 
 
 
 
As we haven't set any other boot device rather than the oneNAND (the IGEP COM PROTON flash memory) the system boots from it.
 
 
 
 
 
But, as '''the MicroSD card has an upper priority than the flash''', if you plug a MicroSD card (with the right configuration on it) to the MicroSD card reader, IGEP COM PROTON will boot from it and won't boot from the flash memory.
 
 
 
 
 
Now, We are going to use this functionality to update your pre-installed software.
 
 
 
 
 
=== Basic instructions ===
 
----
 
 
 
{| cellspacing="0" cellpadding="5" border="1" align="center" width="100%" style="text-align: left;"
 
|-
 
| bgcolor="#cccccc" |'''Overview'''
 
|-
 
| Learn some Bash basic instructions in Linux (for newbies).
 
 
1) Create, edit, move and delete files
 
 
 
2) Run a simple script
 
|}
 
 
 
IGEP COM PROTON is '''compatible with many Linux distributions'''. In this tutorial we are using Poky Linux, which is the pre-installed software from ISEE.
 
 
 
In case you are not familiar with Bash instructions, here comes some basic instructions to help you startup with the board.
 
 
 
First of all, '''log in to IGEP COM PROTON''' with a console from your host PC (via serial port or via SSH), as shown previous sections in this article. Remember the default settings:
 
 
 
login: root
 
password: (none: press return)
 
 
 
Once you are logged in IGEP0030, run the following commands:
 
 
 
cd /
 
ls
 
 
 
You have moved to the root directory, that is "/".
 
The instruction "ls" lists all the existing files and directories in the current "path".
 
 
 
Now let's go to the directory /home/root/ with:
 
 
 
cd /home/root/
 
 
 
You can always check at which directory you are with the instruction:
 
 
 
pwd
 
 
 
Most instructions include a 'help' option that can be accessed by inserting the parameter --help. Check out the help page of 'echo' instruction, for example:
 
 
 
echo --help
 
 
 
You can try the instruction by yourself and type:
 
 
 
echo Hello
 
 
 
You have sent the text "Hello" to the standard output, that is the console you are interacting with.
 
 
 
But you can change and 'redirect' the output by using the character '>' :
 
 
 
echo Hello world! > /home/root/name.file
 
 
 
Now notice you have redirected the output to a file called name.file :
 
 
 
ls
 
 
 
You can append any file using '>>' instead of '>'.
 
You can print the content of the file to the standard output:
 
 
 
cat /home/root/name.file
 
 
 
'''Building a basic script'''
 
 
 
You can create a script that can run any instruction you want to use in Bash. The main advantage is that you do not have to compile the code, as is auto-interpereted by the system.
 
 
 
We are going to create a basic 'Hello World' script that is going to run the same command you have actually used before:
 
 
 
echo "echo > Hello world!" > /home/root/example.sh
 
cat example.sh
 
 
 
Now you have created a file called example.sh, but by default it has no execute permissions (x):
 
 
 
ls -la
 
 
 
We are going to add permission to the file by:
 
 
 
chmod a+x example.sh
 
ls -la
 
 
 
Now you can run the script:
 
  
./example.sh
+
This is the 2/3 chapter of the Getting Started with IGEP COM PROTON Tutorial Guide.
  
You can edit this file (example.sh) with 'vi', the pre-installed text editor in IGEP COM PROTON.
+
In this second chapter, we will learn some basics tasks. Upon completion, you will be ready to continue with chapter 3/3 that explains more advanced tasks.
  
vi example.sh
 
  
Press ESC and:
+
__TOC__
  
* :q! , to exit without saving
 
* :w , to save
 
* :wq , to quit and save
 
* i , to insert text
 
  
'''Other simple & useful instructions'''
+
= What can I do =
 +
You must logged in the board.
 +
== Handle the gpio-LED's ==
 +
The board has three leds available that can be controlled. In its simplest form, you can control of LEDs from
 +
userspace. LEDs appear in /sys/class/leds/ and you can turn on and off with following commands:
  
* mkdir
+
<pre>$ echo 1 > /sys/devices/platform/leds-gpio/leds/d242\:green/brightness
* rmdir
+
$ echo 1 > /sys/devices/platform/leds-gpio/leds/d441\:green/brightness
* find
+
$ echo 1 > /sys/devices/platform/leds-gpio/leds/d442\:green/brightness</pre>
* grep
 
  
You can stop any instruction by pressing CTRL+C
+
A detailed guide on how use GPIO-LEDS can be found by following this link: [[How to handle the gpio-LED]]
  
 +
== How to use the SD card ==
  
=== Send a file between a PC and IGEP COM PROTON ===
+
You can connect a micro SD card for storage. After plugin the SD card the kernel should detect the card and automount in /media directory.
----
 
  
In a Linux host PC, you can '''use SCP (secure copy) via SSH to transfer files''' between IGEP COM PROTON and your host PC.
+
{{Template:Navigation/IGEP Technology Guides/What can I do/Ending}}
 
 
We are going to use the default settings in IGEP COM PROTON for USB Ethernet Gadget.
 
 
 
''Note: This section is assuming you have successfully followed the previous chapters in this tutorial''
 
 
 
Now let's transfer a file called original.file from your host PC to the directory /home/root/ in your IGEP COM PROTON.
 
 
 
In your Host PC open Terminal and type:
 
 
 
scp -r original.file root@<destination_IP>:/home/root/destination.file
 
 
 
where:
 
 
 
*destination_IP: 192.168.7.2 via USB Ethernet Gadget, 192.168.6.1 via Wifi
 
 
 
 
You can repeat the process from the IGEP COM PROTON console, and transfer a file from IGEP COM PROTON to your Host PC.
 
 
 
 
 
=== Mount a MicroSD card ===
 
----
 
 
 
(Work in progress section!)
 
 
 
==== Access to Generic FAT32 microSD  ====
 
 
 
mount -t vfat /dev/mmcblk0 /mnt/tmp/
 
 
 
==== Access to Generic USB Flash disk  ====
 
 
 
mount -t vfat /dev/sda1 /mnt/tmp/
 
 
 
==== Safety Remove microSD  ====
 
 
 
umount /mnt/tmp
 
 
 
==== Access to IGEP demo microSD  ====
 
 
 
mount -t jffs2 /dev/mmcblk0 /mnt/tmp/
 
 
 
 
 
{{Navigation/IGEP Technology Devices Guides/Next Step
 
|Name={{#lst:Template:Links|IGEP_COM_PROTON_Name}}
 
|Community_MainPage={{#lst:Template:Links|IGEP_COM_PROTON_Community_MainPage}}
 
|Next_Step=Start developing under IGEP Technology
 
}}
 
  
 
[[Category:IGEP Technology Devices Guides]]
 
[[Category:IGEP Technology Devices Guides]]
[[Category:IGEP0032]]
 
[[Category:Work in progress]]
 

Latest revision as of 12:18, 29 January 2013


Overview

This is the 2/3 chapter of the Getting Started with IGEP COM PROTON Tutorial Guide.

In this second chapter, we will learn some basics tasks. Upon completion, you will be ready to continue with chapter 3/3 that explains more advanced tasks.



What can I do

You must logged in the board.

Handle the gpio-LED's

The board has three leds available that can be controlled. In its simplest form, you can control of LEDs from userspace. LEDs appear in /sys/class/leds/ and you can turn on and off with following commands:

$ echo 1 > /sys/devices/platform/leds-gpio/leds/d242\:green/brightness
$ echo 1 > /sys/devices/platform/leds-gpio/leds/d441\:green/brightness
$ echo 1 > /sys/devices/platform/leds-gpio/leds/d442\:green/brightness

A detailed guide on how use GPIO-LEDS can be found by following this link: How to handle the gpio-LED

How to use the SD card

You can connect a micro SD card for storage. After plugin the SD card the kernel should detect the card and automount in /media directory.



You have successfully completed this chapter of the guide.


Continue this tutorial guide: 3/3 - Start developing under IGEP Technology
Igep forum.png If you have any question, don't ask to ask at the IGEP Community Forum or the IGEP Community Chat Irc.png