Changes

Jump to: navigation, search

Managed Virtual Machine (MVM)

5,463 bytes added, 09:31, 8 September 2017
Contents and provided services
<code>dvdk</code> can run commands with root privileges via <code>sudo</code>.
 
The following sections detail the organization of the most common types of MVMs available. These types are determined by the target operating system.
====Yocto-based Linux distribution====
The typical development/deployment process basically consists of two stages:
* editing/building/debugging code: during this stage , the target is connected via Ethernet LAN to host machine and is configured to ** retrieve Retrieve binary images (i.e. Linux kernel) via TFTP protocol** mount Mount the development root file system via NFS protocol. This root file system is physically in the file system of the host machine as depicted [[Deploying_Embedded_Linux_Systems#The_development_environment|here]].
* deployment: the goal of this stage is to configure the target for normal operation, that is out of the development environment. A target root file system - optimized in terms of memory footprint - is used. This root file system is stored on target's non-volatile memory.
To implement this workflow, MVM provides
* TFTP server with <code>/tftpboot</code> as root directory[1]* NFS server configured to export <code>/home</code> on <code>192.168.0.0/24</code> network without root squash.[1]
* target't development root file systems in <code>/home/dvdk/<target_name>/rfs/<kit_name></code>
* cross-tool chain
* [[Debugging_with_Eclipse_(MVM)|Eclipse/ADT integrated development environment]].
Part of these resources was generated by the Yocto build system, as depicted in the following picture.  [[File:Belk-yocto.png|thumb|center|600px|Simplified flow of Yocto-based building process]]  The Yocto-related resources included in the MVM allows the developer to:*Build U-Boot SPL/U-Boot separately*Build the Linux kernel separately*Build user application upon the Yocto SDK*Use a pre-built root file system image*Install on the target pre-built additional packages. These build processes make use of a pre-built cross-toolchain. To use it, the shell environment has to be set up properly first. To do this, just issue the following command:<pre>source /home/dvdk/env.sh</pre> For detailed instructions on how to build U-Boot and the Linux kernel, please refer to the specific documentation of your kit. By default, the sources are installed in the following directories:*U-Boot: <code>/home/dvdk/<target_name>/u-boot</code>*Linux kernel: <code>/home/dvdk/<target_name>/linux</code>*MVM: <code>/home/dvdk/<target_name>/mvm/</code>.U-Boot and Linux sources were retrieved from public git repositories, during the creation process of the MVM. Again, the specific documentation of your kit indicates the addresses of these repositories. Please note that access to DAVE Embedded Systems' git repositories is granted to development kit's owners only. Please refer to [[Accessing_DAVE_Embedded_Systems_restricted_git_repositories|this page]] for detailed instructions on how to get access. The components listed in the table above can be kept in sync and up to date with DAVE Embedded Systems' repositories.Once the git account has been enabled, the developer can:*clone the repository with the <code>git clone <git_remote_repository></code> command *synchronize a source tree entering the repository directory and launching the <code>git fetch origin</code> command.Please note that git fetch doesn't merge the commits on the current branch. To do that, the developer should run the <code>git merge</code> command or replace the ''fetch-merge'' process with a single <code>git pull</code> command. Please note that the recommended method is the ''fetch-merge'' process. For further information on Git, please refer to the official Git Documentation (http://git-scm.com/documentation). {{ImportantMessage|text=Technically speaking, the developer can run a Yocto-based full build process to (re)generate all the pre-built objects includes in the MVM. However, this process requires a lot of hardware resources in terms of disk storage, RAM, and processing power. For this reason, it is discouraged to use the MVM to perform such build. Using a physical machine is recommended instead. For more details about TFTP on this, please refer to [[Advanced_use_of_Yocto_build_system_(BELK/BXELK)|this page]].}}  As known, Linux needs a root file system to operate: 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 NFS servers finally launches the <code>/sbin/init</code>, the first user space process and "father" of all the other processes.For more information on host sidethe Linux filesystem, please refer to http://www.thegeekstuff.com/2010/09/linux-file-system-structure/. BELK/BXELK provides one (or more) pre-built root file system, that can be used during the evaluation/development phase since it provides a relatively rich set of packages for working with the BORA platform. This root file system is located here: <code>/home/dvdk/<target_name>/rfs/<kit_name></code>. BELK/BXELK also provides a rich repository containing pre-built applications and libraries. These packages can be easily installed on the target by using the <code>smart</code> tool. Please refer to [[Advanced_use_of_Yocto_build_system_(BELK/BXELK)#Using_pre-built_package_archive|this section]] for more details. The following table lists the pre-built root file systems included in the MVM.{| class="wikitable" border="1"!Kit version<br>BELK<br>BXELK!Image name!Build commands!Path|-|<br>4.0.0<br>2.0.0|<code>bora-image-devel</code>|<pre>dvdk@dvdk-vm:~/belk$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > repodvdk@dvdk-vm:~/belk$ chmod a+x repodvdk@dvdk-vm:~/belk$ ./repo init -u git@git.dave.eu:bora/bora-bsp.git -b bora-mortydvdk@dvdk-vm:~/belk$ ./repo syncdvdk@dvdk-vm:~/belk$ source bora-bsp-init-env.shdvdk@dvdk-vm:~/belk/build$ bitbake bora-image-devel</pre>|<code>/home/dvdk/bora/rfs/belk-4.0.0</code>|-|}  The following table lists the pre-built Yocto SDKs included in the MVM. These SDKs are associated with the root file system images mentioned above.{| class="wikitable" border="1"!Kit version<br>BELK<br>BXELK!SDK name!Build commands!Path|-|<br>4.0.0<br>2.0.0|<code>bora-image-devel</code>|<pre>bitbake bora-image-devel -c populate-sdk</pre>|<code>/home/dvdk/bora/sdk/belk-4.0.0/sysroots/cortexa9hf-neon-xilinx-linux-gnueabi</code>|-|}  About C/C++ application development and debugging, please refer to [[Setting_up_tftp_and_nfsDebugging_with_Eclipse_(MVM)|this page]].             
[1] For more details about TFTP and NFS servers on host side, please refer to this [[Setting_up_tftp_and_nfs|page]].
====Android-based Linux distribution====
This section will be completed in a future version of this article.
4,650
edits

Navigation menu