Software Manual (Diva)

From DAVE Developer's Wiki
Revision as of 14:40, 17 May 2013 by DevWikiAdmin (talk | contribs) (Carrier boards)

Jump to: navigation, search
Info Box
Diva-am335x-overview.png Applies to Diva

Introduction[edit | edit source]

Major software components of an Embedded Linux system are:

  • bootloader
  • operating system kernel
  • root file system, including user-space application and libraries
  • tool chain (on development host)
  • build system (on development host)

Diva Embedded Linux Kit: what is it?[edit | edit source]

Diva Embedded Linux Kit (DIVELK for short) provides all the necessary components required to set up the developing environment to:

  • build the bootloader (U-Boot)
  • build and run Linux operating system on Diva-based systems
  • build Linux applications that will run on the target.

The kit is composed by:

  • hardware platform composed by Diva system-on-module (SOM for short) and carrier board. Supported carrier boards are:
    • DivaEVB-Lite standalone
    • DivaEVB-Lite plugged on Dacu carrier board
  • U-Boot bootloader sources
  • Linux kernel sources
  • Technical documentation such hardware manuals, mechanical drawings, reference schematics, application notes etc.

The documents related to the software issues help the user to quickly start configuring the bootloader and the operating system, by hiding most of the complexity of the underlying hardware. For more details about Diva hardware characteristics, please refer to the Diva Hardware Manual. An account for the reserved area of DAVE's website is required to access the kit contents.

Diva Embedded Linux Kit: what is not?[edit | edit source]

The kit is neither a complete Linux programming guide nor a Linux Reference Guide. Internet provides lots of information, tutorials and examples about writing applications and drivers for this operating system and how to work with it from the user's point of view (for example, type “Linux programming” in your favorite search engine). As the kit is heavily based on open-source community-maintained software projects, DIVELK does not provide exhaustive documentation for these software components but it points out where to find the information on the Internet or books. For example, for the U-Boot bootloader, the kit does not list all the commands it handles but provides the link to the on-line documentation and to the public mailing list used by its community.

For novice users who have no experience at all with embedded Linux systems, reading article Embedded Linux is recommended.

About this manual[edit | edit source]

This document describes how to run Linux on the Diva/DivaEVB-Lite/Carrier-board system. For novice users who have no experience at all about embedded Linux systems, reading of Building Embedded Linux Systems By Karim Yaghmour is strongly recommended. Practically speaking, the book covers all matters involved in developing software for such systems (from tool-chain organization to the most famous file systems running on top of MTD). It is not a reference guide, but it provides a complete and exhaustive overview that helps the developer save a lot of time in searching for such information on the Internet. For a brief but still exhaustive overview of the Linux and Embedded Linux world, please look at the Training and Docs sections of Free Electrons website.

Support service[edit | edit source]

We are committed to making our products user-friendly and will help customers use our CPU modules in their systems. Technical support is delivered through email. Support requests can be sent to support-diva@dave.eu. Software upgrades are available in the restricted download area of DAVE web site: http://www.dave.eu/reserved-area. An account is required to access this area (please contact support-diva@dave.eu for account requests). Please refer to our Web site at http://www.dave.eu/dave-cpu-module-am335x-diva.html for the latest product documents, utilities, drivers, Product Change Notices, Board Support Packages, Application Notes, mechanical drawings and additional tools and software.

DIVELK overview[edit | edit source]

Components[edit | edit source]

Diva SOM[edit | edit source]

Diva-400.png

The heart of Diva SOM is Texas Instruments "Sitara" AM335x microprocessors. From a software point of view, Texas Instruments supports this processor family through so-called Linux EZ Software Development Kit (EZSDK for short). EZSDK releases are published on a regular basis. For more details please refer to:

Diva Embedded Linux Kit, in turn, is directly derived from EZSDK. Hence DIVELK documentation often refers to EZSDK resources.

Carrier boards[edit | edit source]

DivaEVB-Lite[edit | edit source]

DivaEVB-Lite is an adapter board designed to evaluate the functions of Diva system-on-module.

Diva-evb-with-som.png

DivaEVB-Lite provides the following interfaces:

  • On board peripherals:
    • SPI NOR flash
    • 1x UART RS232 on DB9 connector
    • 1x Ethernet port on RJ45 connector
    • 1x USB 2.0 port on MiniAB connector
    • I/Os on expansion connectors
    • 12V power connector
  • Routed to J1 and J2 (140-pin) connectors:
    • 18-bit RGB LCD
    • 1x SD/MMC
    • 1x SPI
    • 2x UART
    • 2x I2C
    • JTAG
    • 2x USB
    • 1x McASP
    • Touch screen / AD signals

The following figure shows the carrier board block diagram

Divaevb-bd.png

Dacu[edit | edit source]

DivaEVB-Lite can be plugged on the Dacu carrier board to extend the set of available interfaces. For further information on Dacu, please refer to:

Software[edit | edit source]

When we talk in general about Embedded Linux, we refer to an embedded system running Linux operating system. As the reader probably knows, Linux was first developed on the PC platform, based on the famous x86 architecture. Typical embedded systems using an operating system (O.S. for short), are equipped with much lighter software. Recent hardware advances made these systems so powerful that now they can run a complex O.S. such as Linux. This choice has several benefits:

  • The developer can count on a reliable and efficient software, developed and maintained by a large community all over the world
  • The software is open-source, so developers have access to the whole source code
  • Since Linux runs on many different platforms (x86, PowerPC, ARM, SuperH, MIPS etc.), applications are portable by definition
  • There are a lot of open-source applications running on top of Linux that can easily be integrated in the embedded system
  • Last but not least, there are no license fees.

An exhaustive description of this topic is beyond the scope of this document. We recommend reading specific documents, eg Building Embedded Linux Systems By Karim Yaghmour. The typical Embedded Linux system is composed of:

  1. the bootloader – this software is run by the processor after exiting the reset state. It performs basic hardware initialization, retrieves the Linux kernel image (for example from a remote server via the TFTP protocol) and launches it by passing the proper arguments (command line and tags)
  2. the Linux kernel
  3. the root file system – this file system is mounted (which means "made available", "attached") by the kernel during the boot process on the root directory (“/”).

The typical developing environment for an Embedded Linux system is composed of a host machine and a target machine. The host is used by the developer to compile the code that will run on the target. In our case the target is obviously the Diva module, while the host is assumed to be a PC running the Linux operating system. The Linux kernel running on the target can mount the root file system from different physical media. During the software development, we strongly recommend using a directory exported via NFS by the host for this purpose (see the example configuration called net_nfs).

DIVELK software components[edit | edit source]

Dave adds to the latest EZSDK from Texas Instruments the customization required to support the Diva platform. For this reason most of the documentation provided by TI remains valid for the DIVELK development kit. However, some customization is required, in particular at bootloader and linux kernel levels.

The following table shows how NELK releases are related to EZSDK releases.

DIVELK version
Release number 1.0.0
Status Planned
Release date May 2013
Release notes Ver 1.0.0
SOM PCB version CS133012A
Supported carrier boards DivaEVB-Lite
Dacu
U-Boot version 2012.10-delk-1.0.0
Linux version 3.2.0-delk-1.0.0
Drivers SPI NOR Flash (boot)
NAND 8 bit (boot)
UART0 (2-wire)
USB Host
SD/MMC1
GPIO
LCD
Touch screen controller
EMAC0 RMII (Fast Ethernet)
PMIC RTC (battery powered)

Audio (ALSA)

TI EZSDK 05.06.00.00

DIVELK contains all the required software to develop Linux application on the Diva platform

  • Virtualbox virtual machine image with pre-installed Ubuntu Linux 12.04.2 LTS and pre-configured basic Linux services (Tftp, NFS, ...)
  • Virtualbox disk containing source code and tools:
    • Bootloader (u-boot) source tree cloned from DAVE's public git repository
    • Linux kernel source tree cloned from DAVE's public git repository
    • Pre-installed AM335x EZSDK with setup scripts, makefiles, example applications, ...
    • Toolchain

Please note that DIVELK u-boot and kernel source trees are derived from the official trees released by TI; these trees have been customized to add support for the Diva SOM.

For further information on EZSDK, please refer to Sitara SDK release notes.

DIVELK Updates[edit | edit source]

200px-Emblem-important.svg.png

It's recommended to use the latest available DIVELK version. Please refer to Release notes for further information.

Updating git repositories[edit | edit source]

In DIVELK, the following source trees are clones of DAVE's public git repositories:

Component GIT Remote DIVELK Installation Directory
Linux git@git.dave.eu:dave/diva/linux-am33x.git /home/dvdk/delk/linux-am33x.git
U-Boot git@git.dave.eu:dave/diva/u-boot-am33x.git /home/dvdk/delk/u-boot-am33x.git

This means that these components can be kept in sync and up to date with DAVE's repositories.

RSA key generation[edit | edit source]

Please follow the procedure reported below to generate the RSA ssh key:

  • select your username (ad es. username@myhost.com)
  • start the DVDK and login into the virtual machine
  • start a shell session
  • enter the .ssh subdirectory into your home directory: cd ~/.ssh/
  • launch the following command:
    ssh-keygen -t rsa -C "username@myhost.com"
  • this command creates the files ~/.ssh/username@myhost.com (private key) and ~/.ssh/username@myhost.com.pub (public key)
  • edit your ~/.ssh/config adding the following lines:
Host git.dave.eu
    User git
    Hostname git.dave.eu
    PreferredAuthentications publickey
    IdentityFile ~/.ssh/username@myhost.com.pub

Please send the public key file to one of the following email support addresses (depending on which SOM is included in your kit version)

with the request for the creation of a new public git account associated to your username. The support team will enable the account and send you a confirmation as soon as possible.

Synchronizing the repository[edit | edit source]

When the account is enabled, you can synchronize a source tree entering the repository directory and launching the git fetch command, like in the following example:

dvdk@dvdk-vm:~$ cd /home/dvdk/delk/linux-am33x.git/
dvdk@dvdk-vm:/home/dvdk/delk/linux-am33x.git$ git fetch origin

Release notes[edit | edit source]

DIVELK 1.0.0[edit | edit source]

  • Release date: May 2013
  • Status: planned
  • EZSDK version: 05.06.00.00
  • Supported carrier boards: DivaEVB-Lite, Dacu

Notes[edit | edit source]

  • First official release

Developing environment[edit | edit source]

Introduction[edit | edit source]

The following figure show the typical developing environment for an Embedded Linux system: it is composed of a host machine and a target machine.

Development env.png

The typical developing environment for an Embedded Linux system is composed of a host machine and a target machine. The host is used by the developer to (cross-)compile the code that is to run on the target. In our case the target is the Diva CPU module, while the host is assumed to be a PC running the Linux operating system, either in a physical installation or as a virtual machine. The bootloader running on the target can download the Linux kernel image through the network (tftp), as well as the u-boot binary images (useful when an update of the bootloader is required). Moreover, the Linux kernel running on the target is able to mount the root file system from different physical media, for example from a directory exported via Network File System (NFS) by the host. This strategy (kernel image and RFS retrieved from the network) saves time during the development phase, since no flash reprogramming or removable storage (SD, usb pen drives, external disks) is required to test new versions or updates of the software components.

Software components[edit | edit source]

Toolchain[edit | edit source]

With the term "toolchain" we refer to the set of programs that allow the building of a generic application. For applications built to run on the same platform as the tool chain, we use a native toolchain. On the contrary, for applications built to run on a target architecture different from the host architecture, we use a cross-toolchain. In this case all the tools involved in this process are lead by the “cross-” prefix. So we talk about cross-compiler, cross-toolchain and so on. The cross-toolchain used to build U-Boot and the Linux kernel is the GNU toolchain for the ARM architecture built for x86 hosts. In other words, the toolchain runs on x86 machines but generates binaries for ARM processors. As for all the software compliant to the GPL license, it is released in source code. Thus the first thing to do to set up the developing environment should be building the cross-toolchain. This is not a trivial task, it takes a lot of time and hard disk space. To avoid this tedious task, we suggest use of a pre-built toolchain as explained in the following sections.

Bootloader[edit | edit source]

U-Boot is a very powerful boot loader and it became the "de facto" standard on non-x86 embedded platforms. The main tasks performed by U-Boot are:

  1. hardware initialization (external bus, internal PLL, SDRAM controller etc.)
  2. starting a shell on the serial port allowing the user to interact with the system through the provided commands
  3. automatic execution of the boot script (if any)

After system power-up, U-Boot prints some information about itself and about the system it is running on. Once the bootstrap sequence is completed, the prompt is printed and U-Boot is ready to accept user's commands. U-Boot manages an environment space where several variables can be stored. These variables are extremely useful to permanently save system settings (such as ethernet MAC address) and to automate boot procedures. This environment is redundantly stored in two physical sectors of boot flash memory; the default variables set is hard-coded in the source code itself. User can modify these variables and add new ones in order to create his/her own custom set of configurations. The commands used to do that are setenv and saveenv. This process allows the user to easily set up the required configuration. Once U-Boot prompt is available, it is possible to print the whole environment by issuing the command printenv.

For further information on use of U-Boot, please refer to http://www.denx.de/wiki/view/DULG/UBoot

Kernel[edit | edit source]

Linux kernel for Sitara processors is maintained primarily by Texas Instruments, that constantly works in close cooperation with Linux community in order to push all the released drivers into mainstream kernel. Periodically TI releases the so-called Platform Support Product (PSP for short). PSP provides updated kernel sources.

Kernels released within DIVELK derive directly from PSP kernels.

For further information on Linux for TI processors, please refer to http://processors.wiki.ti.com/index.php/Category:Linux

Target root file system[edit | edit source]

The Linux kernel running on the target needs to mount a root file system. Building a root file system from scratch is definitively a complex task because several well known directories must be created and populated with a lot of files that must follow some standard rules. Again we will use pre-packaged root file systems that make this task much easier.

DVDK[edit | edit source]

Dave Virtual Development Kit is a virtual machine, based on Oracle VirtualBox that allows developers to start using Dave's platform without wasting time in installing the development environment. The Virtual Machine comes with all the development tools and source code, pre-configured, and requires only a minimal setup by the end user (usually only to adapt network interface to the user environment).

DVDK can also be converted, easily, into a physical environment, for example to increase speed on slower machines.

Please refer to DVDK page on Dave Developer's Wiki for further information on DVDK.

Build system[edit | edit source]

Introduction[edit | edit source]

A build system is a set of source trees, Makefiles, patches, configuration files, tools and scripts that makes it easy to generate all the components of a complete embedded Linux system. A build system, once properly set up, automates the configuration and cross-compilation processes, generating all the required targets (userspace packages (libraries, programs), the kernel, the bootloader and root filesystem images) depending on the configuration. Some well known build systems are the following:

Setting up the server environment[edit | edit source]

During development, user needs to interact with the target system. This section describes the tools that must be installed and configured on the host system for this purpose. Please note that all these tools are already installed and properly configured on the virtual machine image provided with the DIVELK.

TFTP Server[edit | edit source]

One of the most useful features of a bootloader during development is the capability to download the Linux kernel from the network. This saves a lot of time because developer doesn't have to program the image in flash every time he/she modifies it. U-Boot implements the TFTP protocol (see the tftp command), so the host system must be configured to enable the TFTP service. Installation and configuration of a tftp server depends on the host Linux distribution.

The default DVDK tftp installation has /srv/tftp as work directory. It is recommended to create a subdirectory dedicated to the image files created with the DIVELK.

NFS Server[edit | edit source]

One of the most important components of a Linux system is the root file system. A good development root file system provides the developer with all the useful tools that can help him/her on his/her work. Such a root file system can become very big in size, so it's hard to store it in flash memory. User could split the file system in different parts, mounting them from different media (flash, network, usb...). But the most convenient thing is to mount the whole root file system from the network, allowing the host system and the target to share the same files. In such a way, the developer can quickly modify the root file system, even “on the fly” (meaning that the file system can be modified while the system is running). The most common way to setup a system like the one described is through NFS. As for tftp, installation and configuration depends on the host linux distribution.

The default DVDK nfs installation is configured for sharing /home directory and all the subdirectories.

Pre-built toolchain[edit | edit source]

To start developing software for the Diva platform, users need a proper toolchain, which can be pre-built or built-from-scratch. Building a toolchain from scratch is not a trivial task (though using a recent build system is easier than in the past), so the recommended approach consists in using a pre-built toolchain.

DIVELK provides the arago-2012.10 toolchain (GCC verion is 4.5.3).


Pre-built root file system[edit | edit source]

Linux needs a root file system: a root file system must contain everything needed to support the Linux system (applications, settings, data, ..). The root file system is the file system that is contained on the same partition on which the root directory is located. The Linux kernel, at the end of its startup stage, mounts the root file system on the configured root device and finally launches the /sbin/init, the first user space process and "father" of all the other processes. An example of root file system is shown below:

drwxr-xr-x  2 root     root     4096 2011-05-03 11:23 bin/
drwxr-xr-x  2 root     root     4096 2011-04-01 17:20 boot/
drwxr-xr-x  3 root     root     4096 2011-07-07 12:17 dev/
drwxr-xr-x 44 root     root     4096 2011-05-03 19:02 etc/
drwxr-xr-x  4 root     root     4096 2011-04-01 17:35 home/
drwxr-xr-x  5 root     root     4096 2011-05-03 11:23 lib/
drwxr-xr-x 12 root     root     4096 2011-07-07 12:03 media/
drwxr-xr-x  6 root     root     4096 2011-05-19 16:39 mnt/
drwxr-xr-x  2 root     root     4096 2011-03-11 05:21 proc/
drwxr-xr-x  2 root     root     4096 2011-05-03 11:23 sbin/
drwxr-xr-x  2 root     root     4096 2011-03-11 05:21 sys/
lrwxrwxrwx  1 root     root        8 2011-05-30 12:19 tmp -> /var/tmp/
drwxr-xr-x 11 root     root     4096 2010-11-05 19:36 usr/
drwxr-xr-x  8 root     root     4096 2010-12-12 11:30 var/

For more information on the Linux filesystem, please refer to The Linux filesystem explained

DIVELK provides a pre-built root file system, that can be used during the evaluation/development phase, since it provides a rich set of packages for working with the Diva platform. However, there are other pre-built file systems that can be used:

DIVELK root file systems are stored into the following directories:

  • /home/dvdk/delk/rfs/arago-base
  • /home/dvdk/delk/rfs/tisdk

Working with DIVELK[edit | edit source]

Creating the Virtual Machine[edit | edit source]

DIVELK provides a virtual machine image as a .ova file, which is a virtual application exported in Open Virtualization Format (OVF). Please find below the instructions for creating the Virtualbox virtual machine:

  1. Start the Oracle VM VirtualBox Manager

    Screenshot-Oracle VM VirtualBox Manager.png

  2. Click on File and select "Import Virtual Application", then click on "Open Virtual Application":

    Import-ova-01.png

  3. Navigate your file system and select the .ova file provided with the DIVELK:

    Import-ova-01b.png

  4. Click "Next" and on the next window click on "Import"

    Import-ova-02.png

Launching the VM[edit | edit source]

  1. Now that the virtual machine is ready, launch it by clicking on the start icon:

    Divelk-dvdk-configuration.png

  2. VirtualBox will open three message windows like the following, you can click "Ok" to close them

    VirtualBox Info.png

  3. When the boot process is completed, you can login into the Ubuntu system with the credentials provided with the development kit (you can find them into the README file contained in the dvdk folder of the kit distribution)
  4. Mount the sdk disk launching the sdk-mount.sh script contained into /home/dvdk directory as shown on the image below:

    Divelk-dvdk-sdk-mount.png

  5. After launching the VM for the first time, create the tftp directory for DIVELK contents:
    sudo mkdir /srv/tftp/divelk

Guest Additions Update[edit | edit source]

Once logged in, the system could suggest to update the Virtualbox Guest Additions package. You can follow the on-screen instructions to easily install the updated package.

Further steps[edit | edit source]

  1. Check if your keyboard layout matches the Ubuntu keyboard settings. You can change the keyboard layout selecting System->Preferences->Keyboard from the top panel menù.
  2. Configure the Virtual Machine network interface: VirtualBox_Network_Configuration
  3. Start working with the development kit

DIVELK HowTos[edit | edit source]

Once the virtual machine is ready, the actual development kit can be found into the directory /home/dvdk/delk:

Divelk-dvdk-divelk-content.png

The delk directory contains the following subdirectories:

  • arago-2012.10: the cross-toolchain. GNU Compiler Collection (GCC) version is 4.5.3
  • linux-am33x: the Linux source tree
  • u-boot-am33x: the U-Boot source tree
  • rfs: DIVELK provides two root file systems:
    • arago-base: minimal root file system with basic packages (/home/dvdk/delk/rfs/arago-base)
    • tisdk: full root file system with lots of packages, useful during the development phase (/home/dvdk/delk/rfs/tisdk)
  • env.sh: a bash script containing the following lines:
export PATH=~/diva/arago-2012.10/bin:$PATH
export ARCH=arm
export CROSS_COMPILE=arm-arago-linux-gnueabi-

By issuing the following command, some environment shell variables required during the building procedure are set up:

source ~/diva/env.sh


Build a custom application[edit | edit source]

This section will be completed in a future release of this manual.

Build/configure Linux kernel[edit | edit source]

Enter the Linux sources directory (~/diva/delk/linux-am33x.git) and run the following commands:

dvdk@dvdk-vm:~/diva/delk/linux-am33x.git$ make diva_defconfig
dvdk@dvdk-vm:~/diva/delk/linux-am33x.git$ make uImage

The former command select the default Diva configuration, while the latter builds the kernel binary image with the required u-boot header.

Default linux kernel configuration can be changed by using the standard menuconfig, xconfig, gconfig make target.

Subsequent builds just require uImage make target to update the binary image.

Once the build process is complete, the kernel binary image is stored into the arch/arm/boot/uImage file. This file can be copied to the /srv/tftp/divelk/ directory with the following command:

dvdk@dvdk-vm:~/diva/delk/linux-am33x.git$ sudo cp arch/arm/boot/uImage /srv/tftp/divelk/

Build/configure U-Boot only[edit | edit source]

Enter the Linux sources directory (~/diva/delk/u-boot-am33x.git) and run the following commands:

dvdk@dvdk-vm:~/diva/delk/u-boot-am33x.git$ make diva_spiboot
dvdk@dvdk-vm:~/diva/delk/u-boot-am33x.git$ make

The former command select the default Diva configuration which is used to boot from SPI NOR Flash, while the latter build the u-boot binary images.

Subsequent builds just require make command, without targets, to update the binary images.

U-boot is composed by two binary images called:

  • MLO (which is called also SPL or 1st stage)
  • u-boot.img (which is the main u-boot image, plus an additional header needed by SPL)

Once the build process is complete, the binary images can be copied to the /srv/tftp/divelk/ directory with the following command:

dvdk@dvdk-vm:~/diva/delk/linux-am33x.git$ sudo cp MLO u-boot.img /srv/tftp/divelk/

Build the graphics components[edit | edit source]

AM335x processors provide a PowerVR SGX530 2D/3D graphics accelerator (SGX). This subsystem accelerates 2-dimensional (2D) and 3-dimensional (3D) graphics applications. The SGX subsystem is based on the POWERVR® SGX core from Imagination Technologies. SGX is a new generation of programmable POWERVR graphic cores. The POWERVR SGX530 v1.2.5 architecture is scalable and can target all market segments from mainstream mobile devices to high-end desktop graphics.

TI Linux Graphics SDK is the development package that provides graphics drivers and OpenGLES1.1,2.0 and OpenVG libraries and demos running on all TI platforms.

Instruction on how to build the graphic components can be found here: http://processors.wiki.ti.com/index.php/Graphics_SDK_Quick_installation_and_user_guide

Boot configurations[edit | edit source]

Please refer to the Booting_Linux_Kernel article.

Memory Map[edit | edit source]

DRAM bank   = 0x00000000
-> start    = 0x80000000
-> size     = 0x20000000
DIVA# nand info
Device 0: nand0, sector size 128 KiB
  Page size      2048 b
  OOB size         64 b
  Erase size   131072 b

Quick start[edit | edit source]

DivaEVB-Lite standalone[edit | edit source]

This section describes how to quick start a DivaEVB-Lite system, provided that it is programmed according to DIVELK configuration.

  1. connect the serial cable, provided with the board, to J6
  2. connect this cable to PC COM port through a NULL-modem cable (not provided)
  3. start your favourite terminal software on PC; communication parameters are:
    • baud rate: 115200 Bps
    • data bits: 8
    • stop bits: 1
    • parity: none
  4. (optional) to connect the system to Ethernet LAN, please plug cable on connector J7
  5. connect a 12Vcc power supply to J8

Once power has been applied, U-Boot bootloader will be executed and the following messages will be printed on serial console (please note that messages may vary for different U-Boot releases)

U-Boot SPL 2012.10-00096-g35a1513-dirty (Mar 11 2013 - 17:30:35)
>>spl:board_init_r()
boot device - 5 - 0x5
Jumping to U-Boot
image entry point: 0x80800000


U-Boot 2012.10-00110-ge8fd044-dirty (May 13 2013 - 14:01:25) [delk-0.9.1-rc1]

I2C:   ready
DRAM:  512 MiB
WARNING: Caches not enabled
Now running in RAM - U-Boot at: 9ff46000
NAND:  1024 MiB
MMC:   OMAP SD/MMC: 0
SF: Detected S25FL256S_64K with page size 256, total 33554432 bytes
SF: Detected S25FL256S_64K with page size 256 Bytes, total 32 MiB
READ: 0xc0000 => cmd = { 0x0b 0x000c000000 } len = 0x40000
READ: 0x100000 => cmd = { 0x0b 0x0010000000 } len = 0x40000
USB Host mode controller at 47401000 using PIO, IRQ 0
USB Host mode controller at 47401800 using PIO, IRQ 0
Module id#: 0x1
Net:   cpsw connected to SMSC LAN8710/LAN8720
cpsw, usb_ether
Hit any key to stop autoboot:  0 
DIVA#

These messages are printed by U-Boot, which has a serial console that allows basic interaction with the system.

At the end of its boot sequence, U-Boot prints DIVA# prompt and waits for user commands.

The default u-boot environment can be printed using the print command:

DIVA# print
addcons=setenv bootargs ${bootargs} console=${console} loglevel=8
addip=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off panic=1 eth0=${ethaddr}
baudrate=115200
bootcmd=dcache on; echo trying to boot from DELK MMC; mmc rescan 0; fatload mmc 0 80900000 boot.scr; source 80900000; run net_nfs
bootdelay=3
bootfile=diva/uImage.as
console=ttyO0,115200n8
ethact=cpsw
ethaddr=00:50:c2:1e:af:af
ethdev=eth0
fdtaddr=0x80F80000
gatewayip=192.168.0.254
hostname=diva
ipaddr=192.168.0.77
kloadaddr=0x80007fc0
load=tftp ${loadaddr} diva/u-boot.img.as
loadaddr=0x80200000
loadk=tftp ${kloadaddr} ${bootfile}
module_id#=0x1
nand_load_1st=tftp ${loadaddr} diva/MLO
nand_nfs=nand read ${kloadaddr} 0x2A0000 0x400000; run nfsargs addip addcons; bootm ${kloadaddr}
nand_update=nand erase 80000 60000; nand write ${loadaddr} 80000 60000
nand_update_1st=nand erase 0 20000; nand write ${loadaddr} 0 20000
nand_updatek=nand erase 0x2A0000 0x400000; nand write ${kloadaddr} 0x2A0000 0x400000
net_nfs=tftp ${kloadaddr} ${bootfile}; run nfsargs addip addcons; bootm ${kloadaddr}
netdev=eth0
netmask=255.255.255.0
nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} rootdelay=2
rdaddr=0x81000000
rootpath=/home/shared/devel/dave/diva-DDx/sw/linux/rfs/delk
serverip=192.168.0.23
spi_load_1st=tftp ${loadaddr} diva/MLO.byteswap.as
spi_nfs=sf probe;sf read ${kloadaddr} 0x140000 0x400000; run nfsargs addip addcons; bootm ${kloadaddr}
spi_update=sf probe 0:0; sf erase 0x40000 0x80000; sf write ${loadaddr} 0x40000 0x80000
spi_update_1st=sf probe 0:0; sf erase 0x0 0x40000; sf write ${loadaddr} 0x0 0x40000
spi_updatek=sf probe 0:0; sf erase 0x140000 0x400000; sf write ${kloadaddr} 0x140000 0x400000
stderr=serial
stdin=serial
stdout=serial
usbnet_devaddr=00:18:30:f0:2f:be
ver=U-Boot 2012.10-00110-ge8fd044-dirty (May 13 2013 - 14:01:25) [delk-0.9.1-rc1]

Environment size: 1987/262139 bytes
DIVA#


DivaEVB-Lite plugged on Dacu[edit | edit source]

This section describes how to quick start a Diva system composed of a Diva SOM plugged into the DivaEVB-Lite and then mounted on the Dacu carrier board, provided that it is programmed according to DIVELK configuration.

  1. connect the serial cable, provided with the board, to the J25 pin-strip connector on the Dacu board
  2. connect this cable to PC COM port through a NULL-modem cable (not provided)
  3. start your favourite terminal software on PC; communication parameters are:
    • baud rate: 115200 Bps
    • data bits: 8
    • stop bits: 1
    • parity: none
  4. (optional) to connect the system to Ethernet LAN, please plug cable on connector J7 of the DivaEVB-Lite
  5. connect a 12Vcc power supply to JP2 on the Dacu board

Once power has been applied, U-Boot bootloader will be executed and and the following messages will be printed on serial console (please note that messages may vary for different U-Boot releases)

U-Boot SPL 2012.10-00096-g35a1513-dirty (Mar 11 2013 - 17:30:35)
>>spl:board_init_r()
boot device - 5 - 0x5
Jumping to U-Boot
image entry point: 0x80800000


U-Boot 2012.10-00110-ge8fd044-dirty (May 13 2013 - 14:01:25) [delk-0.9.1-rc1]

I2C:   ready
DRAM:  512 MiB
WARNING: Caches not enabled
Now running in RAM - U-Boot at: 9ff46000
NAND:  1024 MiB
MMC:   OMAP SD/MMC: 0
SF: Detected S25FL256S_64K with page size 256, total 33554432 bytes
SF: Detected S25FL256S_64K with page size 256 Bytes, total 32 MiB
READ: 0xc0000 => cmd = { 0x0b 0x000c000000 } len = 0x40000
READ: 0x100000 => cmd = { 0x0b 0x0010000000 } len = 0x40000
USB Host mode controller at 47401000 using PIO, IRQ 0
USB Host mode controller at 47401800 using PIO, IRQ 0
Module id#: 0x1
Net:   cpsw connected to SMSC LAN8710/LAN8720
cpsw, usb_ether
Hit any key to stop autoboot:  0 
DIVA#

These messages are printed by U-Boot, which has a serial console that allows basic interaction with the system.

At the end of its boot sequence, U-Boot prints DIVA# prompt and waits for user commands.

The default u-boot environment can be printed using the print command:

DIVA# print
addcons=setenv bootargs ${bootargs} console=${console} loglevel=8
addip=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off panic=1 eth0=${ethaddr}
baudrate=115200
bootcmd=dcache on; echo trying to boot from DELK MMC; mmc rescan 0; fatload mmc 0 80900000 boot.scr; source 80900000; run net_nfs
bootdelay=3
bootfile=diva/uImage.as
console=ttyO0,115200n8
ethact=cpsw
ethaddr=00:50:c2:1e:af:af
ethdev=eth0
fdtaddr=0x80F80000
gatewayip=192.168.0.254
hostname=diva
ipaddr=192.168.0.77
kloadaddr=0x80007fc0
load=tftp ${loadaddr} diva/u-boot.img.as
loadaddr=0x80200000
loadk=tftp ${kloadaddr} ${bootfile}
module_id#=0x1
nand_load_1st=tftp ${loadaddr} diva/MLO
nand_nfs=nand read ${kloadaddr} 0x2A0000 0x400000; run nfsargs addip addcons; bootm ${kloadaddr}
nand_update=nand erase 80000 60000; nand write ${loadaddr} 80000 60000
nand_update_1st=nand erase 0 20000; nand write ${loadaddr} 0 20000
nand_updatek=nand erase 0x2A0000 0x400000; nand write ${kloadaddr} 0x2A0000 0x400000
net_nfs=tftp ${kloadaddr} ${bootfile}; run nfsargs addip addcons; bootm ${kloadaddr}
netdev=eth0
netmask=255.255.255.0
nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} rootdelay=2
rdaddr=0x81000000
rootpath=/home/shared/devel/dave/diva-DDx/sw/linux/rfs/delk
serverip=192.168.0.23
spi_load_1st=tftp ${loadaddr} diva/MLO.byteswap.as
spi_nfs=sf probe;sf read ${kloadaddr} 0x140000 0x400000; run nfsargs addip addcons; bootm ${kloadaddr}
spi_update=sf probe 0:0; sf erase 0x40000 0x80000; sf write ${loadaddr} 0x40000 0x80000
spi_update_1st=sf probe 0:0; sf erase 0x0 0x40000; sf write ${loadaddr} 0x0 0x40000
spi_updatek=sf probe 0:0; sf erase 0x140000 0x400000; sf write ${kloadaddr} 0x140000 0x400000
stderr=serial
stdin=serial
stdout=serial
usbnet_devaddr=00:18:30:f0:2f:be
ver=U-Boot 2012.10-00110-ge8fd044-dirty (May 13 2013 - 14:01:25) [delk-0.9.1-rc1]

Environment size: 1987/262139 bytes
DIVA#

Use cases[edit | edit source]

Application notes[edit | edit source]