分类: LINUX
2008-08-11 16:43:13
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Customers using Gumstix OpenEmbedded should go to and the related
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
For customers using buildroot:
The Buildroot is the system used to create flash filesystem images for use on the Gumstix.
With the Buildroot, anyone can construct a custom, complete Gumstix filesystem in a single command. It automates the steps in constructing the image, including
The Buildroot also provides configuration menus, which can be used to add software to the filesystem image or remove existing packages. Everything from voice recognition to terminal emulators is but a checkbox away.
Contents[] |
For the latest information about the current buildroot version, visit
The Buildroot is designed for use on Linux. It can be coerced into working on other Unix-like systems (like FreeBSD, Mac OS X, or Cygwin), but it tends to be more difficult to maintain.
The default Buildroot configuration works on Linux 2.6.x-based systems. For 2.4.x systems, see the page for tips.
The Buildroot can be used on Windows by installing Linux. You don't even have to leave Windows -- you can install Linux in a virtual environment, such as VMware or Colinux, so that it runs in a window alongside your other applications. See the page for details.
See for a Howto on getting Ubuntu configured for building the Buildroot.
See for a Howto on getting buildroot to build under your Dreamhost account.
See for a Howto on getting buildroot to build on an Apple Mac OS X machine.
See for information on getting SLED 10 SP1 to build Buildroot.
To use the Buildroot, you must first obtain the files from Gumstix's public repository.
You will need the following things on your development host machine:
which svn
at the command prompt.
gcc
and associated tools. Most Linux systems already have these tools installed; if yours are missing, install your distribution's development tools package. You will need the following tools installed: autoconf, automake, bison, byacc, gcc, gcc-c++, make, ncurses-devel, subversion, zlib-devel, texinfo, flex.
A browseable version of the repository can be accessed in your web browser by navigating to:
This will always be the latest version of the gumstix Subversion repository.
To check out the current revision of the Buildroot, enter the following on your development host:
Basix, Connex and Verdex boards (since revision 1445 the 270 branch has been merged into the main trunk):
svn co gumstix-buildroot
(note: this will check out the latest version, which might not be stable, and might not build without errors. Check below on how to obtain an earlier revision)
The repository will prompt you for authentication. Use root as the user and root as the login.
If you are behind a proxy, make the following changes in ~/.subversion/servers
Add a group:
[groups]
group1=*.gumstix.com
Edit group1:
[group1]
http-proxy-host = proxy1.some-domain-name.com
http-proxy-port = 80
http-proxy-username =
http-proxy-password =
If you want to get a specific revision XXX, use
svn co -rXXX gumstix-buildroot
To confirm the current revision on your gumstix, enter the following on your gumstix:
cat /etc/gumstix-release | grep RELEASE
Different gumstix are shipped with different buildroot revisions (whatever was the latest release at the time of production of that batch of gumstix). The current revision MAY NOT BE BINARY COMPATIBLE with what came on your gumstix. This means that to use the buildroot toolchain to write programs without reflashing the operating system, you MUST first determine the version present on your gumstix. To find this version, boot the gumstix, and look at the file /etc/gumstix-release which will contain something like:
DISTRIB_ID='gumstix' DISTRIB_DESCRIPTION= DISTRIB_RELEASE='773' DISTRIB_CODENAME= BUILD_DATE='Fri Feb 2 13:36:05 PST 2007' BUILD_HOSTNAME='azazel.hughes-family.org'
The "DISTRIB_RELEASE" value is the revision of the buildroot which was used to build your gumstix's filesystem. Now do:
svn co -r773 gumstix-buildroot
Replace "773" with your release number. This will create a new directory named gumstix-buildroot within your current directory. Using a version of buildroot which differs from the version of buildroot running on your gumstix, may result in segfaults or other errors which have nothing to do with the program being run.
If the make does not succeed, check the Troubleshooting section below, or the
Comment: (please edit if you have a solution, or if you have more insight into the buildroot system) It is possible that the build of the revision on your gumstix fails to build on your setup. I found revision 1161 on my gumstix, which had build errors on Ubuntu 6.06. However, I found revision 1445 and 1541 to compile successfully. (If anyone has a complete list of stable revisions, please create a wiki entry and link from here) (end comment)
Comment: Revision 1161, "makeinfo" build errors solved upgrading texinfo to 4.4 version or superior.
For revisions of buildroot from 1445 to present, the verdex and basicx/connex branches have been merged together.
cd gumstix-buildroot rm .config make defconfig make
This will stop and prompt you for the "Target Architecture Variant". Choose either "11. xscale (eg Gumstix basix/connex) (BR2_xscale) (NEW)" or "12. iwmmxt (eg Gumstix verdex) (BR2_iwmmxt) (NEW)". Then you will be prompted for the processor speed of your gumstix. Make the appropriate selection. Finally, type 'make' again to get the build to proceed.
For revisions of buildroot from 865 to 1444, use:
cd gumstix-buildroot make defconfig make
For revisions of buildroot earlier than 865, use:
cd gumstix-buildroot make
This will generate the initial Buildroot configuration files and kick off the process. Now is a good time to make some coffee or take up crochet -- this process will take a while, but it's fully automated and can run unattended.
The build process will generate a lot of output, and you may see some error messages go by. Unless the build halts with a glaring error message, you can safely ignore them for now -- some application configuration scripts will try various approaches and choose the one that works.
If it succeeds, the build will end with a line describing your shiny new root filesystem, which will be named rootfs.arm_nofpu.jffs2
.
The cross compilation toolchain can be found in the directory build_arm_nofpu/staging_dir/bin. The gcc and binutils tools should have the prefix "arm-linux-"; i.e. the gcc is called arm-linux-gcc.
You're done!
The Buildroot scripts produce a JFFS2 filesystem image, suitable for loading directly onto the Gumstix's flash memory, but not -- by default -- usable from an MMC or CompactFlash card. Fortunately, the process for flashing the image onto the Gumstix is safe and easy. See the Replacing the filesystem image page for details.
Check the following pages for more detail:
Unless the stock configuration meets your needs, you'll probably wish to install more software on your Gumstix. The easiest way to do this is with the Buildroot configuration menu.
In your buildroot directory (the gumstix-buildroot
directory created when you checked out the Buildroot), enter:
make menuconfig
This will bring you into a simple, text-based menu system for selecting what goes into your filesystem image. Use the arrow keys and spacebar to select or deselect packages, to tune the machine to your specifications. When completed, exit the configuration menu (saving your changes when prompted) and re-enter:
make
It will rebuild only the parts that have changed, including fetching the source to any new packages you've selected.
If you enter the configuration menu and deselect a package, you may be surprised to discover that it's still in your filesystem image.
The Buildroot will rebuild only the aspects of your system that have changed -- and if you deselect a package, the change is that the Buildroot now no longer even looks at the package. It will not build the package's files, but it will also not remove them.
You can fix this by manually removing the package's files from gumstix-buildroot/build_arm_nofpu/root
, or simply by erasing that whole directory -- the Buildroot will restore it when you next run make
.
ATTENTION wifistix users- If you delete the gumstix-buildroot/build_arm_nofpu/root
directory then the wifistix support will not be properly re-installed unless you also delete the gumstix-buildroot/build_arm/.cf8385
file.
Development of the Buildroot, and the software packages it contains, is ongoing. From time to time, you may wish to update your copy of the Buildroot -- either to get bug fixes, or to bring in new software packages.
To update your Buildroot, change to the gumstix-buildroot directory on your host and enter:
svn update
(You will need a network connection.)
If you'd like to install a software package that isn't available in the Buildroot, you can compile it yourself -- described in more detail on the -- or add it to the Buildroot system, and let the Buildroot do the work.
Adding new packages to the Buildroot itself has another advantage, of course: you can submit them for inclusion in the official Buildroot, benefiting your fellow Gumstix users.
The process for adding new software is described in detail in the buildroot documentation.
The structure of files and directories within the Buildroot is quite simple, and makes modifying the system very easy. This is described in more detail on the page.
If you find yourself buidling multiple versions of buildroot in different directories, or otherwise starting from a clean slate, then this tip can save you a fair amount of time. I like to create a directory parallel to my gumstix-buildroot directory that I call dl-cache.
cd gumstix-buildroot mkdir ../dl-cache
If your gumstix-buildroot already has a dl directory then you can do this:
cd gumstix-buildroot mv dl/* ../dl-cache rmdir dl
Finally, create a symbolic link from the dl directory to ../dl-cache
cd gumstix-buildroot ln -s ../dl-cache dl
Now, when buildroot needs to download any files, they're be in the dl-cache directory. If you do a super clean:
cd gumstix-buildroot rm -rf * svn update . ln -s ../dl-cache dl
then you will have saved yourself all of the tarballs which are in the dl-cache directory and you won't need to redownload them
If you want to create a branch out of the buildroot, in order to keep a parallel development tree of your own, please check this page:
If you see the following error:
WARNING: `makeinfo' is missing on your system. You should only need it if you modified a `.texi' or `.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy `make' (AIX, DU, IRIX). You might want to install the `Texinfo' package or the `GNU make' package. Grab either from any GNU archive site.
then you need to locate and install the texinfo package on your build system. After installing texinfo, you should verify that the makeinfo command is in your PATH (i.e. type makeinfo on the command line and make sure it's not missing). Finally, do
cd gumstix-buildroot rm -rf toolchain_build_arm_nofpu make
If you did the fix above and you still get the `makeinfo' error message above, AND you are sure that makeinfo is properly installed on your path, then type
makeinfo --version
If your makeinfo version is 4.11 or higher, then you may have encountered a well-known `binutils' bug. See for ways to work around this bug.
Alternative: Edit the Makefile if `missing' is entered
Alternatively if you see `missing' by the MAKEINFO macro definition in the Makefile in `gumstix-buildroot/toolchain_build_arm_nofpu/binutils-2.17.50.0.6-build' edit it to
MAKEINFO = /usr/bin/makeinfo
If you are behind a proxy and are having trouble pulling down required files after running 'make':
export http_proxy=""
Replace proxy.example.com with your actual proxy server. Replace 8080 with your actual proxy server port.
Also check your `.subversion/servers file. The proxy can be defined by editing the commented out entries near the end of the file.
# http-proxy-exceptions = *.exception.com, http-proxy-host =http-proxy-port =
Open /gumstix-buildroot/toolchain/getter_script.sh
Edit the wget line (last line in my version) to read
wget -Y on -nd ${a[@]}
Try running make again.