# tclsh8.4 application-specific initialization failed: can't upvar from variable to itselfHowever, Tcl can be built using the native development toolchain  just as on any other machine by downloading Tcl (8.4.11) from SourceForge, unpacking, and:
cd tcl8.4.11/unix ./configure --prefix=/opt make make installAs I have more time, I'll try to submit the appropriate Tcl package fixes back to the NSLU2-Linux project. I am also planning to port additional Tcl software to the Slug. Note that /opt is the conventional directory tree to install packages and other software.One of the first things you can do with your Slug is to allow it to run at full speed, 266 mHz. Linksys (for some reason) decided to under-clock the processor. A fairly simple hardware mod, removing one easily acccessed resistor, allows the Slug to run at full speed . I used an X-Acto knife to carefully cut the solder traces around the resistor. WARNING!! you should only attempt this procedure if you feel comfortable with hardware hacking, and are prepared to have your Slug turn into a brick.The Slug is fully capable of serving up web pages, SMTP server, or other chores that don't require large amounts of cpu, memory, or bandwidth. Here are a few compelling reasons to do so:
- Cheap - the street price of the Slug is $70 US at the time of writing (Sep 1, 2005) . A USB 2.0 IDE drive enclosure can also be found for $30-35, and add an IDE disk drive (80 gb is under $50). Total for a simple server is less than $150 US.
- Low power - even when over clocked, the combined Slug + USB IDE disk doesn't draw much power.
- QUIET! - no fans, just the IDE drive spinning away.
- Cool - for the hackiness, geek cool factor.
- The low-level boot code in the Slug runs the ARM cpu in big-endian mode, most other ARM Debian packages are built for the ARM running in little-endian mode, and are thus unusable. Another project, DebianSlug  runs normal little-endian Debian packages by installing a word-swapped kernel and special loader to kick the ARM into little-endian mode. Since native development is easy and many package already exists, I haven't had any need to try this approach.
- More ideas for what to run on your Slug  and 
- The ARM 5 doesn't have a FPU, so be mindful of running floating point intensive apps.
-bash-2.05b$ file tclkit-linux-arm tclkit-linux-arm: ELF 32-bit LSB executable, ARM, version 1 (ARM), for GNU/Linux 2.0.0, dynamically linked (uses shared libs), strippedand for my natively built tclsh:
-bash-2.05b$ file tcl8.4.11/unix/tclsh tcl8.4.11/unix/tclsh: ELF 32-bit MSB executable, ARM, version 1 (ARM), for GNU/Linux 2.4.3, dynamically linked (uses shared libs), not strippedIt should be possible to build Tclkit (I've already tried once but ran into path issues). Looks like I'll need to write a genkit.local to pass --prefix=/opt to find the proper includes for X (/opt/include/X11) for Tk and C++ libs (/opt/lib/libstdc++.so) for Mk.
05sep05 sbron - A very similar device is the Buffalo LinkStation . As that device runs a version of Linux too and has been hacked as well, it's also possible to run Tcl on the LinkStation.
16May2006 SRIV I picked up a slug, overclocked it & installed OpenSlug. Stay tuned.jcw - There's now a 8.4.13 binary for the Slug at , see Linux / ARM BE.
slebetman: I've been running Tcl on my Slug for a little over a year now for my web site at http://slebetman.homeip.net (Check out my Slug status at ). I have however found that the Tcl handling of the serial port (TTL level RS232) on the Slug is broken. I can easily transmit bytes out but reading bytes in doesn't work no matter what I do. I've tried blocking & non blocking, translation and encoding to binary etc. but nothing seems to work. I'm wondering if this is a specific bug related to the Slug or is Tcl's handling of Unix serial TTYs inherently broken.
TP 3 May 2007 - Debian 4.0 is now fully supported on the Slug!  . I have reflashed my Slug to run Debian. This version runs the kernel in little-endian mode. I did run into some low-memory problems during the install, while the root and home filesystems were being created. There is a work-around, ssh in from another term and start swapping early .Debian supports Tcl as an installable package, along with several popular extensions (Itcl, Tclx, Tk, expect, Swig, tdom, tcllib, etc.)
[Category Distribution|Category Porting|Category Embedded]