| How to build GNU/Linux for an embedded x86 computer |
|
|
Recently, I had a customer who needed an embedded Linux distribution running on an Advantech PCM-9371 single board computer (SBC). The PCM-9371 contains a low voltage Celeron or Pentium III processor. This article describes why the Openembedded build system was chosen and a few tips for running Openembedded on a x86 system.
The hard way!There are many ways to put Linux on a x86 embedded system. There are hundreds of distributions out there and the temptation is always to do something "quick" and just try to trim down one of the standard distributions. Other shortcuts are often taken, such as compiling your application on a workstation that is running a different distribution and different versions of the libraries used in the embedded systems. This approach can work, but there are many possible pitfalls:
OpenEmbeddedConsidering the disadvantages of using an standard x86 distribution for this project, I chose to use OpenEmbedded (OE). The OpenEmbedded project (http://openembedded.org ) is a full featured build system for building embedded Linux distributions. The development is done on a Linux workstation of your choice and the entire distribution is cross-compiled to the architecture of your choice. The entire build process is automated, including building the toolchain and an image that can be installed on the target embedded system. Some of the features of OpenEmbedded are:
Build and InstallationSetting up an OE build is beyond the scope of this article, but it basically involves selecting a machine and distribution. In this case, I chose the x86 machine and the generic OE distribution. Several hours later, I had an image in the form of a tar.gz file that I decompressed to a Compact Flash (CF) card. After installing grub on the CF card, I had a booting Linux distribution that included all the basics (like ssh, ipkg package manager, shell, standard file utilities, etc) in less than 4MB of disk space. Adding GTK+ and XwindowsThis system required support for GTK+ and Xwindows. To add this involved running the following commands: bitbake xserver-kdrive and bitbake gtk+. The OE build system then automatically downloaded and compiled the need packages. The image size is now around 20MB -- still fits very easily on a CF card. Getting X runningThere are several options for running X on a x86 system. In this case, I chose the quickest way so that my customer could get started with application integration as quickly as possible. Linux and Xwindows support the standard VESA Framebuffer mode. Then can be enabled by selecting the CONFIG_FB_VESA kernel config option. The kdrive version of X can then be started by running Xvesa. In the future, we may move to an accelerated X driver if needed. Summary | |||||||
|
|||||||
| Last Updated ( Thursday, 30 November 2006 ) | |||||||
| < Prev | Next > |
|---|




