[bootlin/training-materials updates] master: sysdev/kernel: building: Fully rework the slide about the cmdline (7569ea8c)

Miquel Raynal miquel.raynal at bootlin.com
Wed Nov 10 11:09:13 CET 2021


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

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

commit 7569ea8ca68c200ecc51919357af23a852811f86
Author: Miquel Raynal <miquel.raynal at bootlin.com>
Date:   Wed Nov 10 11:04:20 2021 +0100

    sysdev/kernel: building: Fully rework the slide about the cmdline
    
    The original purpose of this slide was to explain how the kernel was
    getting its cmdline.
    
    While explaining that the kernel configuration has an impact on the
    cmdline might be worth keeping, I do not think it is wise to talk about
    device tree overlays, U-Boot fixing the DT and so on. In particular
    because device tree will be addressed later in the training(s). Here, we
    are just explaining how to boot the kernel with U-Boot, nothing more,
    it's important to keep this portion short and clear, so let's not bother
    with too much detail. Plus, U-boot natively does noting of all of that,
    it's usually a user input/script more than a core/automated feature.
    
    The reference to DT fixups is the slide title is dropped, if fixups and
    overlays need to be explained, this should be a dedicatd slide among the
    existing device tree slides comming next.
    
    Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>


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

7569ea8ca68c200ecc51919357af23a852811f86
 .../sysdev-kernel-building.tex                     | 47 ++++++++++------------
 1 file changed, 22 insertions(+), 25 deletions(-)

diff --git a/slides/sysdev-kernel-building/sysdev-kernel-building.tex b/slides/sysdev-kernel-building/sysdev-kernel-building.tex
index 1c3b04c1..6aec24a8 100644
--- a/slides/sysdev-kernel-building/sysdev-kernel-building.tex
+++ b/slides/sysdev-kernel-building/sysdev-kernel-building.tex
@@ -595,33 +595,30 @@ CONFIG_NTFS_RW=y
 \end{frame}
 
 \begin{frame}
-  \frametitle{DT fixups and passing the kernel command line}
-  \footnotesize
-  On platforms with the Device Tree, U-Boot actually fixes the DT
-  before passing it to the Linux kernel:
+  \frametitle{Passing the kernel command line}
   \begin{columns}
-  \column{0.7\textwidth}
-  \begin{itemize}
-     \item U-Boot checks the device tree loaded in RAM
-           or directly provides its own.
-     \item U-Boot checks the specifics of the hardware
-           (amount and location of RAM, MAC address, present
-           devices...), possibly loads corresponding Device Tree overlays,
-           and modifies (fixes-up) the Device Tree accordingly.
-     \item U-Boot stores the Linux kernel command line string
-            (\code{bootargs}) in the \code{chosen} section
-            in the Device Tree.
-     \item Then the kernel can:
-           \begin{itemize}
-	   \item Append this string to the default command line
-                 (\kconfig{CONFIG_CMDLINE}) if \kconfig{CONFIG_CMDLINE_EXTEND} is set
-           \item Use only this string if \kconfig{CONFIG_CMDLINE_FROM_BOOTLOADER} is set
-	   \item Use only \kconfig{CONFIG_CMDLINE} if \kconfig{CONFIG_CMDLINE_FORCE} is set.
-           \end{itemize}
-  \end{itemize}
-  \column{0.3\textwidth}
+    \column{0.7\textwidth}
+    \begin{itemize}
+    \item U-Boot carries the Linux kernel command line string in its
+      \code{bootargs} environment variable
+    \item Right before starting the kernel, it will store the content of
+      \code{bootargs} in the \code{chosen} section of the Device Tree
+    \item The kernel will behave differently depending on its
+      configuration:
+      \begin{itemize}
+      \item If \kconfig{CONFIG_CMDLINE_FROM_BOOTLOADER} is set:\\
+        The kernel will use only the string from the bootloader
+      \item If \kconfig{CONFIG_CMDLINE_FORCE} is set:\\
+        The kernel will only use the string received at configuration
+        time in \kconfig{CONFIG_CMDLINE}
+      \item If \kconfig{CONFIG_CMDLINE_EXTEND} is set:\\
+        The kernel will concatenated both strings
+      \end{itemize}
+    \end{itemize}
+    \column{0.3\textwidth}
     \tiny See the "Understanding U-Boot Falcon Mode"
-    presentation from Michael Opdenacker, for details about how U-Boot boots Linux.\\
+    presentation from Michael Opdenacker, for details about how U-Boot
+    boots Linux.\\
     \vspace{0.6cm}
     \includegraphics[width=\textwidth]{slides/sysdev-kernel-building/understanding-falcon-mode-presentation.png}\\
     \vspace{0.4cm}




More information about the training-materials-updates mailing list