[bootlin/training-materials updates] master: Revert "labs/sysdev-kernel-cross-compiling: put all instructions in this file" (ea8767bb)

Thomas Petazzoni thomas.petazzoni at bootlin.com
Thu Sep 22 15:33:34 CEST 2022


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

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

commit ea8767bb60f679a09aabb4b69d3d5717ecacca18
Author: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
Date:   Thu Sep 22 15:33:10 2022 +0200

    Revert "labs/sysdev-kernel-cross-compiling: put all instructions in this file"
    
    This reverts commit 1f6a8d104c23824a69d896a2fead79902389da84.
    
    Turns out this dance is needed because the code within the condition
    uses verbatim environment... and that breaks the build. Really, LaTeX
    sucks badly :-/
    
    Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>


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

ea8767bb60f679a09aabb4b69d3d5717ecacca18
 common/sysdev-kernel-cross-compiling-stm32mp1.tex  | 45 ++++++++++++++++++++++
 .../sysdev-kernel-cross-compiling.tex              | 45 +---------------------
 2 files changed, 46 insertions(+), 44 deletions(-)

diff --git a/common/sysdev-kernel-cross-compiling-stm32mp1.tex b/common/sysdev-kernel-cross-compiling-stm32mp1.tex
new file mode 100644
index 00000000..17a41150
--- /dev/null
+++ b/common/sysdev-kernel-cross-compiling-stm32mp1.tex
@@ -0,0 +1,45 @@
+\section{Writing the kernel and DTB on the SD card}
+
+In order to let the kernel boot on the board autonomously, we can
+copy the kernel image and DTB in the boot partition we created
+previously.
+
+Insert the SD card in your PC, it will get auto-mounted. Copy the
+kernel and device tree:
+
+\begin{bashinput}
+$ sudo cp arch/arm/boot/dts/stm32mp157a-dk1.dtb arch/arm/boot/zImage /media/$USER/boot/
+$ sudo umount /media/$USER/boot
+\end{bashinput}
+\normalsize
+
+Insert the SD card back in the board and reset it. You should now be
+able to load the DTB and kernel image from the SD card and boot with:
+
+\begin{ubootinput}
+=> ext2load mmc 0:4 0xc0000000 zImage
+=> ext2load mmc 0:4 0xc4000000 stm32mp157a-dk1.dtb
+=> bootz 0xc0000000 - 0xc4000000
+\end{ubootinput}
+
+You are now ready to modify \code{bootcmd} to boot the board
+from SD card. But first, save the settings for booting from
+\code{tftp}:
+
+\begin{ubootinput}
+=> setenv bootcmdtftp %\$%{bootcmd}
+\end{ubootinput}
+
+This will be useful to switch back to \code{tftp} booting mode
+later in the labs.
+
+Finally, using \code{editenv bootcmd}, adjust \code{bootcmd} so that
+the Discovery board starts using the kernel from the SD card.
+
+Now, reset the board to check that it boots in the same way from the
+SD card. Check that this is really your own version of the kernel
+that's running\footnote{Look at the kernel log. You will find the
+kernel version number as well as the date when it was compiled.
+That's very useful to check that you're not loading an older version
+of the kernel instead of the one that you've just compiled.}.
+
diff --git a/labs/sysdev-kernel-cross-compiling/sysdev-kernel-cross-compiling.tex b/labs/sysdev-kernel-cross-compiling/sysdev-kernel-cross-compiling.tex
index fb39b3ac..9d845164 100644
--- a/labs/sysdev-kernel-cross-compiling/sysdev-kernel-cross-compiling.tex
+++ b/labs/sysdev-kernel-cross-compiling/sysdev-kernel-cross-compiling.tex
@@ -158,49 +158,6 @@ Restart the board to make sure that booting the kernel is now automated.
 
 \ifdefstring{\labboard}{stm32mp1}
 {
-\section{Writing the kernel and DTB on the SD card}
-
-In order to let the kernel boot on the board autonomously, we can
-copy the kernel image and DTB in the boot partition we created
-previously.
-
-Insert the SD card in your PC, it will get auto-mounted. Copy the
-kernel and device tree:
-
-\begin{bashinput}
-$ sudo cp arch/arm/boot/dts/stm32mp157a-dk1.dtb arch/arm/boot/zImage /media/$USER/boot/
-$ sudo umount /media/$USER/boot
-\end{bashinput}
-\normalsize
-
-Insert the SD card back in the board and reset it. You should now be
-able to load the DTB and kernel image from the SD card and boot with:
-
-\begin{ubootinput}
-=> ext2load mmc 0:4 0xc0000000 zImage
-=> ext2load mmc 0:4 0xc4000000 stm32mp157a-dk1.dtb
-=> bootz 0xc0000000 - 0xc4000000
-\end{ubootinput}
-
-You are now ready to modify \code{bootcmd} to boot the board
-from SD card. But first, save the settings for booting from
-\code{tftp}:
-
-\begin{ubootinput}
-=> setenv bootcmdtftp %\$%{bootcmd}
-\end{ubootinput}
-
-This will be useful to switch back to \code{tftp} booting mode
-later in the labs.
-
-Finally, using \code{editenv bootcmd}, adjust \code{bootcmd} so that
-the Discovery board starts using the kernel from the SD card.
-
-Now, reset the board to check that it boots in the same way from the
-SD card. Check that this is really your own version of the kernel
-that's running\footnote{Look at the kernel log. You will find the
-kernel version number as well as the date when it was compiled.
-That's very useful to check that you're not loading an older version
-of the kernel instead of the one that you've just compiled.}.
+\input{sysdev-kernel-cross-compiling-stm32mp1.tex}
 }
 {}




More information about the training-materials-updates mailing list