[FE training-materials-updates] Improvements to the U-Boot section

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Wed Sep 7 12:21:54 CEST 2016

Repository : git://git.free-electrons.com/training-materials.git
On branch  : master
Link       : http://git.free-electrons.com/training-materials/commit/?id=50e2c3df8247f2175e3980d8c8f56e8023641847


commit 50e2c3df8247f2175e3980d8c8f56e8023641847
Author: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
Date:   Wed Sep 7 12:21:54 2016 +0200

    Improvements to the U-Boot section
    - Update about configs/ vs. include/configs/
    - No longer talk about boards.cfg, which has been removed
    - Improve presentation here and there
    Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>


 .../sysdev-bootloaders-u-boot.tex                  | 131 +++++++++++----------
 1 file changed, 66 insertions(+), 65 deletions(-)

diff --git a/slides/sysdev-bootloaders-u-boot/sysdev-bootloaders-u-boot.tex b/slides/sysdev-bootloaders-u-boot/sysdev-bootloaders-u-boot.tex
index a780a37..b8a5834 100644
--- a/slides/sysdev-bootloaders-u-boot/sysdev-bootloaders-u-boot.tex
+++ b/slides/sysdev-bootloaders-u-boot/sysdev-bootloaders-u-boot.tex
@@ -23,66 +23,53 @@
   \frametitle{U-Boot configuration}
   \item Get the source code from the website, and uncompress it
-  \item The \code{include/configs/} directory contains one
-    configuration file for each supported board
+  \item The \code{configs/} directory contains one configuration file
+    for each supported board
     \item It defines the CPU type, the peripherals and their configuration, the
       memory mapping, the U-Boot features that should be compiled in, etc.
-    \item It is a simple \code{.h} file that sets C pre-processor
-      constants. See the \code{README} file for the documentation of
-      these constants. This file can also be adjusted to add or remove
-      features from U-Boot (commands, etc.).
-  \item Assuming that your board is already supported by U-Boot, there
-    should be one entry corresponding to your board in the
-    \code{boards.cfg} file.
-  \item Or just look in the \code{configs/} directory.
+  \item Note: U-Boot is migrating from board configuration defined in
+    header files (\code{include/configs/}) to {\em defconfig} like in
+    the Linux kernel (\code{configs/})
+    \begin{itemize}
+    \item Not all boards have been converted to the new configuration
+      system.
+    \item Older U-Boot releases provided by hardware vendors may not
+      yet use this new configuration system.
+    \end{itemize}
-  \frametitle{U-Boot configuration file excerpt}
-  \begin{columns}
-    \column{0.5\textwidth}
-    \scriptsize
-/* CPU configuration */
-#define CONFIG_ARMV7 1
-#define CONFIG_OMAP 1
-#define CONFIG_OMAP34XX 1
-#define CONFIG_OMAP3430 1
-#define CONFIG_OMAP3_IGEP0020 1
-/* Memory configuration */
-#define PHYS_SDRAM_1_SIZE (32 <<  20)
-/* USB configuration */
-#define CONFIG_MUSB_UDC 1
-#define CONFIG_USB_OMAP3 1
-#define CONFIG_TWL4030_USB 1
-    \column{0.5\textwidth}
-    \scriptsize
+  \frametitle{U-Boot configuration file}
-/* Available commands and features */
-#define CONFIG_CMD_EXT2
-#define CONFIG_CMD_I2C
-  \end{columns}
+# CONFIG_MMC is not set
+# CONFIG_CMD_IMLS is not set
+CONFIG_G_DNL_MANUFACTURER="Allwinner Technology"
@@ -91,10 +78,10 @@
   \item U-Boot must be configured before being compiled
     \item \code{make BOARDNAME_defconfig}
-    \item Where \code{BOARDNAME} is the name of the board, as visible
-      in the \code{boards.cfg} file (first column).
-    \item New: you can now run \code{make menuconfig} to further
-      edit U-Boot's configuration!
+    \item Where \code{BOARDNAME} is the name of a configuration, as
+      visible in the \code{configs/} directory.
+    \item You can then run \code{make menuconfig} to further customize
+      U-Boot's configuration!
   \item Make sure that the cross-compiler is available in \code{PATH}
   \item Compile U-Boot, by specifying the cross-compiler prefix.\\
@@ -166,8 +153,9 @@ Hit any key to stop autoboot:  0
   \frametitle{Information commands}
-  {\bf Flash information (NOR and SPI flash)}
+\begin{block}{Flash information (NOR and SPI flash)}
 U-Boot> flinfo
@@ -178,20 +166,28 @@ Logical address: 0xC0000000
 Area 0: C0000000 to C0001FFF (RO) Bootstrap
 Area 1: C0002000 to C0003FFF Environment
 Area 2: C0004000 to C0041FFF (RO) U-Boot
-  {\bf NAND flash information}
+\begin{block}{NAND flash information}
 U-Boot> nand info
 Device 0: nand0, sector size 128 KiB
   Page size      2048 b
   OOB size         64 b
   Erase size   131072 b
-  {\bf Version details}
+\begin{block}{Version details}
 U-Boot> version
 U-Boot 2016.05 (May 17 2016 - 12:41:15 -0400)
@@ -237,10 +233,15 @@ U-Boot 2016.05 (May 17 2016 - 12:41:15 -0400)
-  \frametitle{Environment variables commands (1)}
+  \frametitle{Environment variables: principle}
-  \item U-Boot can be configured through environment variables, which
-    affect the behavior of the different commands.
+  \item U-Boot can be configured through environment variables
+    \begin{itemize}
+    \item Some specific environment variables affect the behavior of
+      the different commands
+    \item Custom environment variables can be added, and used in
+      scripts
+    \end{itemize}
   \item Environment variables are loaded from flash to RAM at U-Boot
     startup, can be modified and saved back to flash for persistence
   \item There is a dedicated location in flash (or in MMC storage)

More information about the training-materials-updates mailing list