Stripping Distributions Versus Building Your Own

The simplest way to build an embedded Linux application is to start with a copy of your favorite commercial Linux distribution that works with your chosen CPU—for example, Red Hat, SuSE, or Debian. Install it onto a hard drive, get it set up so your application starts as part of the initialization process, and call it “done.” This can be accomplished in less than a day. If your hardware has the memory and storage space available, this isn’t a bad way to go. You lose a lot of control over exactly what goes on in the box, and the result is possibly less robust and secure than a “from scratch” approach, but this might be a tradeoff that you’re willing to make for the time saved. This approach can take just a few hours to implement, whereas the other approaches discussed in this book can take days or weeks.

If you’re short on storage—but not too short—the next-easiest way to build an embedded application is much like the first: Install a commercial Linux distribution in its most minimal form, and then start ripping out pieces until it fits in the space you have available. Depending on your application’s needs, this will work if you have more than about 50MB of storage available. This can probably be done in a day or two, depending on how well you know your chosen distribution.

The third approach is to start with one of the many embedded Linux distributions available on the Internet. It seems as if every day another distribution becomes available for starting embedded projects. Because choosing one can be difficult, I’ve compiled a list of questions you should think about when looking at the choices. That list is available in Chapter 6,“Embedded Linux Toolkits.”

The fourth option is to “roll your own.” In days past, this was the solution for most people. With it, you have the greatest control over what your application actually does—but it also takes the most time. You must take great care in choosing the programs you’re going to use, and in building your binaries properly so that they’ll be as small as possible. However, this is probably the best way to get the smallest possible Linux system in which your application will run.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.23.101.60