Differences
This shows you the differences between two versions of the page.
|
doc:howto:buildroot.exigence [2013/01/17 12:13] bluse |
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| ?| | ||
| 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 | ? | perl-XML-Parser | ? | ? | ?| | + | | intltool | [Perl] XML::Parser | libxml-parser-perl | ? | perl-XML-Parser | ? | perl-XML-Parser | ?| |
| ===== Examples of Package Installations ===== | ===== Examples of Package Installations ===== | ||
| - | **Debian 5.0 Lenny:** | + | **Debian 5 Lenny:** |
| - | <code>aptitude install gawk ncurses-dev unzip zlib1g-dev</code> | + | <code>apt-get install gawk ncurses-dev unzip zlib1g-dev</code> |
| + | |||
| + | **Debian 6 Squeeze:** | ||
| + | <code>apt-get install libncurses5-dev zlib1g-dev gawk flex libssl-dev sdcc-nf</code> | ||
| + | |||
| + | **Debian 7 Wheezy:** | ||
| + | <code>apt-get install libncurses5-dev zlib1g-dev gawk</code> | ||
| - | **Debian 6.0 Squeeze:** | ||
| - | <code>aptitude install libncurses5-dev zlib1g-dev gawk flex libssl-dev sdcc-nf</code> | ||
| **Fedora 17:** | **Fedora 17:** | ||
| Line 92: | Line 100: | ||
| ./scripts/feeds update -a | ./scripts/feeds update -a | ||
| ./scripts/feeds install -a | ./scripts/feeds install -a | ||
| - | make defconfig | ||
| make prereq | make prereq | ||
| make menuconfig | make menuconfig | ||
| - | ionice -c 3 nice -n 20 make -j 2 #for quad-core CPU put -j 3</code> | + | ionice -c 3 nice -n 20 make -j 3 #always put nproc +1 </code> |
| **Fedora 18 - 64Bit** (Maybe also for lower versions, some packages seem to be missing above): | **Fedora 18 - 64Bit** (Maybe also for lower versions, some packages seem to be missing above): | ||
| - | <code>yum install -y subversion binutils bzip2 gcc gcc-c++ gawk gettext flex flex ncurses-devel zlib-devel make patch unzip perl-ExtUtils-MakeMaker \ | + | <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> | glibc glibc-devel glibc-static quilt ncurses-lib sed sdcc intltool sharutils bison</code> | ||
doc/howto/buildroot.exigence.1358421201.txt.bz2 · Last modified: 2013/01/17 12:13 by bluse
