Difference between revisions of "PremierWave/Timesys Programmers Guide"

From Lantronix Wiki!
Jump to navigation Jump to search
Line 17: Line 17:
 
=== Setup a Linux host ===
 
=== Setup a Linux host ===
  
To compile custom programs and create the image for the PremierWave devices, you will need a computer running Linux. You can setup a computer to boot into Linux, or use a virtual environment such as VMWare Player or VirtualBox to run the Linux operating system as a Guest Operating System. Lantronix has tested recent version of the Ubuntu Linux distribution.
+
To compile custom programs and create the image for the PremierWave devices, you will need a computer running Linux. You can setup a computer to boot into Linux, or use a virtual environment such as VMWare Player or VirtualBox to run the Linux operating system as a Guest Operating System. Lantronix has tested recent versions of the Ubuntu Linux distribution.
  
 
=== Sign into Timesys and create your first image ===
 
=== Sign into Timesys and create your first image ===

Revision as of 21:49, 27 December 2014

Introduction

Overview

This guide introduces developers to the support for customizing the Linux system on the Lantronix line of embedded and ready-to-deploy Intelligent Gateway products. It describes how to compile, load, and run custom programs on Lantronix devices, modify the Linux kernel to load custom drivers, and create images to deploy to your device.

Supported Lantronix Products

The following Lantronix products can be customized using the Linux Timesys development environment.

Getting Started

Setup a Linux host

To compile custom programs and create the image for the PremierWave devices, you will need a computer running Linux. You can setup a computer to boot into Linux, or use a virtual environment such as VMWare Player or VirtualBox to run the Linux operating system as a Guest Operating System. Lantronix has tested recent versions of the Ubuntu Linux distribution.

Sign into Timesys and create your first image

Sign up for Timesys LinuxLink account [1]

Click on Build BSP/SDK and then Create a Project. Give your project a name, select your PremierWave product as the Board, and click on Create Project.

CreateProject.jpg

Then click on Create a Workorder, give it a name, and click Next. Click next when it asks for for kernel and Toolchain. This will keep the default versions of the kernel and libc.

On the packages page, expand System and select ltrx-rfs-base and ltrx-fwupgrade, then click Next. See the image below.

Packages.jpg

Leave the defaults for the rest of the screens (click Next), then click Build in the last screen to start the build process.

You will eventually get an email that the build process has finished. At that time, you will be able to setup the SDK.

Setup SDK

In your Linux Host, click the link on the email or go back to the Timesys LinuxLink page and click on Download BSP/SDK. Select your project, and then click on the link called Download SDK installer. This will download a file named premierwave_xxxxx.sh which is an executable shell script.

To install the SDK, you will need to execute this image by following these steps from a terminal window:

  • chmod +x premierwave_xxxxxx.sh
  • ./premierwave_xxxxxxx.sh

Follow the instructions on the screen to install the SDK onto your Linux host. If you left the defaults, the SDK will be installed in the ~/timesys/premierwave_xxxxx directory. Add toolchain/bin to the $PATH variable (for example, in your ~/.profile file), and add the environment variable CC=armv5l-timesys-linux-gnueabi-gcc

Exploring the SDK

The directory structure of the SDK looks as follows:

  • bootloader/

This directory includes the premierwave-xxxxx.rom image, which can be directly programmed into your PremierWave device. This image includes the packages that were chosen in the Timesys web build. It also includes the u-boot binary image for the bootloader.

  • toolchain/

This directory includes the binary cross-compilers to be able to compile your custom programs into the ARM processor of the PremierWave device. It also includes the libraries and include files necessary to make the compilation.

  • kernel_source/

This directory is where the source code for the Linux kernel lives. Modifications to the kernel can be done here, and will be explained later.

  • rfs/

The root filesystem of the PremierWave device in multiple formats. There is a rootfs.tar.gz file which can be expanded to see all the files that will be installed on the device, as well as the filesystem in UBI format, and in ROM format to be added to the PremierWave device

Developing new firmware