[clue] What do you run on your Pi?

Michael J. Hammel mjhammel at graphics-muse.org
Wed Aug 28 21:40:29 MDT 2013


On Wed, 2013-08-28 at 18:35 -0600, David L. Anselmi wrote:
> What distros are you using on your Pi hardware?

PiBox:
http://www.graphics-muse.org/wiki/pmwiki.php?n=RaspberryPi.RaspberryPi

PiBox is a build system but it's also a distribution.  It will be called
the PiBox Media Server, providing a wireless access point serving video
files over NFS/CIFS and video files and webcam over RTSP for travel
trailers.  My goal is to have the media in the trailer, then sit outside
my R-Pod, inside our R-Dome, and play videos with a DLP projector on the
side of the trailer.  The modern day version of the drive-in movie.  I
also plan to integrate a variety of sensors meaningful to people with
travel trailers (specifically R-Pods, but others as well).

Right now the wireless access point is working, configurable with a
custom network configuration utility.  I also can stream a webcam in
near realtime (well, .5 second delay) through crtmpserver and the Monkey
web server to a JWPlayer.  I haven't got HTML5 working yet but that is
on the todo list.  Right now it's just FLV (re: Flash).  

I have also played with a few of XBMC-oriented distros.  I have packaged
XBMC for PiBox but haven't had a chance to test it completely.  I'll get
to the player side of PiBox after I get the server side working
completely.

> I've figured out how to debootstrap an image so I don't need the Raspbian images as I like to start 
> with a bare system and dress it up how I like.

Because of the way that flash memory (SD cards) work, ever time a daemon
deletes something it has to delete a whole sector and write back what
its keeping.  So using an off-the-shelf distribution that has not been
optimized to limit disk I/O to the SD card puts extra weight on the CPU,
memory and the SD card (which has a limited lifepsan, btw).  Remember
that a Pi has very limited memory compared to a typical desktop or
laptop.  The idea is to tailor the distro to squeeze out the best
performance for specific purposes.  Which is why a general purpose
desktop based on the Pi seems a bit silly when run from an SD card
(though running it off an external drive would be okay, if a little
slow).

> The distros settled on ARMv7 and then RPi came out and sold millions of units running ARMv6.  That 
> shouldn't be embarrassing or inconvenient, it should be a chance to figure out how to handle the 
> next time more easily.  (Of course the issues are very abstract to me so apologies if I'm naive.)

Linaro is setup to deal with this.  The distros can make use of Linaro
releases to support specific ARM versions.  Linaro provides gcc,
binutils and associated utility patches and upstream-pushes to support
the hardware.  I believe Raspbian does this.  I think there is an Ubuntu
version that does too (see Robert Nelson's releases).

PiBox uses Crosstool-NG to build a cross toolchain that utilizes Linaro
updates.  It also uses a kernel that is from a Raspberry Pi git repo.

> I'm encouraged that Raspbian is doing a good job and it doesn't seem too big an issue that they 
> aren't Debian.  It's fine if they're a port or pure blend or just Not Debian(TM).  I'm curious what 
> other distros are doing with the Pi.

Many are trying to be general purpose, which seems a little silly to me
but if you're trying to encourage new ideas it's not a bad idea.  Some
are special purpose (like PiBox) such as the XBMC-oriented distros.  

> If ARMv6 became supported by Debian it would be an official installer for the Pi.  It isn't obvious 
> to me how that works since you have to boot off the media you're installing to.  (A really small 
> image doing PXE boot and/or net install doesn't seem sufficient.  But I guess a boot image on SD 
> with the install going to a USB drive might be reasonable.)

There doesn't need to be an install if the distro is specific to the
Raspberry Pi.  An common base image could be placed on the sd card and
upon first login you could be prompted to choose the packages you want.
This would even work if you had an external USB hard drive.  The Pi
could be configured to boot the base image off the SD card and pivot to
the USB drive if its available, or stick with the base image if not.

I think the typical install process of distros is a leftover of how PCs
were designed (and used).  Small devices like Pi will require a
different view on the problem.  

> I don't know that I care about an official installer since SD cards are so easy to move between 
> machines and you can create images on any architecture.  Seems to me that most people have the 
> skills to build their own image or are willing to run images built by someone else.  But I don't 
> know how hard it is to build a complex image and maybe Raspbian isn't packaging a kernel at all.

It's not really all that hard, but it takes a little while to understand
what "complex" really means.  First you need a cross toolchain.  You can
get that ready made or build your own (which is one of the harder things
to get right).  You can then build Busybox and have a simple system.
You can then use Buildroot to build something more complex.  Finally,
once you have a staging tree from Buildroot, you can begin cross
compiling your own tools and packaging them (such as with opkg).  Once
you have packaged software you just need something akin to an initial
ramdisk smart enough to know how to setup the install partition to
accept the packages.

>From a high level it's not that hard.  The toolchain is the key.  It's
what determines if you'll be able to make use of all the hardware
goodness or just spin on the CPU.

-- 
Michael J. Hammel                               
mjhammel at graphics-muse.org / http://www.graphics-muse.org
------------------------------------------------------------------------------
Reintarnation: Coming back to life as a hillbilly. 



More information about the clue mailing list