Browse Source

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: Max Krummenacher <max.krummenacher@toradex.com>
Stefan Agner 8 years ago
parent
commit
38045f5447
1 changed files with 4 additions and 2 deletions
  1. 4 2
      include/configs/colibri_imx7.h

+ 4 - 2
include/configs/colibri_imx7.h

@@ -127,6 +127,7 @@
 		"${board}/flash_blk.img && source ${loadaddr}\0" \
 		"${board}/flash_blk.img && source ${loadaddr}\0" \
 	"splashpos=m,m\0" \
 	"splashpos=m,m\0" \
 	"videomode=video=ctfb:x:640,y:480,depth:18,pclk:39722,le:48,ri:16,up:33,lo:10,hs:96,vs:2,sync:0,vmode:0\0" \
 	"videomode=video=ctfb:x:640,y:480,depth:18,pclk:39722,le:48,ri:16,up:33,lo:10,hs:96,vs:2,sync:0,vmode:0\0" \
+	"updlevel=2\0"
 
 
 /* Miscellaneous configurable options */
 /* Miscellaneous configurable options */
 #define CONFIG_SYS_LONGHELP
 #define CONFIG_SYS_LONGHELP
@@ -161,8 +162,8 @@
 #define CONFIG_MMCROOT			"/dev/mmcblk0p2"  /* USDHC1 */
 #define CONFIG_MMCROOT			"/dev/mmcblk0p2"  /* USDHC1 */
 #define CONFIG_ENV_OFFSET		(8 * SZ_64K)
 #define CONFIG_ENV_OFFSET		(8 * SZ_64K)
 #elif defined(CONFIG_ENV_IS_IN_NAND)
 #elif defined(CONFIG_ENV_IS_IN_NAND)
-#define CONFIG_ENV_OFFSET		(4 * 1024 * 1024)
 #define CONFIG_ENV_SECT_SIZE		(128 * 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
 #define CONFIG_ENV_SIZE			CONFIG_ENV_SECT_SIZE
 #endif
 #endif
 
 
@@ -189,7 +190,8 @@
 #define MTDIDS_DEFAULT		"nand0=gpmi-nand"
 #define MTDIDS_DEFAULT		"nand0=gpmi-nand"
 #define MTDPARTS_DEFAULT	"mtdparts=gpmi-nand:"		\
 #define MTDPARTS_DEFAULT	"mtdparts=gpmi-nand:"		\
 				"512k(mx7-bcb),"		\
 				"512k(mx7-bcb),"		\
-				"3584k(u-boot)ro,"		\
+				"1536k(u-boot1)ro,"		\
+				"1536k(u-boot2)ro,"		\
 				"512k(u-boot-env),"		\
 				"512k(u-boot-env),"		\
 				"-(ubi)"
 				"-(ubi)"