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

Thomas Petazzoni thomas.petazzoni at bootlin.com
Thu Sep 22 15:17:42 CEST 2022


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

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

commit 1f6a8d104c23824a69d896a2fead79902389da84
Author: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
Date:   Thu Sep 22 15:17:42 2022 +0200

    labs/sysdev-kernel-cross-compiling: put all instructions in this file
    
    Stop using a common/ file. It is not common, it is only used in one
    place.
    
    Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>


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

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

diff --git a/common/sysdev-kernel-cross-compiling-stm32mp1.tex b/common/sysdev-kernel-cross-compiling-stm32mp1.tex
deleted file mode 100644
index 17a41150..00000000
--- a/common/sysdev-kernel-cross-compiling-stm32mp1.tex
+++ /dev/null
@@ -1,45 +0,0 @@
-\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 1f2dfa11..8c4e5496 100644
--- a/labs/sysdev-kernel-cross-compiling/sysdev-kernel-cross-compiling.tex
+++ b/labs/sysdev-kernel-cross-compiling/sysdev-kernel-cross-compiling.tex
@@ -158,6 +158,49 @@ Restart the board to make sure that booting the kernel is now automated.
 
 \ifdefstring{\labboard}{discovery}
 {
-\input{sysdev-kernel-cross-compiling-stm32mp1.tex}
+\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.}.
 }
 {}




More information about the training-materials-updates mailing list