[Soekris] "Squashed" versions of FreeBSD

Crist J. Clark cjc+soekris at pumpky.net
Wed Jul 2 19:41:08 UTC 2008


On Wed, Jul 02, 2008 at 12:37:18PM -0600, Brett Glass wrote:
> All:
> 
> Several years ago, I developed several embedded systems using 
> "PicoBSD," a "squashed" version of FreeBSD. I then was diverted 
> from embedded UNIX development for a few years and am finally 
> returning to it. I need to upgrade/revamp some of my older work and 
> then develop some new things. I'd like to use a derivative of 
> FreeBSD 7.0 (or the upcoming 7.1), and need to come up to speed on 
> the various existing schemes for reducing FreeBSD 7.x to manageable 
> size and putting it on a CF card. All of the systems I'll be 
> developing will need to be configured remotely, and I may need to 
> do remote firmware updates, so I'm especially interested in schemes 
> which accommodate these things. I expect to build the systems 
> around Soekris boards, PC-compatible "set top boxes," or similar hardware.
> 
> So far, I've seen two possibilities: "miniBSD" and a "nanoBSD". Are 
> there others of which I should be aware? What are their pros and 
> cons? How does each of them handle issues involving 
> nonvolatile/read-only media vs. read/write media? Are good "howtos" 
> and architecture papers available for them, so that I do not have 
> to reverse engineer them to fully understand how they work? Any 
> input would be MUCH appreciated.

Given the size of your typical CF card these days (I walked
into Frys and got 4 GB for $40 (not the cheapest either), and
a Atheros-based wireless NIC for $10!), there does not seem to
be much of a need to restrict size at the CF end of things.

For systems with small RAM, say < 64M, there may be advantages
to keeping the runtime footprint of the kernel and userland
code small, but again, with my net5501 with 512 MB of RAM,
I don't need to worry much about that either.

I've got a read-only root file system, /var is a live read-
write, noatime file system in the CF, but I made an effort
to put stuff in /var that does not need to be persistent
across reboot or just does to many write cycles in MFS,
specifically, /var/run is loaded with the usual data plus
other stuff that usually resides elsewhere in /var.

My only real worry is that I've not broken out all of the
stuff from the /var that I should and I may get "dead
spots" on my CF from too many write-cycles earlier than I
need to, but at $40, it's a risk I can take. I'd be curious
about any advice on that front.

But to get back on point, given how hardware capabilities
in embedded devices have scaled in the last decade (RAM,
CF, and CPU can easily be as big or bigger than your PC
server from a few years ago) compared to with how FreeBSD
resource consumption has (really not much when you look
at the OS itself), the need to pare things down has been
greatly reduced or may not even exist.

Of course, YMMV given the specific hardware and application.
-- 
Crist J. Clark                     |     cjclark at alum.mit.edu


More information about the Soekris-tech mailing list