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.

Signed-off-by: Jean-Jacques Hiblot <jjhib...@ti.com>
---

Sam,

This patch goes a bit further in changing the layout of the MMC than yours. 
However
it doesn't update the GPT partitioning. This would still be needed.

tested on DRA7. DFU updates ok for MMC and eMMC

Jean-Jacques

 include/configs/dra7xx_evm.h      |  2 +-
 include/configs/omap5_uevm.h      |  2 +-
 include/configs/ti_armv7_common.h |  7 ++++---
 include/environment/ti/dfu.h      | 14 ++++++++------
 4 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h
index bce2816..a56c224 100644
--- a/include/configs/dra7xx_evm.h
+++ b/include/configs/dra7xx_evm.h
@@ -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              0x220000
 #define CONFIG_ENV_OFFSET_REDUND       (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
 #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
 #endif
diff --git a/include/configs/omap5_uevm.h b/include/configs/omap5_uevm.h
index 736d804..127776e 100644
--- a/include/configs/omap5_uevm.h
+++ b/include/configs/omap5_uevm.h
@@ -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              0x220000
 #define CONFIG_ENV_OFFSET_REDUND       (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
 #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
 
diff --git a/include/configs/ti_armv7_common.h 
b/include/configs/ti_armv7_common.h
index 905e1ef..4cfa134 100644
--- a/include/configs/ti_armv7_common.h
+++ b/include/configs/ti_armv7_common.h
@@ -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        0x1500  /* address 
0x2A0000 */
+#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR  0x1300  /* address 0x260000 */
+#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS 0x100   /* 128KiB */
+
 
 /* spl export command */
 #define CONFIG_CMD_SPL
diff --git a/include/environment/ti/dfu.h b/include/environment/ti/dfu.h
index caf71a3..63e0ab8 100644
--- a/include/environment/ti/dfu.h
+++ b/include/environment/ti/dfu.h
@@ -12,9 +12,10 @@
        "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;" \
+       "u-boot.img.raw raw 0x300 0xE00;" \
+       "u-env.raw raw 0x1100 0x200;" \
+       "spl-os-args.raw raw 0x1300 0x100;" \
+       "spl-os-image.raw raw 0x1500 0x6B00;" \
        "spl-os-args fat 0 1;" \
        "spl-os-image fat 0 1;" \
        "u-boot.img fat 0 1;" \
@@ -27,9 +28,10 @@
        "rootfs part 1 2;" \
        "MLO fat 1 1;" \
        "MLO.raw raw 0x100 0x100;" \
-       "u-boot.img.raw raw 0x300 0x1000;" \
-       "spl-os-args.raw raw 0x80 0x80;" \
-       "spl-os-image.raw raw 0x900 0x2000;" \
+       "u-boot.img.raw raw 0x300 0xE00;" \
+       "u-env.raw raw 0x1100 0x200;" \
+       "spl-os-args.raw raw 0x1300 0x100;" \
+       "spl-os-image.raw raw 0x1500 0x6B00;" \
        "spl-os-args fat 1 1;" \
        "spl-os-image fat 1 1;" \
        "u-boot.img fat 1 1;" \
-- 
1.9.1

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to