Open main menu

DAVE Developer's Wiki β

Changes

Software Manual (Diva)

26 bytes added, 10:28, 24 May 2013
m
no edit summary
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 (TftpTFTP, NFS, ...)
* Secondary disk containing source code and tools:
** Bootloader (u-boot) source tree cloned from DAVE's public git repository
[[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 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 tftpTFTP]), 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 ==
==== 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.
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 NFS installation is configured for sharing <code>/home</code> directory and all the subdirectories.
==== Pre-built toolchain ====
# 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>
# After launching the VM for the first time, create the <code>tftp </code> directory for DIVELK contents:<br><pre>sudo mkdir /srv/tftp/divelk</pre><br>
==== Guest Additions Update ====