[bootlin/training-materials updates] master: Remove obsolete content (ef450ff5)

Michael Opdenacker michael.opdenacker at bootlin.com
Wed May 22 22:39:26 CEST 2019


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

>---------------------------------------------------------------

commit ef450ff5664d10bef22e5f069966efffd7036ca7
Author: Michael Opdenacker <michael.opdenacker at bootlin.com>
Date:   Wed May 22 22:39:26 2019 +0200

    Remove obsolete content
    
    Signed-off-by: Michael Opdenacker <michael.opdenacker at bootlin.com>


>---------------------------------------------------------------

ef450ff5664d10bef22e5f069966efffd7036ca7
 labs/boot-time-bootloader/boot-time-bootloader.tex |  54 +--------
 labs/boot-time-results/boot-time-results.tex       | 134 ---------------------
 mk/boot-time.mk                                    |   1 -
 .../boot-time-bootloader/boot-time-bootloader.tex  |  31 -----
 4 files changed, 2 insertions(+), 218 deletions(-)

diff --git a/labs/boot-time-bootloader/boot-time-bootloader.tex b/labs/boot-time-bootloader/boot-time-bootloader.tex
index 7106c7d7..a2fe9058 100644
--- a/labs/boot-time-bootloader/boot-time-bootloader.tex
+++ b/labs/boot-time-bootloader/boot-time-bootloader.tex
@@ -1,53 +1,3 @@
-\subchapter{Bootloader optimizations}{Reduce boot time by
-using and optimizing Barebox}
+\subchapter{SPL optimizations}{Load Linux directly from the U-Boot SPL}
 
-\section{Switching to Barebox}
-
-We could have applied the same methodology as in the previous labs, and
-started to reduce boot time by measuring all the U-boot steps, by making
-it simpler and by tuning its options.
-
-However, there's another bootloader available, called Barebox. It
-supports an increasing number of hardware platforms, in particular the
-Microchip based ones. One of its strengths is that it can copy the kernel
-image with the CPU RAM caches enabled, allowing for faster copy to RAM
-and execution from it.
-
-Let's download the sources for Barebox:\footnote{Once again, the
-bootloader sources can also be found in the USB disk provided by
-the instructor. See also \url{https://bootlin.com/labs/boot-time/README.txt}
-for details about where we got these sources from.}
-
-\begin{verbatim}
-cd /opt/boot-time-labs/barebox
-cp /opt/BootTime/downloads/barebox-2013.08.tar.xz .
-tar xf barebox-2013.08.tar.xz
-\end{verbatim}
-
-We also apply some patches providing configuration and environments files
-that reduce the Barebox features to a minimum:
-
-\begin{verbatim}
-cd barebox-2013.08
-cat ../patches/*.patch | patch -p1
-\end{verbatim}
-
-We can now configure and compile Barebox:
-
-\begin{verbatim}
-source ../../kernel/env.sh
-make sama5d3xek_fast_defconfig
-make
-\end{verbatim}
-
-You can flash the generated image \code{arch/arm/pbl/zbarebox.bin} to
-replace \code{u-boot}. This time you will have to use the
-\code{zImage} instead of the \code{uImage} for the kernel. Edit the
-\code{sama5d3x_demo_linux_nandflash.tcl} script to do that.
-
-\section{Optimizing the kernel}
-
-Try to remove as much as possible from the kernel configuration to be
-faster.
-
-Measure your new boot time.
+Write this chapter!
diff --git a/labs/boot-time-results/boot-time-results.tex b/labs/boot-time-results/boot-time-results.tex
deleted file mode 100644
index 50bcbea5..00000000
--- a/labs/boot-time-results/boot-time-results.tex
+++ /dev/null
@@ -1,134 +0,0 @@
-\subchapter{Appendix - Results}{Results obtained in the various steps}
-
-\section{Initial boot time components}
-
-Here are the results we got after making the initial measurements:
-
-\begin{tabular}{| l | c | c | r |}
-  \hline
-  Boot phase & Start string & Time stamp & Elapsed \\
-  \hline
-  \hline
-  RomBOOT & \code{RomBOOT} & 0.000000 & 55 ms \\
-  \hline
-  Bootstrap & \code{AT91Bootstrap 3.5.2} & 0.054626 & 978 ms \\
-  \hline
-  Bootloader & \code{U-Boot 2012.10} & 1.032380 & 7,720 ms \\
-  \hline
-  Kernel & \code{Booting Linux on physical CPU 0} & 8.752495 & 2,795 ms \\
-  \hline
-  Init scripts & \code{init started: BusyBox v1.21.0} & 11.547943 & 1,890 ms \\
-  \hline
-  Critical application & \code{Starting video player} & 13.438071 & 1,244 ms \\
-  \hline
-  Critical application ready & \code{Done playing video} & 14.682485 & \\
-  \hline
-  \hline
-  \multicolumn{3}{| c |}{Total} & 14,682 ms \\
-  \hline
-\end{tabular}
-
-The original boot log is available in
-\code{/opt/boot-time-labs/measuring/boot-instrumented1.log}.
-
-\section{Init script optimizations}
-
-\section{Results}
-
-Here are the results we obtained from our own experiments:
-
-\begin{tabular}{| l | c | c | r |}
-  \hline
-  Technique & Total time stamp & Difference with previous
-experiment \\
-  \hline
-  \hline
-  Original time & 14.682485 & N/A \\
-  \hline
-  Remove \code{udev} & 13.667242 & -1,015 ms \\
-  \hline
-  Postpone services & 13.003734 & -666 ms \\
-  \hline
-  Optimize launcher & 12.920196 & -84 ms\\
-  \hline
-  Other trick & & \\
-  \hline
-  Other trick & & \\
-  \hline
-  \hline
-  \multicolumn{2}{| c |}{Total gain} & 1,765 ms\\
-  \hline
-\end{tabular}
-
-The original boot logs are available in
-\code{/opt/boot-time-labs/init-scripts/}.
-
-\section{Kernel optimizations}
-
-\subsection{Measuring}
-
-Here are the longuest initcalls that we discovered on the boot graph:
-
-\begin{itemize}
-\item \code{atmel_hlcdfb_init} (about 800 ms!): obviously the
-      framebuffer driver
-      for the Microchip LCD controller. A quick look at the source code
-      \code{drivers/video/atmel_hlcdfb.c} doesn't reveal any obvious
-      delay loop and anything pathological. There is no module parameter
-      either which could be used to shorten probe time.
-\item \code{atmel_serial_init} (about 500 ms!): obviously Microchip's serial
-      driver. No obvious issue found in the code. Another driver
-      that needs optimizing!
-\item \code{atmel_nand_init} (about 100 ms). Nothing suspicious found.
-      May be scanning for bad blocks though (not immediately found in
-      the code).
-\item \code{ubi_init} (about 1000 ms!). That's the longuest one.
-      This corresponds to the time running the \code{ubi_attach}
-      functionality. A {\em UBI fastmap} feature was added in Linux 3.7
-      to address this issue, but our kernel version doesn't have it
-      yet. A solution would be to switch to a newer stable kernel
-      when available. At least, you can't remove this one
-      as long as the rootfilesystem (in a UBI partition) depends on
-      it.
-\item \code{macb_init} (Ethernet driver), \code{ehci_hcd_init} and
-      \code{ohci_hcd_mod_init} (USB host controller drivers): the
-      corresponding devices are not used in the boot sequence. We can
-      build their drivers as modules and load them later.
-\item \code{qt1070_driver_init} (about 500 ms)! Reading the code
-      reveals that this is a driver for the touch keys on the left
-      hand of the LCD (\code{K1} to \code{K2} keys). Another driver
-      which would be worth optimizing, but which could be built as a module.
-\item \code{atmci_init} (about 100 ms). That's the Microchip Multimedia
-      Card (MMC) interface. It can also be build as a module.
-\end{itemize}
-
-\subsection{Postponing, compiling some drivers as modules}
-
-Thanks to the boot graph highlighting them, here are the
-kernel configuration settings that we modified, to compile
-some drivers as modules: \code{CONFIG_MACB, CONFIG_USB_OHCI_HCD,
-CONFIG_USB_EHCI_HCD, CONFIG_KEYBOARD_QT1070}.
-
-\subsection{Results}
-
-Here are the results we obtained from our own experiments:
-
-\begin{tabular}{| p{6cm} | c | r |}
-  \hline
-  Technique & Total time stamp & Difference with previous experiment \\
-  \hline
-  \hline
-  Original time & 13.252827 & N/A \\
-  \hline
-  Postpone functionality (drivers compiled as modules) & 12.302508 & -950 ms\\
-  \hline
-  Remove unnecessary functionality (\code{quiet} option) & 11.166088 & -1.136 ms\\
-  \hline
-  Remove unnecessary functionality (skip delay loop calibration) & Not tested & \\
-  \hline
-
-  \hline
-  \multicolumn{2}{| c |}{Total gain} & -2,087 ms \\
-  \hline
-\end{tabular}
-
diff --git a/mk/boot-time.mk b/mk/boot-time.mk
index ad3681cf..a000c2f2 100644
--- a/mk/boot-time.mk
+++ b/mk/boot-time.mk
@@ -40,4 +40,3 @@ BOOT_TIME_LABS = boot-time-goals \
 		boot-time-filesystem-optimizations \
 		boot-time-kernel \
 		boot-time-bootloader \
-		boot-time-results
diff --git a/slides/boot-time-bootloader/boot-time-bootloader.tex b/slides/boot-time-bootloader/boot-time-bootloader.tex
index f53a5da6..cce627e5 100644
--- a/slides/boot-time-bootloader/boot-time-bootloader.tex
+++ b/slides/boot-time-bootloader/boot-time-bootloader.tex
@@ -9,7 +9,6 @@
       development. Compile your bootloader with less features.
 \item Optimize required functionality.\\
       Tune your bootloader for fastest performance. \\
-      Switch to another bootloader (if available) \\
       Skip the bootloader and load the kernel right away.
 \end{itemize}
 \end{frame}
@@ -170,36 +169,6 @@ Measured between \code{Booting kernel} and \code{Starting kernel ...}
 \end{itemize}
 \end{frame}
 
-\subsection{Switching to another bootloader}
-
-\begin{frame}[fragile]
-\frametitle{Features}
-Now, let's limit the features of the bootloader.\\
-We still keep a way to interact with it when a GPIO has a given value.
-For example, using the \code{gpio_direction_input} and
-\code{gpio_get_value} commands in a script that would then start an
-upgrade or boot a rescue kernel.
-\begin{block}{}
-\begin{verbatim}
-gpio_get_value 42
-if [ $? = 0 ]; then
-    kdev="/dev/nand0.krescue.bb"
-fi
-\end{verbatim}
-\end{block}
-\end{frame}
-
-\begin{frame}
-\frametitle{Results}
-Note: the kernel didn't actually change but we don't get a message on
-the serial line exactly at the time we switch from the bootloader to
-the kernel.
-
-Warning: Sometimes, the kernel is relying on the bootloader to
-initialize the hardware (pinmuxing, clocks, ...) so be careful when
-removing features.
-\end{frame}
-
 \subsection{Skipping the bootloader}
 
 \begin{frame}[fragile]




More information about the training-materials-updates mailing list