[FE training-materials-updates] Update the kernel instructions

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Wed May 29 16:38:45 CEST 2013


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

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

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

commit f5b6f2ae61456e2ee62dba53fee4c8b1185ab69c
Author: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
Date:   Wed May 29 16:34:44 2013 +0200

    Update the kernel instructions
    
    It also adds a diagram that shows the NAND flash layout with the
    bootloaders and the kernel.
    
    It deletes the useless kernel patches. This also means that the
    sysdev/kernel/ directory will be empty, and therefore removed from
    Git. If we want to keep those directories to let our training
    participants organize their work in sub-directories, then we should
    store an empty '.empty' file in Git, and make the script that creates
    the felabs.tar.bz2 tarball smarter so that it removes those '.empty'
    files.
    
    Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>


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

f5b6f2ae61456e2ee62dba53fee4c8b1185ab69c
 Makefile                                           |    2 +-
 ...gep0020-add-support-for-micron-nand-flash.patch |  216 --------------------
 ...-board-onenand-init-visible-to-board-code.patch |  130 ------------
 .../flash-map.dia                                  |  108 +++++++++-
 .../sysdev-kernel-cross-compiling.tex              |   48 +++--
 .../sysdev-kernel-fetch-and-patch.tex              |   14 +-
 6 files changed, 136 insertions(+), 382 deletions(-)

diff --git a/Makefile b/Makefile
index c9db699..9fa380c 100644
--- a/Makefile
+++ b/Makefile
@@ -350,7 +350,7 @@ SLIDES_PICTURES = $(call PICTURES,$(foreach s,$(SLIDES_CHAPTERS),slides/$(s))) $
 	(cd $(OUTDIR); $(PDFLATEX_ENV) $(PDFLATEX) $(PDFLATEX_OPT) $(basename $@).tex)
 # The second call to pdflatex is to be sure that we have a correct table of
 # content and index
-	(cd $(OUTDIR); $(PDFLATEX_ENV) $(PDFLATEX) $(PDFLATEX_OPT) $(basename $@).tex > /dev/null 2>&1)
+#	(cd $(OUTDIR); $(PDFLATEX_ENV) $(PDFLATEX) $(PDFLATEX_OPT) $(basename $@).tex > /dev/null 2>&1)
 # We use cat to overwrite the final destination file instead of mv, so
 # that evince notices that the file has changed and automatically
 # reloads it (which doesn't happen if we use mv here). This is called
diff --git a/lab-data/sysdev/kernel/linux-3.2-arm-omap3-igep0020-add-support-for-micron-nand-flash.patch b/lab-data/sysdev/kernel/linux-3.2-arm-omap3-igep0020-add-support-for-micron-nand-flash.patch
deleted file mode 100644
index 79b5cf0..0000000
--- a/lab-data/sysdev/kernel/linux-3.2-arm-omap3-igep0020-add-support-for-micron-nand-flash.patch
+++ /dev/null
@@ -1,216 +0,0 @@
-Return-Path: <linux-arm-kernel-bounces+thomas.petazzoni=free-electrons.com at lists.infradead.org>
-Delivered-To: thomas.petazzoni at free-electrons.com
-Received: by mail.free-electrons.com (Postfix, from userid 106)
-	id 6F005142; Wed,  4 Apr 2012 20:37:27 +0200 (CEST)
-X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
-	mail.free-electrons.com
-X-Spam-Level: 
-X-Spam-Status: No, score=-5.1 required=1.0 tests=AWL,BAYES_00,
-	RCVD_IN_DNSWL_MED,T_RP_MATCHES_RCVD shortcircuit=no autolearn=unavailable
-	version=3.3.1
-Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134])
-	by mail.free-electrons.com (Postfix) with ESMTPS id A1EDC18A
-	for <thomas.petazzoni at free-electrons.com>; Wed,  4 Apr 2012 20:37:13 +0200 (CEST)
-Received: from localhost ([::1] helo=merlin.infradead.org)
-	by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux))
-	id 1SFV5B-0000UI-U3; Wed, 04 Apr 2012 18:37:25 +0000
-Received: from mail-we0-f177.google.com ([74.125.82.177])
- by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux))
- id 1SFV52-0000Si-IK
- for linux-arm-kernel at lists.infradead.org; Wed, 04 Apr 2012 18:37:18 +0000
-Received: by werp11 with SMTP id p11so441106wer.36
- for <linux-arm-kernel at lists.infradead.org>;
- Wed, 04 Apr 2012 11:37:14 -0700 (PDT)
-X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
- d=google.com; s=20120113;
- h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
- :x-gm-message-state;
- bh=kNl3ujVgjSkb4W2vsUFhTDThyeE3x+aSl4tmS/+FMUQ=;
- b=aDi5B5BJQwMYcSOFUjaIJete6c7XFKPiL2xgfcNT3fNYk/OamIhOtGiF3TzRJjq4C+
- 5SvsW/OKnedwDA69PEi7NVAnV6WgNYMZ7eqscvjo87eBNxqTsfHIDb7+RYk6AQQDQ3VR
- 9EBlD6U80oNmtUCJih+zaBt4cpp15zzBqtA8p71vaqPORL5LLPOwl+ReDKjZqo7WDT6n
- YW5snNfVw9INMbYAHC19kmfjXGMiUEwAfm9vjB9+GdZ4sEOiSggtxhDaU2a9Gv0GSY7X
- zKRoVr+naw6RMO9aD7qlB8AfFOoVa1wlEGKropJ5zXqtmd3IZ1FmXu3hEavwv/aSycL9
- zLww==
-Received: by 10.216.133.234 with SMTP id q84mr2066602wei.102.1333564633636;
- Wed, 04 Apr 2012 11:37:13 -0700 (PDT)
-Received: from localhost.localdomain ([188.77.211.255])
- by mx.google.com with ESMTPS id 17sm7060020wis.0.2012.04.04.11.37.11
- (version=TLSv1/SSLv3 cipher=OTHER);
- Wed, 04 Apr 2012 11:37:12 -0700 (PDT)
-From: Javier Martinez Canillas <javier at dowhile0.org>
-To: Tony Lindgren <tony at atomide.com>
-Subject: [RESEND PATCH 2/2] OMAP3: igep0020: Add support for Micron NAND Flash
- storage memory
-Date: Wed,  4 Apr 2012 20:36:26 +0200
-Message-Id: <1333564586-3259-2-git-send-email-javier at dowhile0.org>
-X-Mailer: git-send-email 1.7.7.6
-In-Reply-To: <1333564586-3259-1-git-send-email-javier at dowhile0.org>
-References: <1333564586-3259-1-git-send-email-javier at dowhile0.org>
-X-Gm-Message-State: ALoCoQnpqKmpwAEd8KPARCrKLSGTmk0Ya+L63c+vCYWbyTKJkSltXVzBtHyHKTEY+t7xPt0wZ8XW
-Cc: linaro-kernel at lists.linaro.org, linaro-dev at lists.linaro.org,
- patches at linaro.org,
- =?UTF-8?q?Enric=20Balletb=C3=B2=20i=20Serra?= <eballetbo at gmail.com>,
- Russell King <linux at arm.linux.org.uk>,
- Javier Martinez Canillas <javier at dowhile0.org>, linux-omap at vger.kernel.org,
- linux-arm-kernel at lists.infradead.org
-X-BeenThere: linux-arm-kernel at lists.infradead.org
-X-Mailman-Version: 2.1.14
-Precedence: list
-List-Id: <linux-arm-kernel.lists.infradead.org>
-List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, 
- <mailto:linux-arm-kernel-request at lists.infradead.org?subject=unsubscribe>
-List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
-List-Post: <mailto:linux-arm-kernel at lists.infradead.org>
-List-Help: <mailto:linux-arm-kernel-request at lists.infradead.org?subject=help>
-List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, 
- <mailto:linux-arm-kernel-request at lists.infradead.org?subject=subscribe>
-MIME-Version: 1.0
-Content-Type: text/plain; charset="us-ascii"
-Content-Transfer-Encoding: 7bit
-Sender: linux-arm-kernel-bounces at lists.infradead.org
-Errors-To: linux-arm-kernel-bounces+thomas.petazzoni=free-electrons.com at lists.infradead.org
-
-IGEP-based boards can have two different flash memories, a OneNAND or
-a NAND device. The boot configuration pins (sys_boot) are used to
-specify which memory is available.
-
-Also, this patch removes unnecesary code for registering the OneNAND.
-
-Signed-off-by: Javier Martinez Canillas <javier at dowhile0.org>
----
- arch/arm/mach-omap2/board-igep0020.c |   75 ++++++++++++++--------------------
- 1 files changed, 31 insertions(+), 44 deletions(-)
-
-diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
-index 930c0d3..4af615a 100644
---- a/arch/arm/mach-omap2/board-igep0020.c
-+++ b/arch/arm/mach-omap2/board-igep0020.c
-@@ -24,6 +24,8 @@
- #include <linux/i2c/twl.h>
- #include <linux/mmc/host.h>
- 
-+#include <linux/mtd/nand.h>
-+
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
- 
-@@ -39,6 +41,8 @@
- #include "hsmmc.h"
- #include "sdram-numonyx-m65kxxxxam.h"
- #include "common-board-devices.h"
-+#include "board-flash.h"
-+#include "control.h"
- 
- #define IGEP2_SMSC911X_CS       5
- #define IGEP2_SMSC911X_GPIO     176
-@@ -60,6 +64,10 @@
- #define IGEP3_GPIO_LED1_RED	16
- #define IGEP3_GPIO_USBH_NRESET  183
- 
-+#define IGEP_SYSBOOT_MASK           0x1f
-+#define IGEP_SYSBOOT_NAND           0x0f
-+#define IGEP_SYSBOOT_ONENAND        0x10
-+
- /*
-  * IGEP2 Hardware Revision Table
-  *
-@@ -110,8 +118,10 @@ static void __init igep2_get_revision(void)
- 	gpio_free(IGEP2_GPIO_LED1_RED);
- }
- 
--#if defined(CONFIG_MTD_ONENAND_OMAP2) || \
--	defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
-+#if defined(CONFIG_MTD_ONENAND_OMAP2) ||		\
-+	defined(CONFIG_MTD_ONENAND_OMAP2_MODULE) ||	\
-+	defined(CONFIG_MTD_NAND_OMAP2) ||		\
-+	defined(CONFIG_MTD_NAND_OMAP2_MODULE)
- 
- #define ONENAND_MAP             0x20000000
- 
-@@ -123,7 +133,7 @@ static void __init igep2_get_revision(void)
-  * So MTD regards it as 4KiB page size and 256KiB block size 64*(2*2048)
-  */
- 
--static struct mtd_partition igep_onenand_partitions[] = {
-+static struct mtd_partition igep_flash_partitions[] = {
- 	{
- 		.name           = "X-Loader",
- 		.offset         = 0,
-@@ -151,50 +161,27 @@ static struct mtd_partition igep_onenand_partitions[] = {
- 	},
- };
- 
--static struct omap_onenand_platform_data igep_onenand_data = {
--	.parts = igep_onenand_partitions,
--	.nr_parts = ARRAY_SIZE(igep_onenand_partitions),
--	.dma_channel	= -1,	/* disable DMA in OMAP OneNAND driver */
--};
--
--static struct platform_device igep_onenand_device = {
--	.name		= "omap2-onenand",
--	.id		= -1,
--	.dev = {
--		.platform_data = &igep_onenand_data,
--	},
--};
-+static inline u32 igep_get_sysboot_value(void)
-+{
-+	return omap_ctrl_readl(OMAP343X_CONTROL_STATUS) & IGEP_SYSBOOT_MASK;
-+}
- 
- static void __init igep_flash_init(void)
- {
--	u8 cs = 0;
--	u8 onenandcs = GPMC_CS_NUM + 1;
--
--	for (cs = 0; cs < GPMC_CS_NUM; cs++) {
--		u32 ret;
--		ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG1);
--
--		/* Check if NAND/oneNAND is configured */
--		if ((ret & 0xC00) == 0x800)
--			/* NAND found */
--			pr_err("IGEP: Unsupported NAND found\n");
--		else {
--			ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG7);
--			if ((ret & 0x3F) == (ONENAND_MAP >> 24))
--				/* ONENAND found */
--				onenandcs = cs;
--		}
--	}
--
--	if (onenandcs > GPMC_CS_NUM) {
--		pr_err("IGEP: Unable to find configuration in GPMC\n");
--		return;
--	}
--
--	igep_onenand_data.cs = onenandcs;
--
--	if (platform_device_register(&igep_onenand_device) < 0)
--		pr_err("IGEP: Unable to register OneNAND device\n");
-+	u32 mux;
-+	mux = igep_get_sysboot_value();
-+
-+	if (mux == IGEP_SYSBOOT_NAND) {
-+		pr_info("IGEP: initializing NAND memory device\n");
-+		board_nand_init(igep_flash_partitions,
-+				ARRAY_SIZE(igep_flash_partitions),
-+				0, NAND_BUSWIDTH_16);
-+	} else if (mux == IGEP_SYSBOOT_ONENAND) {
-+		pr_info("IGEP: initializing OneNAND memory device\n");
-+		board_onenand_init(igep_flash_partitions,
-+				   ARRAY_SIZE(igep_flash_partitions), 0);
-+	} else
-+		pr_err("IGEP: Flash: unsupported sysboot sequence found\n");
- }
- 
- #else
--- 
-1.7.7.6
-
-
-_______________________________________________
-linux-arm-kernel mailing list
-linux-arm-kernel at lists.infradead.org
-http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
diff --git a/lab-data/sysdev/kernel/linux-3.2-omap2-make-board-onenand-init-visible-to-board-code.patch b/lab-data/sysdev/kernel/linux-3.2-omap2-make-board-onenand-init-visible-to-board-code.patch
deleted file mode 100644
index ad7fd3f..0000000
--- a/lab-data/sysdev/kernel/linux-3.2-omap2-make-board-onenand-init-visible-to-board-code.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-Return-Path: <linux-arm-kernel-bounces+thomas.petazzoni=free-electrons.com at lists.infradead.org>
-Delivered-To: thomas.petazzoni at free-electrons.com
-Received: by mail.free-electrons.com (Postfix, from userid 106)
-	id E8A021AE; Wed,  4 Apr 2012 20:37:20 +0200 (CEST)
-X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
-	mail.free-electrons.com
-X-Spam-Level: 
-X-Spam-Status: No, score=-5.6 required=1.0 tests=AWL,BAYES_00,
-	RCVD_IN_DNSWL_MED,T_RP_MATCHES_RCVD shortcircuit=no autolearn=ham
-	version=3.3.1
-Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134])
-	by mail.free-electrons.com (Postfix) with ESMTPS id 675E912A
-	for <thomas.petazzoni at free-electrons.com>; Wed,  4 Apr 2012 20:37:10 +0200 (CEST)
-Received: from localhost ([::1] helo=merlin.infradead.org)
-	by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux))
-	id 1SFV56-0000So-HZ; Wed, 04 Apr 2012 18:37:20 +0000
-Received: from mail-wg0-f49.google.com ([74.125.82.49])
- by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux))
- id 1SFV4z-0000SE-Vl
- for linux-arm-kernel at lists.infradead.org; Wed, 04 Apr 2012 18:37:14 +0000
-Received: by wgbdr1 with SMTP id dr1so360083wgb.18
- for <linux-arm-kernel at lists.infradead.org>;
- Wed, 04 Apr 2012 11:37:11 -0700 (PDT)
-X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
- d=google.com; s=20120113;
- h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state;
- bh=mdT8MBLbu5vw3Ql0o0yVv1r64XWPIi+xvTrNokfOiWA=;
- b=IV+U/1wZPNM0KJBnMjpm8MCBSR9A9ecoEROQocd6NIBvYGLJzFNma80F7DxMxpYzWt
- xMBzsTddxDv4glHCZ0s+2mauK1n3ckO3fb6BBTet315X0Jj+HHH31/2qSBdDO7V1ZJBW
- flOKTi75/BJIeeqHQbFOHCfsD6ewRF3gFDUoZLRzFjqPTgjKPbttJICIJOsp8mndR9ju
- CqheaFFl0p+whKwnD1st7Rs/CIaSM6ZSpK+Ts8AOhKtAHWnPNcQAgubILz0dj27bIzf+
- KBq4pFDk0vzX5ZeM2cw2gCkUHRtF5Ro50Q6qmH7QmmUeTbJns2oMi8hVucxoLKY3t7x9
- sduA==
-Received: by 10.180.91.10 with SMTP id ca10mr7711191wib.17.1333564631490;
- Wed, 04 Apr 2012 11:37:11 -0700 (PDT)
-Received: from localhost.localdomain ([188.77.211.255])
- by mx.google.com with ESMTPS id 17sm7060020wis.0.2012.04.04.11.37.09
- (version=TLSv1/SSLv3 cipher=OTHER);
- Wed, 04 Apr 2012 11:37:10 -0700 (PDT)
-From: Javier Martinez Canillas <javier at dowhile0.org>
-To: Tony Lindgren <tony at atomide.com>
-Subject: [RESEND PATCH 1/2] ARM: OMAP2+: nand: Make board_onenand_init()
- visible to board code
-Date: Wed,  4 Apr 2012 20:36:25 +0200
-Message-Id: <1333564586-3259-1-git-send-email-javier at dowhile0.org>
-X-Mailer: git-send-email 1.7.7.6
-X-Gm-Message-State: ALoCoQmIk8aNDreTL/tiYHZ34Wduf7Br1GODPnocJLk8FAD3+IJjWdVzHn0i7wAfChtd6IEQ5nbj
-Cc: linaro-kernel at lists.linaro.org, linaro-dev at lists.linaro.org,
- patches at linaro.org,
- =?UTF-8?q?Enric=20Balletb=C3=B2=20i=20Serra?= <eballetbo at gmail.com>,
- Russell King <linux at arm.linux.org.uk>,
- Javier Martinez Canillas <javier at dowhile0.org>, linux-omap at vger.kernel.org,
- linux-arm-kernel at lists.infradead.org
-X-BeenThere: linux-arm-kernel at lists.infradead.org
-X-Mailman-Version: 2.1.14
-Precedence: list
-List-Id: <linux-arm-kernel.lists.infradead.org>
-List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, 
- <mailto:linux-arm-kernel-request at lists.infradead.org?subject=unsubscribe>
-List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
-List-Post: <mailto:linux-arm-kernel at lists.infradead.org>
-List-Help: <mailto:linux-arm-kernel-request at lists.infradead.org?subject=help>
-List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, 
- <mailto:linux-arm-kernel-request at lists.infradead.org?subject=subscribe>
-MIME-Version: 1.0
-Content-Type: text/plain; charset="us-ascii"
-Content-Transfer-Encoding: 7bit
-Sender: linux-arm-kernel-bounces at lists.infradead.org
-Errors-To: linux-arm-kernel-bounces+thomas.petazzoni=free-electrons.com at lists.infradead.org
-
-board_onenand_init() and board_nand_init() initialization functions are
-used to initialize OneNAND and NAND memories respectively. But only
-board_nand_init() was visible to be used from board code. This patch makes
-possible to initialize a OneNAND flash memory within platform code.
-
-Signed-off-by: Javier Martinez Canillas <javier at dowhile0.org>
----
- arch/arm/mach-omap2/board-flash.c |    4 ++--
- arch/arm/mach-omap2/board-flash.h |   11 +++++++++++
- 2 files changed, 13 insertions(+), 2 deletions(-)
-
-diff --git a/arch/arm/mach-omap2/board-flash.c b/arch/arm/mach-omap2/board-flash.c
-index 0349fd2..70a81f9 100644
---- a/arch/arm/mach-omap2/board-flash.c
-+++ b/arch/arm/mach-omap2/board-flash.c
-@@ -87,7 +87,7 @@ static struct omap_onenand_platform_data board_onenand_data = {
- 	.dma_channel	= -1,   /* disable DMA in OMAP OneNAND driver */
- };
- 
--static void
-+void
- __init board_onenand_init(struct mtd_partition *onenand_parts,
- 				u8 nr_parts, u8 cs)
- {
-@@ -98,7 +98,7 @@ __init board_onenand_init(struct mtd_partition *onenand_parts,
- 	gpmc_onenand_init(&board_onenand_data);
- }
- #else
--static void
-+void
- __init board_onenand_init(struct mtd_partition *nor_parts, u8 nr_parts, u8 cs)
- {
- }
-diff --git a/arch/arm/mach-omap2/board-flash.h b/arch/arm/mach-omap2/board-flash.h
-index d25503a..c44b70d 100644
---- a/arch/arm/mach-omap2/board-flash.h
-+++ b/arch/arm/mach-omap2/board-flash.h
-@@ -47,3 +47,14 @@ static inline void board_nand_init(struct mtd_partition *nand_parts,
- {
- }
- #endif
-+
-+#if defined(CONFIG_MTD_ONENAND_OMAP2) || \
-+		defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
-+extern void board_onenand_init(struct mtd_partition *nand_parts,
-+					u8 nr_parts, u8 cs);
-+#else
-+static inline void board_onenand_init(struct mtd_partition *nand_parts,
-+					u8 nr_parts, u8 cs)
-+{
-+}
-+#endif
--- 
-1.7.7.6
-
-
-_______________________________________________
-linux-arm-kernel mailing list
-linux-arm-kernel at lists.infradead.org
-http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
diff --git a/labs/sysdev-u-boot/flash-map.dia b/labs/sysdev-kernel-cross-compiling/flash-map.dia
similarity index 82%
copy from labs/sysdev-u-boot/flash-map.dia
copy to labs/sysdev-kernel-cross-compiling/flash-map.dia
index dfa1f2d..f11bbf0 100644
--- a/labs/sysdev-u-boot/flash-map.dia
+++ b/labs/sysdev-kernel-cross-compiling/flash-map.dia
@@ -419,10 +419,10 @@ env#</dia:string>
     </dia:object>
     <dia:object type="Standard - Text" version="1" id="O13">
       <dia:attribute name="obj_pos">
-        <dia:point val="31.2,10.2"/>
+        <dia:point val="32.5,10"/>
       </dia:attribute>
       <dia:attribute name="obj_bb">
-        <dia:rectangle val="31.2,9.7275;31.6875,10.32"/>
+        <dia:rectangle val="32.5,9.5275;32.9875,10.12"/>
       </dia:attribute>
       <dia:attribute name="text">
         <dia:composite type="text">
@@ -436,7 +436,7 @@ env#</dia:string>
             <dia:real val="0.63499997556209564"/>
           </dia:attribute>
           <dia:attribute name="pos">
-            <dia:point val="31.2,10.2"/>
+            <dia:point val="32.5,10"/>
           </dia:attribute>
           <dia:attribute name="color">
             <dia:color val="#000000"/>
@@ -490,5 +490,107 @@ env#</dia:string>
         <dia:color val="#868686"/>
       </dia:attribute>
     </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O16">
+      <dia:attribute name="obj_pos">
+        <dia:point val="29.8,8.2"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="29.75,8.15;29.85,12.0401"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="29.8,8.2"/>
+        <dia:point val="29.8,11.9901"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_color">
+        <dia:color val="#868686"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O17">
+      <dia:attribute name="obj_pos">
+        <dia:point val="28.3,10"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="27.5025,9.70375;29.0975,10.2962"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#Kernel#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="sans" style="0" name="Helvetica"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.63499997556209564"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="28.3,10.1762"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="1"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="2"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Line" version="0" id="O18">
+      <dia:attribute name="obj_pos">
+        <dia:point val="29.8,12"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="29.775,11.975;29.825,12.625"/>
+      </dia:attribute>
+      <dia:attribute name="conn_endpoints">
+        <dia:point val="29.8,12"/>
+        <dia:point val="29.8,12.6"/>
+      </dia:attribute>
+      <dia:attribute name="numcp">
+        <dia:int val="1"/>
+      </dia:attribute>
+      <dia:attribute name="line_width">
+        <dia:real val="0.05000000074505806"/>
+      </dia:attribute>
+    </dia:object>
+    <dia:object type="Standard - Text" version="1" id="O19">
+      <dia:attribute name="obj_pos">
+        <dia:point val="28.8,13"/>
+      </dia:attribute>
+      <dia:attribute name="obj_bb">
+        <dia:rectangle val="28.8,12.6325;30.7,13.095"/>
+      </dia:attribute>
+      <dia:attribute name="text">
+        <dia:composite type="text">
+          <dia:attribute name="string">
+            <dia:string>#0x7e0000#</dia:string>
+          </dia:attribute>
+          <dia:attribute name="font">
+            <dia:font family="monospace" style="0" name="Courier"/>
+          </dia:attribute>
+          <dia:attribute name="height">
+            <dia:real val="0.49388886988162994"/>
+          </dia:attribute>
+          <dia:attribute name="pos">
+            <dia:point val="28.8,13"/>
+          </dia:attribute>
+          <dia:attribute name="color">
+            <dia:color val="#000000"/>
+          </dia:attribute>
+          <dia:attribute name="alignment">
+            <dia:enum val="0"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+      <dia:attribute name="valign">
+        <dia:enum val="3"/>
+      </dia:attribute>
+    </dia:object>
   </dia:layer>
 </dia:diagram>
diff --git a/labs/sysdev-kernel-cross-compiling/sysdev-kernel-cross-compiling.tex b/labs/sysdev-kernel-cross-compiling/sysdev-kernel-cross-compiling.tex
index 12534fb..a111263 100644
--- a/labs/sysdev-kernel-cross-compiling/sysdev-kernel-cross-compiling.tex
+++ b/labs/sysdev-kernel-cross-compiling/sysdev-kernel-cross-compiling.tex
@@ -26,20 +26,11 @@ board.
 \section{Kernel sources}
 
 We will re-use the kernel sources downloaded and patched in the
-previous lab. However, we will have to apply two additional patches
-that add NAND support for the IGEPv2 revision 6 board that we are
-using in this course:
-
-\small
-\begin{verbatim}
-cat ../linux-3.2-omap2-make-board-onenand-init-visible-to-board-code.patch | patch -p1
-cat ../linux-3.2-arm-omap3-igep0020-add-support-for-micron-nand-flash.patch | patch -p1
-\end{verbatim}
-\normalsize
+previous lab.
 
 \section{Cross-compiling environment setup}
 
-To cross-compile Linux, you need to install the cross-compiling
+To cross-compile Linux, you need to have a cross-compiling
 toolchain. We will use the cross-compiling toolchain that we
 previously produced, so we just need to make it available in the PATH:
 
@@ -94,9 +85,12 @@ tool has already been installed in your system as part of the
 the kernel image, simply run:
 
 \begin{verbatim}
-make uImage
+make LOADADDR=0x80008000 uImage
 \end{verbatim}
 
+The \code{LOADADDR} indicates to U-Boot where the kernel image should
+be loaded.
+
 \section{Setting up serial communication with the board}
 
 Plug the IGEP board on your computer. Start Picocom on
@@ -161,15 +155,19 @@ be manipulated in U-Boot using the \code{nand} command, which
 features several subcommands. Run \code{help nand} to see the
 available subcommands and their options.
 
-After storing the X-loader, U-boot and its environment variables, we
-will keep a special area in NAND flash for the Linux kernel image.
-This 4th partition will be 4 MiB big, from NAND offset
-0x280000 to 0x680000.
+After storing the first stage bootloader, U-boot and its environment
+variables, we will keep a special area in NAND flash for the Linux
+kernel image.  This 4th partition will be 5 MiB big, from NAND offset
+0x2e0000 to 0x7e0000.
+
+\begin{center}
+  \includegraphics[width=\textwidth]{labs/sysdev-kernel-cross-compiling/flash-map.pdf}
+\end{center}
 
-So, let's start by erasing the corresponding 4 MiB of NAND flash:
+So, let's start by erasing the corresponding 5 MiB of NAND flash:
 
 \begin{verbatim}
-nand erase 0x280000 0x400000
+nand erase 0x2e0000 0x500000
         (NAND offset) (size)
 \end{verbatim}
 
@@ -179,21 +177,21 @@ before.
 Then, flash the kernel image:
 
 \begin{verbatim}
-nand write 0x80000000 0x280000 0x400000
+nand write 0x80000000 0x2e0000 0x500000
            (RAM addr) (NAND offset) (size)
 \end{verbatim}
 
-Power your board off and on, to clear RAM contents. We should now be able to load
-the kernel image from NAND and boot it using:
+Power your board off and on, to clear RAM contents. We should now be
+able to load the kernel image from NAND and boot it using:
 
 \begin{verbatim}
-nand read 0x80000000  0x280000    0x400000
-          (RAM addr) (NAND offset) (size)
+nboot 0x80000000 0        0x2e0000
+      (RAM addr) (device) (NAND offset)
 bootm 0x80000000
 \end{verbatim}
 
-\code{nand read} copies the kernel to RAM and then, \code{bootm}
-executes it.
+\code{nboot} copies the kernel to RAM and then, \code{bootm} executes
+it.
 
 Write an U-Boot script that automates the kernel download and flashing
 procedure. Finally, adjust the \code{bootcmd} so that the IGEP board
diff --git a/labs/sysdev-kernel-fetch-and-patch/sysdev-kernel-fetch-and-patch.tex b/labs/sysdev-kernel-fetch-and-patch/sysdev-kernel-fetch-and-patch.tex
index a4b0c04..37b1612 100644
--- a/labs/sysdev-kernel-fetch-and-patch/sysdev-kernel-fetch-and-patch.tex
+++ b/labs/sysdev-kernel-fetch-and-patch/sysdev-kernel-fetch-and-patch.tex
@@ -19,10 +19,10 @@ identify the latest stable version.
 Just to make sure you know how to do it, check the version of the
 Linux kernel running on your machine.
 
-We will use \code{linux-3.2.x}, which this lab was tested with.
+We will use \code{linux-3.9.x}, which this lab was tested with.
 
-To practice the patch command later, download the full 3.1
-sources. Unpack the archive, which creates a \code{linux-3.1}
+To practice the patch command later, download the full 3.8
+sources. Unpack the archive, which creates a \code{linux-3.8}
 directory. Remember that you can use \code{wget <URL>} on the command
 line to download files.
 
@@ -35,9 +35,9 @@ manager, or using the following command line:
 sudo apt-get install patch
 \end{verbatim}
 
-Download the 2 patch files corresponding to the latest 3.2 stable
-release: a first patch to move from 3.1 to 3.2 and a second patch to
-move from 3.2 to 3.2.x.
+Download the 2 patch files corresponding to the latest 3.9 stable
+release: a first patch to move from 3.8 to 3.9 and a second patch to
+move from 3.9 to 3.9.x.
 
 Without uncompressing them (!), apply the 2 patches to the Linux
 source directory.
@@ -46,4 +46,4 @@ View one of the 2 patch files with vi or gvim (if you prefer a
 graphical editor), to understand the information carried by such a
 file. How are described added or removed files?
 
-Rename the \code{linux-3.1} directory to \code{linux-3.2.<x>}.
+Rename the \code{linux-3.8} directory to \code{linux-3.9.<x>}.



More information about the training-materials-updates mailing list