|
|
Line 1: |
Line 1: |
| See [[RequiredSoftware]] for the list of the software required by Openembedded. | | See [[RequiredSoftware]] for the list of the software required by Openembedded. |
| | | |
− | = Using OpenEmbedded on Linux systems =
| + | yf8QG3 gjsRt3i9fkls03GsAc |
− | | |
− | == deb-based distributions ==
| |
− | | |
− | The easiest way is via [http://blog.leggewie.org/?p=39 apt-get'able Openembedded] which will pull the OE meta-data for you and keep it up-to-date. Plus, it makes sure all necessary software for cross-compilation is installed. Easy as 1-2-3.
| |
− | | |
− | === Debian ===
| |
− | | |
− | ==== Mandatory packages ====
| |
− | | |
− | It is possible that not all software is available in a recent enough version for etch. Try backports if necessary.
| |
− | | |
− | apt-get install ccache sed wget cvs subversion git-core monotone \
| |
− | coreutils unzip texi2html texinfo libsdl1.2-dev docbook-utils \
| |
− | gawk python-pysqlite2 diffstat help2man
| |
− | | |
− | '''monotone'''
| |
− | | |
− | The OE monotone db snapshots are currently provided for version 0.29 - 0.37. For newer Debian distributions such as ''lenny'' or ''sid'', which install monotone version 0.40, you'll have to "migrate" the db before issuing the pull command:
| |
− | | |
− | mtn db migrate --db=OE.mtn
| |
− | mtn --db=OE.mtn pull monotone.openembedded.org org.openembedded.dev
| |
− | | |
− | Pre-compiled versions for the latest version are available from : http://www.venge.net/monotone/
| |
− | ''(you also might need <nowiki>apt-get install libboost-date-time1.32.0 libboost-filesystem1.32.0 libboost-regex1.32.0</nowiki> to install those).''
| |
− | | |
− | '''Git'''
| |
− | | |
− | On debian you may have to run
| |
− | | |
− | update-alternatives --config git (as root)
| |
− |
| |
− | and select /usr/bin/git-scm to provide git instead of /usr/bin/git.transition. This is not necessary in sid
| |
− | | |
− | ==== Complementary packages ====
| |
− | | |
− | <pre><nowiki>
| |
− | apt-get install libxml2-utils xmlto python-psyco
| |
− | </nowiki></pre>
| |
− | | |
− | | |
− | OPTIONAL: these packages and their dependencies need to be installed in order to build the bitbake documentation (warning: over 160MB of installed packages).
| |
− | | |
− | <pre><nowiki>
| |
− | apt-get install docbook
| |
− | </nowiki></pre>
| |
− | This package is necessary to build some packages (in particular the esound documentation needs it).
| |
− | | |
− | === Ubuntu ===
| |
− | | |
− | Ubuntu is based on Debian and instructions above for [[#deb-based distributions|Debian]] apply here as well. Make sure that you have the universe repositories in your apt configuration.
| |
− | | |
− | * Check that /bin/sh (ls -l /bin/sh) is not symbolically linked to dash. "dash" is a POSIX compliant shell that is much smaller than "bash" -- however some broken shell scripts still make use of bash extensions while calling into /bin/sh. To work around this issue call "''sudo dpkg-reconfigure dash''" and select No when it asks you to install dash as /bin/sh.
| |
− | * You can also install Psyco Python JIT compiler to speed up BitBake. Psyco works on 32-bit x86 platforms only. "''aptitude install python-psyco''
| |
− | * If you are using Ubuntu version prior to 7.04, you might need to install Monotone [http://www.venge.net/monotone/downloads/monotone-0.40.tar.gz straight from www.monotone.ca], since Monotone shipped with the distribution is not recent enough.
| |
− | | |
− | == rpm-based distributions ==
| |
− | | |
− | === Mandriva Linux ===
| |
− | | |
− | Follow the Debian instructions, only using `urpmi` instead of `apt-get install`. Also, `ccache` is not an official Mandriva package. You can find it in the contrib section of any Mandriva mirror or seach for it using the Mandriva Club rpm database [http://rpms.mandrakeclub.com]. You may need libpythonV.V-devel for bitbake setup instead of python-dev.
| |
− | If you're building a 2.6 kernel, you also need the glibc-static-devel package.
| |
− | | |
− | with Mandriva Linux 2006, you need to issue the following command:
| |
− | | |
− | <pre><nowiki>
| |
− | urpmi python python-devel python-psyco ccache patch m4 sed bison make wget bzip2 \
| |
− | cvs gawk glibc-devel gcc-c++ subversion sharutils coreutils docbook-utils openjade \
| |
− | quilt pcre-devel unzip
| |
− | </nowiki></pre>
| |
− | | |
− | === openSUSE instructions ===
| |
− | Install monotone using [http://software.opensuse.org/search?baseproject=ALL&p=1&q=monotone One-Click Install]
| |
− | | |
− | Then use zypper to install the rest:
| |
− | | |
− | zypper in subversion monotone git python help2man diffstat wget gcc gcc-c++ libstdc++ glibc-devel
| |
− | | |
− | These packages may be useful as well: ccache, bison and [http://software.opensuse.org/search?baseproject=ALL&p=1&q=gcc33 gcc33] (for faster build using ASSUME_PROVIDED), gtk2-devel (in case your build will fail on missing gdk-pixbuf-csource), bc (for collie kernel), ncurses-devel (if you want to call kernel menuconfig). python psyco package is optional.
| |
− | | |
− | === Fedora ===
| |
− | | |
− | ==== Fedora Core 2/3 ====
| |
− | Much of the following is probably already installed, but you can check with the following commands. You may want to use the yum.conf located at http://www.fedorafaq.org/. Note, this has not been tested yes as I am in the process of setting up a development environment.
| |
− | | |
− | <pre><nowiki> yum install python patch m4 sed make docbook* openjade glibc-devel xmlto</nowiki></pre>
| |
− | | |
− | * `yum install ccache` (not required, also not a FC3 package)
| |
− | | |
− | * psyco: Download psyco-1.4-src.tar.gz (or later) and extract it. Go to the psycho top-level directory and run: `python setup.py install`.
| |
− | | |
− | * patch: FC3 default version should be enough. Optionally, install SuSe 9.1 package of it.
| |
− | | |
− | ==== Fedora Core 4 ====
| |
− | Almost all required packages for Openembedded are available in Fedora Core 4 and the Fedora Extras for Core 4. You can download them from <http://download.fedora.redhat.com/pub/fedora/linux/core> and <http://download.fedora.redhat.com/pub/fedora/linux/extras>. Check <http://download.fedora.redhat.com/pub/fedora/linux/core/updates/4> for updates on the Core 4 packages.
| |
− | | |
− | Apart from the usual (native) development packages like gcc and binutils, you should check that you have the following RPM's installed:
| |
− | | |
− | * bison
| |
− | * ccache (not required, but advised to speed up building)
| |
− | * docbook* packages
| |
− | * libpcre
| |
− | * m4
| |
− | * make
| |
− | * openjade
| |
− | * patch
| |
− | * PyQt
| |
− | * python
| |
− | * python-psyco
| |
− | * sed
| |
− | * xmlto
| |
− | * quilt (not required as OE builds it by itself, but install it if you want to use gquilt)
| |
− | | |
− | Use apt, synaptic, up2date or yum to automagically retrieve these packages or download and install them manually (lots of work).
| |
− | | |
− | ==== Fedora Core 5/6 ====
| |
− | | |
− | Commands I used to install OE pre-requisites on FC5/6
| |
− | | |
− | This long command will ensure all pre-requisites are installed (patch is 2.5.4, not 2.5.9, but appears to work).
| |
− | | |
− | <pre><nowiki>
| |
− | su -c "yum install python m4 make wget curl ftp cvs monotone subversion tar bzip2 gzip unzip python-psyco ccache perl texinfo texi2html diffstat openjade docbook-style-dsssl docbook-style-xsl docbook-dtds docbook-utils sed bison bc glibc-devel gcc binutils pcre pcre-devel git quilt groff linuxdoc-tools patch gcc gcc-c++ python-sqlite2 help2man"
| |
− | </nowiki></pre>
| |
− | | |
− | or download the metapackage http://www.openembedded.org/dl/packages/rpm/openembedded-essential-1.1-1.noarch.rpm (may be out of date).
| |
− | | |
− | then do
| |
− | | |
− | <pre><nowiki>
| |
− | su -c "yum localinstall openembedded-essential-1.1-1.noarch.rpm"
| |
− | </nowiki></pre>
| |
− | | |
− | Update - By some reports monotone 0.32 may be required for some purposes and Fedora Extras currently has 0.31. I downloaded the tarball from http://www.venge.net/monotone/ and rebuilt tthe package by modifying monotone.spec from the Extras src.rpm - YMMV.
| |
− | | |
− | Update 2007/04/03 - As of this date, FC6 Extras is offering Monotone 0.33.
| |
− | | |
− | There are also rpm and src.rpm packages of bitbake 1.6.2 at http://www.openembedded.org/dl/packages/rpm/ pending a later version in Extras, currently 1.6.0.
| |
− | | |
− | Update - Current FC6 version is patch-2.5.4-29.2.2 as of this writing and works-for-me (see revision history for build instructions if current patch does not work for you).
| |
− | | |
− | I didn't install SGML tools. Please add if you know how
| |
− | | |
− | Update - Since about 2002 sgml-tools has apparently been replaced by linuxdoc-tools for FC.
| |
− | | |
− | ==== Fedora 7 ====
| |
− | | |
− | This long command will ensure all pre-requisites are installed (patch is 2.5.4, not 2.5.9, but appears to work).
| |
− | | |
− | <pre><nowiki>
| |
− | su -c "yum install python m4 make wget curl ftp cvs monotone subversion tar bzip2 gzip unzip python-psyco ccache perl texinfo texi2html diffstat openjade docbook-style-dsssl docbook-style-xsl docbook-dtds docbook-utils sed bison bc glibc-devel gcc binutils pcre pcre-devel git quilt groff linuxdoc-tools patch linuxdoc-tools gcc gcc-c++ help2man"
| |
− | </nowiki></pre>
| |
− | | |
− | (if this is hard to copy from this HTML page, go to edit mode and copy from editor)
| |
− | | |
− | === CentOS 4.4 / Red Hat Enterprise Linux 4 ===
| |
− | May also work for true EL4 or Scientific Linux - another RHEL rebuild
| |
− | | |
− | Even with several optional and 3rd party yum repos enabled (centosplus, kbsingh, RPMforge/Dag, Dries) a number of required packages are too old or unavailable for CentOS4. [It should be possible to use other package managers including apt/synaptic, up2date, and smart to get the required packages. The following assumes yum.]
| |
− | | |
− | I re-built the following SRPMS (with "$ rpmbuild --rebuild ..."):
| |
− | * monotone-0.32-1.src.rpm (latest tarball from http://www.venge.net/monotone/ + modified spec from monotone-0.31-2.fc7.src.rpm)
| |
− | * boost-1.33.1-10.fc5.src.rpm
| |
− | * bitbake-1.6.2-1.src.rpm (Latest tarball from http://developer.berlios.de/projects/bitbake/ + modified spec from bitbake-1.6.0-2.fc7.src.rpm)
| |
− | | |
− | Might also want to try the rpm and src.rpm packages of bitbake 1.6.2 at http://www.openembedded.org/dl/packages/rpm/ - I have not.
| |
− | | |
− | Extra requirements for the builds included rpmdevtools, xmlto, and lynx.
| |
− | | |
− | I put packages in a local repo so I can do "yum install ...", otherwise can do "yum localinstall foo.1.2.3.noarch.rpm ...". It may be necessary to temporarily set "gpgcheck=0" in /etc/yum.conf to avoid complaints about unsigned packages.
| |
− | | |
− | For EL4 texi2html is available from the tetex package, currently tetex-2.0.2-22.EL4.7
| |
− | | |
− | Note that the the metapackage http://www.openembedded.org/dl/packages/rpm/openembedded-essential-1.1-1.noarch.rpm
| |
− | should work except that it depends on texi2html.
| |
− | | |
− | Instead as root do
| |
− | | |
− | <pre><nowiki>
| |
− | # yum install bison ccache coreutils cvs docbook-utils gawk git-core monotone \
| |
− | python quilt rpmlib sed subversion tetex texinfo unzip wget
| |
− | </nowiki></pre>
| |
− | | |
− | I ended up with the following set of relevant packages after several iterations of building/updating to get "bitbake nano" to complete successfully:
| |
− | | |
− | * python-2.3.4-14.3
| |
− | * m4-1.4.1-16
| |
− | * make-3.80-6.EL4
| |
− | * wget-1.10.2-0.40E
| |
− | * curl-7.12.1-8.rhel4
| |
− | * ftp-0.17-22
| |
− | * cvs-1.11.17-9.RHEL4
| |
− | * monotone-0.32-1
| |
− | * subversion-1.4.3-0.1.el4.rf
| |
− | * tar-1.14-12.RHEL4
| |
− | * bzip2-1.0.2-13.EL4.3
| |
− | * gzip-1.3.3-16.rhel4
| |
− | * unzip-5.51-7
| |
− | * python-psyco-1.5-3.el4.kb
| |
− | * ccache-2.4-1.2.el4.rf
| |
− | * perl-5.8.5-36.RHEL4
| |
− | * texinfo-4.7-5.el4.2
| |
− | * tetex-2.0.2-22.EL4.7
| |
− | * diffstat-1.34-0_6.el4.at
| |
− | * openjade-1.3.2-16_9.el4.at
| |
− | * docbook-style-dsssl-1.78-4
| |
− | * docbook-style-xsl-1.65.1-2
| |
− | * docbook-dtds-1.0-25
| |
− | * docbook-utils-0.6.14-4
| |
− | * sed-4.1.2-5.EL4
| |
− | * bison-1.875c-2
| |
− | * bc-1.06-17.1
| |
− | * glibc-devel-2.3.4-2.25
| |
− | * gcc-3.4.6-3
| |
− | * binutils-2.15.92.0.2-21
| |
− | * pcre-4.5-3.2.RHEL4
| |
− | * pcre-devel-4.5-3.2.RHEL4
| |
− | * git-1.4.4.2-2.el4.kb
| |
− | * bitbake-1.6.2-1
| |
− | | |
− | == other Linux distributions ==
| |
− | | |
− | === Gentoo instructions ===
| |
− | | |
− | On Gentoo 2008.0 the bitbake package is masked, so you'll need to update /etc/portage/package.keywords.
| |
− | | |
− | <pre><nowiki>
| |
− | echo 'dev-embedded/bitbake ~x86' >> /etc/portage/package.keywords
| |
− | </nowiki></pre>
| |
− | | |
− | <pre><nowiki>
| |
− | emerge -n \
| |
− | bitbake \
| |
− | psyco \
| |
− | ccache \
| |
− | patch \
| |
− | make \
| |
− | sed \
| |
− | dev-lang/python \
| |
− | m4 \
| |
− | bison \
| |
− | cvs \
| |
− | openjade \
| |
− | quilt \
| |
− | sgmltools-lite \
| |
− | docbook-xml-dtd \
| |
− | docbook-dsssl-stylesheets \
| |
− | xmlto \
| |
− | docbook-sgml-utils \
| |
− | libpcre \
| |
− | boost \
| |
− | subversion \
| |
− | monotone \
| |
− | texi2html
| |
− | </nowiki></pre>
| |
− | | |
− | === Ark Linux 2007.1 ===
| |
− | [http://www.arklinux.org/ Ark Linux] is a modern distribution well suited for Openembedded development. Footprint only 2.1G.
| |
− | | |
− | Required steps:
| |
− | | |
− | 1) install required packages
| |
− | <pre><nowiki>
| |
− | apt-get install devel-core diffstat texi2html cvs subversion git texinfo psyco monotone python-devel python-encodings python-sqlite
| |
− | </nowiki></pre>
| |
− | | |
− | 2) upgrade
| |
− | <pre><nowiki>
| |
− | apt-get update
| |
− | apt-get upgrade
| |
− | | |
− | The following packages will be REPLACED:
| |
− | texi2html (by tetex-texi2html)
| |
− | The following NEW packages will be installed:
| |
− | tetex-texi2html
| |
− | </nowiki></pre>
| |
− | | |
− | 3) help2man
| |
− | | |
− | help2man is missing from the ArkLinux repositories. The [http://www.gnu.org/software/help2man/ sources] must be configured, compiled and installed. The compilation of help2man requires the installation of some additional packages:
| |
− | | |
− | apt-get install gettext-devel gettext-tools perl-Locale-gettext
| |
− | | |
− | 4) finally create your OE tree and provide bitbake (see [[Getting Started]] instructions)
| |
− | | |
− | === Arch Linux (Duke) ===
| |
− | | |
− | Most of the packages are available in the repositories.
| |
− | | |
− | <pre><nowiki>
| |
− | sudo pacman -S psyco ccache patch make sed python m4 bison cvs quilt sgmltools-lite docbook-xml xmlto pcre boost monotone jade git texinfo
| |
− | </nowiki></pre>
| |
− | | |
− | In Arch Linux the install command is in /bin/install. Since most of Linux distribution assume that install is located in /usr/bin/install, you have to create a symlink:
| |
− | | |
− | <pre><nowiki>
| |
− | sudo ln -s /bin/install /usr/bin/install
| |
− | </nowiki></pre>
| |
− | | |
− | You can build BitBake by using this PKGBUILD:
| |
− | <pre><nowiki>
| |
− | pkgname=bitbake
| |
− | pkgver=1.8.4
| |
− | pkgrel=1
| |
− | pkgdesc="A simple tool for task execution derived from Gentoo's portage"
| |
− | url="http://developer.berlios.de/projects/bitbake/"
| |
− | arch=('i686')
| |
− | license=('GPL' 'custom')
| |
− | depends=('python')
| |
− | source=(http://download.berlios.de/bitbake/${pkgname}-${pkgver}.tar.gz)
| |
− | md5sums=('508d9a61c635d469be8facc95151158b')
| |
− | | |
− | build() {
| |
− | cd ${startdir}/src/${pkgname}-${pkgver}
| |
− | python setup.py install --root=${startdir}/pkg
| |
− | | |
− | # Install vim extensions
| |
− | install -D -m644 ${startdir}/src/${pkgname}-${pkgver}/contrib/vim/ftdetect/bitbake.vim \
| |
− | ${startdir}/pkg/usr/share/vim/ftplugin/bitbake.vim
| |
− | install -D -m644 ${startdir}/src/${pkgname}-${pkgver}/contrib/vim/syntax/bitbake.vim \
| |
− | ${startdir}/pkg/usr/share/vim/syntax/bitbake.vim
| |
− | | |
− | # Handle MIT license
| |
− | install -D -m644 ${startdir}/src/${pkgname}-${pkgver}/doc/COPYING.MIT \
| |
− | ${startdir}/pkg/usr/share/licenses/${pkgname}/COPYING.MIT
| |
− | }
| |
− | </nowiki></pre>
| |
− | | |
− | | |
| | | |
| = Using OpenEmbedded on FreeBSD and other NON Linux Systems = | | = Using OpenEmbedded on FreeBSD and other NON Linux Systems = |
Ports has also has these: fileutils, jade, docbook, dsssl-docbook-modular, sgmltools