Desktop Installation: Difference between revisions

From STRIDE Wiki
Jump to navigation Jump to search
Line 124: Line 124:
: This directory (and several sub-directories) is created as part of the make process. All of the make targets are written to this directory and its sub-directories.
: This directory (and several sub-directories) is created as part of the make process. All of the make targets are written to this directory and its sub-directories.


== Perl Installation (Optional Not for Training Exercises) ==
== Perl Installation (Optional, Not for Training Exercises) ==
If you intend to use [[Test Modules Overview|STRIDE Script modules]] for testing in script, you will need a recent version of Perl (x86 with threads support) installed. This is '''NOT''' required if only tests in C/C++ will be run or to complete the training.
If you intend to use [[Test Modules Overview|STRIDE Script modules]] for testing in script, you will need a recent version of Perl (x86 with threads support) installed. This is '''NOT''' required if only tests in C/C++ will be run or to complete the training.



Revision as of 23:25, 1 February 2013

Installation Packages

Files are installed by unzipping the provided package to your PC. Packages are available targeting the following operating systems (your version number may be different than that shown):

Windows (x86)
STRIDE_framework-windows_4.x.yy.zip
Linux (x86)
STRIDE_framework-linux_4.x.yy.tgz

Please see the appropriate installation instructions below.

Windows Installation

Unpacking

The following installation example assumes the the installation package is located in your root directory and that the directory \stride exists. You can choose to install to a different location (all instructions below assume you are installing into \stride).

The example uses the open source 7-Zip utility to unzip the archive.

cd \stride
"\Program Files\7-Zip\7z" x ..\STRIDE_framework-windows_4.x.yy.zip

Once unzipped, files will have been installed under the \stride directory.

Verify Environment Variables

Updated PATH

As a final step, you will need to update your PATH environment variable to include \stride\bin. For instructions on modifying it, please see http://support.microsoft.com/kb/310519.

NOTE: Make sure to insert no spaces before and after the semicolon separators(;).

Create/Update STRIDE_DIR

Verify that the STRIDE_DIR environment variable exists and is set to the root installation directory (\stride). If this environment variable does not yet exist, you should create it as a user environment variable.

To confirm installation and display help run the following command in a console window:

stride -h

Uninstalling

To uninstall STRIDE simply:

  • Remove any reference to \stride\bin in your PATH environment variable.
  • Remove STRIDE_DIR environment variable.
  • Remove \stride directory.

Linux Installation

Unpacking

The following installation example assumes the the installation package is located in your home directory and that the directory ~/stride exists. You can choose to install to a different location (all instructions below assume you are installing into ~/stride).

cd ~/stride
tar -zxvf ../STRIDE_framework-linux_4.x.yy.tgz

Once unzipped, files will have been installed under the ~/stride directory.

Verify Environment Variables

Updated PATH

As a final step, you will need to update your PATH environment variable to include ~/stride/bin.

If you use the bash shell, enter the following at a command prompt, or to automatically set at each login, add to your .bashrc:

export PATH=$PATH:~/stride/bin

For other shells, and more information, please see the following articles:

Create/Update STRIDE_DIR

Verify that the STRIDE_DIR environment variable exists and is set to the root installation directory (~/stride). If this environment variable does not yet exist, you should automatically set at each login, add to your .bashrc:

export STRIDE_DIR=~/stride

To confirm installation and display help run the following command in a console window:

stride -h

NOTE: In a 64-bit environment the above may fail with the following error: "stride: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory." To resolve this issue install the appropriate 32-bit compatibility libraries for your Linux distribution:

  • Debian / Ubuntu
sudo apt-get install ia32-libs
  • Fedora / CentOS / RHEL
sudo yum -y install glibc.i686 libstdc++.i686

Uninstalling

To uninstall STRIDE simply:

  • Remove any reference to ~/stride/bin in your PATH environment variable.
  • Remove STRIDE_DIR environment variable.
  • Remove ~/stride directory.

Directories and Files

It's not necessary to understand the workings of the STRIDE framework to perform evaluation or training. The desktop package contains an STRIDE Off-Target Environment that utilizes a SDK that is set up with appropriate options and settings to enable "out of the box" functionality. A quick orientation to the Off-Target Environment's directories and files are shown below.

If you are interested in the details, consult the articles Posix SDK and Windows SDK.

bin

This directory contains the STRIDE Build Tools and the STRIDE Runner.

The build tools are invoked early on in the target software build process to generate special STRIDE artifacts that are used in subsequent build steps and later when running tests against the target. In an Off-Target Environment installation, these files are needed on the host computer since this is where we are building the target application. In a production environment, these files are needed only on the computer that performs the target software build.

The STRIDE Runner is the program you use to run tests from the host.

lib

This directory contains a set of STRIDE specific core scripting libraries along with prebuild binaries intended to be used for testing in scripts.

Samples

The Samples directory contains a number of sub-directories, each containing the source for a sample test.

SDK

This directory contains the sub-directories GRS, Runtime, and SLAP, which contain source code that comprises the STRIDE Runtime. These sources are built into the STRIDE Runtime library as a dependency of the testapp target. (See src directory below.)

In addition, there is a directory named either Posix or Windows, depending on your host operating system.

SDK\Windows( or SDK/Posix )

This directory (Windows or Posix) contains the following directories:

  • bin (Windows only)
Contains GNU make program files (GNU make is already present on Linux systems)
  • sample_src
This directory is originally empty. The sandbox is set up so that any files in this directory are included in the TestApp build.
  • settings
This directory contains a set of stride.XXX.s2scompile files, where XXX coresponds to the target CPU architecture (i.e. X86, ARM...). These files, used by the STRIDE Compiler, specify target CPU characteristics (endian-ness, data sizes and alignments). On Windows, this directory also contains a set of files for use in building target apps with Visual Studio.
  • src
This directory contains the Makefile used to produce the sandbox TestApp as well as the TestApp sources.
  • out
This directory (and several sub-directories) is created as part of the make process. All of the make targets are written to this directory and its sub-directories.

Perl Installation (Optional, Not for Training Exercises)

If you intend to use STRIDE Script modules for testing in script, you will need a recent version of Perl (x86 with threads support) installed. This is NOT required if only tests in C/C++ will be run or to complete the training.

As of this writing, we support only the 32-bit versions 5.8.9, 5.10.x, 5.12.x and 5.14.x of Perl.

Windows

It is required to use the standard 32-bit Perl distributions from ActiveState.

The following additional (non-standard) Perl packages are also required for full functionality of STRIDE tests in perl:

You can easily install these packages using the ppm tool. If you access the Internet via a proxy make sure to read this. Simple command-line installation of PACKAGE_NAME (the package to install) typically just requires typing:

ppm install PACKAGE_NAME

Linux

We recommend you to use the standard 32-bit Perl distribution that comes with your Linux version. In case you need to manually build from source make sure to configure "shared library" (-Duseshrplib), "thread support" (-Duseithreads) and no "64-bit support" (-Uuse64bitint -Uuse64bitall).

The following additional (non-standard) Perl packages are also required for full functionality of STRIDE tests in perl:

If your perl is installed in a system directory (/usr/bin/perl, for instance), you will need root access to install shared modules. The simplest method for installing packages is via the CPAN shell. If you access the Internet via a proxy make sure to set the appropriate CPAN config variables. To start the shell in interactive mode:

sudo perl -MCPAN -eshell

Once in the shell, search for and install the latest stable version of PACKAGE_NAME (the package to install):

install PACKAGE_NAME

The STRIDE perl packages also need to load your system's libperl.so (shared object file) at runtime. Depending on your system, this file should be loadable from a perl CORE directory or from one of the shared system directories. If you DO NOT have this shared library on your system, you might need to install a libperl-dev, perl-devel or perl-libs package in order to get it. Here is how you can do that on the console of some Linux distributions:

  • Debian / Ubuntu
sudo apt-get install libperl-dev
  • Fedora / CentOS / RHEL
sudo yum -y install perl-devel

Validation

Once you have installed Perl we recommend you to run the following command in a console window:

stride --device NULL  --diagnostics Perl --output PerlCheck

If everything was properly set up you should get the following output:

Loading database...
Executing diagnostics...
  script "diagnostics.pl"
    > 2 passed, 0 failed, 0 in progress, 0 not in use.
  ---------------------------------------------------------------------
  Summary: 2 passed, 0 failed, 0 in progress, 0 not in use.

Disconnecting from device...
Saving result file...

In addition a report file with name PerlCheck.xml will be created in the current directory. If interested in the details you could open that report file in a browser of your choice.