[bootlin/training-materials updates] master: labs/sysdev-accessing-hardware*: create kernel patch at the end (bc2928f0)

Michael Opdenacker michael.opdenacker at bootlin.com
Thu Jan 19 15:53:32 CET 2023


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

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

commit bc2928f0700f3f7cf55d565d1111d4f0fa021abf
Author: Michael Opdenacker <michael.opdenacker at bootlin.com>
Date:   Thu Jan 19 15:53:32 2023 +0100

    labs/sysdev-accessing-hardware*: create kernel patch at the end
    
    Will make the Buildroot lab easier and faster,
    compare to making a local clone of the kernel repository.
    
    Signed-off-by: Michael Opdenacker <michael.opdenacker at bootlin.com>


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

bc2928f0700f3f7cf55d565d1111d4f0fa021abf
 .../sysdev-accessing-hardware-bbb.tex              | 27 ++++++++++++++++++----
 .../sysdev-accessing-hardware-stm32.tex            | 27 ++++++++++++++++++----
 2 files changed, 44 insertions(+), 10 deletions(-)

diff --git a/labs/sysdev-accessing-hardware-bbb/sysdev-accessing-hardware-bbb.tex b/labs/sysdev-accessing-hardware-bbb/sysdev-accessing-hardware-bbb.tex
index df198ad8..185f4cfb 100644
--- a/labs/sysdev-accessing-hardware-bbb/sysdev-accessing-hardware-bbb.tex
+++ b/labs/sysdev-accessing-hardware-bbb/sysdev-accessing-hardware-bbb.tex
@@ -760,10 +760,21 @@ the new model name in two different places:
 \section{Committing kernel tree changes}
 
 Now that our changes to the kernel sources are over,
-create a branch for your changes. {\bf Please
-don't skip this step} as it would interfere with the version assigned
-to the kernel and its modules, and with the way we will refer to our
-kernel sources in the upcoming labs.
+create a branch for your changes and create a patch for them.
+{\bf Please don't skip this step} as we need it for the next labs.
+
+First, if not done yet, you should set your identity
+and e-mail address in git:
+
+\begin{bashinput}
+git config --global user.email "linus at bootlin.com"
+git config --global user.name "Linus Torvalds"
+\end{bashinput}
+
+This is necessary to create a commit with the \code{git commit -s}
+command, as required by the Linux kernel contribution guidelines.
+
+Let's create the branch and the patch now:
 
 \begin{bashinput}
 git checkout -b bootlin-labs
@@ -771,7 +782,13 @@ git add arch/arm/boot/dts/am335x-boneblack-custom.dts
 git commit -as -m "Custom DTS for Bootlin lab"
 \end{bashinput}
 
-Doing this will impact the versions of the kernel and the modules.
+We can now create the patch:\\
+\texttt{git format-patch stable/linux-\workingkernel.y}
+
+This should generate a \code{0001-Custom-DTS-for-Bootlin-lab.patch}
+file.
+
+Creating the branch will impact the versions of the kernel and the modules.
 Compile your kernel and install your modules again (not necessary for the
 Nunchuk one for the moment) and see the version changes through the
 new based directory for modules.
diff --git a/labs/sysdev-accessing-hardware-stm32/sysdev-accessing-hardware-stm32.tex b/labs/sysdev-accessing-hardware-stm32/sysdev-accessing-hardware-stm32.tex
index 1a9b12e7..232c467c 100644
--- a/labs/sysdev-accessing-hardware-stm32/sysdev-accessing-hardware-stm32.tex
+++ b/labs/sysdev-accessing-hardware-stm32/sysdev-accessing-hardware-stm32.tex
@@ -708,10 +708,21 @@ the new model name in two different places:
 \section{Committing kernel tree changes}
 
 Now that our changes to the kernel sources are over,
-create a branch for your changes. {\bf Please
-don't skip this step} as it would interfere with the version assigned
-to the kernel and its modules, and with the way we will refer to our
-kernel sources in the upcoming labs.
+create a branch for your changes and create a patch for them.
+{\bf Please don't skip this step} as we need it for the next labs.
+
+First, if not done yet, you should set your identity
+and e-mail address in git:
+
+\begin{bashinput}
+git config --global user.email "linus at bootlin.com"
+git config --global user.name "Linus Torvalds"
+\end{bashinput}
+
+This is necessary to create a commit with the \code{git commit -s}
+command, as required by the Linux kernel contribution guidelines.
+
+Let's create the branch and the patch now:
 
 \begin{bashinput}
 git checkout -b bootlin-labs
@@ -719,7 +730,13 @@ git add arch/arm/boot/dts/stm32mp157a-dk1-custom.dts
 git commit -as -m "Custom DTS for Bootlin lab"
 \end{bashinput}
 
-Doing this will impact the versions of the kernel and the modules.
+We can now create the patch:\\
+\texttt{git format-patch stable/linux-\workingkernel.y}
+
+This should generate a \code{0001-Custom-DTS-for-Bootlin-lab.patch}
+file.
+
+Creating the branch will impact the versions of the kernel and the modules.
 Compile your kernel and install your modules again (not necessary for the
 Nunchuk one for the moment) and see the version changes through the
 new based directory for modules.




More information about the training-materials-updates mailing list