Skip to contentSkip to conversation

ARM: ti: Update layout for MMC and eMMC (env and dfu)

PATCH Superseded Jean-Jacques Hiblot 2 participants 2 messages Mar 16, 2017 – Mar 17, 2017

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ARM: ti: Update layout for MMC and eMMC (env and dfu)

The problems with the current DFU layout are:
MMC: The space allocated for u-boot is too small for the latest u-boot
(>750KB). We need to increase it. eMMC uses a much bigger area (2MB).
eMMC: region "u-boot.img.raw" overlaps the environment area and the region

      "spl-os-image.raw".

both: region "spl-os-image.raw" is quite small and can't handle android
kernels

Fixing this requires growing some regions and moving others. Care has been taken to leave some room for further growth of "spl-os-args.raw".
Also the "env" now appears in the dfu so that it's apparent that the region is not free space that can be used to grow "u-boot.img.raw". The total space allocated for those raw binaries is 16MB, of which 13+MB are reserved for the kernel image.

---

changes since v1:
* increased u-boot size to 2MB
* updated CONFIG_ENV_OFFSET in omap5_uevm.h

 include/configs/dra7xx_evm.h      |  2 +-
 include/configs/omap5_uevm.h      |  2 +-
 include/configs/ti_armv7_common.h |  7 ++++---
 include/environment/ti/dfu.h      | 16 +++++++++-------
 4 files changed, 15 insertions(+), 12 deletions(-)
include/configs/dra7xx_evm.h +1 -1
index bce2816..91bf47a 100644
@@ -28,7 +28,7 @@
 #define CONFIG_ENV_IS_IN_MMC
 #define CONFIG_SYS_MMC_ENV_DEV		1	/* SLOT2: eMMC(1) */
 #define CONFIG_ENV_SIZE			(128 << 10)
-#define CONFIG_ENV_OFFSET		0xE0000
+#define CONFIG_ENV_OFFSET		0x260000
 #define CONFIG_ENV_OFFSET_REDUND	(CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
 #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
 #endif
include/configs/omap5_uevm.h +1 -1
index 736d804..cfec434 100644
@@ -38,7 +38,7 @@
 #define CONFIG_ENV_IS_IN_MMC
 #define CONFIG_SYS_MMC_ENV_DEV		1	/* SLOT2: eMMC(1) */
 #define CONFIG_ENV_SIZE			(128 << 10)
-#define CONFIG_ENV_OFFSET		0xE0000
+#define CONFIG_ENV_OFFSET		0x260000
 #define CONFIG_ENV_OFFSET_REDUND	(CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
 #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
 
include/configs/ti_armv7_common.h +4 -3
index 6de7b66..a046e4d 100644
@@ -282,9 +282,10 @@
 #define CONFIG_SPL_FS_LOAD_ARGS_NAME		"args"
 
 /* RAW SD card / eMMC */
-#define CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR	0x900	/* address 0x120000 */
-#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR	0x80	/* address 0x10000 */
-#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS	0x80	/* 64KiB */
+#define CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR	0x1700  /* address 0x2E0000 */
+#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR	0x1500  /* address 0x2A0000 */
+#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS	0x200   /* 256KiB */
+
 
 /* spl export command */
 #define CONFIG_CMD_SPL
include/environment/ti/dfu.h +9 -7
index caf71a3..3111ab5 100644
@@ -11,10 +11,11 @@
 	"boot part 0 1;" \
 	"rootfs part 0 2;" \
 	"MLO fat 0 1;" \
-	"MLO.raw raw 0x100 0x100;" \
-	"u-boot.img.raw raw 0x300 0x400;" \
-	"spl-os-args.raw raw 0x80 0x80;" \
-	"spl-os-image.raw raw 0x900 0x2000;" \
+	"MLO.raw raw 0x100 0x200;" \
+	"u-boot.img.raw raw 0x300 0x1000;" \
+	"u-env.raw raw 0x1300 0x200;" \
+	"spl-os-args.raw raw 0x1500 0x200;" \
+	"spl-os-image.raw raw 0x1700 0x6900;" \
 	"spl-os-args fat 0 1;" \
 	"spl-os-image fat 0 1;" \
 	"u-boot.img fat 0 1;" \
@@ -26,10 +27,11 @@
 	"boot part 1 1;" \
 	"rootfs part 1 2;" \
 	"MLO fat 1 1;" \
-	"MLO.raw raw 0x100 0x100;" \
+	"MLO.raw raw 0x100 0x200;" \
 	"u-boot.img.raw raw 0x300 0x1000;" \
-	"spl-os-args.raw raw 0x80 0x80;" \
-	"spl-os-image.raw raw 0x900 0x2000;" \
+	"u-env.raw raw 0x1300 0x200;" \
+	"spl-os-args.raw raw 0x1500 0x200;" \
+	"spl-os-image.raw raw 0x1700 0x6900;" \
 	"spl-os-args fat 1 1;" \
 	"spl-os-image fat 1 1;" \
 	"u-boot.img fat 1 1;" \
Signature · 1 line
1.9.1
#1 lore raw

PATCH v2 1/1 ARM: ti: Update layout for MMC and eMMC (env and dfu)

Quoted 15 lines · Jean-Jacques Hiblot

The problems with the current DFU layout are:
MMC: The space allocated for u-boot is too small for the latest u-boot
(>750KB). We need to increase it. eMMC uses a much bigger area (2MB).
eMMC: region "u-boot.img.raw" overlaps the environment area and the region

      "spl-os-image.raw".

both: region "spl-os-image.raw" is quite small and can't handle android
kernels

Fixing this requires growing some regions and moving others. Care has been taken to leave some room for further growth of "spl-os-args.raw".
Also the "env" now appears in the dfu so that it's apparent that the region is not free space that can be used to grow "u-boot.img.raw". The total space allocated for those raw binaries is 16MB, of which 13+MB are reserved for the kernel image.

[snip]

include/environment/ti/dfu.h line 18

Quoted 9 lines
include/environment/ti/dfu.h +5 -4
-	"MLO.raw raw 0x100 0x100;" \
-	"u-boot.img.raw raw 0x300 0x400;" \
-	"spl-os-args.raw raw 0x80 0x80;" \
-	"spl-os-image.raw raw 0x900 0x2000;" \
+	"MLO.raw raw 0x100 0x200;" \
+	"u-boot.img.raw raw 0x300 0x1000;" \
+	"u-env.raw raw 0x1300 0x200;" \
+	"spl-os-args.raw raw 0x1500 0x200;" \
+	"spl-os-image.raw raw 0x1700 0x6900;" \

I'm not sure about changing the MLO raw size. The first TRM I checked (am335x) does say that you can exceed 128KiB with the drawback being that redundancy into the following location is lost. But we need to take care in that we still have SRAM size constraints to deal with. I think we should leave MLO.raw alone for now. Thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170317/b4724304/attachment.sig>