[FE training-materials-updates] Update Marvell specific lab

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Tue Jan 27 17:56:15 CET 2015


Repository : git://git.free-electrons.com/training-materials.git

On branch  : marvell-armada
Link       : http://git.free-electrons.com/training-materials/commit/?id=6c5299a496943e30685b9ba8aa75ee9775c95c1b

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

commit 6c5299a496943e30685b9ba8aa75ee9775c95c1b
Author: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
Date:   Tue Jan 27 17:56:09 2015 +0100

    Update Marvell specific lab
    
    Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>


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

6c5299a496943e30685b9ba8aa75ee9775c95c1b
 lab-data/kernel/marvell-armada/scu-fix.patch       | 12 ---
 .../kernel-marvell-armada.tex                      | 81 ++++++++++---------
 .../kernel-marvell-armada.tex                      | 90 +++++++++-------------
 3 files changed, 77 insertions(+), 106 deletions(-)

diff --git a/lab-data/kernel/marvell-armada/scu-fix.patch b/lab-data/kernel/marvell-armada/scu-fix.patch
deleted file mode 100644
index ad4fbe8..0000000
--- a/lab-data/kernel/marvell-armada/scu-fix.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
-index 2c35f0f..87f6c2e 100644
---- a/arch/arm/kernel/head.S
-+++ b/arch/arm/kernel/head.S
-@@ -506,6 +506,7 @@ __fixup_smp:
- 	@ below address check will need to be #ifdef'd or equivalent
- 	@ for the Aegis platform.
- 	mrc	p15, 4, r0, c15, c0	@ get SCU base address
-+	ldr	r0, =0xf100c000
- 	teq	r0, #0x0		@ '0' on actual UP A9 hardware
- 	beq	__fixup_smp_on_up	@ So its an A9 UP
- 	ldr	r0, [r0, #4]		@ read SCU Config
diff --git a/labs/kernel-marvell-armada/kernel-marvell-armada.tex b/labs/kernel-marvell-armada/kernel-marvell-armada.tex
index 3500a6a..d6a0f83 100644
--- a/labs/kernel-marvell-armada/kernel-marvell-armada.tex
+++ b/labs/kernel-marvell-armada/kernel-marvell-armada.tex
@@ -3,22 +3,36 @@
 During this lab, you will:
 
 \begin{itemize}
-\item Build a little endian mainline kernel and boot it on Armada 385 RD
+\item Build a little endian mainline kernel and boot it on Armada 388 GP
 \item Explore a few useful {\em debugfs} files
-\item Build a big endian mainline kernel and boot it on Armada 385 RD
+\item Build a big endian mainline kernel and boot it on Armada 388 GP
 \end{itemize}
 
 \section{Getting the kernel sources}
 
-Checkout the \code{v3.16-rc6} tag, which will allow us to test one of
-the latest release candidate of the kernel. If there is a newer one,
-you can also try it.
+At the time of this writing, the support for the Armada 388 GP has not
+yet landed in the mainline Linux kernel: it is only available in the
+\code{linux-next} integration tree.
 
-Apply the \code{scu-fix.patch} patch available from the labs data
-directory (\code{$HOME/felabs-kernel/marvell-armada}). It works around
-a problem in the Marvell U-Boot bootloader, which has been fixed in
-more recent versions of U-Boot (maybe it is even already fixed on the
-board you're using).
+So, add the \code{linux-next} tree as a new {\em remote} in your
+kernel Git repository:
+
+\begin{verbatim}
+git remote add linux-next git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
+\end{verbatim}
+
+Then, fetch the contents of this repository:
+
+\begin{verbatim}
+git fetch linux-next
+\end{verbatim}
+
+Finally, switch to the \code{next-20150123} tag, which we have tested
+to work:
+
+\begin{verbatim}
+git checkout next-20150123
+\end{verbatim}
 
 \section{Configuring the kernel}
 
@@ -63,13 +77,6 @@ We will have to:
   \code{$HOME/felabs-kernel/marvell-armada/rootfs.cpio.le}.
 \item In {\em System Type}, explore the options available under {\em
     Marvell Engineering Business Unit (MVEBU) SoCs}
-\item In {\em Boot Options}, make sure {\em Use appended device tree
-    blob to zImage} and {\em Supplement the appended DTB with
-    traditional ATAG information} are enabled. The first option allows
-  to use a Device Tree appended to the zImage, which is useful on
-  platforms where the bootloader does not have Device Tree
-  support. The second allows the kernel to read the legacy ATAGs
-  information passed by a non-DT-capable bootloader.
 \item In {\em Kernel hacking}, enable the {\em Kernel low-level
     debugging functions} option. Then you should choose the right UART
   for the platform we're using. For Marvell EBU platforms, there are
@@ -88,11 +95,6 @@ We will have to:
   \end{itemize}
 \item Still in {\em Kernel hacking}, make sure to enable {\em Early
     printk}.
-\item Also, our initramfs makes the assumption that {\em devtmpfs}
-  will be available. Therefore, in {\em Device Drivers} $\rightarrow$
-  {\em Generic Driver Options}, enable {\em Maintain a devtmpfs
-    filesystem to mount at /dev} and {\em Automount devtmpfs at /dev,
-    after the kernel mounted the rootfs}.
 \end{itemize}
 
 \section{Building the kernel}
@@ -103,26 +105,15 @@ Now that the configuration is done, it's time to build the kernel:
 make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4
 \end{verbatim}
 
-Since the bootloader on the Armada 385 RD board does not have DT
-support (at least in the \code{Marvell version: 2014_T1.0_eng_drop_v6}
-we have used), we will use the appended Device Tree technique. So,
-first, append the Device Tree blob to the zImage:
+The resulting files are:
 
-\begin{verbatim}
-cat arch/arm/boot/zImage arch/arm/boot/dts/armada-385-rd.dtb > zImage-with-dtb
-\end{verbatim}
-
-Now, we need to produce a U-Boot {\em uImage}. In order to avoid the
-relocation of the kernel, we'll set the load address in the {\em
-  uImage} to be the same as the place where we will actually load the
-kernel in memory, and we'll set the entry point 64 bytes after that,
-to skip the {\em uImage header}.
-
-\begin{verbatim}
-mkimage -A arm -O linux -T kernel -C none -a 0x2000000 -e 0x2000040 -d zImage-with-dtb uImage-with-dtb
-\end{verbatim}
+\begin{itemize}
+\item \code{arch/arm/boot/zImage}, the kernel image
+\item \code{arch/arm/boot/dts/armada-388-gp.dtb}, the Device Tree blob
+\end{itemize}
 
-Our \code{uImage-with-dtb} is ready for booting.
+Copy those files to the directory exported on the network by your TFTP
+server.
 
 \section{Booting the kernel}
 
@@ -138,13 +129,19 @@ setenv bootargs console=ttyS0,115200 earlyprintk
 Load the kernel image in memory:
 
 \begin{verbatim}
-tftp 0x2000000 uImage-with-dtb
+tftp 0x2100000 zImage
+\end{verbatim}
+
+Load the Device Tree blob in memory:
+
+\begin{verbatim}
+tftp 0x2000000 armada-388-gp.dtb
 \end{verbatim}
 
 And boot:
 
 \begin{verbatim}
-bootm
+bootz 0x2100000 - 0x2000000
 \end{verbatim}
 
 At the end of the boot, the {\em Buildroot} login prompt should
diff --git a/slides/kernel-marvell-armada/kernel-marvell-armada.tex b/slides/kernel-marvell-armada/kernel-marvell-armada.tex
index 0572e04..cf60887 100644
--- a/slides/kernel-marvell-armada/kernel-marvell-armada.tex
+++ b/slides/kernel-marvell-armada/kernel-marvell-armada.tex
@@ -45,6 +45,20 @@
   \end{center}
 \end{frame}
 
+\begin{frame}{Timeline: upcoming topics}
+  \begin{itemize}
+  \item Suspend/resume on Armada 38x, and suspend/resume support in
+    more device drivers
+  \item Armada 39x support
+  \item CPUfreq on 38x and 39x
+  \item Cryptographic support: extension of the existing
+    \code{mv_cesa} driver to use TDMA, support the new hashes and
+    crypto algorithms
+  \item Network improvements: multiqueue, RSS, etc.
+  \item More testing
+  \end{itemize}
+\end{frame}
+
 \begin{frame}{Using the result}
 
 \begin{itemize}
@@ -89,75 +103,47 @@
 
 \begin{frame}{Where is the code: platform code (2)}
 
-\footnotesize
-\begin{columns}
-\column{0.5\textwidth}
 \begin{itemize}
-\item {\bf board-v7.c} Core file for v7 platforms, includes the
+\item \code{board-v7.c} Core file for v7 platforms, includes the
   \code{DT_MACHINE_START} definition.
-\item {\bf coherency.c, coherency_ll.S} Coherency fabric code (for CPU
-  coherency on A370/XP and I/O coherency 370, XP, 375 and 38x)
-\item {\bf cpu-reset.c} Minimal driver to handle the CPU reset
+\item \code{coherency.c}, \code{coherency_ll.S} Coherency fabric code
+  (for CPU coherency on A370/XP and I/O coherency 370, XP, 375 and
+  38x)
+\item \code{cpu-reset.c} Minimal driver to handle the CPU reset
   register, used for SMP boot.
-\item {\bf dove.c} Core file for Dove platforms. Should be merged with
+\item \code{dove.c} Core file for Dove platforms. Should be merged with
   \code{board-v7.c} in the future.
-\item {\bf kirkwood.c} Core file for Kirkwood platforms. Should be
+\item \code{kirkwood.c} Core file for Kirkwood platforms. Should be
   renamed \code{board-v5.c} in the future.
-\item {\bf kirkwood-pm.c} Suspend/resume support for Kirkwood
+\item \code{kirkwood-pm.c} Suspend/resume support for Kirkwood
 \end{itemize}
-\column{0.5\textwidth}
+
+\end{frame}
+
+\begin{frame}{Where is the code: platform code (3)}
+
 \begin{itemize}
-\item {\bf mvebu-soc-id.c} SoC identification for 370, XP, 375, 38x
-\item {\bf netxbig.c} Remaining board support for Kirkwood. Should be
+\item \code{mvebu-soc-id.c} SoC identification for 370, XP, 375, 38x
+\item \code{netxbig.c} Remaining board support for Kirkwood. Should be
   removed at some point.
-\item {\bf platsmp.c, platsmp-a9.c, headsmp.S, headsmp-a9.S} SMP
-  support for Armada 370/XP and Armada 375/38x
-\item {\bf pm.c, pm-board.c} Suspend/resume support for Armada XP
-\item {\bf pmsu.c, pmsu_ll.S} Power Management Service Unit of Armada
+\item \code{platsmp.c}, \code{platsmp-a9.c}, \code{headsmp.S},
+  \code{headsmp-a9.S} SMP support for Armada 370/XP and Armada 375/38x
+\item \code{pm.c, pm-board.c} Suspend/resume support for Armada XP
+\item \code{pmsu.c}, \code{pmsu_ll.S} Power Management Service Unit of Armada
   370, XP, 38x (used for SMP, cpuidle, cpufreq, etc.)
-\item {\bf system-controller.c} Used for platform reset, SMP boot on
+\item \code{system-controller.c} Used for platform reset, SMP boot on
   some platforms.
 \end{itemize}
-\end{columns}
 
 \end{frame}
 
 \begin{frame}{Where is the code: Device Tree}
 
 In \code{arch/arm/boot/dts}
-\footnotesize
-\begin{columns}
-\column{0.5\textwidth}
-\begin{itemize}
-\item armada-370.dtsi
-\item armada-370-xp.dtsi
-\item armada-375.dtsi
-\item armada-380.dtsi
-\item armada-385.dtsi
-\item armada-38x.dtsi
-\item armada-xp.dtsi
-\item armada-xp-mv78230.dtsi
-\item armada-xp-mv78260.dtsi
-\item armada-xp-mv78460.dtsi
-\end{itemize}
-\column{0.5\textwidth}
-\begin{itemize}
-\item armada-370-db.dts
-\item armada-370-mirabox.dts
-\item armada-370-netgear-rn102.dts
-\item armada-370-netgear-rn104.dts
-\item armada-370-rd.dts
-\item armada-375-db.dts
-\item armada-385-db.dts
-\item armada-385-rd.dts
-\item armada-xp-axpwifiap.dts
-\item armada-xp-db.dts
-\item armada-xp-gp.dts
-\item armada-xp-matrix.dts
-\item armada-xp-netgear-rn2120.dts
-\item armada-xp-openblocks-ax3-4.dts
-\end{itemize}
-\end{columns}
+
+\begin{center}
+  \includegraphics[width=0.8\textwidth]{slides/kernel-marvell-armada/device-trees.pdf}
+\end{center}
 
 \end{frame}
 



More information about the training-materials-updates mailing list