Buildroot on Ubuntu
From GumstixDocsWiki
Getting a Linux machine configured to build the Buildroot isn't that hard. The key is knowing what the package manager of your particular Linux distro calls the various packages required to build software. On Ubuntu 6.06, Here's the list of packages that you need to fetch and install:
Contents[hide] |
To Build the Buildroot
- build-essential - this installs a complete build environment
- This gets you all the necessary packages to build software, like gcc,autoconf,automake,libtool etc.
- openssl-dev (on Ubuntu 7.04, 7.10 or 8.04, libssl-dev is needed instead)
- libncurses-dev
- bison
- flex
- texinfo
- zlib1g-dev
- gettext
- autoconf
- patch(ubuntu 8.04, maybe on others too, only tested it on this one)
These are the exact package names (on Ubuntu), so you can issue this command in a terminal without having to mess around with the graphic package managers:
sudo apt-get install build-essential libncurses-dev bison flex texinfo zlib1g-dev gettext openssl-dev autoconf
Note: on Ubuntu 8.04 you don't need the package openssl-dev (openssl stuff is already installed)
Pre-build requirements
There are some pre-build dependencies that also must be met:
- a subversion client - to fetch the buildroot
- wget - the build scripts use wget to download packages
My Hardy system did not have "mpfr" so you may need to install it too. I found it in synaptic with mpfr, but the full name is something like libmpfr-dev. I don't know the apt-get incantation.
sudo apt-get install subversion wget
Ubuntu uses dash instead of bash for /bin/sh. If you leave dash as your shell, you'll gets lots of "-e"'s stuck in various files. You can switch back to bash by doing:
sudo dpkg-reconfigure dash
and select No
Post-build requirements
There are some post-build dependencies that also must be met:
- tftpd - (optional) a tftpd server to install the filesystem over ethernet
- ckermit - (optional) to connect to the console and to upload newly built filesystem
- lrzsz - (optional) to use zmodem/xmodem transfers to upload files to linux if you can't use ssh/scp
sudo apt-get install ckermit tftpd-hpa lrzsz
If you get an error that it can't find ckermit, you need to add "multiverse" to your list of components in sources.list. Add it on the same lines that contains the "universe":
deb http://xx.archive.ubuntu.com/ubuntu/ edgy universe multiverse
deb-src http://xx.archive.ubuntu.com/ubuntu/ edgy universe multiverse
Possible Problems
If you get an error: Compilation aborted. Please read the FAQ for linux-libc-headers package./usr/include/linux/config.h and delete both lines. then edit
If you find some lines with just a "-e" on them in your /etc/modprobe.conf file on the gumstix, then you'll probably find that /bin/sh is symlinked to a program called dash. If you change the symlink to be /bin/bash then the -e flags will disappear the next time the /etc/modprobe.conf file is created (you'll need to manually remove them to start with). You can remove them on the host side by editing the gumstix-buildroot/build_arm_nofpu/root/etc/modprobe.conf. You'll probably also find some -e lines in the /etc/network/interfaces file as well.
댓글 없음:
댓글 쓰기