Differences

This shows you the differences between two versions of the page.

doc:howto:buildroot.exigence [2012/10/08 22:34]
hnyman document trunk rename to Barrier Breaker
doc:howto:buildroot.exigence [2013/05/20 04:10] (current)
ileadu
Line 1: Line 1:
====== OpenWrt Buildroot – Installation ====== ====== OpenWrt Buildroot – Installation ======
-[[about:toolchain|OpenWrt Buildroot]] is the preferred [[wp>toolchain]] to build OpenWrt. It is recommended that you use a [[wp>Linux distribution|GNU/Linux Distribution]], either a standalone installation or one running in a virtual environment ([[wp>VMware]] or [[wp>Qemu]]).+[[about:toolchain|OpenWrt Buildroot]] is the preferred [[wp>toolchain]] to build OpenWrt. It is recommended that you use a [[wp>Linux distribution|GNU/Linux Distribution]] (Debian is recommended), either a standalone installation or one running in a virtual environment ([[wp>VMware]] or [[wp>Qemu]]). 
 +  * Suse 12.3 uses the rpm package manager. //Please note that Suse 12.3 may work to compile, but has not been tested by OpenWRT Community//
-[[wp>Cygwin]] will probably not work correctly, and while it is possible to build OpenWrt images on a [[wp>Comparison of BSD operating systems|~BSD]] or on MacOSX system, success is not guaranteed. Feel free to try and then report back with your results. Don't forget to read [[#Troubleshooting]].+[[wp>Cygwin]] will probably not work correctly, and while it is possible to build OpenWrt images on a [[wp>Comparison of BSD operating systems|~BSD]] or on MacOS X system, success is not guaranteed. Feel free to try and then report back with your results. Don't forget to read [[#Troubleshooting]]. [[https://forum.openwrt.org/viewtopic.php?id=34676|Build OpenWrt on Mac OS X 10.7 Lion]]
===== Prerequisites ===== ===== Prerequisites =====
Line 11: Line 12:
| {{:meta:icons:tango:48px-emblem-important.svg.png?nolink}} | 1. Do everything as //non//-root user!\\ 2. Issue all OpenWrt Buildroot commands in the ''<buildsystem root>'' directory, e.g. ''~/openwrt/trunk/''\\ 3. Do not build in a directory that has spaces in its full path | | {{:meta:icons:tango:48px-emblem-important.svg.png?nolink}} | 1. Do everything as //non//-root user!\\ 2. Issue all OpenWrt Buildroot commands in the ''<buildsystem root>'' directory, e.g. ''~/openwrt/trunk/''\\ 3. Do not build in a directory that has spaces in its full path |
-  - Install ''[[wp>Apache Subversion|subversion]]'' (short: ''svn''), to conveniently download the OpenWrt source code, and ''[[wp>GNU build system|build tools]]'' to assist with the compilation process: <code bash>sudo apt-get update +  - Install ''[[wp>Apache Subversion|subversion]]'' (short: ''svn''), to conveniently download the OpenWrt source code, and ''[[wp>GNU build system|build tools]]'' to do the cross-compilation process: <code bash>sudo apt-get update 
-sudo apt-get install subversion build-essential</code>+sudo apt-get install subversion build-essential</code> Some feeds (e.g. LuCI, openwrt-routing and telephony) are not available over svn but only via ''[[wp>Git (software)|git]]''. If you want to obtain their source-code, you need to install git as well. In Debian do:<code bash> 
 +sudo apt-get install git-core</code>
    * for information about the subversion tool see ''[[man>svn]]'' and [[http://svnbook.red-bean.com/index.en.html|subversion documentation (multiple languages)]]     * for information about the subversion tool see ''[[man>svn]]'' and [[http://svnbook.red-bean.com/index.en.html|subversion documentation (multiple languages)]]
-    * for information about the build tools see ''[[man>make]]'' and [[http://packages.debian.org/squeeze/build-essential|build-essential]]+    * for information about the build tools see ''[[man>make]]'' and [[http://packages.debian.org/wheezy/build-essential|build-essential]] 
 +    * for information about git see ''[[man>git(7)]]''
  - Download the OpenWrt sources with ''svn''. <code bash>   - Download the OpenWrt sources with ''svn''. <code bash>
mkdir ~/openwrt mkdir ~/openwrt
Line 21: Line 24:
cd trunk cd trunk
</code> </code>
-    * this will create a directory 'trunk', which is the main OpenWrt source code dir +    * this creates a directory 'trunk', which is the main OpenWrt source code dir 
-    * for trunk rev R27988, there will be 14,382 files with an overall size of 150 MiB +    * for trunk rev R27988, it contains 14,382 files with an overall size of 150 MiB 
-    * includes the OpenWrt Buildroot system.+    * OpenWrt Buildroot is included
    * for more information about [[#Downloading Sources]].     * for more information about [[#Downloading Sources]].
  - Download and install [[doc:devel:feeds]] using feeds script. (//optional//)<code bash>   - Download and install [[doc:devel:feeds]] using feeds script. (//optional//)<code bash>
./scripts/feeds update -a ./scripts/feeds update -a
./scripts/feeds install -a</code> ./scripts/feeds install -a</code>
-    * after this, Revision 7367, the ''trunk''-dir contained **26,650 files** with an overall size of **302 MiB** (to install individual packages: ''./scripts/feeds install PACKAGENAME'')+    * after this, Revision 7367, the ''trunk''-dir contained **26,650 files** with an overall size of **302 MiB** (to install only individual packages: ''./scripts/feeds install PACKAGENAME'')
  - Use one of the following commands to check for missing packages on the system you want to build OpenWrt on:<code bash>   - Use one of the following commands to check for missing packages on the system you want to build OpenWrt on:<code bash>
make defconfig make defconfig
make prereq make prereq
make menuconfig</code> make menuconfig</code>
-    * this will list missing system packages needed to successfully build OpenWrt using buildroot+    * this will list missing system packages needed to successfully build OpenWrt using OpenWrt Buildroot
-  - Install the missing packages using [[https://wiki.archlinux.org/index.php/Pacman_Rosetta|package management commands]]. See the examples and table below for more details. +  - Install the missing packages. On a fresh //Debian 7 Wheezy 32/64Bit// these are:<code>libncurses5-dev zlib1g-dev gawk</code> 
-  - Proceed with [[build]] or [[https://forum.openwrt.org/viewtopic.php?id=34676|Build OpenWrt on Mac OS X 10.7 Lion]] +  - Proceed with [[build]] (i.e. cross-compile the downloaded sources to binaries) 
-:!: After configuring and running make (as described [[doc:howto:build|here]]), ''trunk''-dir contained 244,451 files with a total size of 3.2GiB!+ 
 +:!: After the cross-compilation process (as described [[doc:howto:build|here]]), the ''trunk''-directory contained 244,451 files with a total size of 3.2GiB!
===== Table of known prerequisites and their corresponding packages ===== ===== Table of known prerequisites and their corresponding packages =====
Line 43: Line 47:
^ Prerequisite ^ Debian ^ Suse ^ Red Hat ^ OS X (via MacPorts) ^ Fedora ^ NetBSD ^ ^ Prerequisite ^ Debian ^ Suse ^ Red Hat ^ OS X (via MacPorts) ^ Fedora ^ NetBSD ^
| asciidoc| asciidoc| asciidoc| asciidoc| asciidoc | asciidoc| ?| | asciidoc| asciidoc| asciidoc| asciidoc| asciidoc | asciidoc| ?|
-| bash| bash |bash| ?| bash | ?| bash| +| bash| bash |bash| ?| bash | bash| bash|
| binutils| binutils | binutils| binutils| binutils| binutils| ?| | binutils| binutils | binutils| binutils| binutils| binutils| ?|
| bzip2| bzip2 | bzip2| bzip2| bzip2| bzip2| ?| | bzip2| bzip2 | bzip2| bzip2| bzip2| bzip2| ?|
| fastjar| fastjar|fastjar| libgcj| fastjar| libgcj| ?| | fastjar| fastjar|fastjar| libgcj| fastjar| libgcj| ?|
| flex| flex|flex| ?| flex| flex| ?| | flex| flex|flex| ?| flex| flex| ?|
-| git| git-core| git-core| ?| ?| ?| ?|+| git| git-core| git-core| ?| ?| git | ?|
| g++| g++| gcc-c++| gcc-c++| ?| gcc-c++| ?| | g++| g++| gcc-c++| gcc-c++| ?| gcc-c++| ?|
| gcc| gcc| gcc| gcc| ?| gcc| ?| | gcc| gcc| gcc| gcc| ?| gcc| ?|
-| getopt| util-linux | util-linux | ?| getopt| ?| getopt| +| getopt| util-linux | util-linux | ?| getopt| util-linux | getopt|
| GNU awk| gawk| gawk| gawk| gawk| gawk| ?| | GNU awk| gawk| gawk| gawk| gawk| gawk| ?|
| gtk2.0-dev| libgtk2.0-dev| ?| gtk2-devel| gtk2| gtk2-devel| ?| | gtk2.0-dev| libgtk2.0-dev| ?| gtk2-devel| gtk2| gtk2-devel| ?|
Line 62: Line 66:
| patch| patch | patch| ?| patchutils| patch| ?| | patch| patch | patch| ?| patchutils| patch| ?|
| perl-ExtUtils-MakeMaker| perl-modules | perl-ExtUtils-MakeMaker| perl-ExtUtils-MakeMaker| p5-extutils-makemaker| perl-ExtUtils-MakeMaker| ?| | perl-ExtUtils-MakeMaker| perl-modules | perl-ExtUtils-MakeMaker| perl-ExtUtils-MakeMaker| p5-extutils-makemaker| perl-ExtUtils-MakeMaker| ?|
-| python2.6-dev| python2.6-dev | python-devel| ?| python26| ?| ?| +| python2.6-dev| python2.6-dev | python-devel| ?| python26| python-devel | ?|
| rsync| rsync| rsync| ?| rsync| rsync| ?| | rsync| rsync| rsync| ?| rsync| rsync| ?|
| ruby| ruby| ruby | ?| ruby| ruby| ?| | ruby| ruby| ruby | ?| ruby| ruby| ?|
-| sdcc| sdcc| sdcc| ?| sdcc| sdcc| ?| +| sdcc| sdcc| sdcc| sdcc| sdcc| sdcc| ?|
| unzip| unzip| unzip| ?| unzip| unzip| ?| | unzip| unzip| unzip| ?| unzip| unzip| ?|
| wget| wget | wget| wget| wget| wget| ?| | wget| wget | wget| wget| wget| wget| ?|
Line 71: Line 75:
| xgettext| gettext| ?| ?| gettext| gettext| ?| | xgettext| gettext| ?| ?| gettext| gettext| ?|
| xsltproc| xsltproc| libxslt| ?| libxslt| libxslt| ?| | xsltproc| xsltproc| libxslt| ?| libxslt| libxslt| ?|
-| zlib, zlib-static| zlib1g-dev| zlib-devel| ?| ?| ?| ?|+| zlib, zlib-static| zlib1g-dev| zlib-devel| ?| ?| zlib-devel | ?|
Unfortunately not all dependencies are checked by ''make config'': Unfortunately not all dependencies are checked by ''make config'':
^ Package ^ Prerequisite ^ Debian ^ Suse ^ Red Hat ^ OS X ^ Fedora ^ NetBSD ^ ^ Package ^ Prerequisite ^ Debian ^ Suse ^ Red Hat ^ OS X ^ Fedora ^ NetBSD ^
-| intltool | [Perl] XML::Parser | libxml-parser-perl | ? | ? | ? | ? | ?| +| intltool | [Perl] XML::Parser | libxml-parser-perl | ? | perl-XML-Parser | ? | perl-XML-Parser | ?|
-===== Examples ===== +===== Examples of Package Installations ===== 
-Debian 5.0 Lenny: +**Debian 5 Lenny:** 
-| ''**# aptitude install** gawk ncurses-dev unzip zlib1g-dev'' |+<code>apt-get install gawk ncurses-dev unzip zlib1g-dev</code>
-Debian 6.0 Squeeze: +**Debian 6 Squeeze:** 
-| ''**# aptitude install** libncurses5-dev zlib1g-dev gawk flex libssl-dev sdcc-nf '' |+<code>apt-get install libncurses5-dev zlib1g-dev gawk flex libssl-dev sdcc-nf</code>
-Fedora 11: +**Debian 7 Wheezy:** 
-| ''**# yum install** binutils bzip2 gawk gcc gcc-c++ gettext make ncurses-devel patch unzip wget zlib-devel flex git-core'' |+<code>apt-get install libncurses5-dev zlib1g-dev gawk</code>
-openSuSE 11.1 
-| ''**# zypper install** binutils bzip2 gawk gcc gcc-c++ gettext make ncurses-devel patch unzip wget zlib-devel flex git-core'' | 
-Ubuntu: +**Fedora 17:** 
-| ''**$ sudo apt-get install** build-essential subversion libncurses5-dev zlib1g-dev gawk flex'' |+<code>yum install -y subversion binutils bzip2 gcc gcc-c++ gawk gettext flex libz-dev flex ncurses-devel zlib-devel make patch unzip  perl-ExtUtils-MakeMaker 
 +mkdir ~/openwrt 
 +cd openwrt 
 +svn co svn://svn.openwrt.org/openwrt/trunk/ 
 +cd trunk 
 +./scripts/feeds update -a 
 +./scripts/feeds install -a 
 +make prereq 
 +make menuconfig 
 +ionice -c 3 nice -n 20 make -j 3 #always put nproc +1 </code>
-Ubuntu 9.10, I needed also these (30-03-2011): +**Fedora 18 - 64Bit** (Maybe also for lower versions, some packages seem to be missing above): 
-| ''**$ sudo apt-get install** gcc-multilib bison autoconf screen gcc g++ binutils patch bzip2 flex make gettext unzip libc6 git-core'' |+<code>yum install -y subversion binutils bzip2 gcc gcc-c++ gawk gettext flex ncurses-devel zlib-devel make patch unzip perl-ExtUtils-MakeMaker \ 
 + glibc glibc-devel glibc-static quilt ncurses-lib sed sdcc intltool sharutils bison</code>
-Ubuntu 11.10: +<code>#Maybe you need glibc.i686 glibc-static.i686 glibc-devel.i686 libgcc.i686 too</code>
-| ''**$ sudo apt-get install** build-essential subversion git-core libncurses5-dev zlib1g-dev gawk flex quilt'' |+
-Ubuntu 64bit: +**openSuSE 11.1** 
-| ''**$ sudo apt-get install** build-essential subversion libncurses5-dev zlib1g-dev gawk gcc-multilib flex git-core gettext'' |+<code>zypper install binutils bzip2 gawk gcc gcc-c++ gettext make ncurses-devel patch unzip wget zlib-devel flex git-core</code>
 +**Ubuntu 9.10:**
 +<code>sudo apt-get install build-essential subversion libncurses5-dev zlib1g-dev gawk gcc-multilib bison autoconf screen gcc g++ binutils patch bzip2 flex make gettext unzip libc6 git-core</code>
-Mac OS X (tested on 64-bit Lion): +**Ubuntu 11.10:** 
-  - Download [[http://www.macports.org/install.php#pkg|MacPorts .pkg Installer]], and install (horizontal scroll for entire second command):+<code>sudo apt-get install build-essential subversion git-core libncurses5-dev zlib1g-dev gawk flex quilt</code> 
 + 
 +**Ubuntu 12.04LTS:** 
 +<code>sudo apt-get install build-essential subversion git-core libncurses5-dev zlib1g-dev gawk flex quilt libssl-dev xsltproc libxml-parser-perl</code> 
 + 
 +**Ubuntu 64bit:** 
 +<code>sudo apt-get install build-essential subversion libncurses5-dev zlib1g-dev gawk gcc-multilib flex git-core gettext</code> 
 + 
 +**Mac OS X (tested on 64-bit Lion & Mountain Lion):** 
 +  - Download & use[[http://www.macports.org/install.php#pkg|MacPorts .pkg Installer]], and install the following packages with the help of Mac-Ports:
  - <code>sudo port -v selfupdate</code>   - <code>sudo port -v selfupdate</code>
-  - <code>sudo port install coreutils asciidoc bzip2 fastjar flex getopt gtk2 intltool jikes zlib openssl p5-extutils-makemaker python26 rsync ruby sdcc unzip gettext libxslt bison gawk autoconf wget gmake ncurses e2fsprogs osso-uuid</code>+  - <code>sudo port install coreutils asciidoc bzip2 fastjar flex getopt gtk2 intltool jikes zlib openssl p5-extutils-makemaker
 +python26 rsync ruby sdcc unzip gettext libxslt bison gawk autoconf wget gmake ncurses e2fsprogs ossp-uuid gawk findutils</code> 
  - **Required for 64-bit OS X**: After checking out the source tree via svn above, we need to edit **trunk/tools/Makefile**   - **Required for 64-bit OS X**: After checking out the source tree via svn above, we need to edit **trunk/tools/Makefile**
  * On line 17, erase the instance of "e2fsprogs" but leave the rest of the line   * On line 17, erase the instance of "e2fsprogs" but leave the rest of the line

Back to top

doc/howto/buildroot.exigence.1349728493.txt.bz2 · Last modified: 2012/10/08 22:34 by hnyman