You Can Have You Cake and Eat It Too
(… or running other operating systems on PCLinuxOS)
by Patrick G. Horneker (phorneker)
Last month, I discussed running PCLinuxOS on Slackware. This is one example of the use of virtual machines to run multiple operating systems on a single physical machine. (I mention this as PCLinuxOS also runs on Intel-based Macintoshes.)
While you can run PCLinuxOS on Slackware, OpenSUSE, Fedora, Ubuntu, or any other Linux you wish, You can also run any Linux distribution on PCLinuxOS, using VirtualBox and/or QEMU. I mentioned VirtualBox as it does the best job of utilizing network and hardware resources between Linux distributions.
QEMU
QEMU is a good virtual machine for running older Linux distributions, Windows 9x/ME, PC/MS-DOS (with and without Windows 3.x), FreeDOS with OpenGEM, MikeOS (created by Mike Saunders of Linux Format fame) and other operating systems that run on Intel x86 processors (as well as the AMD equivalents).
As an Intel emulator, QEMU emulates a x86 machine with a Cirrus 34xx video chipset for video, your choice of an Adlib, Sound Blaster 16, or ESS1860 for audio, NE2000 Ethernet emulation, with TUN capability for networking, virtual serial and parallel ports, which can be redirected to disk files (for later printing), or to actual devices such as a USB Modem (for serial port access) or a USB printer (for the parallel port).
On my laptop, I have a copy of IBM PC-DOS 6.3 with DJGPP installed (for DOS development) running inside a QEMU virtual machine. (I had that copy of PC-DOS stored in the closet for about ten years.)
Hercules
This software package emulates a IBM System 370, System 390, or a z-Series mainframe. You can use this to see how Linux runs on an IBM mainframe. However, to understand how Hercules works, you need to understand how to install and maintain these classic IBM mainframes.
You will need to have the Hercules package installed, a 3270 terminal emulator, and some packages containing the operating system, and supporting software packages. Fortunately, the Hercules website has links to sites for downloading of these packages.
Android
This is Google's newest platform for smart phone development. You start by downloading the basic SDK to an empty directory on your hard drive. While you are still connected, unpack the archive and run ./tools/android to launch the system manager.
You can use any development environment such as Eclipse, KDevelop or Anjuta, or even use a text editor such as Emacs for Android development.
Within the system manager, you can install development packages, including API, toolkits, and documentation. You can also create virtual Android devices to test your applications you create before deploying them to smart phones.
Most of the development for Android takes place on the command line, or through your favorite development environment.
In this example, I have the latest versions of the Android SDK tools, the SDK Platform, and the application APIs from Google installed.
I also have a virtual smart phone with the latest Android (version 2.0.1 as of this writing) installed. It is here where I have a virtual Motorola Droid phone (as advertised by Verizon Wireless) installed.
Note: To create virtual Android phones and to download the installed packages, you must be connected to the Internet as the tools are downloaded directly from Google servers.
Typing ./tools/android help in the terminal window provides a list of command line options:
Usage:
android [global options] action [action options] Global options: v verbose Verbose mode: errors, warnings and informational messages are printed. h help This help. s silent Silent mode: only errors are printed out. Valid actions are composed of a verb and an optional direct object: list : Lists existing targets or virtual devices. list avd : Lists existing Android Virtual Devices. list target : Lists existing targets. create avd : Creates a new Android Virtual Device. move avd : Moves or renames an Android Virtual Device. delete avd : Deletes an Android Virtual Device. update avd : Updates an Android Virtual Device to match the folders of a new SDK. create project : Creates a new Android Project. update project : Updates an Android Project (must have an AndroidManifest.xml). create testproject: Creates a new Android Test Project. update testproject: Updates an Android Test Project (must have an AndroidManifest.xml). update adb : Updates adb to support the USB devices declared in the SDK addons. update sdk : Updates the SDK by suggesting new platforms to install if available. Action "list " : Lists existing targets or virtual devices. Options: No options Action "list avd": Lists existing Android Virtual Devices. Options: No options Action "list target": Lists existing targets. Options: No options Action "create avd": Creates a new Android Virtual Device. Options: c sdcard Path to a shared SD card image, or size of a new sdcard for the new AVD t target Target id of the new AVD [required] n name Name of the new AVD [required] p path Location path of the directory where the new AVD will be created f force Force creation (override an existing AVD) s skin Skin of the new AVD Action "move avd": Moves or renames an Android Virtual Device. Options: p path New location path of the directory where to move the AVD n name Name of the AVD to move or rename [required] r rename New name of the AVD to rename Action "delete avd": Deletes an Android Virtual Device. Options: n name Name of the AVD to delete [required] Action "update avd": Updates an Android Virtual Device to match the folders of a new SDK. Options: n name Name of the AVD to update [required] Action "create project": Creates a new Android Project. Options: n name Project name t target Target id of the new project [required] p path Location path of new project [required] k package Package name [required] a activity Activity name [required] Action "update project": Updates an Android Project (must have an AndroidManifest.xml). Options: p path Location path of the project [required] n name Project name t target Target id to set for the project s subprojects Also update any projects in subfolders, such as test projects. Action "create testproject": Creates a new Android Test Project. Options: p path Location path of new project [required] m main Location path of the project to test, relative to the new project [required] n name Project name Action "update testproject": Updates an Android Test Project (must have an AndroidManifest.xml). Options: m main Location path of the project to test, relative to the new project [required] p path Location path of the project [required] Action "update adb": Updates adb to support the USB devices declared in the SDK addons. Options: No options Action "update sdk": Updates the SDK by suggesting new platforms to install if available. Options: No options
Note that these options can also be accessed through the user interface that launches when help is not provided on the command line.
iPhone Development
Unfortunately, the same could not be said for development for the iPhone. Just learning ObjectiveC is not enough. According to the Apple website, you need to have registered your iPhone (that is, you must own an iPhone, not just download the simulator) to develop applications for the iPhone.
Registration allows you to obtain a user account for which you login to download the SDK. Also, you must be running Mac OSX to download the SDK.
However, Jonathan Zdziarski has written a book called iPhone Open Application Development that allows you to work around the SDK restrictions. The link on this page allows you to order the book from Amazon.com, and is provided for your convenience.
The Future is Mobile
While we have emulators such as VirtualBox and QEMU to run other operating systems, the future of computing is clearly moving in the direction of mobile devices. While PCLinuxOS can run on the current generation of netbooks, and more traditional laptops (of which I recommend the latter for everyday use), it is the smart phone where there is a substantial growth in applications development.
Besides Android (which is itself a Linux derivative, and requires Linux for development) and iPhone (as you would guess is a Mac OSX derivative), we have the next generation Palm devices, which do not resemble the PalmOS devices of yesteryear as far as functionality and usability.
The good news here is that the current generation of Palm devices are Linux based! Hence, the older PalmOS tools, such as KPilot and GnomePilot, are not needed. Instead, you can use the Bluetooth capabilities to sync these devices.