[bootlin/training-materials updates] master: labs/sysdev-kernel: adjust patching for STM32 (d8f5a507)

Thomas Petazzoni thomas.petazzoni at bootlin.com
Tue Jan 28 16:03:33 CET 2020


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

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

commit d8f5a5079c4b450e359622d664a698c6fd606b57
Author: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
Date:   Tue Jan 28 16:03:33 2020 +0100

    labs/sysdev-kernel: adjust patching for STM32
    
    Specify that we need to use 4.19.9 precisely, and apply the patch in
    the sysdev-kernel-fetch-and-patch lab instead of the
    sysdev-kernel-cross-compiling lab.
    
    Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>


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

d8f5a5079c4b450e359622d664a698c6fd606b57
 .../sysdev-kernel-cross-compiling-stm32.tex           | 15 ++++++---------
 .../sysdev-kernel-fetch-and-patch.tex                 | 19 ++++++++++++++++++-
 2 files changed, 24 insertions(+), 10 deletions(-)

diff --git a/labs/sysdev-kernel-cross-compiling-stm32/sysdev-kernel-cross-compiling-stm32.tex b/labs/sysdev-kernel-cross-compiling-stm32/sysdev-kernel-cross-compiling-stm32.tex
index b9c2347b..cf60ad5e 100644
--- a/labs/sysdev-kernel-cross-compiling-stm32/sysdev-kernel-cross-compiling-stm32.tex
+++ b/labs/sysdev-kernel-cross-compiling-stm32/sysdev-kernel-cross-compiling-stm32.tex
@@ -17,17 +17,13 @@ Go to the \code{$HOME/embedded-linux-labs/kernel} directory.
 \section{Target system}
 
 We are going to cross-compile and boot a Linux kernel for the
-STM32MP157C-DK2 Discovery kit.
+STM32MP157A-DKA Discovery kit.
 
 \section{Kernel sources}
 
 We will re-use the kernel sources downloaded and patched in the
 previous lab.
 
-We need to add an other patch to get full support of the platform.
-Apply the patch named
-\code{$HOME/embedded-linux-labs/linux-stm32/stm31mp157_support.patch}
-
 \section{Cross-compiling environment setup}
 
 To cross-compile Linux, you need to have a cross-compiling
@@ -51,10 +47,11 @@ Also, don't forget to either:
 
 We could use the \code{multi_v7_defconfig} default configuration to
 build a working kernel but to save time and compile less code, we
-provide a minimal configuration file, named
-\code{stm31mp157_defconfig}. Copy it to \code{.config} and then run
-either \code{make olddefconfig} or \code{make oldconfig} if you want
-to get asked for all the possible choices.
+provide in
+\code{$HOME/embedded-linux-labs/linux-stm32/} a minimal configuration
+file, named \code{stm31mp157_defconfig}. Copy it to \code{.config} and
+then run either \code{make olddefconfig} or \code{make oldconfig} if
+you want to get asked for all the possible choices.
 
 Don't hesitate to visualize the new settings by running
 \code{make xconfig} afterwards!
diff --git a/labs/sysdev-kernel-fetch-and-patch/sysdev-kernel-fetch-and-patch.tex b/labs/sysdev-kernel-fetch-and-patch/sysdev-kernel-fetch-and-patch.tex
index 6660576c..8454c0a3 100644
--- a/labs/sysdev-kernel-fetch-and-patch/sysdev-kernel-fetch-and-patch.tex
+++ b/labs/sysdev-kernel-fetch-and-patch/sysdev-kernel-fetch-and-patch.tex
@@ -28,14 +28,31 @@ line to download files.
 
 \section{Apply patches}
 
+\ifdefstring{\labboard}{discovery}{
+Download the patch files corresponding to the latest 4.19 stable
+release: a first patch to move from 4.18 to 4.19 and if one exists,
+a second patch to move from 4.19 to 4.19.9.
+
+We need to use 4.19.9 precisely, because we will apply another patch
+on top of that to add support for the STM32 platform.
+}{
 Download the patch files corresponding to the latest 4.19 stable
 release: a first patch to move from 4.18 to 4.19 and if one exists,
 a second patch to move from 4.19 to 4.19.x.
+}
 
 Without uncompressing them to a separate file, apply the patches to the Linux
 source directory.
 
-View one of the 2 patch files with \code{vi} or \code{gvim}
+\ifdefstring{\labboard}{discovery}{
+  We need to apply another patch to get full support of the STM32
+  platform, which was not completely in the official Linux kernel as
+  of Linux 4.19.
+
+  Apply the patch named
+  \code{$HOME/embedded-linux-labs/linux-stm32/stm31mp157_support.patch}}{}
+
+View one of the patch files with \code{vi} or \code{gvim}
 (if you prefer a graphical editor), to understand the information carried
 by such a file. How are described added or removed files?
 




More information about the training-materials-updates mailing list