beginning embedded linux

I’ve been doing some research into embedded linux since last month, and it is some incredible stuff what you can do. Gentoo’s tools make it especially even easier to quickly create and customize builds that can be deployed, not that I’m that far yet. Right now I’m still working on creating my own basic barebones system that I can boot. I’m really familiar with booting computers off the network, thanks to my last job where I ran LTSP on about 40 to 50 client computers. Right now I can sucessfully boot off a small nfsroot system and dump myself into a busybox shell, but what I really want to do is learn to get baselayout or baselayout-lite working with it.

More specifically, here’s what I’m trying to do … I want to setup three environments, or root installs. The first one is my build development where I have an x86 chroot that I suck down all the packages and build them, and create binary quickpkgs of them that I can then use to quickly install to the other two environments. My second install I want to create a small, simple chroot that I can use to boot devices over the network into. I could make things really simple on me and use an ISO from any Linux distro and just boot into that, but I’d like to customize mine and tweak it a bit (of course), since I’d like to put a few more diagnostic tools on there and what not. I could do without the network boot one, of course, and just boot into my development environment or the final release, but the reasoning behind making one just for that is so that I can keep it separate, simple, and not worry about upgrading or maintaining it, since it’ll be a temporary environment for the client anyway. The whole purpose of it will be to use it so I can boot clients with no operating system installed, format the harddrives, and then rsync the image onto the disk. Later on down the road, I can of course automate the entire process. But for now I’m having fun pulling out my hair and doing lots of reading, research, and asking questions about how to get an init system working with an NFS root. Fun times.

The third environment, as I already mentioned, is the actual deployment one. This is going to be the one where I remove all the crap that I don’t need, like build libraries, and in turn try to get the image as small as possible. Once again, using Gentoo makes things *really* simple as its just a matter of using INSTALL_MASK to ignore everything I don’t need, and them using emerge -K to use the buildpkg files. In doing that, though, I’ve already found more a few ebuilds that their DEPEND and RDEPEND settings are wrong. Not really a big deal, since I can go back and clean it up later. Some of them are pretty obvious though, like pulling in alsa-headers as a run time dependency. Whoops. :)

I’m still wondering how I’m going to deploy the image, though that’s mostly just gonna be a matter of more reading. My optimal goal is to not have to squash the filesystem at all, and instead just keep it all unpacked. Long-term, it’s probably going to get compressed just to give me more space and flexibility. I’m not too worried about that though, I’ve got all the space I’ll need.

Anyway, good times. A huge thanks to solar who has shown me not only how freaking cool this is, but given me some amazingly good starting tips so it feels like I can actually accomplish this. There are so many amazing tools to get you started with this, and really the only hard part is just understanding how the system works and boots and how everything fits all together. It’s pretty cool when you get down to the barebones of it and nothing is automated for you and you get to piece the system together yourself. It’s a great way to learn.

1 Comment

Filed under Gentoo

One response to “beginning embedded linux

  1. LTSP, eh? Want to help with the Gentoo port of LTSP5? =)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s