OEandYourDistro: Difference between revisions

From Openembedded.org
Jump to navigation Jump to search
(import from previous wiki)
(No difference)

Revision as of 16:31, 4 June 2008

Openembedded on your Distribution

See RequiredSoftware for the list of the software required by OpenEmbedded.

Note for OpenMoko Developers

OpenMoko has its own version of bitbake. The easy way to get started with OpenMoko, after installing other packages for your distro, is to see [1]

Ark Linux 2007.1 instructions

Ark Linux is a modern distribution well suited for OpenEmbedded development. Footprint only 2.1G.

Required steps:

  1. 1 install required packages
apt-get install devel-core diffstat texi2html cvs subversion git texinfo psyco monotone python-devel python-encodings python-sqlite
  1. 2 upgrade
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
  1. 3 help2man

help2man is missing from the ArkLinux repositories.

Sources here: [2] (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
  1. 4 GCC vs. QEMU

The generation of glibc binary locales requires a working qemu. At the moment the easiest way is to use the obsoleted gcc-3.3.5 instead of the ArkLinux gcc-4.2.1.

The compiler can be found here: [3] [4]

You should install and then switch to the old gcc-3.3.5 before using bitbake:

mv /usr/bin/gcc /usr/bin/gcc-4.2.1.bak
ln -s /usr/bin/i586-ark-linux-gcc-4.2.1 /usr/bin/gcc-4.2.1
ln -s /usr/bin/i586-ark-linux-gcc-3.3.5 /usr/bin/gcc-3.3.5
ln -s /usr/bin/gcc-3.3.5 /usr/bin/gcc
  1. 5 finally create your OE tree and provide bitbake (see [5])

Debian instructions

Mandatory packages

Dependancy Package

Add this line to APT sources (/etc/apt/sources.list):

deb http://www.openembedded.org/dl/ packages/

Then do "apt-get update; apt-get install openembedded-essential" as root.

(2007-06-26) I had to build a monotone package in order to install openembedded-essential as the official monotone package had broken dependencies

(2007-07-21) I had to install git-core instead of git. (JS)

(2007-08-17) An alternative method on Debian Etch(RM)

# apt-get install quilt ccache sed bison wget cvs subversion git-core monotone coreutils unzip texi2html texinfo libsdl1.2-dev docbook-utils gawk

Monotone

You may also want to install monotone to be able to access OpenEmbedded's SCM directly, rather than downloading a snapshot.

You may need the version from testing or unstable, but pay attention to the recommended monotone version in RequiredSoftware. At some point in time, Debian may be shipping a more recent version, causing problems if used to fetch openembedded.

Currently monotone 0.33 is in debian unstable. The OE monotone db (snapshots/OE.mtn.bz2) is currently 0.32, so 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 apt-get install libboost-date-time1.32.0 libboost-filesystem1.32.0 libboost-regex1.32.0 to install those).

Git on Debian

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

(not necessary in sid)

Complementary packages

apt-get install libxml2-utils xmlto passivetex



Note: as of 2007/07/12, passivetex doesn't seem to be available

OPTIONAL: these packages and their dependencies need to be installed in order to build the bitbake documentation (warning: over 160MB of installed packages).

apt-get install docbook

This package is necessary to build some packages (in particular the esound documentation needs it).

Ubuntu instructions

Ubuntu is based on Debian and instructions above for Debian apply here as well. Make sure that you have the universe repositories in your apt-get 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:

   sudo dpkg-reconfigure dash

and select No when it asks you to install dash as /bin/sh

or:

   sudo apt-get remove dash

Script authors should aim to avoid bash-isms or start their scripts with "#!/bin/bash" if necessary.

You can also install Psyco Python JIT compiler to speed up BitBake. Psyco works on 32-bit x86 platforms only.

sudo apt-get install python-psyco


Then install a lot of stuff:

sudo  apt-get install monotone git-core cogito
sudo update-alternatives --config git
# press 2 (to choose git) in previous question


sudo apt-get install monotone python-dev ccache m4 sed bison make cvs gawk libc6-dev g++ \
subversion sharutils docbook openjade quilt libmpfr-dev libpcre3-dev texinfo help2man

If you decide to build it from source , you will need some additional packages.

sudo apt-get install texi2html libboost-date-time-dev libboost-filesystem-dev libboost-regex-dev \
libboost-test-dev libboost-dev zlib1g-dev build-essential dh-make debhelper devscripts


If you are using Ubuntu version prior to 7.04, you might need to install Monotone by hand, since Monotone shipped with the distribution is not recent enough.

wget http://www.venge.net/monotone/downloads/monotone-0.25.tar.gz <-- use the latest
tar -zxvf monotone-0.25.tar.gz
cd monotone-0.25
sudo dpkg-buildpackage -uc -b
cd ..
sudo dpkg -i monotone_0.25-0.1_amd64.deb

If the ipkg-build script is not installed on your system, get it from here: http://www.openembedded.org/repo/org.openembedded.packaged-staging/contrib/scripts/ipkg-build

Mandriva Linux instructions

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 [6]. 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:

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

FreeBSD instructions

  • Python == /usr/ports/lang/python
  • GNU Patch == /usr/ports/devel/patch
  • GNU m4 == /usr/ports/devel/m4
  • GNU make == /usr/ports/devel/gmake
  • wget == /usr/ports/ftp/wget
  • Psyco JIT Compiler == /usr/ports/devel/py-psyco
  • ccache == /usr/ports/devel/ccache
  • GNU sed == /usr/ports/textproc/gsed
  • Bison == /usr/ports/devel/bison
  • GCC 2.95.3 == /usr/ports/lang/gcc295
  • bc == already in FreeBSD
  • PyQt == /usr/ports/x11-toolkits/py-qt
  • glibc headers (ignore)
  • subversion == /usr/ports/devel/subversion
  • monotone == /usr/ports/devel/monotone
  • git == /usr/ports/devel/git
  • bitkeeper == /usr/ports/devel/bitkeeper (make sure you follow the instructions regarding the license)
  • pcre == /usr/ports/devel/pcre

Ports has also has these: fileutils, jade, docbook, dsssl-docbook-modular, sgmltools


SuSE (9.1/9.2) instructions

Install [7], then follow Debian instructions.

python-dev and python-spyco are not in suse apt repository. python-spyco is not mandatory, so one can ignore it. I suppose python-devel (suse) is python-dev (devian).

Gentoo instructions

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

Fedora Core 2/3 instructions

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.

  • `yum install python`
  • `yum install ccache` (not required, also not a FC3 package)
  • `yum install patch`
  • `yum install m4`
  • `yum install sed`
  • `yum install bison`
  • `yum install make`
  • `yum install docbook*` (not sure what is required for docs)
  • `yum install openjade` (not sure what is required for docs)
  • `yum install glibc-devel`
  • `yum install Py Qt`
  • `yum install xmlto`
  • psycho: 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 Su Se 9.1 package of it.
  • quilt: Not needed to install on the system. OE will get, build and install it by itself.
  • libpcre: ???

Fedora Core 4 instructions

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
  • Py Qt
  • 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 instructions

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).

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"

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

su -c "yum localinstall openembedded-essential-1.1-1.noarch.rpm"

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 instructions

This long command will ensure all pre-requisites are installed (patch is 2.5.4, not 2.5.9, but appears to work).

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"

CentOS 4.4 (Red Hat Enterprise Linux 4 rebuild) instructions

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 ..."):

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

# yum install bison ccache coreutils cvs docbook-utils gawk git-core monotone \
  python quilt rpmlib sed subversion tetex texinfo unzip wget

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

Arch Linux (Duke) Instructions

Most of the packages are available in the repositories.

sudo pacman -S psyco ccache patch make sed python m4 bison cvs quilt sgmltools-lite docbook-xml xmlto pcre boost monotone jade git texinfo

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:

sudo ln -s /bin/install /usr/bin/install

You can build BitBake by using this PKGBUILD:

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
}

Using OpenEmbedded on FreeBSD and other NON Linux Systems

Building OpenEmbedded on FreeBSD. See BuildOnFreeBSD

Using OpenEmbedded on Mac OSX

Building OpenEmbedded on Mac OSX. See BuildOnOSX

Using OpenEmbedded on Windows/Cygwin Systems

Building OpenEmbedded on Windows is currently unsupported, but work is in progress to support buidling of meta-toolchain.bb on Windows/Cygwin hosts. See BuildOnCygwin