Showing posts with label slug. Show all posts
Showing posts with label slug. Show all posts

Saturday 31 May 2008

SqueezeCenter on the SLUG

At first glance, installing slimserver (now SqueezeCenter) on the SLUG is very straight forward as it's nicely packaged into an ipkg and made available via Optware. However, as indicated on the slimserver application page on the nslu2-linux wiki, things aren't as simple as they first appear. Unfortunately, something is very broken with slimserver and its dependency chain in Optware as things stand at this moment in time. As a result installing slimserver with a view to upgrading to squeezecenter at a later date becomes much more problematic. I need at least SqueezeCenter version 7.0 to operate with the SqueezeBox Duet.

My first target was to run slimserver 6.5.4 which is the latest version from the version 6 line and the version packaged for the SLUG in optware. I tracked the problem down to the mysql dependency for slimserver, it seems since the last update of slimserver in optware, mysql has also been updated and since that time slimserver has been reported as broken on the SLUG. Unfortunately, rolling back versions in optware is not trivial since they only make available the latest version with no access to previously packaged programs. My only option was to check out the mysql build environment from SVN at the previous level and compile up the package from source. This is reported to take in the region of 18 hours natively on the SLUG so I set up a cross-compilation environment on my Fedora 8 box at home. MySQL compiled in about 10-15 minutes and I now had a package to install. The reports were correct, slimserver 6.5.4 was now running on my SLUG, excellent!

The next challenge was to get SqueezeCenter running, and this worked in a similar way to getting slimserver going. There are a few oddities with getting all your ducks in a row while running this stuff on a SLUG, SqueezeCenter is very particular about file permissions, and the newer software introduces a whole bunch of Perl dependencies not present in the earlier slimserver versions. Fortunately, I'm very familiar with Perl as well as Linux (one of the reasons for choosing a squeezebox) and I've managed to compile up the minimum dependencies to get SqueezeCenter going. It seems Slim Devices as a company test against x86 and PPC architectures to the extent they even supply their Perl dependencies for these from CPAN. I'm running on ARM on the SLUG though which introduces a whole world of dependency problems as it seems SqueezeCenter is also pretty sensitive to the version of each Perl module used, it's not just a case of grabbing the latest and greatest from CPAN, a further bind for getting it going nicely. One other thing, CPAN doesn't seem to run at all well on the SLUG, it's far faster to download the tarred packages and compile manually!

I eventually got SqueezeCenter 7.0.1 running on the SLUG, it consumes at least twice the 32MB RAM available so runs pretty slowly while spending a lot of time paging to the USB disk. I set up an additional swap file on disk as well, thinking about it perhaps I should have used the rest of the 8MB flash as swap too! All in all, running SqueezeCenter on a machine with so little memory and on an architecture not supported by Slim Devices has equated to a slow response time and a maintenance headache.

In conclusion, it's been a good experience getting a SLUG and setting up SqueezeCenter on it. But I already need a more powerful box so less than 1 week after the SLUG arrived at my house it's time to sell already. Fortunately, I've found a buyer at work who wants something low power for some really trivial services so the SLUG is ideal for them. For me though, it's a case of getting back to scratching my head over which low power home server solution to try next. Whatever I choose will be more expensive than the SLUG, it's possible I could equal its low power usage, and I definitely now know I need more memory and ideally an x86 architecture.

Thursday 29 May 2008

Unslinging the SLUG

Having recently purchased the Linksys NSLU2 (commonly called a SLUG) for use in a hacked form as a low power home server, I've been playing around with it a little to customise it towards my needs. The eventual aim is to run SqueezeCenter on it to power my new SqueezeBox Duet. The most commonly used hacked version of Linux provided by the SLUG hacking community is known as uSLUnG, hence hacking the SLUG with this being called unslinging.

The process of unslinging is made very simple, thanks to the great instructions developed over the years by the community, and with such a large community the amount of testing on these instructions is pretty complete too. First step is to download the firmware binaries as described on the SLUG Firmware site. I used firware version 6.10 Beta which is considered the latest stable version in spite of having a beta tag. Then simply followed the instructions in this README file and I was done. The whole process takes no more than 10 minutes or so.

Now I have a nice little low power Linux box sitting on my network raring to run some services for me. Pretty much anything you can think of has been done on the SLUG, Apache, MySQL, etc, etc, etc. So the list and choice of what to do is very complete. For now though, I've just installed a few basic utilities (coreutils), Perl (I know I'll need that later), GCC, and SSH for remote access.

I'll quickly mention the SLUG specs in passing too. It has a 266Mhz ARM based Intel XScale processor, some of the early models were under clocked at 133Mhz but all the recent editions run at full speed; 8MB flash; 32MB RAM; 2 USB 2.0; 10/100 Ethernet; runs from 5V DC power and measures just 2 x 9 x 13cm. With one USB disk attached my Current Cost meter reads it at about 5 watts power usage which I guess may rise a watt or two under load.

Wednesday 28 May 2008

Choosing the media server

The decision of which media server to go with has easily been the longest and most agonising while putting together new audio solution at home. I'm not the only one at work having recently been looking in this area either, James Taylor has also been looking at home servers with similar requirements in mind to myself. Namely, cheap and low power (low electrical power for always-on as opposed to a slow processor).

In no particular order, options on the list for me were:
EDIT (suggestions from comments, with my thanks):END EDIT

All have clear advantages and weaknesses I wont go into in detail for each box. However, they can roughly be grouped into cheaper solutions as provided by a hacked NAS box, or more expensive PC style systems. Some go straight out of the list on price alone, such as the relatively expensive Mac (I don't understand the Mac fad, single vendor lock-in, haven't we seen that somewhere before?).


I decided to plump for the cheapest of all the options, the SLUG. I figure that even though it has a slow processor and only 32MB memory it does have a fighting chance of running SqueezeCenter to power the Squeezebox Duet based on the reports of other users running SlimServer on it. If all else fails, there are plenty of people at work looking for low power solutions who may be willing to buy a 2nd hand SLUG should I want to upgrade anyway.

The SLUG is a very well-known device in the land of hackery. It can easily be modified to run any one of several different versions of Linux that maintain different levels of compatibility with the original Linksys firmware and interface. It's purpose in life when released (back in 2004 I think) was as a cheap NAS box that simply provides a USB to Ethernet interface. The idea being you plug a cheap USB hard disk into it, configure via the simple web interface, and you have storage you can access from anywhere on your home network. Because Linksys made the device cheap, naturally their choice of operating system was a free one, Linux. The Linux license dictates Linksys had to make their source code available, hence it's easy to modify the original software for your own purposes. The rest follows from there really!

Friday 16 May 2008

In with the new

Related to my previous post "Out with the old" I have been thinking about what's next for me in terms of a home media solution. I've also been spurred on by my recent purchase of a Current Cost meter which I can hook up to a computer, but more about that another time. Similar to my old system, I'm not bothered about video so this is purely an audio solution.

There are some things I took into consideration when building the old system that I don't consider to be so important this time around. I'm not bothered about browsing the Internet on my TV and I'm prepared to spend a bit more cash, for example. But rather than concentrate on those points, here's a list of things I would like to include in the new system:

  • Switchable speakers in different rooms (kitchen and living room)
  • Connection to my stereo amplifier
  • Access to my mp3 collection without leaving my PC powered on
  • Access to Internet music (podcasts, radio, etc)
  • Remotely controlled
  • Separate screen (from the TV)


After much research, here's what I've come up with:
Setup Diagram Click to enlarge.

I'm going to use a Linksys NSLU2 (a.k.a. a SLUG) which can be modified to run Linux so I can hack it into submission to be my low powered music server. The SLUG will provide my music collection over my wireless network to a Slim Devices Squeezebox Duet system. The Squeezebox is also able to access all the Internet services I want and similar to the SLUG runs open source software so has a fantastic community of users. The Duet comes with a wifi remote control with built-in LCD screen so I can interact with the system from anywhere in the house. From the Squeezebox is an audio connection to the amplifier which, similarly to my old system, is connected to a speaker switcher box.

That little lot should keep me busy for a while and give me all I want from music at home. As I mentioned, a lot of research went into deciding which components to choose. The weak link here will likely be the SLUG because it's such a small box with only 32Mb RAM and a relatively slow processor (just 264 bogomips) but it should do for the time being. Here's my component list: