Putting a Slug to Work

Putting a Slug to Work

Loyola University Chicago Loyola eCommons Computer Science: Faculty Publications and Other Works Faculty Publications 3-2009 Putting a Slug to Work Konstantin Läufer Loyola University Chicago, [email protected] George K. Thiruvathukal Loyola University Chicago, [email protected] Ryohei Nishimura Carlos Ramirez Martinez-Eiroa Follow this and additional works at: https://ecommons.luc.edu/cs_facpubs Part of the Computer Sciences Commons Recommended Citation Konstantin Läufer, George K. Thiruvathukal, Ryohei Nishimura, Carlos Ramírez Martínez-Eiroa, "Putting a Slug to Work," Computing in Science and Engineering, vol. 11, no. 2, pp. 62-68, Mar./Apr. 2009, doi:10.1109/MCSE.2009.35 This Article is brought to you for free and open access by the Faculty Publications at Loyola eCommons. It has been accepted for inclusion in Computer Science: Faculty Publications and Other Works by an authorized administrator of Loyola eCommons. For more information, please contact [email protected]. This work is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 License. Copyright © 2009 Konstantin Läufer, George K. Thiruvathukal, Ryohei Nishimura, Carlos Ramírez Martínez-Eiroa S cieNTIFic P ROGRAMMING Editors: Konstantin Läufer, [email protected] Konrad Hinsen, [email protected] PUTTING A SLUG TO WORK By Konstantin Läufer, George K. Thiruvathukal, Ryohei Nishimura, and Carlos Ramírez Martínez-Eiroa Although novel architectures such as cell processors, graphics processors, and FPGAs are growing in popularity, conventional microprocessor designs pack a punch in a small footprint and are widely supported by commodity operating system and development tools. e’ve been busy during the you’ve probably been waiting for the fore you buy, just make sure you do the past several months with day when you could put that cigarette research on how hackable the device W an emerging multidisci- lighter to use for something other than is and what firmware supports which plinary research project focused on its original intended purpose. In any of the hardware features (for example, environmental science in an urban event, our hope is to use the slug as the USB ports in some wireless rout- setting. Given that Chicago is our a host for environmental monitoring, ers might not work). hometown, matters of air and water which is becoming possible via a grow- quality are near and dear to our hearts ing number of USB-capable sensors. Setting up the SlugOS (literally), so we hope to bring multi- Although it has several physical Let’s now focus on the nuts and bolts. ple people and organizations together challenges to address (which we won’t The first thing we did was to transplant to better understand them. Toward cover here), this platform is only one the firmware on the device, starting this goal, we’ve been exploring several of a whole class of computers that with the extensive resources at www. technologies to support mobile and can run embedded Linux—and run nslu2-linux.org. Although we initially wireless distributed computing, which it well, especially with all the work found the information perplexing, ow- will play a crucial role in our project. going into lower-power processors. ing to the number of alternative distri- In this installment of Scientific Pro- The device firmware itself is Linux- butions available, we ultimately settled gramming, we’re going to talk about based and uses the GNU toolchain on the SlugOS/BE distribution because our initial foray into embedded Li- and various utilities that most people it appeared to have the most momentum nux running on the slug, which is the already know and love. Because Link- behind it, not to mention a large pack- pet name for the Linksys NSLU2, a sys made the decision to use Linux, age database, which would eliminate home “appliance” aimed at providing the firmware is bound by open source the need to rebuild most of the pack- network-attached storage. licenses, and its source code is freely ages we needed from scratch. Ordinar- Although the slug is aimed at home available. Translation: hackers have ily, we wouldn’t be bothered by having users wanting network-attached stor- already figured out how to replace the to build a few packages from scratch, age (a form of storage not attached to slug’s firmware, so you can turn this but memory is severely constrained any one computer but accessible from device initially aimed at NAS into a on the slug at 32 Mbytes RAM and 8 any computer on the LAN), we took full-fledged Linux environment and Mbytes flash (still better than your first immediate notice of this device as a develop your own applications to run PC, mind you), so we’d need to set up a prospective embedded host for other on it. (Please note that replacing the cross-compiler to build a good number kinds of USB devices—in particular, stock firmware voids your warranty.) of the available free and open source those that can support various envi- Even though Linksys has discontin- software (FOSS) packages. Even so, the ronmental sensing technologies. Its ued this product, you can still get your other advantage of SlugOS/BE is that power footprint also attracted us: this hands on one for roughly US$60 if you most available packages have already completely fanless, thus silent, com- look around a bit. What we cover here been tested on the slug and, whenever puter runs on a 12-V DC power input, also applies to various other similarly possible, hand-tuned or written to keep which you can power with a cigarette hackable devices, including network the memory footprint low. lighter. If you’re nonsmokers like us, storage units and wireless routers. Be- In the remaining discussion, we’ll 62 Copublished by the IEEE CS and the AIP 1521-9615/09/$25.00 © 2009 IEEE COMPUTING IN SC IEN C E & ENGINEERING talk about how to get a complete slug ommend that you set your private IP Not bad, right? Next, we’ll work on environment up and running. We’ll subnet to 192.168.1.0/255.255.255.0. By the discovery. also describe how to integrate the slug default, the slug has a fixed address, into your existing home or office com- 192.168.1.77; you might also want to Step 3: puting setup, which will allow you to check in your router’s Dynamic Host Finding Your Device on the LAN login remotely via SSH for your own Configuration Protocol (DHCP) client As indicated in Step 2, we’re big fans experiments. table whether the slug has come up with of discovery, which is distributed sys- a dynamic address. Another possibility tems speak for “I should be able to Step 1: Initial Setup is to connect the device to any comput- browse for the device when it’s run- To set up the device, we recommend er that has more than one network port ning.” DHCP is vastly underrated: that you have an existing Linux setup and make sure the additional port is when you use it, you can actually dis- somewhere on your LAN (your desk- configured to the same subnet. It’s per- cover all your attached devices (slug top or laptop will do): mitted to have more than one private included) simply by going to the net- subnet (just make sure they’re not both work router’s administrative interface. • Install the NSLU2 flash utility ap- 192.168.1.0). Now you just follow the (Most routers released within the past propriate for your host hardware instructions at www.nslu2-linux.org/ few years support this capability.) (upslug2 for Linux and Mac OS). wiki/OpenSlug/InitialisingOpenSlug: In recent years, however, Zeroconf • Download the latest SlugOS/BE bi- (www.zeroconf.org) has gained some nary image for NSLU2 from www. • Log into the slug: ssh root@ popularity. This multicast framework slug-firmware.net. 192.168.1.77 (or actual dy- for device announcement and discov- • Put the slug in upgrade mode fol- namic address). The password is ery has its roots in AppleTalk and now lowing the instructions at www.ns opeNSLUg (the letters in red must lives as Bonjour (formerly Rendezvous). lu2-linux.org/wiki/HowTo/Use be capitalized). Zeroconf lets us browse the network of TheResetButtonToEnterUpgrade • Initialize basic configuration:turn- devices via a common name and look Mode. Similar to many other home up init. up various properties about them, no- networking appliances (such as • Leave networking set to DHCP. tably their IP addresses. Translation: routers), you power off the device We’ll work on how to discover the set up Zeroconf on your slug and on and then insert a pin or straightened hostname later, which eliminates your computer (unless you’re using a paper clip into the pinhole near the the need for a static IP in most Mac, which means you already have back of the device. You then press situations. it running), and you’ll be able to find and release the power button exact- • Set the host name in accordance your slug by its common name as set ly as instructed. with your project naming scheme, in Step 2 (in our case, luc-etl-slug0). • Flash the image following the such as luc-etl-slug0. Ubuntu Linux also supports Zeroconf instructions at www.nslu2-linux. • Using the “vi” editor, remove the out of the box. org/wiki/SlugOS/UsingTheBinary. line containing w_g_name (domain- On the slug, you need to use the If you’re on a Linux box (such as name) from /etc/default/sysconf. It intrinsic packaging system (ipkg) Ubuntu or a similar major distribu- should now look like this: to set up Zeroconf support via the tions), you can just install the up- Avahi project: slug2 utility via aptitude or apt-get.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    8 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us