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.
The current version of this HOWTO applies to Leopard, Snow Leopard and Lion.
You will need a mac with an ethernet port. If you don't have an ethernet port, you can try and get the usb-to-ethernet converter working. Good Luck.
$ sudo mkdir -p /var/tftpboot/$USER $ sudo chown $USER /var/tftpboot/$USER $ cd /System/Library/LaunchDaemons $ sudo <editor> tftp.plist # change /private/tftpboot to /var/tftpboot/<YOUR_USER_NAME> $ sudo launchctl unload tftp.plist $ sudo launchctl load -F tftp.plist
It is easier to export the tftpboot directory as your filesystem for later milestones. This section describes the steps necessary to do this.
(Note that it does not appear to be possible to export /var/tftpboot/$USER directly on Leopard, as the nfsd does not follow symlinks, and /var is a symlink.)
$ cd aos-2012; mkdir rootfs $ sudo sh -c 'echo "/path/to/aos-2012/rootfs -network 192.168.168.0 -mask 255.255.255.0" >> /etc/exports' $ sudo nfsdYou will need to run
$ sudo nfsd
each time you reboot your system.
The NFS code in SOS also requires the host to be running a server for the time protocol on UDP port 37. This is not NTP! Have a go at implementing your own time server. It's a trivial program. (I managed to do it in 5 lines of Java. Nothing in Java takes 5 lines.)
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 picocom below.
Download and install the MacPorts package installer from here.
$ sudo port install picocomYou can then talk to your slug by running (* is what you found earlier, when you installed the FTDI driver)
$ sudo picocom -b 115200 /dev/cu.usbserial-*
$ sudo port install mercurial libmpc(Go have a coffee while this happens; libmpc takes a while to build.) TortoiseHg is a fairly attractive graphical frontend to Mercurial; if this sounds like something you'd like, install
tortoisehg
as well.
WARNING: it depends on Qt, which takes ages to build.
$ sudo port install gsed gmake coreutils
$ export PATH=/Users/$USER/.../aos-2012/tools/bin:$PATH
CONFIG_CROSS_COMPILER_PREFIX="arm-softfloat-be-"
$ cd tools/bin; ln -s /opt/local/bin/gsed sed; etc
$ tar -jxvf osx_10.6_cross.tar.bz2
nslu2 -p /dev/cu.usbserial-* reset