summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2016-09-20 16:14:19 -0700
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2018-02-01 15:14:20 +0100
commitcd8f8265f33ddfbbc31d2abbaf8e2e3e8896fcba (patch)
tree30daf71c3e19dd1c0973c1134c9730860785cb51
parentaff98abb944751fd08592556e0609063d3b7955c (diff)
colibri_imx7: split and resize firmware MTD partition
Use two separate partitions for the two firmware instances. Also resize them to be of the same size which also makes the start of the UBI partition nicely aligned to 0x400000. In order to detect the new MTD layout and whether we run a U-Boot with the new BCB format or not, introduce a variable called "updlevel" which we can use in update/upgrade scripts. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
-rw-r--r--include/configs/colibri_imx7.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/configs/colibri_imx7.h b/include/configs/colibri_imx7.h
index 621a4d0cb3..2fe2422045 100644
--- a/include/configs/colibri_imx7.h
+++ b/include/configs/colibri_imx7.h
@@ -257,6 +257,7 @@
"fatload ${interface} 0:1 ${loadaddr} " \
"${board}/flash_blk.img && source ${loadaddr}\0" \
"splashpos=m,m\0" \
+ "updlevel=1\0" \
/* Miscellaneous configurable options */
#define CONFIG_SYS_LONGHELP
@@ -334,7 +335,8 @@
#define MTDIDS_DEFAULT "nand0=gpmi-nand"
#define MTDPARTS_DEFAULT "mtdparts=gpmi-nand:" \
"512k(mx7-bcb)," \
- "3584k(u-boot)ro," \
+ "1536k(u-boot1)ro," \
+ "1536k(u-boot2)ro," \
"512k(u-boot-env)," \
"-(ubi)"
@@ -348,8 +350,8 @@
#define CONFIG_ENV_OFFSET (8 * SZ_64K)
#elif defined(CONFIG_ENV_IS_IN_NAND)
#undef CONFIG_ENV_SIZE
-#define CONFIG_ENV_OFFSET (4 * 1024 * 1024)
#define CONFIG_ENV_SECT_SIZE (128 * 1024)
+#define CONFIG_ENV_OFFSET (28 * CONFIG_ENV_SECT_SIZE)
#define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE
#endif