[CSE]  Advanced Operating Systems 
 COMP9242 2010/S2 
CRICOS Provider
Number: 00098G

PRINTER Printer-Friendly Version
- Notices
- Course Intro
- Times
- Lecture location/time
- Statistics
- Survey Results
- Lectures
- Selected Papers
- Project Spec
- Exam
- Forums
- Wiki
- Project Resources
- Slug Lab
- L4 Debugging Guide
- Developing on a Mac
- Developing on Linux
- SOS source browser
- OKL4 reference manual
- Elfweaver user manual
- IXP42X hardware manual
- OKL Wiki
- NSLU2-Linux HomePage
- Intel IXP400 Software
Related Info
- IBM OS Prize
- OS Hall of Fame
- 2009
- 2008
- 2007
- 2006
- 2005
- 2004
- 2003
- 2002
- 2000
- 1999
- 1998
- Gernot Heiser
- Kevin Elphinstone (LiC)
- Guest Lecturers (TBA)
- Student Reps

Valid HTML 4.0!

Developing your AOS project on a Macintosh

Mac OS X is a wonderful operating system that many students have on their laptops. It is possible to configure the Mac to become a host for AOS slug development. This web page lists the steps necessary to configure a Mac. The number of steps will seem quite daunting but each one is reasonably simple and you should proceed step by step. It is easier to use recent Macintoshes with AirPort installed.

Warning: the OSXCrossToolBuild script linked below is currently broken due to Apple's idiot compilers and GNU Autotools' idiot configure scripts. Use/hack at your own risk.

Watch this space (and the course notices) for future updates.

In the meantime, if you are developing on a Mac, please email Justin.

Configuring your Mac

  • Create a new network location.
    1. Select System preference->Network->Location->New Location...
    2. Create a new location for NSLU2 development
    3. Now in the 'show' popup select Built-In Ethernet->TCP/IP.
    4. Set Configure IPv4: to Manual with IP Address and Subnet Mask
    5. Now configure your internet connection on one of the other network devices, such as the AirPort.
  • Create a tftpboot directory for yourself, configure tftp to use it and finally enable tftp:
    # sudo mkdir /var/tftpboot/$USER
    # sudo chown $USER:$USER /var/tftpboot/$USER
    # cd /System/Library/LaunchDaemons
    # sudo <editor> tftp.plist # change /private/tftpboot to /var/tftpboot/<$USER>
    # sudo launchctl unload tftp.plist
    # sudo launchctl load tftp.plist
    # sudo service tftp start
  • Export an nfs filesystem.

    It is easier to export the tftpboot directory as your filesystem for later milestones. This section describes the steps necessary to do this.

    (These instructions do not apply to Mac OS X 10.5 Leopard. If you are using 10.5, have a look at this page. Note that it does not appear to be possible to export /var/tftpboot/$USER directly on Leopard, as the nfsd does not follow symlinks.)

    1. % sudo -s # Start a superuser shell
    2. # cd /var/tftpboot/$USER
    3. # nicl . -create /exports/\\/var\\/tftpboot\\/$USER clients
    4. # nicl . -create /exports/\\/var\\/tftpboot\\/$USER opts maproot=<user>
    5. # nicl . -read /exports/\\/var\\/tftpboot\\/$USER
      name: /var/tftpboot/<$USER>
      opts: maproot=<$USER>
    6. The easiest way to start the nfs server is to reboot the system

    At a later stage when you want to remove all nfs exports and reboot
    % sudo nicl . -delete /exports

  • The NFS code in SOS also requires the host to be running a server for the time protocol on UDP port 37. (NB: this is not NTP.)

Installing and configuring software

  • Install the FTDI USB serial driver

    You will need the USB driver for the serial card in your slug. You can find it in Virtual COM Port Drivers, grab whichever driver you need for your Macintosh system. Once you have the driver you can plugin the Slug and find out what the USB serial port is called; it will be something starting with /dev/cu.usbserial-*, note this down as you will need to configure minicom below.

  • Install MacPorts

    Download and install the MacPorts package installer. Get MacPorts

  • Install Python 2.4

    sudo port install python24

  • Install minicom

    sudo port install minicom. When it is finished you will need to configure the minicom installation by running sudo minicom -s Delete the modem initialisation strings, Set the serial port up on previously noted address /dev/cu.usb..., 115200, 8N1, No Hardware flowcontrol

  • Build the cross development tools
    1. Grab a copy of OSXCrossToolBuild.
    2. Unpack it <somewhere>
    3. % cd <somewhere>
    4. % OSXCrossToolBuild armv5b-softfloat-linux c,c++ 3.4.5 2.3.5

      This will take a long time! At the beginning sudo will occasionally ask for your password to create /opt/crosstool and to call port install for some software.

    5. Add /opt/crosstool/gcc-3.4.5-glibc-2.3.5/armv5b-softfloat-linux/bin to your path in your favourite shell. (Alternatively, if you have the time and patience, and you really want MacPorts to control your toolchain, you can create a proper Portfile for building the toolchain. If you do, we'd love to see it!)
  • Build the nslu2 command and install it in your path somewhere, /usr/local/bin or ~/bin are pretty good places.

Last modified: 20 Jul 2010.