logo

Requirements Document
General
  • The image should be named *.vmdk (else VMware Fusion won't let you use it). Also, rename them consistently so we can avoid confusion:

    maemosdk_gutsy-10-07.vmdk
    maemosdk_hardy-04-08.vmdk


  • Add to /etc/rc.local

    /sbin/dhclient &>/tmp/dhclient.log

  • Under OS X, for some reason, the network interfaces aren't configured as expected, so the interface can be either eth0, eth1, eth2, or eth3 in some cases. dhclient will catch them
  • Provide *.vmx files for these images (replace ".vmdk" with ".vmx" in filename) so VMWare products can launch them. With USB support, main hard drive being the *.vmdk image, 512 Mb, and anything else below
  • Image should launch very quickly, in text mode. (This isn't for developer usage, so it doesn't need host development tools, a GUI, etc.)
  • Memory size minimum 384 Mb for now, maybe 512 Mb. Let the user grow it if needed. We want to avoid, though, shipping a configuration whose memory size is too large for someone to use (and not obvious to edit, if they have only VMware Player)
  • Add a USB controller device to the hardware
  • Remove "cdrom" entries from /etc/apt/sources.list
  • Pre-add sb2 repository to /etc/apt/sources.list:

    deb http://maemo-sdk.garage.maemo.org/download/host ubuntu-gutsy free

  • Filesystems should be journaling, like ext3 or reiserfs -- we expect the user to kill the VM without mercy, so we need to protect it.
  • The root filesystem should be 40 gigs. This does introduce a lot of "dead space" in the usual case, so try "mke2fs -j -m 0" (or "tune2fs -m 0") to turn off the "reserved space"
  • Also turn off automatic disk checks (tune2fs -i 0 -c 0) to avoid having e2fsck run on boot randomly. (Maybe this isn't the smartest option, but it's best for the user.)
  • Use an en_US keyboard layout for the console (otherwise accent characters become dead keys and it's difficult to enter shell commands)
  • Remove unused applications (games, openoffice, etc.)
  • SSH server should be installed. Edit /etc/ssh/sshd_config to add:

    #Under QEMU, at least, the built-in DNS server messes up sometimes,
    #causing the SSH connections to take up to ten seconds to connect.
    # Remove DNS checking. Only the host PC should be connecting.
    UseDNS no


  • The server should also respond to port 2222, to accord with ESbox defaults, in /etc/ssh/sshd_config

    Port 22
    Port 2222


  • User account maemo/maemo with full passwordless sudo access. No root account
Samba
  • DO NOT set DISPLAY in the .bashrc.
  • Remove mlocate, slocate, locate from the image (or at the very least, from /etc/cron.daily). These just waste time since they will go off every time the VM is launched
  • Samba server should be installed. Edit /etc/samba/smb.conf to also listen on port 4445 ("smb ports = 445 139 4445"). (This is needed so we can optionally mount scratchbox from the VM and see it in the host, in order to do code indexing.)
  • Install packages for Windows sharing (winbind) and samba file system (smbfs and smbclient)
  • Make directory /home/maemo/shared and /scratchbox/users/maemo/home/maemo/shared. (These are the default locations where a shared mount will be attached.)
  • Add shares for /scratchbox and /home/devel in /etc/samba/smb.conf:

    [scratchbox]
    writable = yes
    public = yes
    browseable = yes
    path = /scratchbox

    [maemo]
    writable = yes
    public = yes
    browseable = yes
    path = /home/maemo


  • Allow visiting these shares, in /etc/samba/smb.conf:

    security = share
    guest account = maemo
    encrypt passwords = false
    passdb backend = tdbsam
    obey pam restrictions = yes
    invalid users = root
Clock sync
  • In order for the image to apply correct timestamps when it modifies images through Samba, we have to make two odd changes
    1. In image, force timezone to Europe/London in order to get GMT (so that the filesystem times match). /etc/timezone = "Europe/London" and /etc/profile "export TZ='Europe/London'". But also set LANG=C in /etc/profile or an appropriate place -- else this setting causes LANG=en_GB.UTF-8 which makes perl spit out a lot of messages about locales
    2. Be sure cron is installed.
      • Add this entry to /etc/crontab

        * * * * * root cd / && run-parts --report /etc/cron.minutely

      • Add an /etc/cron.minutely directory
      • Add a chmod +x 00resetclock script in /etc/cron.minutely

        #!/bin/sh
        /sbin/hwclock --hctosys


      • This fixes up the clock drift in both QEMU and VMware, mostly
Scratchbox
  • Install Scratchbox 1 and latest Maemo SDK with targets for ARMEL and X86
  • Add to /etc/init.d/rc.local

    echo 0 >/proc/sys/vm/vdso_enabled
    echo 4096 > /proc/sys/vm/mmap_min_addr


  • Add the "extras" repositories to the rootstraps, so Mica can auto-install C++ and Python from them
  • The armel target should include the patched qemu-arm-cvs-m (or whatever), or else local Python running/debugging fails
  • OPTIONAL: Install sb2 from http://maemo-sdk.garage.maemo.org/install.html, latest rootstrap (chinook40_armel and chinook401_i386). Do install the "etch tools" as recommended
  • Install programming environment packages (maemo-python-device-env and maemo-cplusplus-device-env) and debug tools (maemo-debug-scripts and maemo-c-debug-tools)
  • Fix problem with /etc/resolv.conf on Scratchbox
End-user configuration
  • During builds of ESbox projects on VM, some "clock skew detected" messages may appear. Then, it's necessary to:
    1. Set UTC=no in /etc/default/rcS
    2. Have the user run "sudo dpkg-reconfigure tzdata" and select his actual timezone
    3. TODO: How can we inform these issues (messages to the user) ?

Current Version
23 Dec 2009
Maemo SDK Virtual Images, 1.0 final

This release provides 2 different virtual images with Maemo SDK installed: an image with Ubuntu Server Intrepid Ibex and an image with Ubuntu Desktop Intrepid Ibex.

Download
Maemo Diablo Ubuntu Intrepid Server virtual SDK image

Download
Maemo Diablo Ubuntu Intrepid Desktop virtual SDK image