[bootlin/training-materials updates] master: Boot time: Buildroot part1 (8fca0941)

Michael Opdenacker michael.opdenacker at bootlin.com
Thu May 16 14:17:19 CEST 2019

Repository : https://github.com/bootlin/training-materials
On branch  : master
Link       : https://github.com/bootlin/training-materials/commit/8fca094129efa2d273fddfbcdb3cfef3aefffce5


commit 8fca094129efa2d273fddfbcdb3cfef3aefffce5
Author: Michael Opdenacker <michael.opdenacker at bootlin.com>
Date:   Thu May 16 05:55:41 2019 +0200

    Boot time: Buildroot part1
    Signed-off-by: Michael Opdenacker <michael.opdenacker at bootlin.com>


 .../boot-time-build-system.tex                     | 81 ++++++++++++++++++++++
 mk/boot-time.mk                                    |  1 +
 2 files changed, 82 insertions(+)

diff --git a/labs/boot-time-build-system/boot-time-build-system.tex b/labs/boot-time-build-system/boot-time-build-system.tex
new file mode 100644
index 00000000..9150dd4a
--- /dev/null
+++ b/labs/boot-time-build-system/boot-time-build-system.tex
@@ -0,0 +1,81 @@
+\subchapter{Build the system}{Objective: compile the root filesystem.}
+After this lab, you will have a ready to use root filesystem to boot
+your system with, including a video player application.
+We haven't compiled the bootloader and kernel for our board yet,
+but since this part can take a long time (especially compiling the
+cross-compiling toolchain), let's start it now, while we are still
+fetching kernel sources or going through lectures.
+As specified in the Buildroot
+Buildroot requires a few packages to be installed on your
+machine. Let's install them using Ubuntu's package manager:
+sudo apt install sed make binutils gcc g++ bash patch \
+  gzip bzip2 perl tar cpio python unzip rsync wget libncurses-dev
+\section{Choosing a Buildroot release}
+Buildroot is one of the best tools for building a custom root filesystem
+for a dedicated embedded system with a fixed set of features, typically
+like the one we're trying to build.
+Go to the /code{~/boot-time-labs/src/buildroot/} directory.
+We will use the latest revision of the \code{2019.02} release, which is
+one of Buildroot's long term releases:
+git tag | grep 2019.02
+git checkout 2019.02.2
+\section{Configuring Buildroot}
+To minimize external dependencies and maximize flexibility, we will ask
+Buildroot to generate its own toolchain. This can be better than using
+external toolchains, as we have the ability to tweak toolchain settings
+in a fine way if needed.
+Start the Buildroot configuration utility:
+make menuconfig
+\item \code{Target Options} menu
+  \begin{itemize}
+  \item It is quite well known that the BeagleBone Black Wireless is
+    an ARM based platform, so select \code{ARM (little endian)} as the
+    target architecture.
+  \item According to the BeagleBone Black Wireless website at
+    \url{http://beagleboard.org/BLACK}, it uses a Texas Instruments
+    AM335x, which is based on the ARM Cortex-A8 core. So select
+    \code{cortex-A8} as the \code{Target Architecture Variant}.
+  \item On ARM two {\em Application Binary Interfaces} are available:
+    \code{EABI} and \code{EABIhf}. Unless you have backward
+    compatibility concerns with pre-built binaries, \code{EABIhf} is
+    more efficient, so make this choice as the \code{Target ABI}
+    (which should already be the default anyway).
+  \item The other parameters can be left to their default value:
+    \code{ELF} is the only available \code{Target Binary Format},
+    \code{VFPv3-D16} is a sane default for the {\em Floating Point
+      Unit}, and using the \code{ARM} instruction set is also a good
+    default (we could use the \code{Thumb-2} instruction set for
+    slightly more compact code).
diff --git a/mk/boot-time.mk b/mk/boot-time.mk
index 85badf20..5d08f8f0 100644
--- a/mk/boot-time.mk
+++ b/mk/boot-time.mk
@@ -24,6 +24,7 @@ BOOT_TIME_LABS = boot-time-goals \
 		setup \
 		boot-time-sources-download \
 		boot-time-board-setup \
+		boot-time-build-system \
 		boottime-init-scripts \
 		boottime-application \
 		boottime-kernel \

More information about the training-materials-updates mailing list