From ede4134dce7f6108f5284779e2b2dc1dd673df89 Mon Sep 17 00:00:00 2001 From: Michael Opdenacker Date: Tue, 3 Sep 2019 16:26:20 +0200 Subject: [PATCH] Introduce new Elixir macros - kreldir for relative directory paths - krelfile for relative file paths This allows to provide readers with an Elixir link to a subdirectory or a file in a sub directory, without having to show its full path. Using this to provide links to ARM subdirectories and source files. Signed-off-by: Michael Opdenacker --- common/common.sty | 2 ++ .../kernel-porting-content.tex | 15 +++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/common/common.sty b/common/common.sty index 2ab4ff76d..e9fc9331d 100644 --- a/common/common.sty +++ b/common/common.sty @@ -4,8 +4,10 @@ \newcommand\ksym[1]{\href{https://elixir.bootlin.com/linux/latest/ident/#1}{\code{#1}}} \newcommand\kstruct[1]{\href{https://elixir.bootlin.com/linux/latest/ident/#1}{\code{struct #1}}} \newcommand\kfile[1]{\href{https://elixir.bootlin.com/linux/latest/source/#1}{\code{#1}}} +\newcommand\krelfile[2]{\href{https://elixir.bootlin.com/linux/latest/source/#1/#2}{\code{#2}}} % For relative file paths \newcommand\kfileversion[2]{\href{https://elixir.bootlin.com/linux/v#2/source/#1}{\code{#1}}} \newcommand\kdir[1]{\href{https://elixir.bootlin.com/linux/latest/source/#1/}{\code{#1/}}} +\newcommand\kreldir[2]{\href{https://elixir.bootlin.com/linux/latest/source/#1/#2}{\code{#2/}}} % For relative directory paths \newcommand\ksubarch[1]{\href{https://elixir.bootlin.com/linux/latest/source/arch/#1/}{\code{#1}}} \newcommand\kerneldoctext[1]{\href{https://kernel.org/doc/Documentation/#1}{\code{Documentation/#1}}} \newcommand\kerneldochtml[1]{\href{https://www.kernel.org/doc/html/latest/#1.html}{\code{#1}}} diff --git a/slides/kernel-porting-content/kernel-porting-content.tex b/slides/kernel-porting-content/kernel-porting-content.tex index 6d7a1a02f..2f28e2269 100644 --- a/slides/kernel-porting-content/kernel-porting-content.tex +++ b/slides/kernel-porting-content/kernel-porting-content.tex @@ -27,14 +27,17 @@ \end{itemize} \item This directory contains generic ARM code \begin{itemize} - \item \code{boot}, \code{common}, \code{configs}, \code{kernel}, - \code{lib}, \code{mm}, \code{nwfpe}, \code{vfp}, - \code{oprofile}, \code{tools} + \item \kreldir{arch/arm}{boot}, \kreldir{arch/arm}{common}, + \kreldir{arch/arm}{configs}, \kreldir{arch/arm}{kernel}, + \kreldir{arch/arm}{lib}, \kreldir{arch/arm}{mm}, + \kreldir{arch/arm}{nwfpe}, \kreldir{arch/arm}{vfp}, + \kreldir{arch/arm}{oprofile}, \kreldir{arch/arm}{tools} + and several others. \end{itemize} \item And many directories for different SoC families \begin{itemize} - \item \code{mach-*} directories: \code{mach-pxa} for PXA CPUs, - \code{mach-imx} for Freescale iMX CPUs, etc. + \item \code{mach-*} directories: \kreldir{arch/arm}{mach-pxa} for PXA CPUs, + \kreldir{arch/arm}{mach-imx} for Freescale iMX CPUs, etc. \begin{itemize} \item Before the ARM cleanup, these directories contained support for the SoC family (GPIO, clocks, pinmux, power @@ -360,7 +363,7 @@ 370/XP. \item For this platform, the core of the SoC support is located in \kdir{arch/arm/mach-mvebu} - \item The \kfile{arch/arm/mach-mvebu/board-v7.c} file (see code on the next slide) + \item The \krelfile{arch/arm/mach-mvebu}{board-v7.c} file (see code on the next slide) contains the "{\em entry point}" of the SoC definition, the \code{DT_MACHINE_START} .. \code{MACHINE_END} definition: \begin{itemize}