diff options
author | Felix Fietkau <nbd@openwrt.org> | 2008-08-06 14:30:46 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2008-08-06 14:30:46 +0000 |
commit | 131ba6fed71615f10f662a66357cfdddec16026d (patch) | |
tree | da2352b1de1a05127992fdf150f62799324a541b /docs | |
parent | 3a321fb11041d6786f0da6227b0b6f531314cefd (diff) | |
download | upstream-131ba6fed71615f10f662a66357cfdddec16026d.tar.gz upstream-131ba6fed71615f10f662a66357cfdddec16026d.tar.bz2 upstream-131ba6fed71615f10f662a66357cfdddec16026d.zip |
add script for managing 'build environments' (.config+files/), including documentation
SVN-Revision: 12212
Diffstat (limited to 'docs')
-rw-r--r-- | docs/build.tex | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/docs/build.tex b/docs/build.tex index 54d31c582b..cc7f5fd2c8 100644 --- a/docs/build.tex +++ b/docs/build.tex @@ -483,3 +483,60 @@ Other useful targets include: \item \texttt{make package/\textit{<name>}/configure V=99} \end{itemize} + +\subsection{Using build environments} +OpenWrt provides a means of building images for multiple configurations +which can use multiple targets in one single checkout. These \emph{environments} +store a copy of the .config file generated by \texttt{make menuconfig} and the contents +of the \texttt{./files} folder. +The script \texttt{./scripts/env} is used to manage these environments, it uses +\texttt{git} (which needs to be installed on your system) as backend for version control. + +The command +\begin{Verbatim} + \texttt{./scripts/env help} +\end{Verbatim} +produces a short help text with a list of commands. + +To create a new environment named \texttt{current}, run the following command +\begin{Verbatim} + ./scripts/env new current +\end{Verbatim} +This will move your \texttt{.config} file and \texttt{./files} (if it exists) to +the \texttt{env/} subdirectory and create symlinks in the base folder. + +After running make menuconfig or changing things in files/, your current state will +differ from what has been saved before. To show these changes, use: +\begin{Verbatim} + ./scripts/env diff +\end{Verbatim} + +If you want to save these changes, run: +\begin{Verbatim} + ./scripts/env save +\end{Verbatim} +If you want to revert your changes to the previously saved copy, run: +\begin{Verbatim} + ./scripts/env revert +\end{Verbatim} + +If you want, you can now create a second environment using the \texttt{new} command. +It will ask you whether you want to make it a clone of the current environment (e.g. +for minor changes) or if you want to start with a clean version (e.g. for selecting +a new target). + +To switch to a different environment (e.g. \texttt{test1}), use: +\begin{Verbatim} + ./scripts/env switch test1 +\end{Verbatim} + +To rename the current branch to a new name (e.g. \texttt{test2}), use: +\begin{Verbatim} + ./scripts/env rename test2 +\end{Verbatim} + +If you want to get rid of environment switching and keep everything in the base directory +again, use: +\begin{Verbatim} + ./scripts/env clear +\end{Verbatim} |