[U-Boot] [PATCH v3 10/16] colibri_t20: enable mtdparts support
Marcel Ziswiler
marcel at ziswiler.com
Thu Aug 6 00:47:07 CEST 2015
From: Marcel Ziswiler <marcel.ziswiler at toradex.com>
Enable mtdparts aka dynamic MTD partition support.
Signed-off-by: Marcel Ziswiler <marcel.ziswiler at toradex.com>
Reviewed-by: Simon Glass <sjg at chromium.org>
Acked-by: Stephen Warren <swarren at nvidia.com>
---
Changes in v2:
Actually set mtdparts environment variable as part of the board extra ones.
include/configs/colibri_t20.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/include/configs/colibri_t20.h b/include/configs/colibri_t20.h
index 2eb043a..7c16e7b 100644
--- a/include/configs/colibri_t20.h
+++ b/include/configs/colibri_t20.h
@@ -63,6 +63,17 @@
#define CONFIG_TEGRA_NAND
#define CONFIG_SYS_MAX_NAND_DEVICE 1
+/* Dynamic MTD partition support */
+#define CONFIG_CMD_MTDPARTS /* Enable 'mtdparts' command line support */
+#define CONFIG_MTD_PARTITIONS
+#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
+#define MTDIDS_DEFAULT "nand0=tegra_nand"
+#define MTDPARTS_DEFAULT "mtdparts=tegra_nand:" \
+ "2m(u-boot)ro," \
+ "1m(u-boot-env)," \
+ "1m(cfgblock)ro," \
+ "-(ubi)"
+
/* Environment in NAND, 64K is a bit excessive but erase block is 512K anyway */
#define CONFIG_ENV_IS_IN_NAND
#define CONFIG_ENV_OFFSET (SZ_2M)
@@ -75,6 +86,9 @@
/* Miscellaneous commands */
#define CONFIG_FAT_WRITE
+#define BOARD_EXTRA_ENV_SETTINGS \
+ "mtdparts=" MTDPARTS_DEFAULT "\0"
+
/* Increase console I/O buffer size */
#undef CONFIG_SYS_CBSIZE
#define CONFIG_SYS_CBSIZE 1024
--
2.4.3
More information about the U-Boot
mailing list