User Tools

Site Tools


doc:howto:buildroot.exigence

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
doc:howto:buildroot.exigence [2012/12/24 10:22]
piratenpanda Add 64Bit fedora systems
doc:howto:buildroot.exigence [2015/06/16 23:41] (current)
RyanLindeman [GIT] Add Chaos Calmer git repo section
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 [[wp>​toolchain|buildsystem]] for the OpenWrt Linux distribution. OpenWrt Buildroot works on Linux, ​BSD or MacOSX operating system. A case-sensitive filesystem is required.
  
-[[wp>Cygwin]] will probably not work correctlyand 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]].+It is recommended that you use a Linux distribution ([[wp>Debian]])either ​standalone installation or one running in a virtual environment ([[wp>VMware]] or [[wp>Qemu]]).
  
 +[[wp>​Cygwin]](Windows) will not be supported because of the lack of case sensitiveness in the file system.
 +
 +Outdated information for old Buildroot versions, old Linux variants is archived at: [[doc:​howto:​buildroot.exigence.old]]
 +
 +:!: For common problems, benchmarks, common optimizations see [[doc:​faq:​development]]
 ===== Prerequisites ===== ===== Prerequisites =====
-  ​350 MB of hard disk space for the source ​files to be downloaded. +to generate an [[doc:​howto:​generic.flashing|installable]] OpenWrt firmware image file with a size of e.g. 8MB: 
-  * 3-4 GB of available hard disk space to build (i.e. cross-compile) OpenWrt.+  ​ca. 200 MB of hard disk space for OpenWrt Buildroot 
 +  * ca. 300 MB of hard disk space for OpenWrt Buildroot + OpenWrt Feeds 
 +  * ca. 2.1 GB of hard disk space for source ​packages ​downloaded ​during build from OpenWrt Feeds 
 +  * ca. 3-4 GB of available hard disk space to build (i.e. cross-compile) OpenWrt ​and generate the firmware file
  
-===== Procedure ===== +  * ca. 1-4 GB of RAM to build Openwrt.(build x86's img need 4GB RAM)
-| {{:​meta:​icons:​tango:​48px-emblem-important.svg.png?​nolink}} | 1. Do everything as //non//-root user!\\ 2Issue 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 + ​{{tag>​wip}} 
-sudo apt-get install ​subversion ​build-essential</​code>​+ 
 +===== Install ​procedure on Linux ===== 
 +| ->[[doc:​howto:​buildroot.exigence.bsd|Procedure on ~BSD]] | ->[[doc:​howto:​buildroot.exigence.macosx|Procedure on Mac OS X]] 
 + \\ 
 +| {{:​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\\ 4. Change Ownership other than root user,of the directory where you Download the OpenWrt ​(sudo chown -R user:user /​openwrt/​)| 
 + 
 +  - Install ​''​[[wp>Git (software)|git]]''​ , 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 ​git-core ​build-essential ​libssl-dev libncurses5-dev unzip</​code> ​Some feeds might not available over git but only via ''​[[wp>​Apache Subversion|subversion]]''​ (short: ''​svn''​) or ''​[[wp>​Mercurial|mercurial]]''​. If you want to obtain their source-code,​ you need to install svn and mercurial as well:<​code bash> 
 +sudo apt-get install subversion mercurial</​code>​ 
 +     * 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)]]''​
      * 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]] +  - Download ​the OpenWrt bleeding edge(trunk Version) with ''​git''​ (//​see ​[[#​Downloading Sources]] for more options!//):<code bash> 
-  - Download the OpenWrt sources with ''​svn''​. ​<code bash>  +git clone git://git.openwrt.org/​openwrt.git 
-mkdir ~/openwrt +</​code> ​<​HTML><​p style="​font-size:​small">​this creates ​a directory 'openwrt', which is the OpenWrt ​Buildroot build-directory </br>the OpenWrt toolchain "OpenWrt Buildroot" is included</​p></​HTML>​ 
-cd ~/openwrt +  - (//​optional//​) ​Download and install ​all available "​feeds"​ (//see [[[doc:​devel:​feeds|OpenWrt Feeds]] for more options!//):<code bash> ​ 
-svn co svn://svn.openwrt.org/​openwrt/trunk/ +cd openwrt
-cd trunk +
-</​code> ​ +
-     ​* ​this will create ​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 +
-     * includes ​the OpenWrt Buildroot ​system. +
-     * for more information about [[#​Downloading Sources]]. ​ +
-  - 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''​) +  Make OpenWrt Buildroot check for missing ​packages ​on your build-system using one of the following commands:<​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> ​<​HTML><​p style="​font-size:​small">​There you will need to select what you want to compile.</p></HTML> 
-     * this will list missing system packages needed ​to successfully build OpenWrt using buildroot. +  - Proceed with [[build]] ​(i.ecross-compile the downloaded sources to binaries)<​HTML><​p style="​font-size:small">​After the cross-compilation process the ''​trunk''​-directory ​contained 244,451 files with a total size of 3.2GiB!</​p></​HTML>​ 
-  - 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. +
-  - Proceed with [[build]] ​or [[https://​forum.openwrt.org/​viewtopic.php?​id=34676|Build OpenWrt on Mac OS X 10.7 Lion]] +
-:!: After configuring and running make (as described [[doc:​howto:​build|here]]), ​''​trunk''​-dir 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 =====
-Here's a table with the package name for each prerequisite separated for different Linux distributions.+Here's a table with the package name for each prerequisite separated for different ​GNU/Linux and Unix like distributions.
  
-^ Prerequisite ^ Debian ^ Suse ^ Red Hat ^ OS X (via MacPorts) ^ Fedora ^ NetBSD ^ +^ Prerequisite ^ Debian ^ SUSE ^ Red Hat ^ OS X (via MacPorts) ^ Fedora ^ NetBSD ​^ Arch ^ Gentoo ​
-| asciidoc| asciidoc| asciidoc| asciidoc| asciidoc | asciidoc| ?| +| asciidoc ​        ​| asciidoc| asciidoc| asciidoc| asciidoc | asciidoc| ?| asciidoc | app-text/​asciidoc ​
-| bash| bash |bash| ​?| bash | ?| bash|  +| [[wp>​Bash (Unix shell)|GNU Bash]] ​| bash |bash| bash | bash | bash| bashbash| app-shells/bash | 
-binutils| binutils | binutils| binutils| binutils| binutils| ?| +[[wp>​Bc_(programming_language)#​GNU_bc|GNU bc]] | bc| bc| | | bc| | bc| sys-devel/​bc | 
-| bzip2| bzip2 | bzip2| bzip2| bzip2| bzip2| ?|  +| [[wp>GNU Binutils]] ​| binutils | binutils| binutils| binutils| binutils| ?| binutils| sys-devel/​binutils ​
-| fastjar| fastjar|fastjar| libgcj| fastjar| libgcj| ?|  +[[wp>bzip2]]     | bzip2 | bzip2| bzip2| bzip2| bzip2| ?| bzip2| app-arch/​bzip2 ​
-| flex| flex|flex| ​?| flex| flex| ?|  +| fastjar ​         | fastjar|fastjar| libgcj| fastjar| libgcj| ?| fastjar| app-arch/​fastjar ​
-| git| git-core| git-core| ​???| ?| +[[wp>flex lexical analyser|flex]]  ​| flex|flex| flex | flex| flex| ?| flex| sys-devel/​flex ​
-g++| g++| gcc-c++| gcc-c++| ?| gcc-c++| ?|  +| [[wp>Git (software)|git]] | git-core| git-core| ​git git-core ​git | ?| git| dev-vcs/​git ​
-| gcc| gcc| gcc| gcc| ?| gcc| ?|  +[[wp>GNU C++ Compiler]]  ​| g++| gcc-c++| gcc-c++| ?| gcc-c++| ?| gcc sys-devel/gcc 
-| getopt| util-linux | util-linux | ?| getopt| ​?| getopt|  +| [[wp>GNU C Compiler]] ​   ​| gcc| gcc| gcc| ?| gcc| ?| gcc| sys-devel/​gcc ​
-| GNU awk| gawk| gawk| gawk| gawk| gawk| ?|  +| getopt ​          ​| util-linux | util-linux | util-linux ​| getopt| ​util-linux ​| getopt| util-linux | sys-apps/​util-linux ​
-| gtk2.0-dev| libgtk2.0-dev| ​?| gtk2-devel| gtk2| gtk2-devel| ?|  +[[wp>GNU awk]]   | gawk| gawk| gawk| gawk| gawk| ?| gawk| sys-apps/​gawk ​
-| intltool-update| intltool| intltool| intltool| intltool| intltool| ?|  +| gtk2.0-dev ​      ​| libgtk2.0-dev| ​gtk2-devel| gtk2-devel| gtk2| gtk2-devel| ?| gtk2 | x11-libs/​gtk+:​2 ​
-| jikes| ​---| jikes| ?| jikes| ---| ?|  +| intltool-update ​ | intltool| intltool| intltool| intltool| intltool| ?| intltool | dev-util/​intltool ​
-| libz, libz-dev| zlib1g-dev | zlib-devel| zlib-devel| zlib| zlib-devel| ?|  +| jikes            [[http://​packages.debian.org/​jessie/​jikespg|jikespg]] ​| jikes| ?| jikes| ---| ?| [[https://​aur.archlinux.org/​packages/​jikes/​|aur/​jikes]] | dev-java/​jikes ​
-| make| make | make| ?| gmake| make| gmake|  +| libz, libz-dev ​  ​| zlib1g-dev | zlib-devel| zlib-devel| zlib| zlib-devel| ?| zlib | sys-libs/​zlib | 
-| ncurses| libncurses5-dev| ncurses-devel| ncurses-devel| ncurses| ncurses-devel| ?|  +| Mercurial / hg   | | mercurial| | | hg | | | dev-vcs/​mercurial ​
-| openssl/​ssl.h| libssl-dev| libopenssl-devel| openssl-devel| openssl| openssl-devel| ?|  +| make             ​| make | make| make | gmake| make| gmake| make | sys-devel/​make ​
-| patch| patch | patch| ​?| patchutils| patch| ?|  +mkisofs ​         | genisoimage | genisoimage| ?| ?| genisoimage| ?| cdrkit | virtual/​cdrtools | 
-| perl-ExtUtils-MakeMaker| perl-modules | perl-ExtUtils-MakeMaker| perl-ExtUtils-MakeMaker| p5-extutils-makemaker| perl-ExtUtils-MakeMaker| ?|  +| [[wp>ncurses]]   | libncurses5-dev| ncurses-devel| ncurses-devel| ncurses| ncurses-devel| ?| ncurses | sys-libs/​ncurses ​
-| python2.6-dev| python2.6-dev | python-devel| ?| python26| ​?| ?|  +| openssl/​ssl.h ​   | libssl-dev| libopenssl-devel| openssl-devel| openssl| openssl-devel| ?| openssl | dev-libs/​openssl ​
-| rsync| rsync| rsync| ​?| rsync| rsync| ?|  +| patch| patch     ​| patch | patch | patchutils| patch| ?| patch | sys-devel/​patch ​
-| ruby| ruby| ruby | ?| ruby| ruby| ?|  +| perl-ExtUtils-MakeMaker| perl-modules | perl-ExtUtils-MakeMaker| perl-ExtUtils-MakeMaker| p5-extutils-makemaker| perl-ExtUtils-MakeMaker| ?| perl-extutils-makemaker | virtual/​perl-ExtUtils-MakeMaker ​
-| sdcc| sdcc| sdcc| ?| sdcc| sdcc| ?|  +| python2.6-dev ​   | python2.6-dev | python-devel| ?| python26| ​python-devel ​| ?| python2 | dev-lang/​python:​2.6 ​
-| unzip| unzip| unzip| ​?| unzip| unzip| ?|  +| rsync            | rsync| rsync| ​rsync | rsync| rsync| ?| rsync | net-misc/​rsync ​
-wget| wget | wget| wget| wget| wget| ?|  +| ruby             ​| ruby| ruby | ?| ruby| ruby| ?| ruby | dev-lang/​ruby ​
-working-sdcc--- ??| ?| ---? +| sdcc             ​| sdcc| sdcc| sdcc| sdcc| sdcc| ?| sdcc | dev-embedded/​sdcc ​
-| xgettext| gettext| ?| ?| gettext| gettext| ?|  +| unzip            | unzip| unzip| ​unzip| unzip| unzip| ?| unzip | app-arch/​unzip ​
-| xsltproc| xsltproc| libxslt| ?| libxslt| libxslt| ?|  +[[wp>GNU Wget]]  ​| wget | wget| wget| wget| wget| ?| wget net-misc/​wget ​| 
-| zlib, zlib-static| zlib1g-dev| zlib-devel| ​???| ?|+xgettext ​        gettextgettext-toolsgettext ​gettext| gettext| ?| gettext | sys-devel/gettext | 
 +| xsltproc ​        ​| xsltproc| libxslt-tools| ?| libxslt| libxslt| ?| libxslt | dev-libs/​libxslt ​
 +| zlib, zlib-static| zlib1g-dev| zlib-devel| ​zlib-devel ​zlib-develzlib-devel ​| ?| zlib | sys-libs/​zlib ​|
  
 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 ^ Arch ^ Gentoo ^ 
-| intltool | [Perl] XML::Parser | libxml-parser-perl | ?+| boost    | bjam / boost-jam ​  | libboost1.53-dev ​  | | | | boost-jam || boost | dev-util/​boost-build | 
 +| intltool | [Perl] XML::Parser | libxml-parser-perl | | perl-XML-Parser ​| | perl-XML-Parser ​| intltool | dev-perl/​XML-Parser | 
 +| libftdi ​ | libusb-config ​     | libusb-dev | | | | libusb-devel | | libusb | dev-libs/​libusb-compat | 
 +| lilo     | as86,​ld86 ​         | bin86 | | | | dev86 | | bin86 | sys-devel/​bin86 | 
 +| lilo     | bcc                | bcc | | | | dev86 | | [[https://​aur.archlinux.org/​packages/​bcc/​|aur/​bcc]] | sys-devel/​dev86 | 
 +| lilo     | uudecode ​          | sharutils | | | | sharutils | | sharutils | app-arch/​sharutils | 
 +| classpath| javac, gcj         | openjdk-7-jdk | | | | java-1.7.0-openjdk-devel | | jdk7-openjdk | dev-java/​oracle-jdk-bin,​ sys-devel/​gcc[gcj],​ and one (or both) of dev-java/​icedtea-bin:​7 and dev-java/​icedtea:​7 | 
 +| mac80211 | b43-fwcutter ​      | | | | | b43-fwcutter | | b43-fwcutter | net-wireless/​b43-fwcutter | 
 +| jamvm    | zip                | | | | | zip | | | app-arch/​zip ​|
  
-===== Examples ​===== +==== Examples ​of Package Installations ​==== 
-Debian ​5.0 Lenny+  * **Arch Linux**<​code>​pacman -S --needed subversion asciidoc bash bc binutils bzip2 fastjar flex git gcc util-linux gawk intltool zlib make cdrkit ncurses openssl patch perl-extutils-makemaker rsync sdcc unzip wget gettext libxslt boost libusb bin86 sharutils b43-fwcutter findutils</​code>​ 
-| ''​**# aptitude ​install** gawk ncurses-dev unzip zlib1g-dev''​ |+  * **Debian ​7 Wheezy:**<​code>​apt-get install libncurses5-dev zlib1g-dev gawk</​code>​ 
 +  * **Fedora 20 - 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 ncurses-devel zlib-devel make patch unzip perl-ExtUtils-MakeMaker \ 
 + glibc glibc-devel glibc-static quilt ncurses-lib sed sdcc intltool sharutils bison wget</​code>​ 
 +  ​* **openSUSE 13.2**<​code>​zypper install asciidoc bash bc binutils bzip2 fastjar flex git-core gcc-c++ gcc util-linux ​gawk gtk2-devel intltool jikes zlib-devel mercurial make genisoimage ​ncurses-devel libopenssl-devel patch perl-ExtUtils-MakeMaker python-devel rsync ruby sdcc unzip wget gettext-tools libxslt-tools zlib-devel subversion</​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 mercurial bzr ecj cvs unzip</​code>​ 
 +  * **Ubuntu 64bit:​**<​code>​sudo apt-get install build-essential subversion libncurses5-dev ​zlib1g-dev ​gawk gcc-multilib flex git-core gettext libssl-dev</​code>​ 
 +  * **Centos x86-64:​**<​code>​yum install 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 wget git-core openssl-devel xz</​code>​ 
 +  * **Gentoo:​**<​code bash>$ echo \ 
 +    app-arch/​{bzip2,​fastjar,​sharutils,​unzip,​zip} \ 
 +    app-text/​asciidoc dev-java/​{icedtea:​7,​jikes,​oracle-jdk-bin} \ 
 +    dev-libs/​{libusb-compat,​libxslt,​openssl} dev-util/​intltool \ 
 +    dev-vcs/​{git,​mercurial} net-misc/​{rsync,​wget} \ 
 +    net-wireless/​b43-fwcutter sys-apps/​{gawk,​util-linux} \ 
 +    sys-devel/​{bc,​bin86,​binutils,​dev86,​flex,​gcc[gcj],​gettext} \ 
 +    sys-libs/​{ncurses,​zlib} virtual/​{cdrtools,​perl-ExtUtils-MakeMaker} \ 
 +    x11-libs/​gtk+:​2 \ 
 +        | sed 's/\s/\n/g' ​
 +            ​sort \ 
 +                | sudo tee /​etc/​portage/​sets/​openwrt-prerequisites \ 
 +                    && sudo emerge -DuvNa '​@openwrt-prerequisites'</​code>​ 
 +==== Known variants to be broken ====
  
-Debian 6.0 Squeeze: +  ​* **alpine linux** uses musl as libc replacement. Some host tools fail to compile (mtd-utils, e2fsprogs). Detection possibly has to be overridden (gcc -dumpmachine outputs a result where some scripts will fail tools/sed)
-| ''​**# aptitude install** libncurses5-dev zlib1g-dev gawk flex libssl-dev sdcc-nf ''​ |+
  
-Fedora 17: 
-| ''​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 defconfig 
-make prereq 
-make menuconfig 
-ionice -c 3 nice -n 20 make -j 2 #for quad-core CPU put -j 3''​ | 
  
-Fedora 18 - 64Bit (Maybe also for lower versions, some packages seem to be missing above): +===== Downloading Sources =====
-| ''​yum install -y subversion binutils bzip2 gcc gcc-c++ gawk gettext flex flex ncurses-devel zlib-devel make patch unzip perl-ExtUtils-MakeMaker \ +
- glibc glibc-devel glibc-static quilt ncurses-lib sed sdcc intltool sharutils bison+
  
-Maybe you need glibc.i686 glibc-static.i686 glibc-devel.i686 libgcc.i686 too ''​ |+==== GIT ==== 
 +cloning the Git repository using one of the following commands:
  
-openSuSE 11.1 +=== trunk (main development tree) === 
-| ''​**# zypper install** binutils bzip2 gawk gcc gcc-c++ gettext make ncurses-devel patch unzip wget zlib-devel flex git-core''​ |+The development branch (trunk) contains everything from documentation to <color yellow>**//​experimental//​**</​color>​ <color red>​**//​patches//​**</​color>​. 
 +== Main repository ==
  
-Ubuntu: +<code bash>git clone git://​git.openwrt.org/​openwrt.git</​code>​
-| ''​**$ sudo apt-get install** build-essential subversion libncurses5-dev zlib1g-dev gawk flex''​ |+
  
-Ubuntu 9.10, I needed also these (30-03-2011):​ +== Packages feed ==
-| ''​**$ sudo apt-get install** gcc-multilib bison autoconf screen gcc g++ binutils patch bzip2 flex make gettext unzip libc6 git-core''​ |+
  
-Ubuntu 11.10: +<code bash>git clone git://​git.openwrt.org/​packages.git</​code>​
-| ''​**$ sudo apt-get install** build-essential subversion ​git-core libncurses5-dev zlib1g-dev gawk flex quilt''​ |+
  
-Ubuntu 12.04LTS: +=== 15.05 branch (Chaos Calmer) ===
-| ''​**$ sudo apt-get install** build-essential subversion git-core libncurses5-dev zlib1g-dev gawk flex quilt libssl-dev xsltproc libxml-parser-perl''​ |+
  
-Ubuntu 64bit: +== Main repository == 
-| ''​**$ sudo apt-get install** build-essential subversion libncurses5-dev zlib1g-dev gawk gcc-multilib flex git-core gettext''​ |+<code bash>git clone git://​git.openwrt.org/​15.05/​openwrt.git</​code>​
  
 +== Packages feed ==
  
-Mac OS X (tested on 64-bit Lion): +<code bash>git clone git://git.openwrt.org/15.05/packages.git</​code>​
-  - Download [[http://www.macports.org/install.php#​pkg|MacPorts .pkg Installer]],​ and install (horizontal scroll for entire second command): +
-  - <​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 ossp-uuid</​code>​ +
-  - **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 +
-   * Comment out line 22, line 50, line 52, line 58 with the hash symbol, by putting # at the beginning of each lineThey are the lines that issue qemu to be built, followed by the build dependancies for mtd-utils (dep: e2fsprogs), qemu (dep: e2fsprogs), and e2fsprogs respectively. +
-   * Then copy the required headers and libraries to compile tools/​mtd-utils <​code>​cd trunk; +
-mkdir -p staging_dir/​host/​include/​e2fsprogs;​ +
-cp -R /​opt/​local/​include/​ossp staging_dir/​host/​include/​e2fsprogs/;​ +
-cp /​opt/​local/​lib/​libuuid* staging_dir/​host/​lib ​</​code>​ +
-See thread: [[https://​forum.openwrt.org/​viewtopic.php?​id=34676|[HOWTO] Build OpenWRT Trunk from svn on Mac OS X 10.7 Lion]] for more details+
  
 +=== 14.07 branch (Barrier Breaker) ===
  
-Notes: +== Main repository == 
-   * In Debian or Ubuntu use <​code>​apt-cache search ""</​code>​ to find prerequisite packages. Naming is sometimes different +<​code ​bash>git clone git://git.openwrt.org/14.07/openwrt.git</​code>​
-   * In openSuSE some packages require additional repositories. Search on http://packages.opensuse-community.org and add repositories like that: <​code>​zypper ar "​http:/​/download.opensuse.org/​repositories/​devel:/​languages:/​perl/openSUSE_11.1/​devel:​languages:​perl.repo"​</​code>​ +
-  * To build your images on a Mac OS X Machine all you need is the package "​fileutils"​ from the //fink project//. (Tested on Leopard 10.5.3)+
  
 +== Packages feed ==
  
-===== Downloading Sources ===== +<code bash>git clone git://git.openwrt.org/​14.07/packages.git</code>
-Short version: [[https://dev.openwrt.org/​wiki/GetSource]]\\ +
-You have two choices:  +
-  * Download the latest stable release, or  +
-  * Download the bleeding edge development snapshot (currently named "​Barrier Breaker",​ but often called "​trunk"​). +
-The official repository is in svn but you can also choose to use git if you're building trunk. Refer to the [[https://​dev.openwrt.org/​wiki/​GetSource|GetSource]] for the URLs and amend the following commands appropriately.+
  
-==== Using Release Sources ​(stable) ===+=== 12.09 branch ​(Attitude Adjustment) ===
-As of this writing, the latest stable release is OpenWrt 10.03 "​Backfire"​. There is a Backfire branch in SVN repository, which is still slowly being updated with verified patches. Using it will most likely produce a stable and working OpenWrt installation,​ but all the newest features and patches might not be there. As an example, this will check out the source code that the backfire release is built from (plus the latest backported fixes from trunk):+
  
-<​code>​ +== Main repository == 
-svn checkout svn://svn.openwrt.org/​openwrt/branches/​backfire +<​code ​bash>git clone git://git.openwrt.org/​12.09/openwrt.git</​code>​
-</​code>​+
  
-You could alternatively download a '​tagged'​ version of the backfire sources. For instance, if you insist on using the pristine release sources (no backported fixes applied after the last release), you could use:+== Packages feed ==
  
-<​code>​ +<​code ​bash>git clone git://git.openwrt.org/​12.09/packages.git</​code>​
-svn checkout svn://svn.openwrt.org/​openwrt/​tags/backfire_10.03 +
-</​code>​+
  
-You can check out certain revision+=== Merged main repository into a single Git repository === 
-<​code>​ +If you want all three repositories mentioned above in single git repository (with history) do the following
-svn checkout --revision=24045 svn://svn.openwrt.org/​openwrt/​branches/backfire/ ./build_dir +<​code ​bash>git clone git://git.openwrt.org/​openwrt.git  
-</code>+cd openwrt 
 +# Add AA remote repository 
 +git remote add aa-up git://git.openwrt.org/12.09/openwrt.git 
 +git fetch aa-up 
 +AA_BRANCH=`git log aa-up/master --pretty="​tformat:​%H %T" | tail -1` 
 +AA_TIP=($AA_BRANCH) 
 +OW_AA_MATCH=`git log master --pretty="​tformat:​%H %T" | grep ${AA_TIP[1]}` 
 +OW_AA_BRANCH=($OW_AA_MATCH) 
 +git checkout -b ow-aa ${OW_AA_BRANCH[0]} 
 +echo "​${AA_TIP[0]} ${OW_AA_BRANCH[0]}" ​>> .git/​info/​grafts 
 +git merge aa-up/​master
  
-As for the packages copy ''​feeds.conf.default''​ in ./build_dir to feeds.conf and add "@24045" ​at the end of the line that checks out the package feed+# Add BB remote repository 
-<code+git remote add bb-up git://git.openwrt.org/14.07/openwrt.git 
-src-svn packages svn://svn.openwrt.org/​openwrt/​packages@24045+git fetch bb-up 
 +BB_BRANCH=`git log bb-up/​master --pretty="tformat:%H %T" | tail -1` 
 +BB_TIP=($BB_BRANCH) 
 +OW_BB_MATCH=`git log master --pretty="tformat:%H %T" | grep ${BB_TIP[1]}` 
 +OW_BB_BRANCH=($OW_BB_MATCH) 
 +git checkout -b ow-bb ${OW_BB_BRANCH[0]} 
 +echo "​${BB_TIP[0]} ${OW_BB_BRANCH[0]}" ​>> .git/​info/​grafts 
 +git merge bb-up/​master 
 + 
 +# Add CC remote repository 
 +git remote add cc-up git://git.openwrt.org/15.05/openwrt.git 
 +git fetch cc-up 
 +CC_BRANCH=`git log cc-up/​master --pretty="​tformat:​%H %T" | tail -1` 
 +CC_TIP=($CC_BRANCH) 
 +OW_CC_MATCH=`git log master --pretty="​tformat:​%H %T" | grep ${CC_TIP[1]}` 
 +OW_CC_BRANCH=($OW_CC_MATCH) 
 +git checkout -b ow-cc ${OW_CC_BRANCH[0]} 
 +echo "​${CC_TIP[0]} ${OW_CC_BRANCH[0]}"​ >> .git/​info/​grafts 
 +git merge cc-up/master
 </​code>​ </​code>​
 +After doing the above, you can simply do the following to pickup trunk, aa, bb, or cc changes made.
 +<code bash>git checkout master
 +git pull
 +  AND/OR
 +git checkout ow-aa
 +git pull aa-up master
 +  AND/OR
 +git checkout ow-bb
 +git pull bb-up master
 +  AND/OR
 +git checkout ow-cc
 +git pull cc-up master</​code>​
 +
 +=== Check out certain revision ===
 +git commits are tagged with SVN ids.
 +<code bash>git log --grep=<​svn id></​code>​
 +
 +==== SVN ====
 +see [[doc:​howto:​buildroot.exigence.old|Deprecated Buildroot-Installation Howto]]
 +
 +:!: Accessing SVN may get your IP blacklisted on SVN and forum. Full SVN checkout can take a very long time compared to git. Using git is recommended by the developers.
 +
 +
  
  
-==== Using Development Sources (bleeding edge) ==== 
-The development branch (trunk) contains everything from documentation to <color yellow>​**//​experimental//​**</​color>​ <color red>​**//​patches//​**</​color>​. 
-  * get latest<​code>​ 
-svn checkout svn://​svn.openwrt.org/​openwrt/​trunk/​ 
-</​code>​ 
-  * get certain revision<​code>​ 
-svn co svn://​svn.openwrt.org/​openwrt/​trunk/​@<​rev#>​ 
-</​code>​ 
  
-===== Troubleshooting ===== 
-  * Beware of unusual environment variables such as 
-     * ''​GREP_OPTIONS''​ which should not have ''​--initial-tab''​ or other options affecting its output 
-     * **''​SED''​ should not be set.  If it is, run `unset SED` before compiling.** (See [[https://​dev.openwrt.org/​ticket/​10612|Ticket 10612]].) 
doc/howto/buildroot.exigence.1356340979.txt.bz2 · Last modified: 2012/12/24 10:22 by piratenpanda