]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
ARM: ti: Update layout for MMC and eMMC (env and dfu)
authorJean-Jacques Hiblot <jjhiblot@ti.com>
Wed, 24 May 2017 10:08:27 +0000 (12:08 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 5 Jun 2017 18:13:10 +0000 (14:13 -0400)
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 MLO region is 0x100 sectors wide but the 0x100 are unused in case the
MLO comes too overflow this areas.
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 <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
include/configs/dra7xx_evm.h
include/configs/omap5_uevm.h
include/configs/ti_armv7_common.h
include/environment/ti/dfu.h

index 17608a54cd9dd3f1e01b9e0c37c234ad5ca561b8..71c9d82791e38178e9bad0e2f0338311a0d4552e 100644 (file)
@@ -27,7 +27,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
index d8b0c023b94b23435b6199a5be3549d01a4b36cf..e7fac6d1e1e57af7dfa2655bb92ab2880cb983ea 100644 (file)
@@ -37,7 +37,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
 
index 5321ed6b091978fae9ae6c196138d554a301007c..a4676d3a7ffb98d896d562172ef6941700b6135c 100644 (file)
 #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
index caf71a3fe63071ad886d1720eb954050b623849a..c9f61a577ec2fec5e896fe3f3eed39caf78ed28a 100644 (file)
        "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 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;" \
@@ -28,8 +29,9 @@
        "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-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;" \