[bootlin/training-materials updates] master: yocto: labs: yocto-first-build-stm32: switch from verbatim to bashinput (a16ace8c)

Luca Ceresoli luca.ceresoli at bootlin.com
Fri Nov 18 10:38:41 CET 2022


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

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

commit a16ace8cffc2d97d5e592b0914ca2f6b920b3cf9
Author: Luca Ceresoli <luca.ceresoli at bootlin.com>
Date:   Wed Nov 16 11:02:16 2022 +0100

    yocto: labs: yocto-first-build-stm32: switch from verbatim to bashinput
    
    The BBB labs use bachinput, make them more similar. This also provides
    nicer rendering (gray background) and automatig wrapping.
    
    Signed-off-by: Luca Ceresoli <luca.ceresoli at bootlin.com>


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

a16ace8cffc2d97d5e592b0914ca2f6b920b3cf9
 .../yocto-first-build-stm32.tex                    | 42 +++++++++++-----------
 1 file changed, 20 insertions(+), 22 deletions(-)

diff --git a/labs/yocto-first-build-stm32/yocto-first-build-stm32.tex b/labs/yocto-first-build-stm32/yocto-first-build-stm32.tex
index 62625822..bdb5d345 100644
--- a/labs/yocto-first-build-stm32/yocto-first-build-stm32.tex
+++ b/labs/yocto-first-build-stm32/yocto-first-build-stm32.tex
@@ -17,38 +17,37 @@ system due to limitations in file name lengths.
 Go to the \code{$HOME/__SESSION_NAME__-labs/} directory.
 
 Install the required packages:
-\begin{verbatim}
-sudo apt install bc build-essential chrpath cpio diffstat gawk git python3 \
-                 texinfo wget gdisk libssl-dev
-\end{verbatim}
+\begin{bashinput}
+sudo apt install bc build-essential chrpath cpio diffstat gawk git python3 texinfo wget gdisk libssl-dev
+\end{bashinput}
 
 \section{Download Yocto}
 
 Download the \code{kirkstone} version of Poky:
-\begin{verbatim}
+\begin{bashinput}
 git clone https://git.yoctoproject.org/git/poky
 cd $HOME/__SESSION_NAME__-labs/poky
 git checkout -b kirkstone-4.0.2 kirkstone-4.0.2
-\end{verbatim}
+\end{bashinput}
 
 Return to your project root directory (\code{cd $HOME/__SESSION_NAME__-labs/})
 and download the OpenEmbedded and STM32MP layers:
-\begin{verbatim}
+\begin{bashinput}
 git clone -b kirkstone https://git.openembedded.org/meta-openembedded
 git clone https://github.com/STMicroelectronics/meta-st-stm32mp
 cd meta-st-stm32mp
 git checkout openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15
-\end{verbatim}
+\end{bashinput}
 
 \section{Set up the build environment}
 
 Check you're using Bash. This is the default shell when using Ubuntu.
 
 Export all needed variables and set up the build directory:
-\begin{verbatim}
+\begin{bashinput}
 cd $HOME/__SESSION_NAME__-labs
 source poky/oe-init-build-env
-\end{verbatim}
+\end{bashinput}
 
 You must specify which machine is your target. By default it
 is \code{qemu}. We need to build an image for an \code{stm32mp1}.
@@ -67,9 +66,9 @@ STM32MP layers. Edit the layer configuration file
 \section{Build your first image}
 
 Now that you're ready to start the compilation, simply run:
-\begin{verbatim}
+\begin{bashinput}
 bitbake core-image-minimal
-\end{verbatim}
+\end{bashinput}
 
 Once the build finished, you will find the output images under
 \code{$BUILDDIR/tmp/deploy/images/stm32mp1}.
@@ -81,17 +80,16 @@ root filesystem files. To generate the final image, You will find scripts in
 \code{$BUILDDIR/tmp/deploy/images/stm32mp1/scripts}.
 
 Execute it (replace \code{157d} with \code{157a} depending on your board variant):
-\begin{verbatim}
+\begin{bashinput}
 ./create_sdcard_from_flashlayout.sh \
 ../flashlayout_core-image-minimal/trusted/FlashLayout_sdcard_stm32mp157d-dk1-trusted.tsv
-\end{verbatim}
+\end{bashinput}
 
 Flash the SD card with that image:
-\begin{verbatim}
+\begin{bashinput}
 umount /dev/mmcblk0p*
-sudo dd if=../FlashLayout_sdcard_stm32mp157d-dk1-trusted.raw  \
-of=/dev/mmcblk0 bs=8M conv=fdatasync status=progress
-\end{verbatim}
+sudo dd if=../FlashLayout_sdcard_stm32mp157d-dk1-trusted.raw of=/dev/mmcblk0 bs=8M conv=fdatasync status=progress
+\end{bashinput}
 
 \section{Setting up serial communication with the board}
 
@@ -107,16 +105,16 @@ You can also see this device appear by looking at the output of
 To communicate with the board through the serial port, install a
 serial communication program, such as \code{picocom}:
 
-\begin{verbatim}
+\begin{bashinput}
 sudo apt install picocom
-\end{verbatim}
+\end{bashinput}
 
 You also need to make your user belong to the \code{dialout} group to be
 allowed to write to the serial console:
 
-\begin{verbatim}
+\begin{bashinput}
 sudo adduser $USER dialout
-\end{verbatim}
+\end{bashinput}
 
 {\bf Important}: for the group change to be effective, you have to
 {\em completely log out} from your session and log in again (no need to




More information about the training-materials-updates mailing list