Erlang

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(Installation)
Line 25: Line 25:
 
Reboot to get the new menu_4 title to show up.
 
Reboot to get the new menu_4 title to show up.
  
In home directory .profile
+
'''Install erlang'''
 +
 
 +
apt-get install erlang-base
 +
 
 +
 
 +
== Install the GUI package ex11 ==
 +
 
 +
Download from here [http://www.sics.se/~joe/work_in_progress/] or [http://www.sics.se/~joe/ex11]
 +
Take some additional GUI lib files from here [http://projects.openmoko.org/frs/?group_id=59]
 +
 
 +
In home directory file .profile
 
export DISPLAY=:0
 
export DISPLAY=:0
  
Line 31: Line 41:
  
 
Install xauth package and create .Xauthenticate file
 
Install xauth package and create .Xauthenticate file
 +
 +
debian-gta01:~# apt-get xauth
  
 
debian-gta01:~# xauth
 
debian-gta01:~# xauth
Line 38: Line 50:
  
  
'''Install erlang'''
+
== Install the dbus package ==
  
apt-get install erlang-base
+
 
 +
Download from here [http://sourceforge.net/projects/dbus-erlang/]

Revision as of 18:47, 10 September 2008

Erlang is a programming language which has many features more commonly associated with an operating system than with a programming language: concurrent processes, scheduling, memory management, distribution, networking, etc.

Concurrency - Erlang has extremely lightweight processes whose memory requirements can vary dynamically. Processes have no shared memory and communicate by asynchronous message passing. Erlang supports applications with very large numbers of concurrent processes. No requirements for concurrency are placed on the host operating system.

Distribution - Erlang is designed to be run in a distributed environment. An Erlang virtual machine is called an Erlang node. A distributed Erlang system is a network of Erlang nodes (typically one per processor). An Erlang node can create parallel processes running on other nodes, which perhaps use other operating systems. Processes residing on different nodes communicate in exactly the same was as processes residing on the same node.

Robustness - Erlang has various error detection primitives which can be used to structure fault-tolerant systems. For example, processes can monitor the status and activities of other processes, even if these processes are executing on other nodes. Processes in a distributed system can be configured to fail-over to other nodes in case of failures and automatically migrate back to recovered nodes.

Soft real-time - Erlang supports programming "soft" real-time systems, which require response times in the order of milliseconds. Long garbage collection delays in such systems are unacceptable, so Erlang uses incremental garbage collection techniques. Hot code upgrade - Many systems cannot be stopped for software maintenance. Erlang allows program code to be changed in a running system. Old code can be phased out and replaced by new code. During the transition, both old code and new code can coexist. It is thus possible to install bug fixes and upgrades in a running system without disturbing its operation.

Incremental code loading - Users can control in detail how code is loaded. In embedded systems, all code is usually loaded at boot time. In development systems, code is loaded when it is needed, even when the system is running. If testing uncovers bugs, only the buggy code need be replaced.

External interfaces - Erlang processes communicate with the outside world using the same message passing mechanism as used between Erlang processes. This mechanism is used for communication with the host operating system and for interaction with programs written in other languages. If required for reasons of efficiency, a special version of this concept allows e.g. C programs to be directly linked into the Erlang runtime system.


Installation

Make sure you have an uboot that is compatible, I used Uboot u-boot-gta01bv4-1.2.0+svnnow-r13_0_2632_0.bin

Install Debian, install script is here http://wiki.openmoko.org/wiki/Debian

Follow the instructions. I had to type in the setenv string and then saveenv. Reboot to get the new menu_4 title to show up.

Install erlang

apt-get install erlang-base


Install the GUI package ex11

Download from here [1] or [2] Take some additional GUI lib files from here [3]

In home directory file .profile export DISPLAY=:0

Remove "-nolisten tcp" from /etc/X11/xinit/xservrrc

Install xauth package and create .Xauthenticate file

debian-gta01:~# apt-get xauth

debian-gta01:~# xauth xauth: creating new authority file /root/.Xauthority Using authority file /root/.Xauthority xauth> q


Install the dbus package

Download from here [4]

Personal tools

Erlang is a programming language which has many features more commonly associated with an operating system than with a programming language: concurrent processes, scheduling, memory management, distribution, networking, etc.

Concurrency - Erlang has extremely lightweight processes whose memory requirements can vary dynamically. Processes have no shared memory and communicate by asynchronous message passing. Erlang supports applications with very large numbers of concurrent processes. No requirements for concurrency are placed on the host operating system.

Distribution - Erlang is designed to be run in a distributed environment. An Erlang virtual machine is called an Erlang node. A distributed Erlang system is a network of Erlang nodes (typically one per processor). An Erlang node can create parallel processes running on other nodes, which perhaps use other operating systems. Processes residing on different nodes communicate in exactly the same was as processes residing on the same node.

Robustness - Erlang has various error detection primitives which can be used to structure fault-tolerant systems. For example, processes can monitor the status and activities of other processes, even if these processes are executing on other nodes. Processes in a distributed system can be configured to fail-over to other nodes in case of failures and automatically migrate back to recovered nodes.

Soft real-time - Erlang supports programming "soft" real-time systems, which require response times in the order of milliseconds. Long garbage collection delays in such systems are unacceptable, so Erlang uses incremental garbage collection techniques. Hot code upgrade - Many systems cannot be stopped for software maintenance. Erlang allows program code to be changed in a running system. Old code can be phased out and replaced by new code. During the transition, both old code and new code can coexist. It is thus possible to install bug fixes and upgrades in a running system without disturbing its operation.

Incremental code loading - Users can control in detail how code is loaded. In embedded systems, all code is usually loaded at boot time. In development systems, code is loaded when it is needed, even when the system is running. If testing uncovers bugs, only the buggy code need be replaced.

External interfaces - Erlang processes communicate with the outside world using the same message passing mechanism as used between Erlang processes. This mechanism is used for communication with the host operating system and for interaction with programs written in other languages. If required for reasons of efficiency, a special version of this concept allows e.g. C programs to be directly linked into the Erlang runtime system.


Installation

Make sure you have an uboot that is compatible, I used Uboot u-boot-gta01bv4-1.2.0+svnnow-r13_0_2632_0.bin

Install Debian, install script is here http://wiki.openmoko.org/wiki/Debian

Follow the instructions. I had to type in the setenv string and then saveenv. Reboot to get the new menu_4 title to show up.

In home directory .profile export DISPLAY=:0

Remove "-nolisten tcp" from /etc/X11/xinit/xservrrc

Install xauth package and create .Xauthenticate file

debian-gta01:~# xauth xauth: creating new authority file /root/.Xauthority Using authority file /root/.Xauthority xauth> q


Install erlang

apt-get install erlang-base