Skip to content

Commit

Permalink
Introduce new Elixir macros
Browse files Browse the repository at this point in the history
- 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 <michael.opdenacker@bootlin.com>
  • Loading branch information
michaelopdenacker committed Sep 3, 2019
1 parent 6ac27f7 commit ede4134
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 2 additions & 0 deletions common/common.sty
Expand Up @@ -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}}}
Expand Down
15 changes: 9 additions & 6 deletions slides/kernel-porting-content/kernel-porting-content.tex
Expand Up @@ -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
Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit ede4134

Please sign in to comment.