Setting up an Ubuntu Workstation
For any type of Linux development, it is strongly recommended you use a Linux host. Some folks like to use Windows running a bash simulator such as Cygwin. I don’t recommend this as it is a bit tricky to use and will cause Newbies to go insane.
There are many different flavors of Linux. The engineers at Freescale tend to favor Ubuntu Version 9.10 or Version 10.04.
There are three ways to create an Ubuntu host machine.
1. Find another PC or laptop and install Ubuntu. This will create a dedicated Linux machine. Linux works well on older PCs. Just make sure you have sufficient disk space (>20G).
2. Install Linux on a Windows PC allowing you to boot in either Windows or Ubuntu, but not both at the same time. This is easy to do—simply download the Windows installer program “Wubi” from www.ubuntu.com.
3. Run Ubuntu as a “virtual machine” in Windows.
Of the three options above, #3 is the most convenient as you can instantly switch between Windows and Ubuntu, plus you can share files on the same PC. Option #2 should probably be avoided--there is a chance you could trash your Windows files. Option #1 is recommended for maximum performance.
Which method you use is up to you, but I prefer #3.
To run Ubuntu as a virtual machine, you need to get a virtual player. The one I recommend is VMware Player. It’s free and can be downloaded from here: http://downloads.vmware.com/d/info/desktop_downloads/vmware_player/3_0
A few notes on VMware. I’ve found running Linux as a virtual machine works quite well. But there are a couple of things to look out for:
First, go out and buy a USB external hard drive. They’re not expensive and this is where you’ll put Linux and all the tools and the gigabytes of SDK files and documents you download from Freescale and other sources. Plus you can use it to backup your Windows files.
Do not download a pre-made VMware Ubuntu virtual machine image. Make your own. The free VMware Player lets you do this. So go to www.ubuntu.com and download the complete Ubuntu iso image that you burn to a CD. If you don’t know how to burn an iso CD, there are instructions on the Ubuntu site. I downloaded version 9.10 but I believe you should be OK with the latest version 10.04.
Then launch VMware Player and select “Create a New Virtual Machine.” Make sure you select at least 100 GB of storage. You’re going to need it (that’s why I recommend an external drive).
Then install Ubuntu using the iso CD just as you would if you were installing it on a “fresh PC”.
One thing to note is that Ubuntu running as a Virtual Machine should bridge to the IP address as your host (i.e. Windows). This is accomplished by selecting “Edit Virtual Machine Settings”. Select the Hardware Tab. Highlight the Network Adapter and enable the radio button entitled, “Bridged: Connected directly to the physical network.”
You can also access this menu if you click VMàSettings at the very top of the VMware window, or click on the Network Adapter icon at the bottom of the VMware window.
Note that doing this may disable the host virtual machine from accessing the Internet. To restore Internet access, check the box marked “NAT: Used to share the host’s IP address”
Some people like to connect the PC and EVK directly using an Ethernet crossover cable. I don’t advise this. You have to muck around with the Windows network settings and hope for the best. I strongly advise connecting the PC and EVK to a router and let the router assign IP addresses. You probably already use one. If not, they can be purchased for under $30.
TIP: I recommend you disable VPN in Windows if you are running Ubuntu as a virtual machine. VPN will probably kill the NFS connection to the Client.
That’s it. Simple enough. Now you’re ready to install the SDK and start developing applications.