Creating an MSP SD image

From University of Washington - Ubicomp Research Page
Jump to navigationJump to search

The MSB has a MiniSD card slot. The card in this slot is automatically mounted at /mnt/mmc when the MSP (MSB stacked on IMote2) is booted.

For the most part, the system software is let alone on the IMote's onboard flash, and binaries and data logs relating to the sensors are stored on the SD card. This makes loading sensing software onto an MSP a simple matter of exchanging the SD card.

The following is the process used to build from scratch the image copied onto the SD card. <bash># get the source and build it cvs -d /projects/ubicomp/uwar/CVS export msp_peak_detection # or however you want to get the source cd msp_peak_detection/src/ CROSS_COMPILE=arm-linux- ./configure make cd inference make cd ../..

mkdir -p /tmp/sd_image/{logs,msp,msp-data} cp bin/* /tmp/sd_image/msp cp src/inference/inference src/inference/examples/peak_detection.xml /tmp/sd_image/msp

  1. you also need the ini files. the ones in the repository may not suit your needs...

find -name '*.ini' -exec cp {} /tmp/sd_image/msp \;

  1. we're done with files from the repository...

cd /tmp/sd_image/msp

  1. ...because for some reason the critical scripts central.loop and proccontrol.loop aren't there

echo -e '#!/bin/sh\n\nwhile [ 1 ] ; do\n /msp/central\n sleep 2\ndone' > central.loop echo -e '#!/bin/sh\n\nwhile [ 1 ] ; do\n /msp/proccontrol /msp/process.ini\n sleep 2\ndone' > proccontrol.loop

  1. you also need process.ini. see the wiki entry on "Running processes with proccontrol"

echo 'we are still missing a file!'

  1. this is useful for when you forget where the image came from

date > /tmp/sd_image/description.txt echo your description >> /tmp/sd_image/description.txt

cd /tmp tar czf sd_image.tar.gz sd_image</bash>

The INI files in the repository may not be appropriate, and process.ini is missing entirely. If you have an existing image, you may want to copy the INI files from there. process.ini is required if you want any of the programs to be run.

From here, any way you'd like to write the contents of the tarball to the SD card will do.