VMWareImage: Difference between revisions

From HBMobile
Jump to navigationJump to search
No edit summary
 
(6 intermediate revisions by 4 users not shown)
Line 19: Line 19:
==Download the Homebrew Mobile Phone Club Developers' Image==
==Download the Homebrew Mobile Phone Club Developers' Image==


At some point we're going to post an "official" image somewhere, most likely as the torrent of a ZIP file. We haven't done that yet, so your best bet is to post some email to the SVHMPC mailing list asking about it. I'll eventually get tired of seeing the postings and put a torrent up somewhere.
Use BitTorrent to download the XU704_HBMOBILE002.tar.gz.torrent file. More info can be found at [http://linuxtracker.org/torrents-details.php?id=4724 LinuxTracker].
 
But seriously... we don't have an "official" build yet, but we're "real close now."


==Tell the VMWare Server (or Player) about the Image==
==Tell the VMWare Server (or Player) about the Image==


Actually I haven't gotten this far into the process, so I don't know exactly what to tell you yet.
Actually I haven't gotten this far into the process, so I don't know exactly what to tell you yet. But the people who are beta-testing this process can probably figure this one out. When I get reports back about how to do it, I'll update this section.


==Enjoy!==
==Enjoy!==
Line 84: Line 82:
# After rebooting, you should see a standard Xubuntu login panel.  '''Login with the username "mobo" and the password "hbmobile".'''
# After rebooting, you should see a standard Xubuntu login panel.  '''Login with the username "mobo" and the password "hbmobile".'''
# '''Open a terminal window''' by selecting the clicking on the "Applications" button in the upper left corner of the virtual screen, dragging down to "Accessories", and then over and down to the "Terminal" menu item.
# '''Open a terminal window''' by selecting the clicking on the "Applications" button in the upper left corner of the virtual screen, dragging down to "Accessories", and then over and down to the "Terminal" menu item.
# From the command line, issue these commands:<blockquote><code>mkdir Projects<br/>cd Desktop<br/>wget http://hbmobile.org/mobo.html<br/>cd ..<br/>sudo apt-get install build-essential libncurses5-dev bison flex texinfo zlib1g-dev gettext libssl-dev libc6-dev make g++ gcc automake1.9 subversion</code></blockquote>After you enter this last command, the system will ask for a password, '''enter the "mobo password"''' which is "hbmobile" (without the quotes.)
# From the command line, issue these commands:<blockquote><code>mkdir Projects<br/>cd Desktop<br/>wget http://hbmobile.org/mobo.html<br/>cd ..<br/>sudo apt-get install build-essential libncurses5-dev bison flex texinfo zlib1g-dev gettext libssl-dev libc6-dev make g++ gcc automake1.9 subversion minicom libglib2.0-dev libdbus-1-dev libdbus-glib-1-dev libpng12-dev libjpeg62-dev libfreetype6-dev pkg-config fbset<br/>sudo ln -s /bin/zcat /bin/gzcat<br/>sudo rm /bin/sh<br/>sudo ln -s /bin/bash /bin/sh</code></blockquote>After you enter this last command, the system will ask for a password, '''enter the "mobo password"''' which is "hbmobile" (without the quotes.)
# Continue on with these commands:<blockquote><code>cd Projects<br/>svn co http://svn.gumstix.com/gumstix-buildroot/trunk gumstix-buildroot<br/></code></blockquote>
# Continue on with these commands:<blockquote><code>cd Projects<br/>svn co http://svn.gumstix.com/gumstix-buildroot/trunk gumstix-buildroot<br/></code></blockquote>
# Edit the Login Windows Preferences by clicking on the "Applications" button in the upper left hand corner of the screen, dragging down to "Settings" and then over and down to the "Login Window" menu item. When the Login Windows Preferences dialog box appears, click on the "Security" tab. Check the "Enable Automatic Login" checkbox and select the user "mobo" from the drop down list below the check box; then click on the Close button.
# Edit the Login Windows Preferences by clicking on the "Applications" button in the upper left hand corner of the screen, dragging down to "Settings" and then over and down to the "Login Window" menu item. When the Login Windows Preferences dialog box appears, click on the "Security" tab. Check the "Enable Automatic Login" checkbox and select the user "mobo" from the drop down list below the check box; then click on the Close button.

Latest revision as of 21:48, 5 November 2007

Intro

One aspect of Embedded development that is sub-optimal is that you sometimes have to install a number of arcane packages (okay... okay... so GCC 4.1.1 is _not_ arcane) and configure your host system in somewhat weird ways. For instance, one thing I noticed about GumStix development on Ubuntu is that you have to link /bin/sh to /bin/bash (the default is for it to be linked to /bin/dash). Last year at eTel Benoit Schilling mentioned that the QT guys distribute a VMWare image with all the tools properly configured to do QT development so you can try it out without making permanent changes to your development system.

This sounds like a good idea, if you ask me... Not being a GumStix employee, it wasn't on the top of my list of things to do. But.. now that development of Goliath and Jowles is starting up in earnest, I figured it was time to make it easy on myself and others.

Before you can use the development image, you should probably know a bit about linux development and you should probably also have a Gumstix Verdex based development system. The focus of our development is on the Verdex and the Goliath boards, but at the time of this writing, the GumStix team is still working out the bugs in the Goliath hardware, and many of us are working with ConsoleLCD-VX boards to get some base level display development done. More info about getting such a system can be found at the Getting the ConsoleLCD-VX Working page.

Using The "Official" HBMobile Development Image

Note that the word "Official" is in quotes here because, like many other aspects of the Homebrew Mobile Phone Club, there's nothing actually official about it. The image comes without warranty or official support, and it may not be useful to you at all. In fact, it might give you a terrible rash. That being said however, we hope it will be useful and will try to answer support questions directed towards the Homebrew Mobile Phone Club mailing list.

Download the VMWare Server and/or Player software

The good people at VMWare have made their virtualization software available as a free download. There are two versions of the free software: server and player. The VMWare player seems to have much better support for USB devices, while the Server is useful for developing your own custom VMWare images. Either can be used to download and compile the source code for GumStix Linux, but you'll need the VMWare Player communicate with the GumStix system via a USB port. Ergo, we recommend installing the Player and If you know you're going to build your own development image, install the Server as well.

You can find the download images at the VMWare Download site.

Download the Homebrew Mobile Phone Club Developers' Image

Use BitTorrent to download the XU704_HBMOBILE002.tar.gz.torrent file. More info can be found at LinuxTracker.

Tell the VMWare Server (or Player) about the Image

Actually I haven't gotten this far into the process, so I don't know exactly what to tell you yet. But the people who are beta-testing this process can probably figure this one out. When I get reports back about how to do it, I'll update this section.

Enjoy!

Once you've booted the image, it should automatically log in as user "mobo". You should also find an informational README.HTML file on the desktop. Some good hints include:

  • To get a terminal, click on the "Applications" button in the upper left corner of the screen, drag down to the "System" sub-menu, then drag over and then down to the "Terminal" menu item.
  • To perform a command as root, put the word sudo before the command. The system will ask you for your password which is "hbmobile" (without the quotes.)
  • To open a web browser, click on the Firefox logo (the orange and blue thing) just to the right of the "Applications" button in the top left corner of the screen.
  • The system is setup with several virtual desktops. The Ctrl-Alt-Left Arrow and Ctrl-Alt-Right Arrow move between screens.

Creating Your Own "Official" HBMobile Development Image

This is a brief overview of how to build your own "Official" HBMobile Development Image.

Install the VMWare Server software

If you haven't done so already, visit the the VMWare Download site and retrieve the installer for the VMWare Server. Please note that you're expected to agree to a EULA and request a license string before the software will run (though there's no fee associated with this license.)

Download the Xubuntu 7.04 Feisty Fawn Linux Install Disk

You're free to choose a completely different distribution if you want, but I've turned into quite the Debian/Ubuntu fan lately, so the instructions here will apply to those who like (X)Ubuntu. I'm using Xubuntu because it seems slightly "zippier" than the full Ubuntu distro on virtualized hardware. You can download an ISO image from the Xubuntu download page.

Start the VMWare Server and Create a New Image

  1. After launching the VMWare Server, you'll be asked what VMWare host you want to be connected to. select LocalHost.
  2. Start the VM creation process by selecting the File >> New >> Virtual Machine... menu item.
  3. When queried whether to use a "Typical" or "Custom" VM configuration, select Custom.
  4. When queried which class of Guest Operating System you'll be installing, select Linux from the radio button selection and Other Linux 2.6.x kernel from the drop down selection list.
  5. Choose a meaningful name. I name my images like: XUnnn_HBMOBILEyyy where nnn is the version of Xubuntu and yyy is the version of the image I'm working with.
  6. The new VM wizard will ask if you wish to "Make this virtual machine private." I usually select the default, which is to make it private.
  7. It will also ask which user to run the VM as. I choose the default, User that powers on the Virtual Machine.
  8. I don't have two processors in my laptop, but I imagine it would be nice to utilize them both if the VM migrated to a machine that did, so when the wizard asks the number of virtual processors, I select Two.
  9. You are free to give the VM as much memory as you think it needs. I generally select 256Mb when creating the images.
  10. I have encountered minor problems when using bridged networking, so I usually select network address translation (NAT).
  11. For an I/O Adapter Type, I select a LSI Logic SCSI type.
  12. Next, I tell the wizard I want to Create a new virtual disk.
  13. The disk should be a SCSI (Recommended) type.
  14. I usually select the default size, which is 8.0 Gb on my machine. But most importantly, uncheck the Allocate all disk space now check-box. Otherwise, the virtual disk it creates will be difficult to compress.
  15. I like to name the Disk file the same name as the virtual machine and place it in the same folder with the VM.

Mount and Install Linux from the Xubuntu Disk Image

  1. Open the Virtual Machine Settings dialog box with the VM >> Settings... menu item.
  2. Highlight the CD-ROM (IDE 1:0) device in the device list on the Hardware tab.
  3. Select the "Use ISO Image" radio button in the Connection section of the dialog.
  4. Enter the path to Xubuntu ISO image you downloaded earlier or click the browse button and select it with the file chooser.
  5. Click OK
  6. In the main VMWare Server Console, click the green "Start" button. It may take several minutes, but the Xubuntu LiveCD / Install desktop should come up.
  7. On the left side of the screen is a column of icons. Double-click the "Install" icon at the bottom.
  8. Xubuntu can be configured with several languages and keyboard settings. The options I chose were:
    • English Language Install
    • In a time zone near Los Angeles
    • US English / US English keyboard layout
    • Do a Guided partitioning on SCSI (0,0,0)
    • Do not import existing user accounts
  9. When the wizard asks for information about me, I enter:
    • What is your name? Homebrew Mobile Phone Developer
    • What name do you want to use to log in? mobo
    • Choose a password... hbmobile
    • name of this computer? sheriff-mobo
  10. Hit the "Install" button on the "Ready to Install" dialog. At this point, the disk will spin and the lights will blink and in about 20 minutes (depending on how beefy your host system is) the install will be complete.
  11. When the install completes, you'll see a dialog box asking you to "Continue Using the Live CD" or "Restart Now". Unmount the Xubuntu Install Disk before restarting the virtual machine. You do this by going back to the settings dialog box at the "VM >> Settings..." menu item, clicking on the CD-ROM device and selecting the "Use physical drive" radio button to the right of the device list. (If you find that your mouse is trapped inside the virtual machine, hit the Control and Alt keys simultaneously, this will allow the mouse pointer to escape the virtual Xubuntu desktop.

Login and Configure the mobo Account

  1. After rebooting, you should see a standard Xubuntu login panel. Login with the username "mobo" and the password "hbmobile".
  2. Open a terminal window by selecting the clicking on the "Applications" button in the upper left corner of the virtual screen, dragging down to "Accessories", and then over and down to the "Terminal" menu item.
  3. From the command line, issue these commands:

    mkdir Projects
    cd Desktop
    wget http://hbmobile.org/mobo.html
    cd ..
    sudo apt-get install build-essential libncurses5-dev bison flex texinfo zlib1g-dev gettext libssl-dev libc6-dev make g++ gcc automake1.9 subversion minicom libglib2.0-dev libdbus-1-dev libdbus-glib-1-dev libpng12-dev libjpeg62-dev libfreetype6-dev pkg-config fbset
    sudo ln -s /bin/zcat /bin/gzcat
    sudo rm /bin/sh
    sudo ln -s /bin/bash /bin/sh

    After you enter this last command, the system will ask for a password, enter the "mobo password" which is "hbmobile" (without the quotes.)
  4. Continue on with these commands:

    cd Projects
    svn co http://svn.gumstix.com/gumstix-buildroot/trunk gumstix-buildroot

  5. Edit the Login Windows Preferences by clicking on the "Applications" button in the upper left hand corner of the screen, dragging down to "Settings" and then over and down to the "Login Window" menu item. When the Login Windows Preferences dialog box appears, click on the "Security" tab. Check the "Enable Automatic Login" checkbox and select the user "mobo" from the drop down list below the check box; then click on the Close button.
  6. Start the Firefox browser by clicking on the Firefox logo in the upper left of the screen. Set the default page by clicking on the "Edit >> Preferences" menu item. In the Home Page text box, enter:

    file:///home/mobo/Desktop/mobo.html

    Then click the "Close" button.

Halt the System and Package the Virtual Machine

Now that everything is configured, you can shut down the Linux virtual machine by selecting clicking on the "Applications" button in the upper left corner of the screen and dragging down to the "Quit" menu item; then hit the "Shutdown" button. You're now ready to distribute your VMWare Image!

The VMWare web site indicates that only the .vmx and .vmdk files are required for distribution with a new virtual machine, so quit the VMWare Server Console and archive these two files.