{{WarningMessage|text=The following information are valid for <b>DIVELK</b> version up to release <b>2.2.0</b>}}
= Introduction =
* build system (on development host)
== Diva DIVA Embedded Linux Kit: what is it? ==
[[File:Divelk_01.png|500px]]
Diva 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 DivaDIVA-based systems
* build Linux applications that will run on the target.
The kit is composed of:
* hardware platform composed by Diva DIVA system-on-module (SOM for short) and carrier board. Supported carrier boards are:** DivaEVBDIVAEVB-Lite standalone** DivaEVBDIVAEVB-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 DIVA hardware characteristics, please refer to the Diva DIVA Hardware Manual. An account for the reserved area of [http://www.dave.eu DAVE's website] is required to access the kit contents.
== Diva DIVA Embedded Linux Kit: what is not? ==
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.
== About this manual ==
This document describes how to run Linux on the DivaDIVA/DivaEVBDIVAEVB-Lite/Carrier-board system and how to work with '''DIVELK version 2.0.0'''and above. For novice users who have no experience at all about embedded Linux systems, reading of [http://shop.oreilly.com/product/9780596002220.do 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 [http://free-electrons.com Free Electrons website].
== Support service ==
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 [mailto:support-divahelpdesk@dave.eu support-divahelpdesk@dave.eu]. Software upgrades are available in the restricted download area of '''DAVE Embedded Systems''' web sitegit server: http://www<code>git@git.dave.eu</reserved-area. code> An account is required to access this area (please contact [mailto:support-divahelpdesk@dave.eu support-divahelpdesk@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.
== Components ==
=== Diva DIVA SOM ===
[[File:Diva-400.png|300px]]
The heart of Diva DIVA SOM is Texas Instruments "Sitara" [http://www.ti.com/lsds/ti/arm/sitara_arm_cortex_a_processor/sitara_arm_cortex_a8/am335x_arm_cortex_a8/products.page?paramCriteria=no AM335x microprocessors]. From a software point of view, Texas Instruments supports this processor family through so-called Linux EZ AM Software Development Kit (EZSDK AMSDK for short). EZSDK AMSDK releases are published on a regular basis. For more details please refer to:
Diva DIVA Embedded Linux Kit, in turn, is directly derived from EZSDKAMSDK. Hence DIVELK documentation often refers to EZSDK AMSDK resources.
=== Carrier boards ===
==== DivaEVBDIVAEVB-Lite ====
DivaEVBDIVAEVB-Lite is an adapter board designed to evaluate the functions of Diva DIVA system-on-module.
[[File:Diva-evb-with-som.png|300px]]
For further information on the DivaEVBDIVAEVB-Lite, please refer to [[DivaEVB-Lite]]
The following figure shows the carrier board block diagram:
==== Dacu ====
DivaEVBDIVAEVB-Lite can be plugged on the Dacu carrier board to extend the set of available interfaces.
[[File:Diva divaevb dacu.png|450px]]
# 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 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 [[Booting_Linux_Kernel#Configuration_net_nfs | net_nfs]]).
==== Please note that DIVELK software components ====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.
'''DAVE Embedded Systems''' adds For further information on AMSDK, please refer to the latest EZSDK from Texas Instruments the customization required to support the Diva platform[http://processors.wiki.ti.com/index.php/Sitara_SDK_5. For this reason most of the documentation provided by TI remains valid for the DIVELK development kit06. However, some customization is required, in particular at bootloader and linux kernel levels00_Release_Notes Sitara SDK release notes].
The following table shows how DIVELK releases are related to EZSDK releases.
{| class="wikitable"
!
!colspan="2" | DIVELK version
|-
|Release number
|1.0.0
|2.0.0
|-
|Status
|Released
|Work in progress
|-
|Release date
|June 2013
|August 2014
|-
|'''Release notes'''
|[[Software_Manual_(Diva)#DIVELK_1.0.0 | Ver 1.0.0]]
| -
|-
|SOM PCB version
|CS133012A
|CS133012A
|-
|Supported carrier boards
|[[DivaEVB-Lite]]<br>[[:Category:Dacu | Dacu]]
|[[DivaEVB-Lite]]<br>[[:Category:Dacu | Dacu]]
|-
|U-Boot version
|2012.10-divelk-1.0.0
|2012.10-divelk-2.0.0
|-
|Linux version
|3.2.0-divelk-1.0.0
|3.12.10-divelk-2.0.0
|-
|Drivers
|valign="top" | SPI NOR Flash (boot)<br>NAND 8 bit (boot)<br>UART0 (2-wire)<br>USB Host<br>SD/MMC1<br>GPIO<br>LCD<br>Touch screen controller<br>EMAC0 RMII (Fast Ethernet)<br>PMIC RTC (battery powered)<br>
Audio (ALSA)
|valign="top" | SPI NOR Flash (boot)<br>NAND 8 bit (boot)<br>UART0 (2-wire)<br>USB Host<br>SD/MMC1<br>GPIO<br>LCD<br>Touch screen controller<br>EMAC0 RMII (Fast Ethernet)<br>PMIC RTC (battery powered)<br>
Audio (ALSA)<br>USB OTG<br>CAN<br>ADC
|-
|TI EZSDK
|05.06.00.00
|07.00.00.00
|-
|Build System
| -
|Yocto Dylan (1.4)
|-
|}
==== DIVELK microSD Layout software components ==== The microSD provided with DIVELK is used to store:* A bootable partition (mmcblk0p1, vfat) containing:** binary images (MLO, u-boot and kernel images)** DIVELK documentation** DIVELK DVDK virtual machine image* DIVELK root file system partition (mmcblk0p2, ext3)DIVELK contains all the required software and documentation to start developing Linux application on the Diva platform. In particular, DIVELK provides a Virtualbox virtual machine with two emulated disks:* Boot disk with pre-installed Ubuntu Linux 12.04.2 LTS and pre-configured basic Linux services (TFTP, NFS, ...) * Secondary disk containing source code and tools:** Bootloader (u-boot) source tree cloned from '''DAVE Embedded Systems''' public git repository ** Linux kernel source tree cloned from '''DAVE Embedded Systems''' 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 '''DAVE Embedded Systems''' adds to the latest AMSDK from Texas Instruments the customization required to support the DIVA platform. For this reason most of the official trees released documentation provided by TI; these trees have been customized to add support remains valid for the Diva SOMDIVELK development kit. However, some customization is required, in particular at bootloader and linux kernel levels.
For further information on EZSDK, please [[Diva_Embedded_Linux_Kit_(DIVELK)#DIVELK_software_components | Please refer to [http://processors.wiki.ti.com/index.php/Sitara_SDK_5.06.00_Release_Notes Sitara SDK release notesthis table how DIVELK releases are related to AMSDK releases]].
=== DIVELK Updates ===
{{ImportantMessage|text=It's recommended to use the latest available DIVELK version. Customer who want to update to the latest DIVELK release can send an email to [mailto:support-diva@dave.eu support-diva@dave.eu]. Please refer to [[Software_Manual_(Diva)#Release notes | Release notes]] for further information.}}
==== Updating git repositories ====
|Linux
|git@git.dave.eu:dave/diva/linux-am33x.git
|/home/dvdk/delkdivelk/linux-am33x.git
|-
|U-Boot
|git@git.dave.eu:dave/diva/u-boot-am33x.git
|/home/dvdk/delkdivelk/u-boot-am33x.git|-|Yocto BSP|git@git.dave.eu:dave/diva/diva-bsp.git|Please refer to [[Software_Manual_(Diva)#Building the software components with Yocto | Building the software components with Yocto]]
|-
|}
* start a shell session
* enter the .ssh subdirectory into your home directory: <code>cd ~/.ssh/</code>
* launch the following command: <br><pre>ssh-keygen -t rsa -C "username@myhost.com"-f username@myhost.com</pre>
* this command creates the files <code>~/.ssh/username@myhost.com</code> ('''private key''') and <code>~/.ssh/username@myhost.com.pub</code> ('''public key''')
* edit your <code>~/.ssh/config</code> adding the following lines:
<pre class="workstation-terminal">
dvdk@dvdk-vm:~$ cd /home/dvdk/delkdivelk/linux-am33x.git/dvdk@dvdk-vm:/home/dvdk/delkdivelk/linux-am33x.git$ git fetch origin
</pre>
== Release notes ==
=== DIVELK 1.0.0 ===* Release date: June 2013* Status: released* EZSDK versionPlease refer to [https: 05//wiki.06dave.00eu/index.00* Supported carrier boards: DivaEVB-Lite, Dacu==== php/Diva_Embedded_Linux_Kit_(DIVELK)#Release_notes this page] for DIVELK Release Notes ====* First official release
= Developing environment =
[[File: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 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 ([http://en.wikipedia.org/wiki/Trivial_File_Transfer_Protocol 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 [http://en.wikipedia.org/wiki/Network_File_System 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 ==
For further information on Linux for TI processors, please refer to http://processors.wiki.ti.com/index.php/Category:Linux
==== Linux Device Tree ====
The Flattened Device Tree (FDT) is a data structure for describing the hardware in a system (for further information, please refer to http://elinux.org/Device_Tree). Device tree source code is stored into the arch/arm/boot/dts/ directory.
=== Target root file system ===
Please refer to [http://wiki.dave.eu/index.php/Category:DVDK DVDK page on '''DAVE Embedded Systems''' Developer's Wiki] for further information on DVDK.
== Build system ==
=== Introduction ===
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:
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 ====
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 <code>tftp</code> 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 <code>tftp</code> installation has <code>/srv/tftp</code> as work directory. It is recommended to create a subdirectory dedicated to the image files created with the DIVELK.
==== NFS Server ====
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 this 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 <code>/home</code> directory and all the subdirectories.
==== Pre-built toolchain ====
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 version is 4.5.3).
==== Pre-built root file system ====
Linux needs a root file system: a root file system must contain everything needed to support the Linux system (applications, settings, data, ..). The [http://en.wikipedia.org/wiki/Root_directory 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 <code>/sbin/init</code>, the first user space process and "father" of all the other processes. An example of root file system is shown below:
For more information on the Linux filesystem, please refer to [http://www.freeos.com/articles/3102/ 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
== DVDK installation ==
* VirtualBox virtual machine (.OVA archive)
* Based on Ubuntu Lubuntu 12.04 LTS(64-bit version)
* Pre-installed VirtualBox Guest Additions
* Multiple LXDE desktop environment available:** Unity (Ubuntu)** LXDE (Lubuntu)* Boot disk with pre-installed Ubuntu/Lubuntu Linux 12.04.2 LTS the distro and pre-configured basic Linux services:** TFTP: with base directory /srv/tftp/(please refer to [[VirtualBox_Network_Configuration]])** NFS: configured through the /etc/exports file(please refer to [[VirtualBox_Network_Configuration]])
* Secondary disk containing source code and tools:
** Bootloader (u-boot) source tree cloned from DAVE Embedded Systems public git repository
** External pre-built toolchain
** Yocto bsp for DIVA
* Pre-installed Yocto-based root file system systems with setup scripts, makefiles, example applications, ...
* Administrator account (dvdk) with autologin. Please note that the user account credentials are provided with the development kit (you can find them into the README file contained in the sw/dvdk folder of the kit distribution)
=== DIVELK microSD Layout ===
The microSD provided with DIVELK is used to store:
* A bootable partition (mmcblk0p1, vfat) containing:
** binary images (MLO, u-boot and kernel images)
** DIVELK documentation
** DIVELK DVDK virtual machine image
* DIVELK root file system partition (mmcblk0p2, ext3)
DIVELK contains all the required software and documentation to start developing Linux application on the DIVA platform.
=== Importing the Virtual Machine ===
# 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)
# Mount the sdk disk launching the sdk-mount.sh script contained into /home/dvdk directory as shown on the image below:<br><br>[[File:divelk-dvdk-sdk-mount.png|600px]]<br><br>
<pre>
dvdk@dvdk:~$ sh sdk-mount.sh divelk
[sudo] password for dvdk:
dvdk@dvdk:~$
</pre>
# Start working with the development kit
== Working with DIVELK == == DIVELK HowTos = The build system === 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: * OpenEmbedded (http://wiki.openembedded.net/index.php/Main_Page)* Yocto (https://www.yoctoproject.org/)* Buildroot (http://buildroot.uclibc.org)
Once the virtual machine is ready, the actual development kit can be found into the directory <code>The Texas Instruments Arago distribution (http:/home/dvdkarago-project.org/wiki/delk<index.php/code>: <br><br>[[File:Divelk-dvdk-divelk-contentMain_Page) and therefore DIVELK 2.0.0 are based on Yocto.png|600px]]<br><br>
The delk directory contains === Overview of the following subdirectories:installed components ===
* aragoOnce the virtual machine is ready, the actual development kit can be found into the directory <code>/home/dvdk/divelk</code>: <br><br>[[File:Divelk-dvdk-divelk-2012content.10png|600px]]<br><br> The divelk directory contains the following subdirectories: * yocto: the Yocto SDK installation directory (containing 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
* diva-bsp: the Yocto BSP for DIVA* rfs: DIVELK provides two three root file systems:** aragodiva-base: minimal root file system with basic packages (/home/dvdk/delkdivelk/rfs/aragodiva-base)** tisdkdiva-matrix: full root file system with lots of packagesand demo applications, useful during the development phase (/home/dvdk/delkdivelk/rfs/tisdkdiva-matrix)** diva-qt5: root file system with Qt5 libraries and examples (/home/dvdk/divelk/rfs/diva-qt5)
* env.sh: a bash script containing the following lines:
Using the following command, the environment shell variables required during the building procedure are set up:
<pre>
source ~/divelk/env.sh
</pre>
=== Setting up the server environment ===
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 ====
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 <code>tftp</code> 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 <code>tftp</code> installation has <code>/srv/tftp</code> as work directory. A subdirectory dedicated to the image files associated to the DIVELK (/srv/tftp/divelk) is available, but developers can add their custom subdirectories when required.
==== NFS Server ====
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 developers on their 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 this way, developers 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 (Network File System). As for TFTP, installation and configuration depends on the host Linux distribution.
The default DVDK NFS installation is configured for sharing <code>/home/dvdk/divelk</code> directory and all the subdirectories.
We recommend reading the [[VirtualBox_Network_Configuration]] page for additional details on the DVDK networking configuration and on how to enable NFS.
==== Pre-built toolchain ====
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 Linaro gnueabihf-4.7-2013.03 toolchain (GCC version is 4.7.3).
==== Pre-built root file system ====
Linux needs a root file system: a root file system must contain everything needed to support the Linux system (applications, settings, data, ..). The [http://en.wikipedia.org/wiki/Root_directory 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 <code>/sbin/init</code>, the first user space process and "father" of all the other processes. An example of root file system is shown below:
For more information on the Linux filesystem, please refer to [http://www.freeos.com/articles/3102/ The Linux filesystem explained]
DIVELK provides pre-built root file systems, that can be used during the evaluation/development phase, since they contains the software packages for working with the DIVA platform.
DIVELK root file systems are built with the Yocto build system and are stored into the following directories:
* /home/dvdk/divelk/rfs/diva-base
* /home/dvdk/divelk/rfs/diva-matrix
* /home/dvdk/divelk/rfs/diva-qt5
== Building the software components with Yocto ==
These packages can be installed with the following command:
In the DIVELK, we have simplified the Yocto initialization phase, relying on the repo tool and on a Diva DIVA bsp git repository, so that the initialization can be completed with a few commands as reported below:
Please note that even building the basic root file system requires a few hours to complete the process on a mid-hi range desktop PC (4-6 cores, 8-12 GiB RAM), also depending on the Internet connection speed (all source are fetched from the network). Nearly 20GiB of disk space is required for the build. Moreover, building inside the DVDK adds some overhead, since the performances of a virtual machine are reduced if compared to the physical hardware. Thus, it's recommended to check the hardware capabilities of the host system and, when building with Yocto is required, developers should consider the following options:
* migrating the build system to a physical machine
* assuming that the host system has the required resources, extending the hardware capabilities of the default DVDK (eg: adding more cores and disk space)
Once completed the initialization phase, developers can launch the Yocto image build process with the following commands:
<pre>
$ cd ~/divelk/diva-bsp
$ source ~/divelk/env.sh
$ source diva-bsp-init-env.sh
$ bitbake matrix-rootfs-image
</pre>
Please note that three different images are available:
* matrix-rootfs-image (includes the matrix gui application from Texas Instruments)
* qt5-rootfs-image (root file system with Qt 5.1.1 libraries and examples)
* base-rootfs-image (minimal root file system)
The resulting files (kernel, device tree and u-boot binaries, plus root file system in a .tar.gz archive) will then be available inside the build/tmp/deploy/images/diva directory.
== 4.4 Building the software components outside Yocto ==
=== Build/configure Linux kernel ===
Enter the Linux sources directory (''~/diva/delkdivelk/linux-am33x.git'') and run the following commands:
<pre>
dvdk@dvdk-vm:~/diva/delkdivelk/linux-am33x.git$ make diva_defconfigdvdk@dvdk-vm:~/diva/delkdivelk/linux-am33x.git$ make uImageam335x-divelk.dtb
</pre>
The former command selects the default Diva DIVA configuration, while the latter builds the kernel binary image with the required u-boot headerand the dtb binary.
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 <code>arch/arm/boot/uImage</code> file, while the dtb is stored into the <code>linux-am33x/arch/arm/boot/dts/am335x-divelk. This dtb</code> file . These files can be copied to the <code>/srv/tftp/divelk/</code> directory with the following commandcommands:
Enter the U-Boot sources directory (''~/diva/delkdivelk/u-boot-am33x.git'') and run the following commands:
<pre>
dvdk@dvdk-vm:~/diva/delkdivelk/u-boot-am33x.git$ make diva_spibootdvdk@dvdk-vm:~/diva/delkdivelk/u-boot-am33x.git$ make
</pre>
The former command selects the default Diva DIVA configuration which is used to boot from SPI NOR Flash, while the latter builds the u-boot binary images.
Subsequent builds just require ''make'' command, without targets, to update the binary images.
Copy the executable file to the root file system, and execute it from the Diva DIVA system:
<pre>
root@diva:~#./hello
Hello world
</pre>
=== Build the graphics components ===
<strike>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.
[http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/latest/index_FDS.html 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</strike>
== Boot configurations ==
OOB size 64 b
Erase size 131072 b
</pre>
=== Default flash NOR SPI partitions ===
<pre>
[ 1.370563] Creating 7 MTD partitions on "spi1.0":
=== DivaEVB-Lite plugged on Dacu === This section describes how to quick start a Diva DIVA system composed of a Diva DIVA SOM plugged into the DivaEVBDIVAEVB-Lite and then mounted on the Dacu carrier board, provided that it is programmed according to DIVELK configuration. The SD provided with the DIVELK can be used to boot the system, since it contains a bootable partition (mmcblk0p1) and a root file system partition (mmcblk0p2).
# connect the serial cable, provided with the board, to the J25 pin-strip connector on the Dacu board
#* stop bits: 1
#* parity: none
# (optional) to connect the system to Ethernet LAN, please plug cable on connector J7 of the DivaEVBDIVAEVB-Lite
The system is configured to boot automatically, when powered up, from the SD card, loading u-boot which runs the<code>mmcboot</code> macro, that loads the kernel and launches it with the options for mounting the root file system from the mmcblk0p2 partition.
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1SF: Detected S25FL256S_64K with page size 256 Bytes, erase size 64 KiB, total 32 MiBUSB Host mode controller at 47401000 using PIO*** Warning - bad CRC, IRQ 0USB Host mode controller at 47401800 using PIO, IRQ 0default environmentModule id#: 0x1Net: cpsw connected to SMSC LAN8710/LAN8720cpsw, usb_ether
Hit any key to stop autoboot: 0
Booting trying to boot from mmc .DIVELK MMC reading boot.scr419 bytes read in 5 ms (81.1 KiB/s)## Executing script at 80900000
reading uImage
4714280 bytes read in 490 ms (9.2 MiB/s)3027568 reading am335x-divelk.dtb37129 bytes readin 11 ms (3.2 MiB/s)## Booting kernel from Legacy Image at 80007fc0 80200000 ... Image Name: Linux-3.212.010-divelk-12.0.0
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3027504 4714216 Bytes = 24.9 5 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
## Flattened Device Tree blob at 80f80000 Booting using the fdt blob at 0x80f80000 XIP Loading Kernel Image ... OK Loading Device Tree to 9fe02000, end 9fe0e108 ... OK
Starting kernel ...
Uncompressing [ 0.000000] Booting Linux... done, booting the kernel.on physical CPU 0x0[ 0.000000] Linux version 3.212.010-divelk-12.0.0 (amon@linuxserver2) (gcc version 4.57.3 20110311 20130226 (prerelease) (crosstool-NG linaro-1.13.1-4.7-2013.03-20130313 - Linaro GCC2013.03) ) #50 Wed May 22 1526 SMP Sat Sep 13 10:2745:18 59 CEST 20132014
modprobe: FATAL: Could not load /lib/modules/3.2.0-divelk-1.0.0/modules[ 4.dep382357] udevd[954]: No such file or directorystarting version 182 WARNING: -e needs -E or [ 9.887444] FAT-FWARNINGfs (mmcblk0p1): Couldn't open directory /lib/modules/3.2Volume was not properly unmounted.0-divelk-1Some data may be corrupt.0Please run fsck.0: No such file or directoryFATAL[ 10.144522] cryptodev: Could not open /lib/modules/3.2.0-divelk-driver 1.06 loaded.0/modules.dep.temp for writing: No such file or directory
Starting Bootlog daemon: bootlogd: cannot allocate pseudo tty: No such file or directory
bootlogd.
[ 6.686279] EXT3-fs (mmcblk0p2): using internal journal
ALSA: Restoring mixer settings...
Configuring network interfaces... [ 7 13.202239122234] net eth0: initializing cpsw version 1.12 (0)[ 13.130330] net eth0: CPSW phy found : id is : 0x7c0f1[ 13.144609] 8021q: adding VLAN 0 to HW filter on device eth0udhcpc (v1.1920.42) started
Sending discover...
Sending discover...
[ 16.362961] libphy: 4a101000.mdio:06 - Link is Up - 100/Full
Sending discover...
No lease, failing
INIT: Entering runlevel: 5
Starting system message bus: dbus.
UIM SYSFS Node Not FoundStarting Dropbear SSH server: modprobe: FATAL: Could not load /lib/modules/3.2.0-divelk-1.0.0/modules.dep: No such file or directorymodprobe: FATAL: Could not load /lib/modules/3.2.0-divelk-1.0.0/modules.dep: No such file or directory dropbear.
Starting telnet daemon.
Performing wifi calibration...
modprobe: FATAL: Could not load /lib/modules/3.2.0-divelk-1.0.0/modules.dep: No such file or directory
rm: can't remove '/lib/firmware/ti-connectivity/wl1271-nvs.bin': No such file or directory
ERROR: Module wl12xx_sdio does not exist in /proc/modules
nl80211 not found.
FATAL: Could not load /lib/modules/3.2.0-divelk-1.0.0/modules.dep: No such file or directory
Starting network benchmark server: netserver.
Starting syslogd/klogd: done
Starting thttpd.
[ 18.064361] Unhandled fault: external abort on non-linefetch (0x1018) at 0x4013d44cNo SGX hardware, not starting Starting PVRStarting Lighttpd Web Server: lighttpd.2012-12-17 10:16:46: (log.c.166) server started /Starting Matrix GUI application.FATAL: Could not load /lib/modules/3.2.0-divelk-1.0.0/modules.dep: No such file or directory
This section describes how to quick start a DivaEVB-Lite system, provided that it is programmed according to DIVELK configuration.
# connect the serial cable, provided with the board, to J6
# connect this cable to PC COM port through a NULL-modem cable (not provided)
# start your favourite terminal software on PC; communication parameters are:
#* baud rate: 115200 Bps
#* data bits: 8
#* stop bits: 1
#* parity: none
# (optional) to connect the system to Ethernet LAN, please plug cable on connector J7
# 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)
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#
</pre>
These messages are printed by U-Boot, which has a serial The console that allows basic interaction with the system.At dump below (obtained using the end of its boot sequence, U-Boot prints <code style="board-terminal">DIVA#print</code> prompt and waits for user commands.The command) shows the default u-boot environment can be printed using the <code style="board-terminal">print</code> command:
The frequency of the CPU can be changed on the run using the Cpufreq framework (please refer to the documentation included into the linux-am33x/Documentation/cpu-freq directory of the kernel source tree). The cpufreq framework works in conjunction with the related driver & governor.
Cpufreq implementation controls the Linux OPP (Operating Performance Points) adjusting the Cortex-A8 core voltages and frequencies. CPUFreq is enabled by default in the Diva DIVA kernel configuration.
To view the available governors:
== Running QT applications ==
The root file system provided with the DIVELK (/home/dvdk/delkdivelk/rfs/tisdk on the DVDK virtual machine) contains a pre-built version (4.8.0) of the QT libraries:
The root file system also provides a lot of pre-built demos and examples (with the related source code and project files), contained in the following directories:
The Matrix-Gui application (http://processors.wiki.ti.com/index.php/Matrix_Users_Guide) that launched automatically after DIVELK startup is based on QT and can directly show some demos (simply touching the QT icon). Moreover, additional examples can be launched, for example the "calculator" QML demo: