X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/a9f2b5949ea61785014e2906c7e028351fd17d91..112576f704f7cba6d1ea9ba9bad130800df310b6:/docs/build.tex diff --git a/docs/build.tex b/docs/build.tex index 730451ede..54d31c582 100644 --- a/docs/build.tex +++ b/docs/build.tex @@ -65,25 +65,25 @@ There are four key directories in the base: \texttt{tools} and \texttt{toolchain} refer to common tools which will be used to build the firmware image, the compiler, and the C library. -The result of this is three new directories, \texttt{tool\_build}, which is a temporary -directory for building the target independent tools, \texttt{toolchain\_build\_\textit{}} +The result of this is three new directories, \texttt{build\_dir/host}, which is a temporary +directory for building the target independent tools, \texttt{build\_dir/toolchain-\textit{}*} which is used for building the toolchain for a specific architecture, and -\texttt{staging\_dir\_\textit{}} where the resulting toolchain is installed. +\texttt{staging\_dir/toolchain-\textit{}*} where the resulting toolchain is installed. You will not need to do anything with the toolchain directory unless you intend to add a new version of one of the components above. \begin{itemize} - \item \texttt{tool\_build} - \item \texttt{toolchain\_build\_\textit{}} + \item \texttt{build\_dir/host} + \item \texttt{build\_dir/toolchain-\textit{}*} \end{itemize} \texttt{package} is for exactly that -- packages. In an OpenWrt firmware, almost everything is an \texttt{.ipk}, a software package which can be added to the firmware to provide new features or removed to save space. Note that packages are also maintained outside of the main -trunk and can be obtained from subversion at the following location: +trunk and can be obtained from subversion using the package feeds system: \begin{Verbatim} -$ svn checkout https://svn.openwrt.org/openwrt/packages packages +$ ./scripts/feeds update \end{Verbatim} Those packages can be used to extend the functionality of the build system and need to be @@ -91,15 +91,17 @@ symlinked into the main trunk. Once you do that, the packages will show up in th configuration. From kamikaze you would do something like this: \begin{Verbatim} -$ ls -kamikaze packages -$ ln -s packages/net/nmap kamikaze/package/nmap +$ ./scripts/feeds search nmap +Search results in feed 'packages': +nmap Network exploration and/or security auditing utility + +$ ./scripts/feeds install nmap \end{Verbatim} To include all packages, issue the following command: \begin{Verbatim} -$ ln -s packages/*/* kamikaze/package/ +$ make package/symlinks \end{Verbatim} \texttt{target} refers to the embedded platform, this contains items which are specific to @@ -108,12 +110,12 @@ directory which is broken down by platform \textit{} and contains the patc kernel, profile config, for a particular platform. There's also the "\texttt{target/image}" directory which describes how to package a firmware for a specific platform. -Both the target and package steps will use the directory "\texttt{build\_\textit{}}" +Both the target and package steps will use the directory "\texttt{build\_dir/\textit{}}" as a temporary directory for compiling. Additionally, anything downloaded by the toolchain, target or package steps will be placed in the "\texttt{dl}" directory. \begin{itemize} - \item \texttt{build\_\textit{}} + \item \texttt{build\_dir/\textit{}} \item \texttt{dl} \end{itemize} @@ -171,7 +173,7 @@ of noise caused by the compile output. To see the full output, run the command "\texttt{make V=99}". During the build process, buildroot will download all sources to the "\texttt{dl}" -directory and will start patching and compiling them in the "\texttt{build\_\textit{}}" +directory and will start patching and compiling them in the "\texttt{build\_dir/\textit{}}" directory. When finished, the resulting firmware will be in the "\texttt{bin}" directory and packages will be in the "\texttt{bin/packages}" directory. @@ -461,14 +463,14 @@ shortcuts you can take. Instead of waiting for make to get to your package, you run one of the following: \begin{itemize} - \item \texttt{make package/\textit{}-clean V=99} - \item \texttt{make package/\textit{}-install V=99} + \item \texttt{make package/\textit{}/clean V=99} + \item \texttt{make package/\textit{}/install V=99} \end{itemize} -Another nice trick is that if the source directory under \texttt{build\_\textit{}} +Another nice trick is that if the source directory under \texttt{build\_dir/\textit{}} is newer than the package directory, it won't clobber it by unpacking the sources again. If you were working on a patch you could simply edit the sources under the -\texttt{build\_\textit{}/\textit{}} directory and run the install command above, +\texttt{build\_dir/\textit{}/\textit{}} directory and run the install command above, when satisfied, copy the patched sources elsewhere and diff them with the unpatched sources. A warning though - if you go modify anything under \texttt{package/\textit{}} it will remove the old sources and unpack a fresh copy. @@ -476,8 +478,8 @@ it will remove the old sources and unpack a fresh copy. Other useful targets include: \begin{itemize} - \item \texttt{make package/\textit{}-prepare V=99} - \item \texttt{make package/\textit{}-compile V=99} - \item \texttt{make package/\textit{}-configure V=99} + \item \texttt{make package/\textit{}/prepare V=99} + \item \texttt{make package/\textit{}/compile V=99} + \item \texttt{make package/\textit{}/configure V=99} \end{itemize}