[FE training-materials-updates] Use more kpath LXR macros

Michael Opdenacker michael.opdenacker at free-electrons.com
Wed Oct 28 11:28:10 CET 2015


Repository : git://git.free-electrons.com/training-materials.git
On branch  : master
Link       : http://git.free-electrons.com/training-materials/commit/?id=da3d6e53126af8352819150fca5d34b3a49d1c8f

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

commit da3d6e53126af8352819150fca5d34b3a49d1c8f
Author: Michael Opdenacker <michael.opdenacker at free-electrons.com>
Date:   Wed Oct 28 11:28:10 2015 +0100

    Use more kpath LXR macros
    
    - To have clickable links to view kernel code
    - Add a kpathversion macro for files which only exist
      in old versions.
    
    Signed-off-by: Michael Opdenacker <michael.opdenacker at free-electrons.com>


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

da3d6e53126af8352819150fca5d34b3a49d1c8f
 common/beamerthemeFreeElectrons.sty                          | 1 +
 labs/android-new-board/android-new-board.tex                 | 2 +-
 labs/kernel-i2c-communication/kernel-i2c-communication.tex   | 4 ++--
 slides/kernel-init-content/kernel-init-content.tex           | 2 +-
 slides/kernel-porting-content/kernel-porting-content.tex     | 2 +-
 slides/sysdev-flash-filesystems/sysdev-flash-filesystems.tex | 5 +++--
 6 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/common/beamerthemeFreeElectrons.sty b/common/beamerthemeFreeElectrons.sty
index c2bd97d..5b04628 100644
--- a/common/beamerthemeFreeElectrons.sty
+++ b/common/beamerthemeFreeElectrons.sty
@@ -35,6 +35,7 @@
 \newcommand\ksym[1]{\href{http://lxr.free-electrons.com/ident?i=#1}{\code{#1}}}
 \newcommand\kstruct[1]{\href{http://lxr.free-electrons.com/ident?i=#1}{\code{struct #1}}}
 \newcommand\kpath[1]{\href{http://lxr.free-electrons.com/source/#1}{\code{#1}}}
+\newcommand\kpathversion[2]{\href{http://lxr.free-electrons.com/source/#1?v=#2}{\code{#1}}}
 \newcommand\ksubarch[1]{\href{http://lxr.free-electrons.com/source/arch/#1}{\code{#1}}}
 \newcommand\kerneldoc[1]{{\href{http://free-electrons.com/kerneldoc/latest/#1}{\code{Documentation/#1}}}
 }
diff --git a/labs/android-new-board/android-new-board.tex b/labs/android-new-board/android-new-board.tex
index b10a5fd..029f7fe 100644
--- a/labs/android-new-board/android-new-board.tex
+++ b/labs/android-new-board/android-new-board.tex
@@ -314,7 +314,7 @@ the values that are working.
 
 To make these changes permanently, you will have to edit the kernel
 code. The used PWM is defined is the \code{am335xevm} board file, in
-the \code{arch/arm/mach-omap2} folder. The PWM work by switching on
+the \kpath{arch/arm/mach-omap2} folder. The PWM work by switching on
 and off at a fast pace the power supply to be able to adjust the
 average voltage delivered between 0 and the actual voltage of the
 line. Increase the period by a factor of 100.
diff --git a/labs/kernel-i2c-communication/kernel-i2c-communication.tex b/labs/kernel-i2c-communication/kernel-i2c-communication.tex
index ba0deca..005cdf6 100644
--- a/labs/kernel-i2c-communication/kernel-i2c-communication.tex
+++ b/labs/kernel-i2c-communication/kernel-i2c-communication.tex
@@ -71,7 +71,7 @@ signals.
 Now that we know the register offsets, let's try to understand
 how they are used in existing code. For example, open the
 the Device Tree for the AM335x EVM board
-(\code{arch/arm/boot/dts/am335x-evm.dts}), which is using
+(\kpath{arch/arm/boot/dts/am335x-evm.dts}), which is using
 \code{i2c1} too. Look for \code{i2c1_pins}, and you will see how
 offsets are declared and what values they are given:
 
@@ -90,7 +90,7 @@ and \code{0x15c} instead of \code{0x95c}! In both cases, there is a
 
 However, this makes sense if you look at the way the base address of the
 Control Module Registers is defined. Look for \code{pinctrl-single} in
-\code{arch/arm/boot/dts/am33xx.dtsi}:
+\kpath{arch/arm/boot/dts/am33xx.dtsi}:
 
 \begin{verbatim}
 am33xx_pinmux: pinmux at 800 {
diff --git a/slides/kernel-init-content/kernel-init-content.tex b/slides/kernel-init-content/kernel-init-content.tex
index c4f4f05..3d140f7 100644
--- a/slides/kernel-init-content/kernel-init-content.tex
+++ b/slides/kernel-init-content/kernel-init-content.tex
@@ -200,7 +200,7 @@ Defined in \code{include/linux/init.h}
 
 \begin{frame}[fragile]
   \frametitle{initcall example}
-From \code{arch/arm/mach-pxa/lpd270.c} (Linux 2.6.36)
+From \kpathversion{arch/arm/mach-pxa/lpd270.c}{2.6.36} (Linux 2.6.36)
 \begin{minted}[fontsize=\scriptsize]{c}
 static int __init lpd270_irq_device_init(void)
 {
diff --git a/slides/kernel-porting-content/kernel-porting-content.tex b/slides/kernel-porting-content/kernel-porting-content.tex
index 2fe8ee4..f0541d0 100644
--- a/slides/kernel-porting-content/kernel-porting-content.tex
+++ b/slides/kernel-porting-content/kernel-porting-content.tex
@@ -429,7 +429,7 @@ MACHINE_END
     \kpath{drivers/clocksource/time-armada-370-xp.c}
   \item An earlyprintk implementation to get early messages from the
     console, \kpath{arch/arm/Kconfig.debug} and
-    \code{arch/arm/include/debug}
+    \kpath{arch/arm/include/debug}
   \item A serial port driver in \kpath{drivers/tty/serial}. For Armada
     370/XP, the 8250 driver \kpath{drivers/tty/serial/8250} is used.
   \end{itemize}
diff --git a/slides/sysdev-flash-filesystems/sysdev-flash-filesystems.tex b/slides/sysdev-flash-filesystems/sysdev-flash-filesystems.tex
index 08ac4f2..2008803 100644
--- a/slides/sysdev-flash-filesystems/sysdev-flash-filesystems.tex
+++ b/slides/sysdev-flash-filesystems/sysdev-flash-filesystems.tex
@@ -312,7 +312,7 @@ mtdparts=mtdparts=omap2-nand.0:512k(X-Loader)ro,1536k(U-Boot)ro,512k(Environment
   \frametitle{Linux: definition of MTD partitions (1)}
   The Device Tree is the standard place to define MTD partitions
   for boards with Device Tree support.\\
-  Example from \code{arch/arm/boot/dts/omap3-igep0020.dts}:
+  Example from \kpath{arch/arm/boot/dts/omap3-igep.dtsi}:
 \begin{minted}[fontsize=\scriptsize]{perl}
         nand at 0,0 {
                 linux,mtd-name= "micron,mt29c4g96maz";
@@ -337,7 +337,8 @@ mtdparts=mtdparts=omap2-nand.0:512k(X-Loader)ro,1536k(U-Boot)ro,512k(Environment
   \frametitle{Linux: definition of MTD partitions (2)}
   For boards or platforms that do not use the Device Tree,
   MTD partitions can be defined in the kernel.
-  Legacy example from \code{arch/arm/mach-omap2/board-igep0020.c}
+  Legacy example from
+\kpathversion{arch/arm/mach-omap2/board-igep0020.c}{3.12}
   (removed in 3.13):
 \begin{minted}[fontsize=\scriptsize]{c}
 static struct mtd_partition igep2_flash_partitions[] = {




More information about the training-materials-updates mailing list