[bootlin/training-materials updates] master: labs/sysdev-accessing-hardware-*: need to re-compile modules before "make modules_install" (411cbc4e)

Michael Opdenacker michael.opdenacker at bootlin.com
Wed Mar 8 16:46:36 CET 2023


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

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

commit 411cbc4eb8e4284739adfffc9aa38c79ff896b6b
Author: Michael Opdenacker <michael.opdenacker at bootlin.com>
Date:   Wed Mar 8 16:46:36 2023 +0100

    labs/sysdev-accessing-hardware-*: need to re-compile modules before "make modules_install"
    
    Surprisingly, "make modules_install" doesn't update the .ko files
    when the version has changed. Therefore, the .ko files are installed
    in lib/modules/<newversion> but still have <oldversion> inside.
    
    Signed-off-by: Michael Opdenacker <michael.opdenacker at bootlin.com>


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

411cbc4eb8e4284739adfffc9aa38c79ff896b6b
 .../sysdev-accessing-hardware-bbb.tex                     | 15 +++++++++------
 .../sysdev-accessing-hardware-stm32.tex                   | 15 +++++++++------
 2 files changed, 18 insertions(+), 12 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 53c7eb0f..89cbe065 100644
--- a/labs/sysdev-accessing-hardware-bbb/sysdev-accessing-hardware-bbb.tex
+++ b/labs/sysdev-accessing-hardware-bbb/sysdev-accessing-hardware-bbb.tex
@@ -559,13 +559,16 @@ that it is already enabled as a module.
 So, instead of compiling the corresponding driver as a built-in, that's
 a good opportunity to practice with kernel modules.
 
-Following details given in the lectures, compile the modules for your
-kernel if necessary (in case you just compiled the \code{zImage} and
-DTB files), and then install them in our NFS root filesystem
-(\code{$HOME/__SESSION_NAME__-labs/tinysystem/nfsroot}).
+So, compile your modules:
+\begin{bashinput}
+make modules
+\end{bashinput}
+
+Then, following details given in the lectures, install the modules in our NFS
+root filesystem (\code{$HOME/__SESSION_NAME__-labs/tinysystem/nfsroot}).
 
-Also make sure reinstall the kernel image, and reboot the board.
-Indeed, due to the changes we have made to the kernel source code,
+Also make sure to update the kernel image (\code{make zImage}), and reboot the
+board.  Indeed, due to the changes we have made to the kernel source code,
 the kernel version is now \code{5.15.<x>-dirty}, the {\em dirty}
 keyword indicating that the Git working tree has uncommitted changes.
 The modules are therefore installed in \code{/lib/modules/5.15.<x>-dirty/},
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 232c467c..e023e5a4 100644
--- a/labs/sysdev-accessing-hardware-stm32/sysdev-accessing-hardware-stm32.tex
+++ b/labs/sysdev-accessing-hardware-stm32/sysdev-accessing-hardware-stm32.tex
@@ -507,13 +507,16 @@ that it is already enabled as a module.
 So, instead of compiling the corresponding driver as a built-in, that's
 a good opportunity to practice with kernel modules.
 
-Following details given in the lectures, compile the modules for your
-kernel if necessary (in case you just compiled the \code{zImage} and
-DTB files), and then install them in our NFS root filesystem
-(\code{$HOME/__SESSION_NAME__-labs/tinysystem/nfsroot}).
+So, compile your modules:
+\begin{bashinput}
+make modules
+\end{bashinput}
+
+Then, following details given in the lectures, install the modules in our NFS
+root filesystem (\code{$HOME/__SESSION_NAME__-labs/tinysystem/nfsroot}).
 
-Also make sure reinstall the kernel image, and reboot the board.
-Indeed, due to the changes we have made to the kernel source code,
+Also make sure to update the kernel image (\code{make zImage}), and reboot the
+board.  Indeed, due to the changes we have made to the kernel source code,
 the kernel version is now \code{5.15.<x>-dirty}, the {\em dirty}
 keyword indicating that the Git working tree has uncommitted changes.
 The modules are therefore installed in \code{/lib/modules/5.15.<x>-dirty/},




More information about the training-materials-updates mailing list