If you're developing code for an x86 host, why bother using virtualization? The host and target are identical, so using virtualization software introduces overhead. Some of the problems introduced by a homogeneous host and target can be latent in nature, resulting in unexpected problems if the software happens to work by chance on the host environment. Virtualization still makes sense as part of the development process for the following reasons:
• Isolates development target dependencies: It's easy to become careless when you're compiling programs and depend on a library or configuration file that is present on the host computer but won't be available when the software is deployed. Testing and validating the boot-up sequence is best done using a clean computer, because the host environment can interfere in unexpected ways.
• Constrains resources: If the target machine has 8MB RAM, a virtual machine can handle that without any problems. If the target device doesn't have certain hardware like network adapters or serial ports, you can also do that in the virtual machine. For example, many embedded x86 targets have little or no video memory.
• Is highly repeatable: Nearly all virtual machines support the notion of fixed storage, which lets you make writes during the run of the application that are disposed of when the machine reboots. Using virtualization software, the computer can always be returned to a known state.
You can use several approaches for x86 virtualization: Sun's VirtualBox, VMware, and QEMU. VirtualBox and VMware are much easier to use than QEMU; however, QEMU is very Linux oriented and lets you start a virtual machine from a kernel image and an initial RAM disk file, features that VirtualBox and VMware lack. VMware and VirtualBox are commercial software packages that have licensing terms restricting their use in certain commercial situations. Please consult the terms included with the product to determine if you need to purchase a license. You may be curious about Xen, which is a hypervisor for x86-based systems. Xen is more like an operating system that runs operating systems efficiently. It differs from QEMU or VMware in that operating systems run on a Xen pseudo-hardware layer which then partitions the hardware resources to the virtual machines. Installing Xen means overwriting your current operating system and installing Xen on top, which is probably not what you have in mind. When you use either VirtualBox or VMware, you can boot the target machine over the network using PXE as the boot loader. In the VirtualBox user interface, you configure a machine to boot from a network device by opening the virtual machine's definition, selecting General at left, and then clicking the Advanced tab.
In the Boot Order list, unselect every item except Network. When the machine boots, it uses DHCP to request an address and boot information and proceeds to download a kernel and root file system; then, the machine starts running. If you're planning to use PXE for booting during development or deployment, using virtualization software makes testing the PXE configuration much easier than power-cycling a board, even if the Power On Self Tests (POSTs) are disabled.
This article covered some commonly used tools for virtualization. This technology is very useful when you don't yet have your hardware but you still want to experiment. QEMU is the best tool for emulating machines other than x86 and is becoming a popular item in the embedded developer's toolbox.
Our website is not responsible for the information contained by this article. Articleinput.com is a free articles resource thus practically any visitor can submit an article. However if you notice any copyrighted material, please contact us and we will remove the article(s) in discussion right away.
Note: This article was sent to us by: Vern Hensley at 01232010
1. How to Downgrade PSP to version 1.5 using PSP battery
© 2009 ArticleInput.com.