This chapter is about installing a Embedded Environment. Solaris 2.5.1 is the only UNIX operating system supported for embedded systems. The following topics are considered,
Creation of user and installation directory,
Installation of Embedded Environment,
Configuration for automatic start at reboot,
Making a hardware watchdog available,
Changing permission for reboot,
Patches for Solaris 2.5.1,
Configuration of the os_mon application.
Several of the procedures described below require expert knowledge of the Solaris 2 operating system. For most of them super user privilege is needed.
It is recommended that the Embedded Environment is run by an ordinary user, i.e. a user which does not have super user privileges.
Throughout this chapter we assume that the user name is
/export/home/otpuser
Furthermore, we assume that in the home directory of
/export/home/otpuser/otp
This directory is the installation directory of the Embedded Environment.
The procedure for installation of a Embedded Environment does not differ from that of a Development Environment (see the chapter Installation of Development Environment), except for the following,
the (compressed) tape archive file should be extracted in the installation directory as defined above, and,
there is no need to link the start script to a standard directory
like
The details for extracting the tape archive file is not repeated here.
A true Embedded Environment has to start when the system boots. This section accounts for the necessary configurations needed to achieve that.
The embedded environment and all the applications will start automatically
if the script file shown below is added to the
S75otp.system
For further details on initialization (and termination) scripts, and
naming thereof, see the file
#!/bin/sh # # File name: S75otp.system # Purpose: Automatically starts Erlang and applications when the # system starts # Author: janne@erlang.ericsson.se # Resides in: /etc/rc3.d # if [ ! -d /usr/bin ] then # /usr not mounted exit fi killproc() { # kill the named process(es) pid=`/usr/bin/ps -e | /usr/bin/grep -w $1 | /usr/bin/sed -e 's/^ *//' -e 's/ .*//'` [ "$pid" != "" ] && kill $pid } # Start/stop processes required for Erlang case "$1" in 'start') # Start the Erlang emulator # su - otpuser -c "/export/home/otpuser/otp/bin/start" & ;; 'stop') killproc beam ;; *) echo "Usage: $0 { start | stop }" ;; esac
The file
/export/home/otpuser/otp
used in this section. The
Use of the
$SOME_PATH/erl_call -n Node init stop
in order to take Erlang down gracefully (see the
The
For Solaris 2.5.1 running on VME boards from Force Computers, there is a possibility to activate the onboard hardware watchdog, provided a VME bus driver is added to the operating system. For further details see the Embedded Systems documentation.
See also the
If the
HEART_COMMAND=/usr/sbin/reboot
the ownership and file permissions for
chown 0 /usr/sbin/reboot chmod 4755 /usr/sbin/reboot
See also the
When the Erlang runtime system is automatically started from the
TERM=sun
which should be added to the
For proper functioning of flushing file system data to disk, the Solaris 2.5.1 specific patch with number 103640-02 must be added to the operating system.
The following four installation procedures requires superuser privilege.
Make a copy the Solaris standard configuration file for syslogd.
Make a copy the Solaris standard configuration file for syslogd.
This file is usually named
The file name of the copy must be
A simple way to do this is to issue the command
cp /etc/syslog.conf /etc/syslog.conf.ORIG
Make an Erlang specific configuration file for syslogd.
Make an edited copy of the back-up copy previously made.
The file name must be
The format of the configuration file is found in the man page for
Usually a line is added which should state:
which types of information that will be supervised by Erlang,
the name of the file (actually a named pipe) that should receive the information.
If e.g. only information originating from the unix-kernel should
be supervised, the line should begin with
After at least one tab-character, the line added should contain
the full name of the named pipe where syslogd writes its information. The
path must be the same as for the
If the directory for the
kern.LEVEL /etc/syslog.otp
Check the file privileges of the configuration files.
The configuration files should have
A simple way to do this is to issue the commands
chmod 644 /etc/syslog.conf
chmod 644 /etc/syslog.conf.ORIG
chmod 644 /etc/syslog.conf.OTP
Note: If the
Modify file privileges and ownership of the mod_syslog utility.
The file privileges and ownership of the
The full name of the binary executable file is derived from the
position of the
/lib/os_mon-/priv/bin/mod_syslog ]]>
Example: If the path to the otp-root is
The binary executable file must be owned by root, have
A simple way to do this is to issue the commands
/lib/os_mon-/priv/bin/mod_syslog
chmod 4755 mod_syslog
chown root mod_syslog ]]>
The following procedure does not require root privilege.
Ensure that the configuration parameters for the
Browse the application configuration file (do not edit
it). The full name of the application configuration file is derived
from the position of the os_mon-application if the file system by adding
The generic full name of the file is thus
/lib/os_mon-/ebin/os_mon.app. ]]>
Example: If the path to the otp-root is
Ensure that the following configuration parameters are bound to the correct values.
If the values listed in the
Example: The following is an example of the contents of an application configuration file.
[{os_mon, [{start_os_sup, true}, {os_sup_own, "/etc"}, {os_sup_syslogconf, "/etc/syslog.conf"}, {os_sup_errortag, std_error}]}].
See also the