From: Ash Charles <ashcharles@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [Patch v2 2/9] OMAP3: overo: add command support for mtd and ubi
Date: Wed, 21 May 2014 14:04:48 -0700 [thread overview]
Message-ID: <1400706295-31871-3-git-send-email-ashcharles@gmail.com> (raw)
In-Reply-To: <1400706295-31871-1-git-send-email-ashcharles@gmail.com>
The NAND linux partition format default was changed from jffs2 to ubi in
254973e6df0e48f1a72b67905185c774dcd9f394 but the corresponding commands were
not enabled.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Tested-by: Ash Charles <ash@gumstix.com>
---
include/configs/omap3_overo.h | 40 +++++++++++++++++++++++++++++++++++++---
1 file changed, 37 insertions(+), 3 deletions(-)
diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h
index f26d069..7823aa1 100644
--- a/include/configs/omap3_overo.h
+++ b/include/configs/omap3_overo.h
@@ -43,9 +43,11 @@
/*
* Size of malloc() pool
*/
-#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */
- /* Sector */
-#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10))
+#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB sector */
+
+/* Shift 128 << 15 provides 4 MiB heap to support UBI commands.
+ * Shift 128 << 10 provides 128 KiB heap for limited-memory devices. */
+#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 15))
/*
* Hardware drivers
@@ -97,6 +99,37 @@
#undef CONFIG_CMD_NFS /* NFS support */
#define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
+#ifdef CONFIG_CMD_NAND
+
+#define CONFIG_CMD_MTDPARTS /* MTD partition support */
+#define CONFIG_CMD_UBI /* UBI-formated MTD partition support */
+#define CONFIG_CMD_UBIFS /* Read-only UBI volume operations */
+
+#define CONFIG_RBTREE /* required by CONFIG_CMD_UBI */
+#define CONFIG_LZO /* required by CONFIG_CMD_UBIFS */
+
+#define CONFIG_MTD_DEVICE /* required by CONFIG_CMD_MTDPARTS */
+#define CONFIG_MTD_PARTITIONS /* required for UBI partition support */
+
+/* NAND block size is 128 KiB. Synchronize these values with
+ * overo_nand_partitions in mach-omap2/board-overo.c in Linux:
+ * xloader 4 * NAND_BLOCK_SIZE = 512 KiB
+ * uboot 14 * NAND_BLOCK_SIZE = 1792 KiB
+ * uboot environtment 2 * NAND_BLOCK_SIZE = 256 KiB
+ * linux 32 * NAND_BLOCK_SIE = 4 MiB
+ * rootfs remainder
+ */
+#define MTDIDS_DEFAULT "nand0=omap2-nand.0"
+#define MTDPARTS_DEFAULT "mtdparts=omap2-nand.0:" \
+ "512k(xloader)," \
+ "1792k(u-boot)," \
+ "256k(environ)," \
+ "4m(linux)," \
+ "-(rootfs)"
+#else /* CONFIG_CMD_NAND */
+#define MTDPARTS_DEFAULT
+#endif /* CONFIG_CMD_NAND */
+
#define CONFIG_SYS_NO_FLASH
#define CONFIG_SYS_I2C
#define CONFIG_SYS_OMAP24_I2C_SPEED 100000
@@ -145,6 +178,7 @@
"mmcrootfstype=ext3 rootwait\0" \
"nandroot=ubi0:rootfs ubi.mtd=4\0" \
"nandrootfstype=ubifs\0" \
+ "mtdparts=" MTDPARTS_DEFAULT "\0" \
"mmcargs=setenv bootargs console=${console} " \
"${optargs} " \
"mpurate=${mpurate} " \
--
1.8.3.2
next prev parent reply other threads:[~2014-05-21 21:04 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-29 23:15 [U-Boot] [PATCH 0/8] omap3: overo: update board data Ash Charles
2014-04-29 23:15 ` [U-Boot] [PATCH 1/8] omap: overo: allow the use of a plain text env file instead boot scripts Ash Charles
2014-04-29 23:15 ` [U-Boot] [PATCH 2/8] OMAP3: overo: add command support for mtd and ubi Ash Charles
2014-04-29 23:15 ` [U-Boot] [PATCH 3/8] OMAP3: overo: increase linux partition to 8 MiB Ash Charles
2014-04-29 23:15 ` [U-Boot] [PATCH 4/8] OMAP3: overo: eliminate hard-coded partition offsets Ash Charles
2014-04-29 23:15 ` [U-Boot] [PATCH 5/8] arm: omap3: Fix omap3_overo SPL boot hangup Ash Charles
2014-04-29 23:15 ` [U-Boot] [PATCH 6/8] [omap3][overo] Add Board Revision for Wireless chip Ash Charles
2014-04-29 23:15 ` [U-Boot] [PATCH 7/8] OMAP3: overo: add some Gumstix expansion boards Ash Charles
2014-04-29 23:15 ` [U-Boot] [PATCH 8/8] [omap3][overo] Allow overo to boot with device tree Ash Charles
2014-05-06 18:14 ` Tom Rini
2014-05-06 23:56 ` Ash Charles
2014-05-07 12:40 ` Tom Rini
2014-05-07 17:45 ` Ash Charles
2014-05-07 17:47 ` [U-Boot] [PATCH] omap3: overo: Use common configurations for Overo Ash Charles
2014-05-20 17:34 ` [U-Boot] [PATCH 8/8] [omap3][overo] Allow overo to boot with device tree Stefan Herbrechtsmeier
2014-05-21 20:16 ` Ash Charles
2014-05-21 21:04 ` [U-Boot] [Patch v2 0/9] omap3: overo: update board data Ash Charles
2014-05-21 21:04 ` [U-Boot] [Patch v2 1/9] omap: overo: allow the use of a plain text env file instead boot scripts Ash Charles
2014-05-23 23:50 ` [U-Boot] [U-Boot, v2, " Tom Rini
2014-05-21 21:04 ` Ash Charles [this message]
2014-05-23 23:50 ` [U-Boot] [U-Boot, v2, 2/9] OMAP3: overo: add command support for mtd and ubi Tom Rini
2014-05-21 21:04 ` [U-Boot] [Patch v2 3/9] OMAP3: overo: increase linux partition to 8 MiB Ash Charles
2014-05-23 23:51 ` [U-Boot] [U-Boot, v2, " Tom Rini
2014-05-21 21:04 ` [U-Boot] [Patch v2 4/9] OMAP3: overo: eliminate hard-coded partition offsets Ash Charles
2014-05-23 23:51 ` [U-Boot] [U-Boot, v2, " Tom Rini
2014-05-21 21:04 ` [U-Boot] [Patch v2 5/9] arm: omap3: Fix omap3_overo SPL boot hangup Ash Charles
2014-05-23 23:51 ` [U-Boot] [U-Boot, v2, " Tom Rini
2014-05-21 21:04 ` [U-Boot] [Patch v2 6/9] [omap3][overo] Add Board Revision for Wireless chip Ash Charles
2014-05-23 23:51 ` [U-Boot] [U-Boot, v2, 6/9, omap3, overo] " Tom Rini
2014-05-21 21:04 ` [U-Boot] [Patch v2 7/9] OMAP3: overo: add some Gumstix expansion boards Ash Charles
2014-05-23 23:51 ` [U-Boot] [U-Boot, v2, " Tom Rini
2014-05-21 21:04 ` [U-Boot] [Patch v2 8/9] [omap3][overo] Allow overo to boot with device tree Ash Charles
2014-05-23 23:51 ` [U-Boot] [U-Boot, v2, 8/9, omap3, overo] " Tom Rini
2014-05-21 21:04 ` [U-Boot] [Patch v2 9/9] omap3: overo: Use common configurations for Overo Ash Charles
2014-05-23 23:51 ` [U-Boot] [U-Boot, v2, " Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1400706295-31871-3-git-send-email-ashcharles@gmail.com \
--to=ashcharles@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox