[FE training-materials-updates] slides/buildroot-advanced: improve explanations about BR2_EXTERNAL
Thomas Petazzoni
thomas.petazzoni at free-electrons.com
Mon Jul 6 10:58:03 CEST 2015
Repository : git://git.free-electrons.com/training-materials.git
On branch : master
Link : http://git.free-electrons.com/training-materials/commit/?id=98efbd9a93ba56d8b33bf58d61c5ce34313ce374
>---------------------------------------------------------------
commit 98efbd9a93ba56d8b33bf58d61c5ce34313ce374
Author: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
Date: Fri Jun 26 15:20:18 2015 +0200
slides/buildroot-advanced: improve explanations about BR2_EXTERNAL
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
>---------------------------------------------------------------
98efbd9a93ba56d8b33bf58d61c5ce34313ce374
slides/buildroot-advanced/buildroot-advanced.tex | 63 +++++++++++++++++++++++-
1 file changed, 61 insertions(+), 2 deletions(-)
diff --git a/slides/buildroot-advanced/buildroot-advanced.tex b/slides/buildroot-advanced/buildroot-advanced.tex
index ea66037..a7e412a 100644
--- a/slides/buildroot-advanced/buildroot-advanced.tex
+++ b/slides/buildroot-advanced/buildroot-advanced.tex
@@ -10,13 +10,42 @@
\item Makes it harder to upgrade Buildroot
\end{itemize}
\item The \code{BR2_EXTERNAL} mechanism allows to store your own
- package recipes, {\em defconfigs} and other artefacts outside of
- the Buildroot tree.
+ package recipes, {\em defconfigs} and other artefacts {\bf
+ outside} of the Buildroot source tree.
\item Note: can only be used to add new packages, not to override
existing Buildroot packages
\end{itemize}
\end{frame}
+\begin{frame}{{\tt BR2\_EXTERNAL}: example organization}
+
+ \begin{itemize}
+ \item \code{project/}
+ \begin{itemize}
+ \item \code{buildroot/}
+ \begin{itemize}
+ \item The Buildroot source code, cloned from Git, or extracted
+ from a release tarball.
+ \end{itemize}
+ \item \code{external/}
+ \begin{itemize}
+ \item Your {\em external tree}, with your own custom packages
+ and {\em defconfigs}
+ \end{itemize}
+ \item \code{output-build1/}
+ \item \code{output-build2/}
+ \begin{itemize}
+ \item Several {\em output} directories, to build various configurations
+ \end{itemize}
+ \item \code{custom-app/}
+ \item \code{custom-lib/}
+ \begin{itemize}
+ \item The source code of your custom applications and libraries.
+ \end{itemize}
+ \end{itemize}
+ \end{itemize}
+\end{frame}
+
\begin{frame}{{\tt BR2\_EXTERNAL}: mechanism}
\begin{itemize}
\item Specify \code{BR2_EXTERNAL} on the command line when building.
@@ -126,6 +155,36 @@ make BR2_EXTERNAL=/path/to/external
\end{itemize}
\end{frame}
+\begin{frame}[fragile]{Use {\tt BR2\_EXTERNAL} in your configuration}
+
+ \begin{itemize}
+ \item In your Buildroot configuration, don't use absolute paths for
+ the {\em rootfs overlay}, the {\em post-build scripts}, {\em
+ global patch directories}, etc.
+ \item If they are located in your
+ \code{BR2_EXTERNAL}, you can use
+ \code{$(BR2_EXTERNAL)} in your Buildroot configuration options.
+ \item With the recommended structure shown before, a Buildroot
+ configuration would look like:
+ \begin{block}{}
+{\tiny
+\begin{verbatim}
+BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL)/board/<company>/<boardname>/patches/"
+...
+BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL)/board/<company>/<boardname>/rootfs_overlay/"
+...
+BR2_ROOTFS_POST_BUILD_SCRIPT="$(BR2_EXTERNAL)/board/<company>/<boardname>/post_build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL)/board/<company>/<boardname>/post_image.sh"
+...
+BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL)/board/<company>/<boardname>/linux.config"
+\end{verbatim}
+}
+ \end{block}
+ \end{itemize}
+
+\end{frame}
+
\begin{frame}{Package-specific targets: basics}
\begin{itemize}
\item Internally, each package is implemented through a number of
More information about the training-materials-updates
mailing list