RidgeRun Irazu SDK User Guide

From RidgeRun Developer Connection
Jump to: navigation, search

Read First

There are different versions of the RidgeRun's SDK depending on the target processor you plan to use. The information in this document is general and is completely agnostic of the type of hardware or SDK configuration that the customer is using. For more specific information refer to the specific SDK documentation for your target hardware.

SDK Overview


The RidgeRun Linux Irazu SDK, features:

  • Linux Kernel 3.x or 2.6.x (specific kernel depends on the platform).
  • ARM GCC based toolchain (specific version depends on the platform).
  • Bootloader (specific version depends on the platform).
  • OpenFD (improved installer developed by RidgeRun)
  • Integrated configuration and build system.
  • Deployment utilities to automated installation of firmware during development cycle.


Relevant features of the SDK are:

  • Full integration of the whole SDK configuration under one main menu. This allows the access to all the configuration menus for toolchain, bootloader, file-system and others from a centralized point.
  • Transparently management of architecture dependencies. In order to made changes as target hardware, toolchain or bootloader configurations, just choose the correct configuration for your hardware in the SDK main menu and all the necessary dependencies will be handled by the SDK.
  • Easy integration of new user applications.
  • All Open Source packages retrieved from established Internet locations with any changes managed using patches. There are no magic code changes - everything is transparent.

Basic Structure

The SDK is implemented as a collection of directories that allows the integration of all the functional parts (file system, kernel, bootloader, user applications), the basic structure of the SDK is shown in the following image, they are shown only the most relevant directories since the SDK is compound of a much more complex structure:

Sdk structure.png

The following is a brief description of the purpose of each directory displayed in the image.

  • bootloader

This directory contains all the files related to the boot software such as u-boot, x-loader and so on.

  • bsp

On this directory is stored all the files related with the SDK's configuration and architecture and machine files. Into this folder it can be found the arch and mach directories on whose are stored specific files and patches for each architecture (i.e. dm365) and each machine (i.e. leopardboard).

  • documentation

This folder contains the SDK's documentation for the user.

  • downloads

The SDK needs a set of basic packages such as kernel and bootloader and some other extra packages which depends of the user's configuration such as bash, glib, ipiped and so on. Those packages are downloaded and stored on the downloads directory so it will avoid you to download again any package when you run a make clean command on some applications, it will just look into this directory for the required package.

If you install the SDK into more than one development directory (a very common practice), then you can avoid downloading packages by making a global directory to hold the downloads. The following steps will create and configure the global download directory:

sudo mkdir -p /opt/ridgerun/downloads
sudo chmod ugo+rwx /opt/ridgerun/downloads
  • fs

This directory contains the entire file systems and the SDK's applications, you can find three main folders on this directory:

    • fs: This directory is created when you built your SDK and stores the entire file system that is used by your board, if you are using NFS file system type you can access the board's file system by just accessing this directory.
    • apps: This directory stores all the available architecture independent applications for the SDK such as ipiped, bash, glib, alsa-utils and much more.
    • host-apps: This directory includes some applications required for the host machine and that have been configured for the SDK, for example this directory usually includes the VALA API against with some applications stored on the apps directory will be built.
  • images

This directory will store all the generated images that will be flashed on the board with the make install command. If you are using a NAND type file system such as JFFS2 or UBIFS you will find the file system image here, the same way you will find images for SD card when you are using this deployment mode.

  • installer

On this folder are stored some tools used for the installer mechanism of the SDK.

  • kernel

This directory stores the kernel source code used for the SDK.

  • myapps

On this folder you will be able to find some example applications and it is targeted to be the built folder for the user's application, this way the example applications included on this folder also work as reference point to the user to create its own application and integrate it with the SDK.

  • proprietary

All the proprietary applications used by the SDK are stored on this folder, the main application you will find on this directory is the DVSDK/EZSDK package provided by TI.

  • toolchain

This directory contains some files needed to configure the toolchain.

Supported Linux Distributions

RidgeRun SDK have been developed and tested on Ubuntu, and requires at minimum Ubuntu 12.04; however is strongly recommended to use the latest stable version of Ubuntu. Other Linux distribution may be used if they provide glibc 2.4 or up, but have non been tested and the SDK host tool checking will need to be bypassed or extented.

Ubuntu is a well supported and easy to use Linux distribution with commercial support. You can get pre-installed and enterprise supported Ubuntu desktops for your company.

The SDK can be used over a virtual machine, but it is not recommended due to performance concerns. RidgeRun SDK is a source code “build from scratch” system, and the build process is I/O intensive. Virtual machines technologies perform better on CPU intensive applications, but not I/O intensive ones, unless you use a optimized hardware configuration. In addition, the SDK installer uses the serial port, which has been known to drop data when used with a VM.

Please contact RidgeRun support for more information or if you require support for other distributions.


Getting the RidgeRun's EVAL SDK Irazu

If you want to get the RidgeRun's EVAL SDK Irazu you need to go to our Evaluation SDK Download Link and select the Evaluation SDK you need. You will be asked for your email address and some information. Once you have submitted the required information you will receive an email with the following information:

Sequence of evaluation sdk download events:

You have to follow the steps below :

When you select and click on the name of evaluation sdk you want to download, shopping cart page will display with the price $0.00 (for eval sdk's)
-> click on 'Go to Checkout'. It will display 'Your Shopping Bag' page
-> click on 'Checkout'. You will get a form to enter your email id and other info
-> click on 'Continue'. It will display a 'Place Order' page
-> click on 'Place Order'. And then Please check your email with a link to download the tar file for the evaluation SDK you have selected.

Toolchain Installation

For TI (Except TI AM5728) and Freescale processors , new SDK Irazu uses the Codesourcery toolchain for cross compilation. For Jetson TX1/TX2 and Xilinx processors there are separate toolchains. You need to download and install the toolchain before you can build the SDK. Below shown are the toolchains needed for each supported platform.

Processor Toolchain Installation Instructions
TI DM36x / DM81xx / DM385 / DM3730
TI AM5728
Freescale/NXP iMX6
Jetson TX1/TK1
Xilinx Zynq Ultrascale+
Xilinx Zynq 7000
SolidRun HummingBoard EVM

If when you build the SDK for the first time, you see an error message similar to

ccache: FATAL: Could not find compiler "arm-none-linux-gnueabi-gcc" in PATH

it most likely means the compiler toolchain has not been properly installed.

DVSDK 4 or EZSDK Installation

In addition to the toolchain, it is necessary to install the TI's Digital Video Software Development Kit (DVSDK) package before installing the SDK. RidgeRun doesn't have the rights to re-distribute TI's DVSDK/EZSDK packages so you have to fetch and install them yourself. There is a general TI web page listing the latest version of each DVSDK / EZSDK. You need to use the exact version required by the RidgeRun SDK or the patch files will not apply cleanly.

Processor DVSDK/EZSDK version
DM365 dvsdk_dm365-evm_4_02_00_06_setuplinux
DM368 dvsdk_dm368-evm_4_02_00_06_setuplinux
DM8168 ezsdk_dm816x-evm_5_05_02_00_setuplinux
DM8148 / DM385 ezsdk_dm814x-evm_5_05_02_00_setuplinux
DM3730 dvsdk_dm3730-evm_04_03_00_06_setuplinux

Please remember

a) DVSDK 4 or EZSDK Installation is for TI specific processors and it is not required for Freescale iMX6 Processors.

b) EZSDK Package for DM385 is same as that of EZSDK Package for DM8148.

The download and installation instructions are detailed below (the example shown is for the DVSDK 4 for DM365):

1. The dvsdk_dm365-evm_4_02_00_06_setuplinux binary file can be downloaded from TI's site.

2. Install it by executing the binary file with the following commands:

sudo chmod a+x dvsdk_dm365-evm_4_02_00_06_setuplinux

The DVSDK may expect a special Ubuntu version e.g. 10.04 and stop the installation with an error message. Add the --forcehost option in this case:

 ./dvsdk_dm365-evm_4_02_00_06_setuplinux --forcehost

3. You will be asked for the Toolchain's path, you need to specify the path to the binaries' directory of the toolchain as is shown in the following image:

DVSDK4 toolchain check.jpeg

4. Install the DVSDK with the default configuration.

Host Configuration

Usually the SDK will ask you to install any missing package it requires that is not installed on your host machine. You can install them using the following command:

sudo apt-get install package_name

The following is the list of the required packages by the SDK:

  • autoconf2.59
  • libgtk2.0-dev
  • bison
  • flex
  • mono-devel
  • libexpect-perl
  • libusb-dev
  • curl
  • minicom
  • libtool
  • libncurses5-dev

The following commands install the required packages by the Ridgerun SDK mentioned above:

sudo apt-get install autoconf2.59
sudo apt-get install libgtk2.0-dev
sudo apt-get install bison
sudo apt-get install flex
sudo apt-get install mono-devel
sudo apt-get install libexpect-perl
sudo apt-get install libusb-dev
sudo apt-get install curl
sudo apt-get install minicom
sudo apt-get install libtool
sudo apt-get install libncurses5-dev
sudo apt-get install git-core
sudo apt-get install liblzo2-dev
sudo apt-get install uuid-dev
sudo apt-get install asciidoc

It is possible you need to install some additional packages when some features require them, the SDK will ask you for this packages in the form of a error message as is shown below:

Checking for host packages required by the SDK build system:
    buildsystem (build-essential) is installed
    make (make) is installed
    ncurses (libncurses5-dev) is installed
    texinfo (texinfo) is installed
 >> minicom (minicom) is NOT installed
    perl (perl) is installed
    quilt (quilt) is installed
    dc (dc) is installed
    subversion (subversion) is installed
    curl (curl) is installed
    git (git-core) is installed
    autoconf (autoconf) is installed
    crypt-ssleay (libcrypt-ssleay-perl) is installed
    quilt (quilt) is installed
    libusb (libusb-dev) is installed
    perl-expect (libexpect-perl) is installed
    mono (mono-devel) is installed
There are missing packages, please install them:
 apt-get install minicom
make: *** [.oscheck] Error 1

Also required: GIT and subversion:

sudo apt-get install git
sudo apt-get install subversion

In addition, you need to configure your host SUDO, TFTP, and NFS services:

Installing the EVAL SDK

RidgeRun delivers the SDK in either two ways: a tar file for x86 platforms, or for customers with a established development relationship through a custom SCM (typically GIT) repository. If you are using a shared SCM repository, please contact RidgeRun for a detailed instructions.

System Requirements

Listed below are the minimum recommended requirements for installing and using the RidgeRun SDK:

  • A host computer with a 686 or better family processor
  • 1 GB free hard disk space
  • A Linux distribution configured on the host computer.
  • Target hardware for the SDK
  • Optional: a network card installed and configured on the host computer
  • Optional: Internet connection for SDK updates

Once you have downloaded the tar file of the evaluation SDK you can untar it by running the following command:

tar -xvzf <name of the tar file downloaded>.tar.gz 

You may find it convenient to untar the evaluation SDK more than once. For example, you might want one version to be unmodified and another version to be your working development directory. RidgeRun suggests you untar the SDK development directories in your $HOME/work/ directory. When you have more than one development directory installed, just remember to have the DEVDIR shell variable set properly. To set the DEVDIR shell variable use the `make env` command specified at Build_SDK

On the rest of this document, we refer as $DEVDIR to the path where the RidgeRun Eval SDK is installed.

Installing the Professional SDK version

When all the purchase process is done, RidgeRun will provide you a GitHub repository access. For that, the GitHub user ID and other information might be requested. Once you provide that information, you must clone the given repository URL, using the next command:

git clone git@github.com:RidgeRun/<customer>.git

This would have the proper <customer> space modified. With this, you will have the SDK installed on the directory you were when executed the clone command.

On the rest of this document, we refer as $DEVDIR to the path where the RidgeRun Professional SDK is installed.

Build SDK

Several packages are needed in order to compile the SDK. The SDK build process will let you know what packages are needed. While compiling you will be prompted to install them using sudo apt-get install <packages>.

RidgeRun toolchains must be installed on /opt and therefore you need either to install the toolchain as root, or to have write permissions over /opt for your normal user. Run the following command If you decide to assign your user permissions over /opt:

 $ sudo chown $USER /opt

You can get a description of all the available commands for the SDK by running the following command into your SDK's installation directory:

make help

It will show a list as the shown bellow:

RidgeRun Integrated Linux Software Developer's Kit

Make targets:

   build           - build kernel, target filesystem, bootloader
   force_build     - same as build, but forces the recompilation of the target filesystem
   kernel          - build kernel
   fs              - build target filesystem
   cmdline         - build cmdline for target kernel (fs target does the same as well)
   bootloader      - build bootloader
   patch           - fetch the source and apply any patches
   unpatch         - remove all applied patches
   config          - allow SDK to be configured
   config_batch    - attempt to configure without user interaction
   clean           - delete all derived files
   remove_fs       - delete the filesystem
   remove_fsdev    - delete the filesystem staging directory
   env             - displays commands to run to setup shell environment
   coreconfig      - select toolchain, bootloader, and kernel (updates bsp/mach/Make.conf)
   doc             - generate the SDK API documentation into the documentation folder
   prelink         - prelink the root filesystem
   rrsdk_patches_refresh - Update merged series file contains arch, mach, and top level
                     patches.  Only for bootloader, kernel and dvsdk/ezsdk directories.
   install         - Install all out of date images to target
   installbootloader - Install bootloader to target
   installmtd      - Install uBoot MTD partition table
   installkernel   - Install kernel to target
   installfs       - Install file system to target
   installcmdline  - Install uBoot kernel command line
   installbootcmd  - Install uBoot boot command
   svnup           - recursively run the 'svn up' command.

Make parameters:
   VERBOSE         - set to 1 to output executing commands
   LOGFILE         - set to built output filename

 U-boot Installer Parameters ($DEVDIR/installer/u-boot-installer)
   PORT            - Host serial port to use for install
   HOST_IP         - Host IP address to use for TFTP install
   FORMAT          - Set to 1 to force SD card to be formatted
   FORCEINSTALL    - Set to yes to force performing the requested install target
   ERASECHIP       - Set to yes if you want to scrub the FLASH chip during bootloader installation


   make                   # same as 'make build'
   make VERBOSE=1
   make installbootloader PORT=/dev/ttyUSB1

Configure the features you want to have in your board using (instructions shown below):

make config

Set the PATH to include the toolchain and also set the DEVDIR shell variable

$(make env) # this is the same as using grave accents to execute the output from the command - `make env`

Compile the SDK:


Install bootloader, kernel, and target file system on LeopardBoard 365

Verify bootloader is active

First a minicom (or any other terminal emulator used) session must be opened in order to stop the booting process at the bootloader prompt:

  • Minicom must be properly configured in order to communicate with the board, for instructions see minicom configuration.

Reboot the board and stop the autoboot when

Hit any key to stop autoboot: ...

is displayed. Then close your minicom session. Be sure to use the Ctrl-A,Q method, not Ctrl-A,X (Exiting with Q doesn't inject extra modem characters into the terminal session)

Save bootloader to target hardware

The next step is to install the bootloader on the target. Typically you only install the SDK bootloader once.

make installbootloader

Update target hardware with new images

Power cycle your target hardware, and install uboot environment / kernel / FS on the target (per your SDK configuration choices):

make install

Similar to the bootloader installation, to install the devdir on the target the booting process should be stopped at the bootloader prompt.

SDK Components

This SDK has several main components that will be explained in the following sections, they are: bootloader, file-system, kernel and toolchain. There are other non standard components that depends on the specific client configuration, check the specific documentation for such components.


The bootloader allows the loading, storing, and invoking of a Linux kernel and root file system. In normal operation, the bootloader resides in the boot storage device (NOR flash, NAND disks, etc) at the reset vector. It is the first program run on power up and, unless something else is specified, the bootloader will typically transfer control to the stored Linux kernel and file system.

Currently the RidgeRun SDK's support U-Boot bootloader. Information is available at http://sourceforge.net/projects/uboot and in the SDK directory $DEVDIR/bootloader/u-boot-*/src/doc.

The user interface communicates over the board's serial line with a host terminal session such as minicom on Linux, or TeraTerm on Windows. Do not use HyperTerm since it does not support a 8 bit binary transfer mode. Using HyperTerm will cause the images being downloaded to be corrupted.

Target File-System

The target file system holds the master file system structure used to create the target file system. This includes all the files, drivers, nodes and others entries, that will be mounted in the target board when Linux finishes to boot up.


The Linux kernel supplied with your SDK is pre-configured and ready for use. If your project requires components that are not contained in the default RidgeRun kernel, you may want to change the kernel configuration.


Holds the tools and utilities used to build applications and other code for the target hardware, in other words, supports cross compilation, which is the process of compiling on your host machine executables for a different target processor.

Using the SDK

The SDK is pre-configured so that it can be installed, compiled and tested out from the box. The SDK is pre-configured with a default configuration which may not include all that is needed during future development steps for your target hardware. In the following sections we will describe the necessary steps to modify and re-configure the SDK.

Root Password Entry

During the SDK's installation process and building the target file system, you will be asked for the root password several times. Root privileges are necessary at certain points in the configuration of the target file system image (creation of devices, setting of file ownership, etc.). The build process provides an alternative to reduce the number of times you have to enter passwords. If you define the following environment variable in your shell startup script (e.g. .bashrc):

 export SU=sudo

Then you will be asked for a password only once. For Ubuntu the password that you provide is your personal password, not the root password.

In order for the sudo command to work correctly, you must have an entry for your user ID in /etc/sudoers. You need to edit this file as the root user. Also, you can add a default timestamp entry to disable sudo from periodically asking for your user password. The following two lines can be added to the /etc/sudoers file to reduce the number of times you have to enter passwords.

 Defaults:      <user ID> timestamp_timeout=-1
                <user ID> ALL=(ALL) ALL

More information about sudo can be found at http://www.courtesan.com/sudo/

How to configure the SDK

In the root directory where the SDK is installed run the make target “config”. For example:

 $ make config
  Ridgerun Linux SDK
  DM320 TI SoC EVM Board configuration
  Processing toolchain...
  Processing kernel...
  Processing fs...
    Entering arch...
    Entering mach...
    Entering apps...
  Processing bootloader...

Then a menu like the one in Figure 9 will show up:


From this main menu it is possible to configure SDK components like: architecture specific memory addresses, toolchain path and flags, bootloader specific memory addresses, the kernel configuration, the file system type and the applications that will be added to the target file system.

The help option of every menu is useful to understand the different options of the SDK components. The detailed SDK configuration documentation can be found there.

Once the SDK configuration is finished save it and compile the SDK.

Before performing any installation in the board make sure that the installer is properly configured (see How to use the installer system)

How to compile the SDK

In the SDK each component can be compiled separately or the whole SDK can be compiled in one command. For example to make everything:

 $ make
  Ridgerun Linux SDK
  DM320 TI SoC EVM Board configuration
  Processing toolchain...
    Build complete
  Processing kernel...
  CHK     include/linux/version.h
  SPLIT   include/linux/autoconf.h -> include/config/*
  SYMLINK include/asm-arm/arch -> include/asm-arm/arch-dm320
  CHK     include/linux/compile.h
  CHK     usr/initramfs_list
  CHK     include/linux/compile.h
  UPD     include/linux/compile.h
  Kernel: arch/arm/boot/Image is ready
  Kernel: arch/arm/boot/zImage is ready
  Building modules, stage 2.
    Build complete
  Processing fs...
    Entering arch...
      Entering base...
    Entering mach...
    Entering apps...
      Entering busybox-1.1.2...
     Entering dosfstools-2.11...
    Entering arch/targets...
      Entering initrd...
    Entering mach/targets...
    Build complete
  Processing bootloader...
      Building images for bootloader
    Build complete

or you can compile each component separately:

 $ make kernel
  Processing kernel...
  CHK     include/linux/version.h
  SPLIT   include/linux/autoconf.h -> include/config/*
  SYMLINK include/asm-arm/arch -> include/asm-arm/arch-dm320
  CHK     include/linux/compile.h
  CHK     usr/initramfs_list
  Kernel: arch/arm/boot/Image is ready
  Kernel: arch/arm/boot/zImage is ready
  Building modules, stage 2.
    Build complete
 $ make fs
  Processing fs...
    Entering arch...
     Entering base...
    Entering mach...
    Entering apps...
      Entering busybox-1.1.2...
      Entering dosfstools-2.11...
    Entering arch/targets...
      Entering initrd...
    Entering mach/targets...
    Build complete
 $ make bootloader
  Processing bootloader...
      Building images for bootloader
    Build complete

There are some options that can be passed to the make command:

  • VERBOSE. This option set the verbose level of the build system while building the SDK.
    • Level 0: no messages are printed, all command outputs are redirected to LOGFILE (see below).
    • Level 1: Commands, info and warning messages will be shown
    • Level 2: Same level 1, but using verbose kernel build
 $ make VERBOSE=1
 Ridgerun Linux SDK
  DM320 TI SoC EVM Board configuration
 if [ -d toolchain ] ; then echo -e "\040" "Processing toolchain..."; export PATH="/opt/RidgeRun/dm320/linux-2.6/crossdev"/bin:$PATH ; make -C toolchain  DEVDIR=/home/trivas/cdx-devdir -demo TABINDEX="\040\040\040"; fi
   Processing toolchain...
 make[1]: Entering directory `/home/trivas/cdx-devdir-demo/toolchain'
 make  -C uclibc build
 make[2]: Entering directory `/home/trivas/cdx-devdir-demo/toolchain/uclibc'
 make[2]: Nothing to be done for `build'.
 make[2]: Leaving directory `/home/trivas/cdx-devdir-demo/toolchain/uclibc'
 echo -e "\040\040\040" "Build complete"
    Build complete
 make[1]: Leaving directory `/home/trivas/cdx-devdir-demo/toolchain'
  • LOGFILE. This option is similar to VERBOSE, except that all the log, info and warning messages will be redirected to the file path specified after the LOGFILE parameter. The log file path must be an absolute path and the directory path to such file must exist. The LOGFILE option is only useful at VERBOSE level 0. Example:
 $ make LOGFILE=/home/trivas/temp/logfile
  Ridgerun Linux SDK
    Build complete
 $ cat /home/trivas/temp/logfile
 <log file contents>

How to compile an arbitrary directory inside the SDK

The SDK build system uses several system variables that are set-up by the main Makefile in order to build the different components, and find the toolchain components. Therefore if you attempt to compile a single directory inside the SDK structure, it will fail.

A workaround for such limitation is possible and requires two steps:

  • Set and export the DEVDIR environment variable to the absolute path of your development directory:
 $ export DEVDIR=/path/to/devdir
  • Include on your PATH variable the path to the binary cross-compiler toolchain being used:
 $ export PATH=/path/to/toolchain/binaries:$PATH

However the SDK offers a simplified method to set the DEVDIR and PATH values:

  `make env` or $(make env)

After you perform these steps you can go inside any particular directory of the SDK and execute the makefiles contained within them. Be aware that you should recompile the file system images or any other component in order to update your target.

This feature allows you to build a single application instead of build all the parent directory, for example you can clean and rebuild the bash application on $DEVDIR/fs/apps/bash instead of rebuild all the file system. Even more, this feature is extremely useful when using NFS file system since you can modify an application and install it directly to the file system on $DEVDIR/fs/fs and immediately you will be able to test it on your board.

How to add my application to the SDK

This is a quick reference for introduction on how to build applications with the SDK, for more detailed instructions please refer to the Development and Integration Guide found in the documents of the SDK.

Under your SDK development directory is a directory named myapps. This directory allows customers to locate their own applications to be run on the target hardware. Inside this directory is a Makefile with logic to detect new applications and add them to the SDK build procedure.

A example hello application can be found on the myapps directory and can be use as reference for creating new customer application.

Step 1: Creating the application directory

Go into myapps directory and create a new directory for your application:

 $ cd $DEVDIR/myapps
 $ mkdir NewApp
 $ cd NewApp
Step 2: Create the build system files

Create a file named “Config”. This file will contains logic to select if your application should be build within the SDK. A simple example file is:

        bool “NewApp Customer Application”
        default y
                Build my NewApp program

For further information about the syntax of this file check $DEVDIR/bsp/bspc/kconfig-language.txt

HINT: Look at other Config files in the SDK to find one that is similar to your needs and use it as your starting point.

Once the file is created you can run the “config” target (make config) on your system to enable the build of the new application. A screen will appear as follow (in the SDK configuration window go to User applications):


Then create a file named Makefile. This is a standard Makefile file to build your application, however it requires certain rules to be integrated with the SDK build system.

HINT: a template Makefile should look like this:

 # myapps/NewApp/Makefile
 .PHONY: build chkconfig preconfig buildfs install clean
 ifeq ($(DEVDIR),)
 $(error ====== DEVDIR variable is empty, invoke this Makefile from the SDK root, or provide the path to it =====)
 include $(DEVDIR)/bsp/mach/Make.conf
        <build commands for your app>
        <install commands for your app>
        <clean command for your app>
 # Empty but required targets

The rules for the SDK Makefile are:

  • Check the definition of the DEVDIR environment variable
  • Include the file $(DEVDIR)/bsp/mach/Make.conf
  • Have the following phony targets: build, chkconfig, preconfig, buildfs, install, clean
  • The build, install and clean targets should be active only if the application configuration symbol is equal to 'y'

In order to compile the files with the proper cross-compiler you can use the follow environment variables (imported from the Make.conf file):

  • CC, CPP, LD, AR, AS, OBJCOPY, OBJDUMP, STRIP, CXX, RANLIB: those variables contains the name of the corresponding application from the toolchain for cross-compiling.
  • CFLAGS: contains the flags that must be used when compiling programs in order to work properly with the cross-compiler.

HINT: You can see how to use the variables by looking at the hello example Makefile.

How to use the installer system

The SDK Irazu has a huge variety of options for installation methods that allows the user to get a flexible way to control the images handling. You can explore such options into the Installer Configuration and File System Configuration sections into the configuration window.

Bootloader and Kernel installation

The installer system allows to install the system images (bootloader and kernel) to NAND or use them from a SD card. A brief explanation of each method available will be shown below.

1.Booting from NAND

In order to get the bootloader and kernel images flashed into the NAND memory it is necessary to select the Attached board on communication port option in the Installer Configuration window as is shown in the following image.

Attached board configuration.jpeg

When the option is selected two new sub-sections will be created: Installer to U-boot communication options and Transfer options for installation. This sections ask for the necessary information to transmit the images and data from the host computer to the target.

  • Installer to U-boot communication options

In this section you will be asked for the necessary information for communicating with the board. The first parameter you need to enter is the Communication method with the target board. There are two communication methods available: Serial port and Telnet-serial adaptor. In the case of serial port you need to specify the serial port device name and with telnet-serial adapter you will be asked for the IP address of the host machine and the communication port associated.

  • Transfer options for installation

In the Transfer options for installation section you will be asked for the protocol to be used for the transmission of the images to the target and the location of the images (kernel and bootloader).

Once you have selected the option you can rebuild your SDK with the make command and install the new firmware running the make env command and then it will install the bootloader and kernel images to the NAND using the communication method provided.

2. Booting from an SD card

The installer allows to boot with the bootloader and kernel images stored into a SD card, to activate this option it is necessary to select the Deploy all the firmware to an SD card option of Firmware deployment mode tag in the Installer Configuration window as is shown in the following image.

SD board configuration.jpeg

Once you have selected the option you can install the images and create a bootable SD card following the steps described in How to boot a board from a SD card.

File system installation

The installer allows to install the file system using different methods. You can find the available methods in the File system image target option in the File system Configuration section. The available file system types will be displayed as is shown in the following figure.

SDK file system types.jpeg

The following is a brief description of the available file systems.

1. Initramfs filesystem

This file system type allows to create a whole image containing the kernel and file system images.

2. JFFS2 disk image

JFFS2 (Journalling Flash File System version 2) allows to install the file system into NAND and run it without the need of an SD Card or network connection. When using JFFS2 file system two new options will be displayed: Do not include the cleanmarker block and Change JFFS2 endianness. The first one will ommit the cleanmarker in the blocks so they won't be erased, this option must be used for NAND memory devices. The second option will change the endianness of the data generated which by default is set to the endianness of the host machine on which the image is created (little endian for x86-based systems).

3. NFS root file system

NFS or Network File System allows to load the file system through an existent network, so the system files will be stored in a remote system and the target will be able to read, modify or notice any change on it. When using this option the target must have connection to the same network in which the host machine is located so it can access the file system stored on it.

4. Secure Digital Card

This installation method allows to create a SD card image with the file system data, then when the target starts, it will look for the file system in its SD card slot.

5. UBIFS volume

UBIFS is a successor of JFFS2 and in many aspects better than it tending to perform better than JFFS2 for large NAND FLASH devices becoming faster than JFFS2. When selected, a new option called UBIFS sub-page size will be displayed. To reduce the file system flash usage, use smaller sub page sizes to store UBI system data. [UBIFS is only available in the Professional version of the SDK]


Appendix I: Setting up Ubuntu for use with RidgeRun SDK

Ubuntu Linux is a popular Linux Distribution based on Debian Linux. It's available for different platforms and provides a easy-setup development environment. For more information please visit ubuntu homepage

The SDK is developed and tested against Ubuntu. This section describes the required steps to install and setup the required software environment for use of the SDK in Ubuntu, but may be useful if you want to use the SDK in another Linux distribution.

Installing Ubuntu

In order to install Ubuntu you need to get a installer CD from the project page. The specific steps to install it can be found on the CD documentation.

Required development packages

Ubuntu default installation is suited for an end-user desktop machine, so it might lack some development packages required to become a workstation. In order to install those packages you require a high-speed internet connection and use of the apt-get program.

The first step consists on upgrading all the current software. Perform the follow steps:

 $ sudo apt-get update
 $ sudo apt-get upgrade

Now you just need to build the SDK; the first step of this process is to check your host system and your workstation packages, you may see something like this:

 $ make
 The system is ubuntu-7.10 running in a 32 bit architecture 
 SYSID: ubuntu-7.10_32 
 Checking for host packages required by the SDK build system: 
    buildsystem (build-essential) is installed 
    libtool (libtool) is installed 
    make (make) is installed 
    mtd-tools (mtd-tools) is installed 
    ncurses (libncurses5-dev) is installed 
    texinfo (texinfo) is installed 
    tftpd (tftpd) is installed 
    minicom (minicom) is installed 
  Ridgerun Linux SDK 
  DM355 Texas Instruments EVM Board 
  Processing toolchain... 
    Build complete 
  Processing kernel... 
  CHK     include/linux/version.h 

If your host system is not one of the supported systems, the first part of this check will fail and show you a message similar to the following:

 ERROR: your host system is not oficially supported by RidgeRun SDK
 please contact RidgeRun support if you need support for this distribution
 NOTE: your system may still work for building this SDK, is just not tested

If you are working with a supported system such as Ubuntu the packages verification process will start to check all the needed and recommended packages as follow:

 The system is ubuntu-7.10 running in a 32 bit architecture 
 SYSID: ubuntu-7.10_32 
 Checking for host packages required by the SDK build system: 
    buildsystem (build-essential) is installed 

If there is any kind of problem during the verification process, the next part of the process will tell you which packages are missing, and also will alert you if the missing package is vital for building up the SDK, or if it is a highly recommended package. For example an error will look something like this:

 The system is ubuntu-7.10 running in a 32 bit architecture 
 SYSID: ubuntu-7.10_32 
 Checking for host packages required by the SDK build system: 
 >> buildsystem (build-essential) is NOT installed 
 There are missing packages, please install them: 
 make: *** [.oscheck] Error 1 

To install the missing packages use the the apt-get program (for more information about apt-get do: man apt-get). For example:

 sudo apt-get install build-essential

If there is some kind of warnings you will be alerted and you could chose to stop your building process in order to correct the warning or continue the installation. If there is only warnings the message will be displayed just one time, the next time you won't be notified.

Useful Ubuntu Links