Mountains

Mountains

Monday, January 28, 2013

Raspberry Pi Fiddling

Raspberry Pi

I'm sure you've heard of it.

700mhz ARM CPU, 512 megs of ram, OpenGL ES GPU, HDMI, 2 USB ports, I2C, SPI, UART, and GPIO pins. All in a single board computer that costs $35? Sounds like fun! So fun, I got one for christmas.

(that you santa)

Getting the Rasperry Pi Working
I should note that it really takes some other investment to get rolling with a Raspberry pi. You're going to have to put out for an HDMI cable, a powersupply, an ethernet cable, and USB cable, and a decently sized SD card. Also, I discovered that hot plugging my one USB keyboard between several computers and the Pi to be pretty tedious. If you plan on adding a lot of USB stuff, a powered hub to supply 500mA is going to be needed (my keyboard fades every now and then). A protective case might also be worth considering. Plan and additional $30-$80 worth of investment if you don't have any of that equipment

It took some experimentation to get mine to boot. (That's mostly because I didn't read the manual. ) Unlike a traditional x86 PC, it doesn't have a complicated firmware that preconfigures hardware and allows boot device selection. It just recusively drills the SD card for a bootloader and runs from there. No card? No Bootloader? No magic. Just a bright red activity LED and a dimly glowing SD card read light.

It's also very picky about where the bootloader is. The first time I downloaded the raspian disk image, I ran (on my mac)

%dd if="~/Desktop/2012-12-16-wheezy-raspbian.img" of=/dev/disk3s1 bs=10k

That process took forever and didn't work. After checking the cables and reading the manual, I learned that I need to overwrite the whole disk, not just the first partition, and that BSD uses a different syntax in that scenario: disk3s1 becomes rdisk3.

%dd if="~/Desktop/2012-12-16-wheezy-raspbian.img" of=/dev/rdisk3 bs=1m

Took just a few moments (read up on tuning dd's bs=* in your spare time. It will, one day, spare you time) and, when I plugged in and powered up the rbpi, i was greated with a massive screen load of linux booting goodness...




 ... and ultimately a desktop!

Raspberry Pi First Impressions
Fast computer, slow XWindows. 

Watching the boot speed, I was genuinely impressed. For how small and cold (temperature wise, it only needs 700 mA to start), it can really move. It's an amazing demonstration of how much power has been packed into chip packages through miniaturization. My enthusiasm was damped once I started X. The pi does not yet (at the time of writing) have an accelerated XWindows driver, so the GUI feels very sluggish at times. With some tuning, the fbdev driver can be made to feel somewhat snappy (using lightweight window managers and turning every single graphical flourish off), but for users not familiar with X and *nix, that's not going to be an easy option. The LXDE distributed with the Pi is a pretty good balance of usability and speed, but is not outright snappy. I think that puts user focused nettop duty out of the picture until X acceleration arrives. After being spoiled by compositing window systems for 8 years, and accelerated graphics for nearly 20, it's a little hard to go back. For programming and fiddling, It's definitely usable.

The raspian distribution comes with a heavy lean on python development, though there is a smattering of other compilers/interpreters present (C(++), perl, lua, bash), and if you're that kind of person, you probably know how to get what you want running. I was able to use apt to get emacs. As far as going from just a cute board to a cute board that does stuff heavy computational stuff, the barriers are quite low.

Now to figure out what to do with it...




No comments:

Post a Comment

Leave a message after the tone...